• Resolved nartoof

    (@nartoof)


    Hi,

    I customized the shop page to have dropdown variations and quantities selection.

    Then I can fast add to cart even simple and variable products from shop page.

    But when I ask to get alert if product is back on stock, I get :

    Successfull message. The problem is I get this message on all products on the shop page.
    Maybe you use a class with JS to write the message ?
    Because in admin panel I can see I subscribed to the good ID product.
    Is there anyway to override it and use an ID ?

    OR

    Error message : Seems like you have already subscribed to this product (and I didn’t, but I subscribed to another product from the shop page).
    And in this case I don’t understand why this error is displayed ?

    Could you help me to solve this problem ?

    I really would like to have this even on shop page and product page, but if it doesn’t works I’ll have to put your plugin only on product page…

    Thank you very much.

    Anthony

    • This topic was modified 5 years, 1 month ago by nartoof.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author CodeWooGeek

    (@codewoogeek)

    Hi Anthony,

    Sorry to hear about this one. But please note as we designed this plugin based on only product page(we suggest you to use only on product page), in your case your reported issue might arise because of hook we used and global $product to get the product id(if the same code runs it in shop page will yields the same id for all product in shop page), there are more things to do in order to support perfectly for shop page(here is what we need to confirm few things).

    So you’ve mentioned Customized Shop Page? How you set up the variation loaded in shop page? have you used any plugin(s) for that? So you customized shop page only for variable products or all product types(simple/variable/etc)? Are you customized shop page using hooks then post that customized code here to assist you better.

    Let us know.

    Thanks.

    Thread Starter nartoof

    (@nartoof)

    Hi,

    Thank you for your answer.

    I understand that your plugin was made only for product page, and I think I will use it like that.

    Anyway it could take a lot of place if I add it to the archives page loop.

    But FYI, I used a custom function to remove and add action like this (I don’t use any plugin). It works for simple and variable products :

    function MSW_ajouter_variations_produit_page_boutique() {
    	remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
    	add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 30 );
    }
    
    add_action( 'woocommerce_before_shop_loop', 'MSW_ajouter_variations_produit_page_boutique' );
    

    I now can select quantities and variation for variables products.

    I think I’ll use CSS to undisplay your plugin on shop page and only get it on the product page, except if you got a simple solution to make it works ?

    Thank you.

    Plugin Author CodeWooGeek

    (@codewoogeek)

    Hi Anthony,

    We make note of your requested feature as a to-do list(as it need to revamp most of the part in our core, which of-course takes more time), we will slowly bring your feature in our core such that you can make use of the functionality implemented it in product page. For now you can make use of the functionality only in product page.

    Thanks.

    Thread Starter nartoof

    (@nartoof)

    Hi,

    Thank you for your answer and considering my request.

    But if you need a major core update, I don’t think it is very necessary.

    Woocommerce is not intended to have variations on shop page, and I read they don’t want to add this feature because of speed optimization.

    So you will work hard for something used by 2 or 3 people who needs variations on shop page…

    Don’t work for nothing, I’ll use your plugin on product page only.

    Great job anyway.

    Have a nice day.

    Anthony

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error on shop page’ is closed to new replies.