Top WooCommerce & WordPress Plugins › Forums › Product Price by Quantity for WooCommerce › DOM structure change
- Support forum for the Dynamic Pricing & Bulk Quantity Discounts.
- This topic has 8 replies, 3 voices, and was last updated 4 months, 3 weeks ago by
Tom Anbinder.
- AuthorPosts
-
April 4, 2023 at 2:57 pm #112603
Mathias Jouan
ParticipantHi,
There’s an issue with your plugin. I can see by inspecting the page that, on a product that has a tiered price, the DOM structure is different. The div that contains the class “nectar-prod-wrap” has multiple children, although for a product that doesn’t have tiered pricing, this same div has only two children (which is the normal behaviour).
See those screenshots:
https://drive.google.com/drive/folders/1ZBE2bqwE-hSth3xLP0dbV_3bovMCIPZH?usp=share_linkDon’t hesitate to follow up this conversation by email if you want admin credentials for our website.
BR,
Clara.
- This topic was modified 5 months, 3 weeks ago by
Mathias Jouan.
April 5, 2023 at 4:19 pm #112682Hi Marthias,
Thank you for bringing this issue to our attention.
I have escalated this to our development team for further investigation. They will be reviewing the screenshots you provided and working on a solution as soon as possible.
Thank you for your patience and cooperation in resolving this matter. If you have any additional concerns, please do not hesitate to reach out to us.
Thank you for your patience and understanding.
Kind regards,
MoshtafizurApril 6, 2023 at 11:40 am #112747Hi Clara,
It looks like an extra closing
</div>
somewhere in the plugin’s “Info” settings section probably.… if you want admin credentials for our website.
Please send it to [email protected].
April 7, 2023 at 9:01 am #112793Mathias Jouan
ParticipantHi,
You’re right, that’s indeed a mistake in the info section. The problem is that I can’t find where it comes precisely.
I know it comes from this part in Info > Discount Pricing Table > Template for non-variable products:
[alg_wc_product_wholesale_pricing_data field="price" price_format="%price%" level_num="1" before="<div class='tiered-pricing-container'><h3>Offre dégressive</h3>" after=" par "][alg_wc_product_wholesale_pricing_data field="quantity" level_num="1" after=" <span class='tiered-pricing-discount'>-"][alg_wc_product_wholesale_pricing_data level_num="1" field="discount" after="%</span> <br />"][alg_wc_product_wholesale_pricing_data field="price" price_format="%price%" level_num="2" after=" par "][alg_wc_product_wholesale_pricing_data field="quantity" level_num="2" after=" <span class='tiered-pricing-discount'>-"][alg_wc_product_wholesale_pricing_data level_num="2" field="discount" after="%</span></div>"]
Can you please have a look at this piece of code and let me know what’s wrong in here?
Thank you,
Clara.
April 7, 2023 at 9:15 am #112794Mathias Jouan
ParticipantI found out what’s going on!
As I close the <div>, that I opened in the first shortcode, only in the level 2 shortcode, if there’s no level 2 defined, the <div> is never closed. Which happened.
How can I do to close the div, whatever the number of levels?
April 12, 2023 at 10:53 am #113082Mathias Jouan
ParticipantHi,
Did you have time to have a look?
BR,
Clara.
April 13, 2023 at 11:39 am #113172Hi Clara,
Sorry for not getting back to you sooner.
I suggest you simply wrap the shortcodes in
<div>
(instead of using thebefore
andafter
attributes for it in the first and last shortcodes), like this:<div class='tiered-pricing-container'> [alg_wc_product_wholesale_pricing_data field="price" price_format="%price%" level_num="1" before="<h3>Offre dégressive</h3>" after=" par "][alg_wc_product_wholesale_pricing_data field="quantity" level_num="1" after=" <span class='tiered-pricing-discount'>-"][alg_wc_product_wholesale_pricing_data level_num="1" field="discount" after="%</span> <br />"][alg_wc_product_wholesale_pricing_data field="price" price_format="%price%" level_num="2" after=" par "][alg_wc_product_wholesale_pricing_data field="quantity" level_num="2" after=" <span class='tiered-pricing-discount'>-"][alg_wc_product_wholesale_pricing_data level_num="2" field="discount" after="%</span>"] </div>
I hope this helps. Please let me know if you’ll have any questions.
April 14, 2023 at 8:42 am #113225Mathias Jouan
ParticipantI didn’t know we could write HTML code outside the shortcodes! Perfect, it works, thank you!
May 1, 2023 at 9:58 am #114228Happy to help 🙂
- This topic was modified 5 months, 3 weeks ago by
- AuthorPosts
- You must be logged in to reply to this topic.