• Resolved nlnieuw7

    (@nlnieuw7)


    Hi,

    I’m using the shortcode of your plugin in a php file: <?php echo do_shortcode( “[enh_ajax_add_to_cart_button product=$product_id title=none]” ); ?>

    Since upgrading to 1.3.1, the shortcode doesn’t work any more, so I had to downgrade. It does fire an add-to-cart event, but it doesn’t update the cart.

    It must have something to do with the new <span class=”ea-line quantity-container”> but I don’t understand why and how.

    Can you help me out?

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author The Rite Sites

    (@theritesites)

    Hi nlnieuw7!

    I am on a couple different testing environments and am not seeing the results you are. Is there a page you can link me so I can get more details?

    Alternatively, if you could describe your environment to me I will recreate the environment and see if I get the same results as you.

    Hope we can get this figured out quick, thanks for reaching out!

    Cheers,
    Parker Mathewson
    The Rite Sites

    Thread Starter nlnieuw7

    (@nlnieuw7)

    Hi Parker,

    Thanks for your quick response!

    Site running version 1.2.2: https://www.reverta.nl/facial-serenity-serum/

    Test site running version 1.3.1: https://neanova.eu/facial-serenity-serum/

    Your plugin is only being used for the sticky black bar at the bottom of the screen.

    Hope you can figure it out!

    Cheers,

    Paul

    Plugin Author The Rite Sites

    (@theritesites)

    Hi Paul,

    I have identified the issue and will be working on a fix.
    This came about from version 1.3.1 under the change described as:
    “Fixed bug when same product is on the same page, only one quantity field was working”

    The way we made this change is looking for an input in the <div class=”quantity” /> and on your website you have added two inputs to make for a better quantity input experience.

    We will be making a change to the javascript selector to look for the input with the specific identifiers on our number input <input id=”product_##_qty” class=”input-text qty text” …/>

    I expect the fix to be out later today, or no later than Monday.
    Alternatively, you can force enqueue the non-minified javascript and make the change yourself if you are familiar with javascript.
    You can find the applicable line here:
    public/js/enhanced-ajax-add-to-cart-public.js:92

    You can change the line to:
    data[‘qty’] = $( this ).siblings(‘.quantity-container’).find(‘input.input-text.qty.text’).val();

    Or other variations, this is just one quick and precise example.

    Be on the lookout for a new version soon!

    Hope this all helps ??

    Cheers,
    Parker

    Thread Starter nlnieuw7

    (@nlnieuw7)

    Hi Parker,

    It works! Thanks a lot.

    I’ll leave a review in a minute.

    Cheers,

    Paul

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shortcode in PHP doesn’t work anymore as of version 1.3.1’ is closed to new replies.