DOM structure change

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #112603
    Mathias Jouan
    Participant

    Hi,

    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_link

    Don’t hesitate to follow up this conversation by email if you want admin credentials for our website.

    BR,

    Clara.

    #112682
    Moshtafizur
    Moderator
    Plugin Support

    Hi 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,
    Moshtafizur

    #112747
    Tom Anbinder
    Moderator
    Plugin Support

    Hi 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].

    #112793
    Mathias Jouan
    Participant

    Hi,

    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.

    #112794
    Mathias Jouan
    Participant

    I 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?

    #113082
    Mathias Jouan
    Participant

    Hi,

    Did you have time to have a look?

    BR,

    Clara.

    #113172
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Clara,

    Sorry for not getting back to you sooner.

    I suggest you simply wrap the shortcodes in <div> (instead of using the before and after 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.

    #113225
    Mathias Jouan
    Participant

    I didn’t know we could write HTML code outside the shortcodes! Perfect, it works, thank you!

    #114228
    Tom Anbinder
    Moderator
    Plugin Support

    Happy to help 🙂

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.