When i open a variant product page price are not showing if i select any varient then price are showing. I want auto select first available varient price.
{% else %}
{% endif %}
{% endif %}
A Shopify store owner is experiencing an issue where product prices don’t display on variant product pages until a variant is manually selected. They want the first available variant’s price to show automatically on page load.
Proposed Solution:
Another user provided code that successfully displays the first variant’s price automatically.
New Problem:
After implementing the fix, a new error occurs when clicking “Add to Cart” on both variant and non-variant products. The error message states “Required parameters are missing or invalid.”
Current Status:
The discussion remains open with a request for the store URL to further troubleshoot the add-to-cart functionality issue. The store link provided is: mybabybabbles.com/collections/high-chairs/products/stokke-tripp-trapp-chair
When i open a variant product page price are not showing if i select any varient then price are showing. I want auto select first available varient price.
{% else %}
{% endif %}
{% endif %}
Hi. Please try this code. It will fix the problem.
{% assign variantCount = product.variants | size %}
{% if product.available %}
{% if variantCount > 1 %}
{% else %}
{% endif %}
{% endif %}
This code are working perfectly i check this but when i click on add to cart on variant or non variant products its show me error. Required perameters are invalid or missing. its assume that product are variant
Can you please share store url?