Integrating with the DebutTheme


Spreadr supports integrating with the Debut Theme.  This guide will walk you through the process of how to add the integration code to your store.


Steps


1. Open your Shopify admin.

2. Click Online Store.

3. Click Themes.

4. Click Actions for your published theme.



5. Click Edit code.



6. Click the file product-template.liquid which appears under Sections.



7. The product-template.liquid file will open in the online code editor. In the online code editor window, locate the HTML for your add-to-cart button (you can do this by searching with CTRL-f or COMMAND-f). The HTML for your add to cart button will look something like this:



<button type="submit" name="add" id="AddToCart-{{ section.id }}" {% unless current_variant.available %}disabled="disabled"{% endunless %} class="btn product-form__cart-submit{% if section.settings.enable_payment_button %} btn--secondary-accent{% endif %}">

     <span id="AddToCartText-{{ section.id }}">

          {% unless current_variant.available %}

                {{ 'products.product.sold_out' | t }}

           {% else %}

                {{ 'products.product.add_to_cart' | t }}

            {% endunless %}

      </span>

</button>

The trick is to find an <input> or <button> tag that includes something like 'Add to Cart', 'AddToCart' 'add-to-cart', etc or the code will be present above the {% endform %} tag.


(If you are having problems please contact support@spreadr.freshdesk.com. We will do the integration for you.)


8. On the very next line, add the following code.


<!--spreadr file--->

{% render 'spreadr-custom', product:product, s_showSpreadr:1, s_hideCart:1 , s_classes: 'btn product-form__cart-submit', s_style: '' %}


<div class="s_original_{{ product.id }}">


//<button>code


</div>



It will look as shown in the image below. The boxes in blue represent the Spreadr integration code. The box in red is the existing <button> code.

 


9. Hit Save.


10. The Add to Cart button on the product pages should now be replaced with the View on Amazon button for Spreadr products,


(If you are having problems please contact support@spreadr.freshdesk.com. We will do the integration for you.)