Product Option label Yourstore Theme using

Highlighted
New Member
2 0 0
<form id="add-item-form" action="/cart/add" method="post">
{% if product.available %}

{% unless product.variants[0].option1 contains "Default" %}
<div>
{% if product.options.size == 1 %}
<div class="selector-wrapper"><label>{{ product.options | first | replace: 'Color', 'Couleur' }}</label></div>
{% endif %}
<select id="product-select" name="id">
{% for variant in product.variants %}
{% if variant.available %}
<option value="{{ variant.id }}"{% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %}>{{ variant.title }} - {{ variant.price | money }}</option>
{% endif %}
{% endfor %}
</select>

{% if settings.variant_combobox == false %}
{% for option in product.options %}
{% include 'swatch' with option productdesingcenter: false %}
{% endfor %}
{% endif %}

</div>
{% else %}
<input type="hidden" name="id" value="{{ product.variants[0].id }}" />
{% endunless %}

<div class="divider divider--sm"></div>
<div class="wrapper">
<div class="pull-left"><span class="qty-label">{{ 'products.product.quantity' | t }}</span></div>
<div class="pull-left"><input type="text" name="quantity" class="input--ys qty-input pull-left" value="1"></div>
<div class="pull-left"><button type="submit" class="btn btn--ys btn--xxl addtocart">{{ 'products.product.add_to_cart_html' | t }}</button></div>
</div>
<script>
jQuery('.addtocart').click(function(e) {
e.preventDefault();
Shopify.addItemFromFormStart('add-item-form', {{ product.id }});
});
</script>
{% else %}
<br>
<div class="pull-left"><button disabled class="btn btn--ys btn--xxl">{{ 'products.product.unavailable' | t }}</button></div>
<br>
<br>
<br>
{% endif %}
</form>

We're running a e-commerce on Shopify and we can't use our own Product Option label because Google Shopping only recognizes fields in english. So we need to translate the field on the store front, but keeping the option in english to activate the product feed in Google Merchant Center.

 

0 Likes
Highlighted
Shopify Partner
46 0 1

Hey, you can have a look at a third-party app to help you in setting up your feed, please have a look at Easy Google shopping feed app by AdNabu, this app automated most of the tasks related to setting up the products, it will also help you with the language issue you are facing.

Please do check it out, hope it helps.

AdNabu helps E-commerce business power up their Google Ad Campaigns to increase their sales and reduce their cost per sale.
0 Likes