Hello,
My shopify product has variants added from backend [ https://6af8198x7q8a6d2w-5090617.shopifypreview.com/products/who-is-allah-swt ] but isn’t showing on front end, select box showing display: none and when change it to block its not changing variant price, image etc.
Also the add to cart button isn’t working.
Below is the code:
{% assign selectedVariant = product.selected_or_first_available_variant | default: product.variants.first %}
{% capture productGoalDeliveryDate %}{{ settings.product-sale-goal-estimated-delivery-date | trim }}{% endcapture %}
.add-to-cart-button:hover{
color: #fff !important;
}
span.lable {
color: #fd8311;
font-size: 19px;
}
a.a_bundled {
display: block;
color: #fff;
background: red;
font-weight: 700;
font-size: 22px;
border-radius: 23px;
margin-top: 10px;
padding: 2px 8px;
width: 123px;
}
{% include 'breadcrumbs' %}
{{ product.title }}
{{ selectedVariant.price | money }}
{% unless product.variants.size == 1 and product.compare_at_price_min <= selectedVariant.price %}
{% if selectedVariant.compare_at_price > selectedVariant.price %}{{ selectedVariant.compare_at_price | money }}{% endif %}
{% if selectedVariant.compare_at_price > selectedVariant.price %}
{{ "products.product.saving" | t }}
{{ selectedVariant.compare_at_price | minus: selectedVariant.price | money }}
{% endif %}
{% endunless %}
{% assign featured_image = selectedVariant.featured_image | default: product.featured_image %}
{% if item.tag %}
{{ item.tag }} - Best Seller
{% endif %}
{% if product.images.size > 0 %}
![{{ product.title | escape }}]()
{% else %}
![No Image Available]()
{% endif %}
{% if settings.product-enable-zoom %}
{% endif %}
{% if product.images.size > 1 %}
{% endif %}
{% if product.images.size > 1 %}
{% for image in product.images %}
{% endfor %}
{% endif %}
{{ product.title }}
{{ product.type }}
{{ selectedVariant.price | money }}
{% unless product.variants.size == 1 and product.compare_at_price_min <= selectedVariant.price %}
{% if selectedVariant.compare_at_price > selectedVariant.price %}
{{ selectedVariant.compare_at_price | money }}
{% endif %}
{% if selectedVariant.compare_at_price > selectedVariant.price %}
{{ "products.product.saving" | t }}
{{ selectedVariant.compare_at_price | minus: selectedVariant.price | money }}
{% endif %}
{% endunless %}
{% if product.variants.size > 1 %}
{% else %}
{% endif %}
{% if settings.product-display-vendor %}
{{ product.vendor }}
{% endif %}
{% if settings.product-sale-goal-use and product.handle == settings.featured-product-main %}
{% include "product-goal" %}
{% endif %}
{% if product.available %}{% include 'subscription-product' %}{% endif %}
{% if collection.title == "Books" %}
{% comment %}if collection is BOOKS then Plus Minus and ADD TO CART button will not display{% endcomment %}
{% else %}
{{ 'general.general.quantity' | t }}
{% endif %}
{% if product.available %}
{% capture add_to_cart_button %}{{ 'products.product.add_to_cart' | t }}{% endcapture %}
{% if product.handle == settings.featured-product-main and settings.product-sale-goal-use %}
{% capture add_to_cart_button %}
{% if settings.product-sale-goal-button != blank %}
{{ settings.product-sale-goal-button }}
{% else %}
{{ "home.goal.pre_order" | t }}
{% endif %}
{% endcapture %}
{% endif %}
{% capture cart_link %}
{{ 'products.product.cart_link' | t }}
{% endcapture %}
{% capture continue_link %}
{{ 'products.product.continue_link' | t }}
{% endcapture %}
{% capture checkout_link %}
{{ 'products.product.checkout_link' | t }}
{% endcapture %}
{% capture product_item %}
{% endcapture %}
{{ 'products.product.success_html' | t: cart_link: cart_link, continue_link: continue_link, checkout_link: checkout_link, product: product_item }}
{% else %}
{% endif %}
{% if settings.product-sale-goal-estimated-delivery-date != blank and showDeliveryEstimate %}
{{ productGoalDeliveryDate }}
{% endif %}
{% if settings.product-show-info-link-1 or settings.product-show-info-link-2 %}
{% endif %}
{% if product.description.size > 0 %}
About This Item
{{ product.description }}
{% endif %}
{% if product.handle == settings.featured-product-main %}
{% assign product-modules = ‘’ %}
{% for i in (1..2) %}
{% capture module %}product-module-{{ i }}{% endcapture %}
{% unless settings[module] == ‘none’ or product-modules contains settings[module] %}
{% capture product-modules %}{{ product-modules }}|{{ settings[module] }}{% endcapture %}
{% endunless %}
{% endfor %}
{% assign product-modules = product-modules | remove_first: ‘|’ %}
{% if product-modules != blank %}
{% assign sections = product-modules | split: ‘|’ %}
{% for section in sections %}
{% include section %}
{% endfor %}
{% endif %}
{% endif %}
{% if settings.product-show-related %}
{% include ‘product-related’ %}
{% endif %}
Thank you in advance.