Shopify themes, liquid, logos, and UX
Hi There,
I'm currently switching my shop to the new Dawn theme and my original theme was based on Debut. It seems that the Dawn theme uses an Ajax cart to submit an add to cart action, but I'm unable to add the chosen line item properties. Can anybody help me with the code I need to change, or add to the product-form.js file to achieve this?
Thank you in advance.
Solved! Go to the solution
This is an accepted solution.
Hi,
To add the line in the Dawn theme, you can follow these steps below
1. Go to file sections/main-product.liquid, find <div class="product-form__input product-form__quantity"> and insert the following under that line
<div>
<style>
.product__info-container--sticky {
position: static !important;
}
</style>
<label class="form__label" for="pinfel-select">Pinfel pack</label>
<div class="select" id="pinfel-select">
<select required class="select__select required" id="pinfel">
<option class="fruta" value="Fruta">{{ 'products.product.fruit' | t }}</option>
<option class="jogos" value="Jogos">{{ 'products.product.games' | t }}</option>
<option class="rock" value="Rock">Rock</option>
<option class="espaco" value="Espaço">{{ 'products.product.space' | t }}</option>
</select>
{% render 'icon-caret' %}
</div>
</div>
</div>
2. Go to the file assets/product-form.js, find const body = JSON.stringify({ and add the following code under that line
properties: { Pinfel: $('#pinfel-select select').val() },
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024