Tagged: ajax, links, variable product, woocommerce
-
AuthorPosts
-
October 13, 2017 at 8:10 pm #864127
Hello,
On my WooCommerce+Enfold site I’m trying to build a pricing table, and I’m testing a series of WooCommerce Variable Products I’d like to sell through my site.
In order to show all the product variants on the same page (I do not like the default dropdown menu), following WooCommerce rules, for each “buy” button I was forced to use a basic URL structure as follows:https://www.mysite.com/?add-to-cart=1234&variation_id=5678&attribute_pa_format=name
However, using this method, after a click on the “buy” button the buyer is being redirected to the home page, while I would like very much to keep him/her on the same product page, possibly showing the top box “XYZ product has been added to your cart”, as in your single product demo page:
Using WooCommerce variable products, is there any method to update the cart without leaving the page from where the order has been made? Please see my test page linked on the private content area of this post. The basic pricing table with the standard links is the first one from the top.
Thanks!
October 14, 2017 at 6:47 pm #864316I have succeeded in redirecting to the product page using this URL structure:
https://www.mysite.com/product_page/?add-to-cart=1234&variation_id=5678&attribute_pa_format=name
But the top box “XYZ product has been added to your cart” is still missing. Any idea?
Thanks!
October 16, 2017 at 9:29 pm #864949Hi,
You are correct, that message is been missing when using ALB to modify the WooCommerce page.
Can I ask if u are using ALB or not?Best regards,
BasilisOctober 16, 2017 at 9:36 pm #864951If ALB=Advanced Layout Builder or =Avia Layout Builder then yes, I have built my standard WooCommerce product page using ALB.
Is it a bug? Do you have any suggestion on how to trigger that “XYZ product has been added to your cart” message?
Thanks for your help,
DiegoOctober 19, 2017 at 4:24 pm #866292Hi Diego,
Here are some threads to consider:
If you need further assistance please let us know.
Best regards,
VictoriaOctober 19, 2017 at 5:52 pm #866354Thank you Victoria, the tip in the first thread you suggested just saved the day. I had only to make this short addition to CSS in order to avoid the appearence of an unwanted blank space below the WooCommerce “XYZ product has been added to your cart” message:
#top div.woocommerce-message {margin: 0 !important;}
Thanks again for the excellent support!
October 22, 2017 at 6:58 pm #867267Hi nightjar,
Glad you got it working for you! And thank you for sharing! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.