User Tools

Site Tools


public:apps:upsell:manual_installation

Manual installation

1. Add a snippet "shopify-upsell-api-config.liquid" with next code:

<script>
/* Upsell System App Config */
if (!window.ShopifyUpsellApiConfig) {
    window.ShopifyUpsellApiConfig = {
        "template": {{ template | json }},
        "cart": {{ cart | json }},
        "appName": "shopify_upsell_api",
        "formSelector": 'form[action="/cart"]',
        "checkoutButtonSelector": '[type="submit"][name="checkout"]',
        "updateInputSelector": '[name^="updates["]',
        "productFormSelector": 'form[action="/cart/add"]',
        "addToCartSelector": '[type="submit"]',
        "variantInputSelector": '[name="id"], [name="id[]"]',
        "quantityInputSelector": '[name="quantity"]',
        "blockDefaultAddToCart": true,
        "redirectToCartAfterHide": true,
        "redirectToCheckoutAfterHide": true,
        "forceCheckoutRedirect": false,
        "baseUrl": '/a/shopify-upsell-api/v1',
        "debug": false,
    };
}
</script>

{% include 'shopify-upsell-api-data' %}

2. Add a snippet "shopify-upsell-api-data.liquid" with next code:

<script>
/* Upsell System App Data */
if (!window.ShopifyUpsellApiConfig) {
    window.ShopifyUpsellApiConfig = {
        settings: {"enabled":true,"enabled_for_mobile":true,"popup_type":"flash","popup_trigger":"cart_page","popup_products_count":16,"popup_font_family":"Arial","popup_google_font":"","popup_title_color":"#637381","popup_title_size":24,"popup_background":"#ffffff","product_title_color":"#000000","product_title_size":16,"product_text_color":"#777777","product_text_size":16,"product_old_price_color":"#637381","product_old_price_size":16,"product_price_color":"#bf9f66","product_price_size":16,"buy_button_caption":"Add to cart","buy_button_color":"#ffffff","buy_button_background":"#919eab","discard_button_caption":"No, thanks","discard_button_color":"#777777","default_offer_message":"Special offer","default_success_message":"Success Message","offer_free_message":"Free","offer_discount_message":"You got N% off!"}
    };
}
</script>

3. In the theme template "theme.liquid" right before the closing tag "</head>" add the code to connect the snippet:

<!-- Snippet for Upsell System app -->
{% include 'shopify-upsell-api-config' %}

If this does not work, please write to support@kad.systems

public/apps/upsell/manual_installation.txt · Last modified: 08.07.21 в 17:34 by Андрей Скрипников