Get a quick single-click solution to share your products on various social media platforms.Buy Now!
Public Ticket #860

Price change on the category/shop page

sabiertas

Good morning, I have the free version of the plugin, but I wouldn’t mind moving to the paid one. What I need is for the price of the variation to be changed also on the category or shop page. ON the product page it works fine except that the price it puts by default I don’t know very well what it corresponds to, can you help me with this? the website is https://bodegasenguera.com/tienda

wpx

wpx

Hi sabiertas,

Thanks for reaching out to us. Can you please share which plugin you are using to display variations on the category or archive page?

Basically, if the plugin uses the default markup of the WooCommerce dropdown the price should change. From my inspection, on the category/archive page they have their own markup.

Hope to hear from you soon!

Thanks

sabiertas

sabiertas

Thanks for your quick response, I'm not using a plugin but if you consider it necessary and you can recommend one that's fine, I want to solve this as quickly as possible. I'm using a snippet, I'll give you a copy so you can review it and tell me what I should change or do.

Thank you very much again

https://gist.github.com/sabiertas/177827a63af1d66efd46c6fb09fed7d2

sabiertas

sabiertas

Sorry, I deleted the gist without realizing it, here is the new link

https://gist.github.com/sabiertas/1f6078a5bb04a5fa04e3874d4369ef50

wpx

wpx

Hi sabiertas,

Thanks for sharing the snippet. I have sent your snippet to our development team.

They replied, changing prices based on variation is only available for the single product/product description page.

As you know displaying variations on the shop/archive page is not the default behavior of WooCommerce.

They also mentioned the snippet you are using is giving warnings- https://prnt.sc/3xy1P8bG_bcU. It doesn't fire show_variation trigger to get variation data.

Also confirmed they will try to add some code so that price can be changed on the shop/archive page.

I hope you will understand.

Thanks

sabiertas

sabiertas

Thank you for your response, I had not received the email and I was surprised... I know that it is not a standard behavior of WooCommerce, I would be very grateful if you can help me or give me some guidance on how to solve it. Thank you so much for everything

wpx

wpx

Hi sabiertas,

Sorry for our late response. We have adjusted some code.

Did you update to 1.3.1? If so, use this piece of code- https://codeshare.io/pqWng0 to display the variation dropdown on the shop/archive page.

Because I found some errors and warnings in your provided code/snippet.

Hopefully, this version will resolve your issue. Here is an example- https://prnt.sc/YykUY5ukjzQK which you took during tests on our end.

Thanks

sabiertas

sabiertas

Good morning, thanks for your update, I have tried it and replaced it with the previous code and it works, but should I update the price when I change the variation? I have removed the part that hides the icons to add or subtract amounts, since what you want is for the customer to make purchases from the store page without entering the detail sheet. Another error that I don't know what it can be is that in the product sheet the price that is by default does not correspond to any variation, then when you select the variation it is corrected. I don't know if you can help me with these things. Thanks in advance

wpxteam

wpxteam

Hi sabiertas,

Hope you are doing great.

but should I update the price when I change the variation?

We are sorry that we are not clear of this query. Will you please explain it a little?

We have tested the other reported issue on our side. Everything works as expected.

Here is a video that we made during the investigation.

https://www.loom.com/share/44811dcdf5504da6ad8fcf988a835e51

Thank you