Variant prices not changing with different size selections on manually entered inventory

Solved

Variant prices not changing with different size selections on manually entered inventory

kperson913
Tourist
4 0 1

https://holibdaycelebration.com/collections/krakk-korn/products/pre-sale-krakkle-korn

It's the strangest thing.  My prices change with the products that I created thru third party apps , but the inventory that I manually entered (quantity, size, prize, inventory count, sku) does not change with the variant. 

I set variant sizes with different variant prices-confirmed in Product and Inventory that the prices are different w/each variant, but it only displays the price of the first variant option which is the cheapest price.

 

Notes:

  • 2 products manually entered/local inventory, all other products are created thru apps.
  • Only those 2 products are having the issue
  • At check out, it will show the correct variant price, but upon selection the price stays $5-lowest-even if someone selects the highest variant.
  • Customers are not seeing the price of their selection until checkout.
  • I installed a PreSale app to create a sales campaign but it did not affect this. It had this issue before. Now the pre-sale app doesnt work with the inventory. 
  • I uninstalled the app in hopes it would change/it did not.
  • I reset my product-template.liquid and product-price.liquid files back to original-no change
  • Variant prices do not change with manually entered inventory, only products created thru apps

 

View of product-template.liquid attached

View of product-price.liquid file below:

 

<!-- snippet/product-price.liquid -->
{% if product.title %}
{%- assign compare_at_price = product.compare_at_price -%}
{%- assign price = product.price -%}
{%- assign price_varies = product.price_varies -%}
{%- assign available = product.available -%}
{% else %}
{%- assign compare_at_price = 1999 -%}
{%- assign price = 1999 -%}
{%- assign price_varies = false -%}
{%- assign available = true -%}
{% endif %}

{%- assign money_price = price | money -%}

{% if compare_at_price > price %}
<span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
<s class="product-price__price">{{ compare_at_price | money }}</s>
<span class="product-price__price product-price__sale">
{{ money_price }}
</span>
{% if settings.show_saved_amount and settings.show_discount_amount == 'money_save' %}
<span class="salePrice sale-tag large">
{% assign sale = product.compare_at_price | minus: product.price | money %}
{{ 'products.product.on_save_like_price' | t }} {{sale}}
</span>
{% endif %}
{% else %}

<span class="visually-hidden">{{ 'products.product.regular_price' | t }}</span>
<span class="product-price__price">{{ money_price }}</span>

{% endif %}

 

Accepted Solution (1)

tim
Shopify Partner
3911 395 1440

This is an accepted solution.

Looks like other products are either single-variant products or each variant has image assigned.

The page you've shared fails because variants have no image assigned. 

There are 2 options:

1) assign image to each variant

2) fix the theme code.

In your assets/theme.js there is this commented code (starting @ line 642):

//       if (
//         !variant.featured_image ||
//         variantImage.src=== currentVariantImage.src
//       ) {
//         return;
//       }

This was a check whether newly selected variant has no image assigned or new image is the same as the old one and skip product image update if this is the case.

 

My recommendation is to uncomment this code (by removing // at the start of each line) unless you know a good reason why this was done.

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 2 (2)

tim
Shopify Partner
3911 395 1440

This is an accepted solution.

Looks like other products are either single-variant products or each variant has image assigned.

The page you've shared fails because variants have no image assigned. 

There are 2 options:

1) assign image to each variant

2) fix the theme code.

In your assets/theme.js there is this commented code (starting @ line 642):

//       if (
//         !variant.featured_image ||
//         variantImage.src=== currentVariantImage.src
//       ) {
//         return;
//       }

This was a check whether newly selected variant has no image assigned or new image is the same as the old one and skip product image update if this is the case.

 

My recommendation is to uncomment this code (by removing // at the start of each line) unless you know a good reason why this was done.

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
kperson913
Tourist
4 0 1

thank you so very much! Adding pics worked perfectly.