Bug in WooCommerce Add to Cart Form Element

As you know, we aren’t given much control in the add to cart flow when an item has variations/options. We generally have to use the Add to Cart form element which includes the options, price, and add to cart.

But when using this element, it fails to display a price if all the options have the same price.

Product with different options prices: https://cupcakeology.net/product/chocolate-raspberry-cupcake-el-paso/

Product with same options prices: https://cupcakeology.net/product/carrot-cake/

Can’t figure out how to show a price in the latter example.

Hello @co50,

Thanks for writing to us.

I checked on my localhost site it seems that the Add to Cart form element is working fine on my end. I have tested it on the Pro theme version 6.4.1. To help you with your concerns we need to check your setting, I would request please share the admin login details meanwhile I would suggest you troubleshoot a few of the common issues before we investigate your settings. Please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin-level username and password

You can find the Secure Note button at the bottom of your posts

Thanks

Secure note added.

Hey @co50,

The Add to Cart form only displays WooCommerce’s interface and WooCommerce does not show the changing price because it’s unnecessary. What’s important is you must display the Product Price so you need to add the Product Price element above the Add to Cart element. Set the Condition to only show if the Product Type is Variable.

image

We’ve tried this but the product price element does not change when you choose options - it stays the same no matter what options are chosen. We have found no workaround for this which is why it was reported.

Hey @co50,

Yes, the Product Price doesn’t really change. It does not change even in the default WordPress theme. Please use the Dynamic Content {{dc:woocommerce:product_price_html}}. That is exactly the same as the default WordPress theme output. Check out the videos below. The DC I’ve mentioned is the one above the Add to Cart element.

Output of the same product variation price

2023-11-27_00h32_05

Output of different product variation price
2023-11-27_00h33_23

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.