Home Forums WoodMart support forum Quickshop – Add to Cart Button Behaviour

Quickshop – Add to Cart Button Behaviour

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #73952

    weekiang
    Participant

    hi,

    for variable product now: When I am in the quickshop popup, and i click the add to cart, I am return to the product listing. is there a way for me to return to the product page instead?

    for simple product, the behavior I have is that it is returning to the product page.

    Regards

    #73954

    Hello,

    Please provide your site admin access we shall check the issue

    Best Regards

    #73964

    weekiang
    Participant

    it is not a issue. more of if it is possible to do so. If you seee

    https://woodmart.xtemos.com/product-category/furniture/?per_row=4&shop_view=grid&demo=

    Click on the Nerd Wooden Chair’s quickview and add to cart. you see that it is returned to the product category page. I am asking if it is possible to have it return to the product page instead? https://woodmart.xtemos.com/shop/furniture/fiber-base-chair-copy/

    We are at the design stage, nothing is deployed yet. Need to know what can done before we talk to the client.

    #73967

    Artem Temos
    Keymaster

    Sorry, but there is no such option for our quick shop products.

    #73983

    weekiang
    Participant

    Thanks for the quick response. How about quickview? (The one with the magnifying glass)

    Can I click the quickview, click the add to cart and goes to the product page instead of returning to the product catalog page?

    Understand there might be no ready configuration for this, but is there anywhere you can point me to do to code it? a handler or something or where the code for this is housed?

    #73994

    Hello,

    Please add this code to the Theme Settings > Custom JS:

    jQuery('body').bind('added_to_cart', function (e) {
        e.preventDefault();
        var url = jQuery('.quick-view-wrapper .product_title a').attr('href');
    
        if (typeof (url) != 'undefined') {
            jQuery('.woodmart-close-side, .cart-widget-side').remove();
            window.location = url;
            return;
        }
    });

    On document ready

    Best Regards

    #74115

    weekiang
    Participant

    hi, Thanks for helping out.

    Was also trying to understand the snippet.
    So what I am trying to understand is that

    you are trying to override function behavior using JQuery. Basically trying to get the product url in is in the quick-view wrapper and set it to the add to cart function. something like that?

    I tried it but the variable products are still returning to the product category page. not the product page. is it working on your copy?

    #74123

    Artem Temos
    Keymaster

    Could you please send us a link to the page where you added that code and it doesn’t work?

Viewing 8 posts - 1 through 8 (of 8 total)