Personalized checkout and custom promotions with Shopify Scripts
I turned my quick "Add to Cart" button into a plus icon button. Although I'm not sure how I can relocate it to the bottom right corner of the product img, Can anyone help me with that please?
Here is the lines of code for it:
lines 23.-51.
card-product.liquid
<div id="custom_nopop_cart_button" style="position:absolute; z-index:2; top:5px; left:5px">
<script src="{{ 'product_form_nopopup.js' | asset_url }}" defer="defer"></script>
<product-form-nopop class="product-form-nopop">
<div class="product-form__error-message-wrapper" role="alert" hidden="">
<svg aria-hidden="true" focusable="false" class="icon icon-error" viewBox="0 0 13 13">
<circle cx="6.5" cy="6.50049" r="5.5" stroke="white" stroke-width="2"></circle>
<circle cx="6.5" cy="6.5" r="5.5" fill="#EB001B" stroke="#EB001B" stroke-width="0.7"></circle>
<path d="M5.87413 3.52832L5.97439 7.57216H7.02713L7.12739 3.52832H5.87413ZM6.50076 9.66091C6.88091 9.66091 7.18169 9.37267 7.18169 9.00504C7.18169 8.63742 6.88091 8.34917 6.50076 8.34917C6.12061 8.34917 5.81982 8.63742 5.81982 9.00504C5.81982 9.37267 6.12061 9.66091 6.50076 9.66091Z" fill="white"></path>
<path d="M5.87413 3.17832H5.51535L5.52424 3.537L5.6245 7.58083L5.63296 7.92216H5.97439H7.02713H7.36856L7.37702 7.58083L7.47728 3.537L7.48617 3.17832H7.12739H5.87413ZM6.50076 10.0109C7.06121 10.0109 7.5317 9.57872 7.5317 9.00504C7.5317 8.43137 7.06121 7.99918 6.50076 7.99918C5.94031 7.99918 5.46982 8.43137 5.46982 9.00504C5.46982 9.57872 5.94031 10.0109 6.50076 10.0109Z" fill="white" stroke="#EB001B" stroke-width="0.7">
</path>
</svg>
<span class="product-form__error-message"></span>
</div>
<form method="post" action="/cart/add">
<input type="hidden" name="id" value="{{ card_product.variants.first.id }}" />
<div class="product-form__buttons">
<button style="outline:none;border: none; background:transparent" type="submit" name="add" aria-haspopup="dialog">
<div class="loading__spinner hidden" style="width:30px; height:30px">
<svg aria-hidden="true" focusable="false" class="spinner" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
<circle class="path" fill="none" stroke-width="6" cx="33" cy="33" r="30"></circle>
</svg>
</div>
<img src="{{ 'whtplusicon.png' | asset_url }}" width=30x height=30px/>
</button>`
</div>
</form>
</product-form-nopop>
</div>
@HJG
Can you share your site url. The icon location is done by css. If you share your site url we will try to help you.
Thank you
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024