WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Woocommerce - Product variations on category/product list page with add-to-cart (25 posts)

  1. Shashank Shekhar
    Member
    Posted 1 year ago #

    Hello,
    I have setup a site on http://www.metrorestaurantnoida.com/menu/ with wordpress+woocommerce+grid/list plugin. This is a restaurant site for many food items with half and full plate with different price. I have created product variations in admin half/full for such food items with their prices respectively. But these products are showing 'select options' button on category pages which take it to product detail page. I want to display product variation dropdown on category/product-list page itself so that customer can select and add the food half/full plate to cart without going to product detail page. The selected variation can reflect the price for easier user understanding. I tried a lot and also spent many hours on net for its proper solution but no good findings. I think woocommerce should be compatible for such kind of functionality with little customization.
    Please help me in this, if its possible.

    If its not possible with woocommerce, alternatively it will be also okay to open a popup on clicking 'select options' button on product-list page, showing variations in that popup window with variations dropdown and their price with add to cart button that can add products to cart without going to product detail page.

    The overall thing needed I think is to get the product object on product list page for each items in loop along with their variations and prices with add-to-cart and proper links. But dont know what and how to write where to obtain this in full result. Hope someone help with little help idea and code.

    http://wordpress.org/extend/plugins/woocommerce/

  2. Shashank Shekhar
    Member
    Posted 1 year ago #

    Anyone? someone? still waiting for the response. Expected a response from woocommerce developers itself. This is much needed feature, or little extension can be developed. But there should be a hint for it. Is it not possible to do in woocommerce?
    Please respond.

  3. alexdigital
    Member
    Posted 1 year ago #

    Hi,

    I'm also in need of this feature. Would love to be able to add variations with swatches to category views/homepage.

    Does anyone have any ideas?

    -Alex

  4. bheadrick
    Member
    Posted 1 year ago #

    this will be available in 2.0, though it may require some theming.
    basically, at the moment, there's no add to cart url for variations(meaning no way to add a variation to the cart outside of the single product page), but that's a feature they're adding into 2.0, which was just released to beta last week.

  5. sk
    Member
    Posted 1 year ago #

    Hey bheadrick, can you explain a bit further how this feature works or how I can replicate it? I have Woocommerce beta2 set up but I can't seem to see how I could test this feature

  6. Shashank Shekhar
    Member
    Posted 1 year ago #

    Hello woocommerce! Please someone throw more light on it with little more explanations. As we can see many users want this feature, so we are waiting for the proper solution asap. Proper admin GUI and settings for which variations to show, and in frontend selecting a variation can display respective price simultaneously, that directly will be added to cart without directing to product page will be great.This will make woocommerce a most useful plugin for ecommerce in wordpress.

  7. bheadrick
    Member
    Posted 1 year ago #

    the only Info I have is from this

    here's an example of a query string to add a variation to the cart:

    ?add-to-cart=1175&variation_id=1184&attribute_pa_size=x-large&attribute_pa_colour=white

    there's nothing about it in the readme, though

  8. sk
    Member
    Posted 1 year ago #

    Thanks bheadrick, that could be a way to add products from a specific URL but it's not a solution to the OP's issue.

    Ah well looks like this is more suited to a plugin - hopefully it won't cost us $99!

  9. sk
    Member
    Posted 1 year ago #

    Also you should add this as an idea on the Woocommerce ideas page http://ideas.woothemes.com/forums/133476-woocommerce

    I could have sworn it was already there but I couldn't find it. Have a quick search before you post it up. Once you post it let us know here so we can get some more votes!

  10. Shashank Shekhar
    Member
    Posted 1 year ago #

    Is it possible with Woocommerce 2.0.3 which released now?
    "Product variations on category/product list page with add-to-cart, so that customers can add a product to cart with the selected variation/price without going to product detail page".
    As it was commented by various users here that it will work with woocommerce 2, and it was a long awaited feature, I think its now possible but dont know how.
    Please suggest.

    Thanks.

  11. sk
    Member
    Posted 1 year ago #

    No, it's not in WC 2 from what I've seen

  12. Shashank Shekhar
    Member
    Posted 1 year ago #

    Disappointed to see 'NO'. I also seen its changelog and checked this feature not available directly. But as per its changelog, product classes rewritten, some work done for variations, get_product()function, etc. I hope by some customization I could achieve the thing I require, since woocommerce is completely overhauled and many features and code standards added.
    Can someone help with little code and idea for how could I achieve this? A little help in the right direction will help me and others to make this.
    (Please read my first post to get the alternative flow, I need help to achieve any of it).
    I am in urgent need of this waiting for months, and is a so important feature that can be used in so many sites, beneficial for developers and ecommerce users.
    I also expect some response from plugin authors.

    Thanks.

  13. sk
    Member
    Posted 1 year ago #

    There is a lot going on with regards to how variations are created and output, and even more going on as to how these are added to the cart. It's very tricky which is why there isn't much information on this.

    In terms of the code I would start at looking at woocommerce/templates/single-product/add-to-cart/variable.php

    As previously suggested, you should add this as a feature request and continue the discussion there http://ideas.woothemes.com/forums/133476-woocommerce

  14. Shashank Shekhar
    Member
    Posted 1 year ago #

    Hi renegadesk,
    Today I tried to add this new idea on your given link, but even after loggedin, I am unable to add new idea. There is just a textbox in which when I am putting title, going process and finally just a cross mark to delete it. There is no any textarea where I can fill the details and post it. Could u explain me a little how to 'post a new idea' on woocommerce?

    Further, its very amazing that no one else other than you is replying here, not even woocommerce authors. This post is going over months and still no good help or idea. Does author dont bother any support request here? not good.

  15. Shashank Shekhar
    Member
    Posted 1 year ago #

    Hi I have confirmed my email id and now able to post idea.
    I have added it here: http://ideas.woothemes.com/forums/133476-woocommerce/suggestions/3777548-product-variations-on-category-product-list-page-w
    Please arrange some good votes for it, so it can be solved or implemented soon.
    Thanks for help!

  16. sk
    Member
    Posted 1 year ago #

    Nice one Shashank.

    You need to remember that this plugin is open source so the plugin authors really have no duty to respond to you or any of us. Try and be patient about this and you will have much better luck getting help. After all, this is the community forum for a product that we are using to make money for free so we've all got to try and help each other.

    Hopefully your idea gets put together as a plugin at some stage as it would be a great feature.

  17. Shashank Shekhar
    Member
    Posted 1 year ago #

    Hi I have not found proper solution to make it work till now, but got a link
    http://www.cmsites.dk/woocommerce-add-to-cart-with-variable-products-archive-page/ , it helps to throw some light on this. But it work without ajax (page reload on adding each product with variation to cart) as per description and comments mentioned there.
    I do not have time to research on this right now but hope someone test and try to make it work with ajax.

    --
    Please arrange some more votes for it here:
    http://ideas.woothemes.com/forums/133476-woocommerce/suggestions/3777548-product-variations-on-category-product-list-page-w

    --
    Thanks

  18. mosaicmediaeu
    Member
    Posted 1 year ago #

    Hi, have you got any updates on it? We tried the solution from http://www.cmsites.dk/woocommerce-add-to-cart-with-variable-products-archive-page/ but it does work for some products only. It shows "please choose the options" error for the rest.

  19. squaremunkey
    Member
    Posted 1 year ago #

    This is a feature I have just been asked. I have not found any solutions yet.

  20. cxianwei
    Member
    Posted 12 months ago #

    I'm not sure if I understand the requirements correctly. WooCommerce do come with product variation. It allows the product to be configure for variation e.g. such as size or colour at the product page. You can refer to the following link for video and guide to set up product variation.

    http://docs.woothemes.com/document/product-variations/

    Hope this helps. :-)

    Cheers.

    Benjamin.

  21. sk
    Member
    Posted 12 months ago #

    @cxianwei cheers for chiming in but that's not what this post is about. As per the post title we're talking about showing variations with add to cart on the product archive page.

  22. Sofusalbertsen
    Member
    Posted 11 months ago #

    Hi.
    I just want to link to this QA which has a nice (non-ajax unfortunately) way of showing both quantity, and variations on the list page:

    Hope it'll help some of you:)

  23. Ashworth Creative
    Member
    Posted 8 months ago #

    Putting the following code in your theme's functions.php file will show variable product attributes on product categories/tags and will allow you to add those products from those parts of the site. It will also allow the add_to_cart shortcode to work correctly with variable products.

    if ( ! function_exists( 'woocommerce_template_loop_add_to_cart' ) ) {
    
      function woocommerce_template_loop_add_to_cart() {
        global $product;
    
        if ($product->product_type == "variable" && (is_product() || is_product_category() || is_product_tag())) {
          woocommerce_variable_add_to_cart();
        }
        else {
          woocommerce_get_template( 'loop/add-to-cart.php' );
        }
      }
    
    }
  24. sherminator
    Member
    Posted 8 months ago #

    Hello
    Ashworth Creative, thank you for the solution but i have this error :

    Fatal error: Call to a member function is_in_stock() on a non-object in wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-frontend-ui.php on line 339

    Thanks for your help.

  25. Ashworth Creative
    Member
    Posted 8 months ago #

    @sherminator
    That seems like a problem with the WooCommerce Waitlist plugin, you'd want to either contact the plugin developer or go through WooCommerce support to resolve that issue.

Topic Closed

This topic has been closed to new replies.