I have added different collections using the ‘Buy Button’ option in Shopify to my webflow site but when you go to a different page of the site the cart icon disappears until you go back to the page with the collection in.
I am assuming that I can just add some code to cover the whole site but cannot find it anywhere. Any ideas?
As I am linking to specific collections on different pages the first collection code I am using is:
<div data-accent_color="767676" data-background_color="ffffff" data-button_background_color="d9d9d9" data-button_text_color="000000" data-cart_button_text="Cart" data-cart_title="Your cart" data-cart_total_text="Total" data-checkout_button_text="Checkout" data-discount_notice_text="Shipping and discount codes are added at checkout." data-embed_type="cart" data-empty_cart_text="Your cart is empty." data-shop="jo-hamilton-interiors.myshopify.com" data-sticky="true" data-text_color="000000"></div>
<div data-background_color="ffffff" data-button_background_color="d9d9d9" data-button_text_color="000000" data-buy_button_out_of_stock_text="Out of Stock" data-buy_button_product_unavailable_text="Unavailable" data-buy_button_text="Add to Cart" data-collection_handle="candles" data-display_size="compact" data-embed_type="collection" data-has_image="true" data-next_page_button_text="Next page" data-product_handle="" data-product_modal="true" data-product_name="" data-product_title_color="000000" data-redirect_to="modal" data-shop="jo-hamilton-interiors.myshopify.com"></div>
<script type="text/javascript">document.getElementById('ShopifyEmbedScript') || document.write('<script type="text/javascript" src="https://widgets.shopifyapps.com/assets/widgets/embed/client.js" id="ShopifyEmbedScript"><\/script>');</script>
I presumed that the last bit which is the script was the bit I needed to past in the site wide code but it doesn’t appear. Is it a different code for just the cart?
Were you able to fix this problem? I am having the same issue. I got it to work on desktop but not on phone. In fact on the phone if I reload the cart I lose it… so I dont see it on other pages and I lose it if I leave that page.
Im using this code:
<div data-accent_color="767676" data-background_color="ffffff" data-button_background_color="000000" data-button_text_color="FFFFFF" data-cart_button_text="Cart" data-cart_title="Cart" data-cart_total_text="Total" data-checkout_button_text="Checkout" data-discount_notice_text="Shipping and discount codes are added at checkout." data-embed_type="cart" data-empty_cart_text="Your cart is empty." data-shop="mt-site.myshopify.com" data-sticky="true" data-text_color="FFFFFF"></div>
<script type="text/javascript">document.getElementById('ShopifyEmbedScript') || document.write('<script type="text/javascript" src="https://widgets.shopifyapps.com/assets/widgets/embed/client.js" id="ShopifyEmbedScript"><\/script>');</script>