Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
654 views
in Technique[技术] by (71.8m points)

liquid - How to replace Vendor with Add to Cart button on Slick Slider - Shopify Debut theme?

How can I remove the Vendor name and replace with an Add to Cart button on this Slick carousel? This is for the Shopify Debut Theme. Thanks for your help :)

I would like to replace Vendor with an Add to Cart button

question from:https://stackoverflow.com/questions/65856491/how-to-replace-vendor-with-add-to-cart-button-on-slick-slider-shopify-debut-th

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Follow the below steps for Debut theme for Add to cart button on product grid.

  1. In Shopify Admin select "Online Store" and click on Themes.
  2. Choose your main theme.
  3. Click the . . . on the top left-right (see below) and hit "Edit code" option.
  4. Open Snippets -> "product-card-grid.liquid" File and paste below code at the end of the page code.

Here is that code:

<form method="post" action="/cart/add">
  <input type="hidden" name="id" value="{{ product.variants.first.id }}" />
  <input min="1" type="number" id="quantity" name="quantity" value="1"/>
  <input type="submit" value="Add to cart" class="btn" />
</form>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...