Tagged: 

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #615584

    Hi Guys,

    Enfold Version: 3.5.2
    WP: 4.5
    Woo: 2.5.5

    since i have updated enfold to the latest version i have a problem with the ajax add to cart feature of the product list element.
    my page reloads instead of using the ajax option.
    also when i then browse to the cart i see all the annoying messages that items have been added to the cart with a view cart link which makes no sense cuz i am already at the cart.

    i have setup a fresh install for you guys….

    it should work like here on the demo …

    #616105

    Hey Shorty05,

    Please try adding the following to the bottom of your functions.php to see if it helps:

    function modify_jquery() {
    if (!is_admin()) {
    	wp_deregister_script('jquery');
    	wp_register_script('jquery', 'https://code.jquery.com/jquery-1.11.3.min.js');
    	wp_enqueue_script('jquery');
    }
    }
    add_action('init', 'modify_jquery');

    Regards,
    Rikard

    #616132

    Hi Rikard,
    Nope that doesn’t work.
    I spend hours to figure out what the problem is without any luck : (

    Its a problem with the latest version of woo … i have downgraded woo to version 2.2 on another test site using the latest version of enfold and all is working fine on that test site.

    hope that helps to find the problem.

    • This reply was modified 8 years, 8 months ago by Shorty05.
    #617154

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Regards,
    Rikard

    #618660

    ok

    #619128

    Any updates ? I have the same problem!!

    #619184

    The only temporary solution I found is:

    WooCommerce -> Settings -> Products -> Display -> Untick the AJAX button.

    But it’s only until they fix the AJAX issue!

    #619246

    I am able to add the items to the cart never mind if the ajax box is ticked or not but the ajax feature on the list doesn’t work at all.

    the problem is that my live site uses a lot of product lists and people are used to us the ajax effect and now it stopped working and i get 5-15 emails a day from people that complaining it doesn’t work anymore.

    i hope kriesis team is finding a solution soon :)

    the support here is awesome and im sure they wok on it if they have time.

    #621162

    Hi!

    We checked the test page but there’s nothing there. Please create a test page where we can reproduce the issue. http://development.wpcustom.com/epo/product-list/

    Best regards,
    Ismael

    #621269

    Hi Ismael, Rikard told me that i you guys need login credentials. So i have setup a fresh copy of wp and your theme.

    I have also imported the demo version thats why the page isnt there anymore but you can see the issue here:

    #623494

    any news ?

    #623508

    Hi!

    We are still not sure what’s preventing the added_to_cart_notification from displaying. We will forward this thread to Kriesi. Please wait for his response.

    Regards,
    Ismael

    #623801

    The notification isnt really the problem the real problem is that the AJAX ADD TO CART FEATURE DOESNT WORK AT ALL.

    Thanks for forwarding it to Kriesi

    #625576

    Hi,

    Yes. The ajax feature is not working, the page refreshes when you click the product or added an item to the cart. The products are still added to the cart so the only thing we need to fix is the page refresh and the “added to cart” notification.

    Best regards,
    Ismael

    #632400

    Any news after almost 1 month ?

    #633309

    Hi all, also having this problem. However I did some debugging myself. I noticed that the demo is using an older version of woocommerce ( or at least the add to cart script anyway ). The demo is using add-to-cart.min.js?ver=2.4.8 and my site is using ver 2.5.5

    If you expand both of those files and look at line 3, v2.4.8 has: if (b.is(“.product_type_simple”)) { while v2.5.5 has if (b.is(“.ajax_add_to_cart”)) { on line 7. I added ‘ajax_add_to_cart’ class to the a.av-catalogue-item element and it all worked perfectly.

    Until they release a fix, here’s a quick and dirty bit of code you can put in your functions.php file:

    
    function add_ajax_class($text, $product){
    $text = str_replace('add_to_cart_button', 'add_to_cart_button ajax_add_to_cart', $text);
    return $text;
    }
    add_filter('woocommerce_loop_add_to_cart_link', 'add_ajax_class', 10, 2);

    Or if you’re not using a child theme you can override the core file, however this is not recommended as you’ll lose any changes on updates ( although if it’s the update that fixes this that won’t matter )

    Find wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php on line 354 change:
    $ajax_class = $product->is_purchasable() ? "add_to_cart_button" : "";
    to
    $ajax_class = $product->is_purchasable() ? "add_to_cart_button ajax_add_to_cart" : "";

    Hope this helps and hopefully Kriesi can test this and add it to a release soon.

    Thanks for the great theme guys, and thanks for all the hooks and filters. Makes patching things like this waaaay easier :)

    • This reply was modified 8 years, 7 months ago by matt.
    #633479

    Hi,

    @twitchdevelopment: Awesome! Glad you found the issue. This would have been difficult on our part. Thanks! :)

    Best regards,
    Ismael

    #633483

    No worries! Any chance of getting that extra class added into a future release?

    Cheers

    #634582

    Hi,

    feel free to add it here: https://kriesi.at/support/enfold-feature-requests/

    Best regards,
    Andy

Viewing 19 posts - 1 through 19 (of 19 total)
  • The topic ‘Ajax Add to Cart Problem with the ALB product list element’ is closed to new replies.