Streaming live at 10am (PST)

Need the Shopify cart to appear on every page instead of just the ones with shop items?


#1

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?

Thanks


Shopify shopping cart – to show on all pages
#2

You will want to place the cart code in the custom code section of your sites settings. This section is on your dashboard for the site.

Place the cart code in the right before the end body tag section.

http://help.webflow.com/article/how-to-add-custom-head-and-body-code-to-a-webflow-site


#3

That's how I did it. Worked like a champ!


#4

Many thanks for the replies but just one query.

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?

Huge thanks again.


#5

Think I have just figured it out by deleting just the middle line of code.

Seems to be working! Fingers crossed.


#6

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>

#7

I'm trying to figure this one out as well. What code do I use to embed just the cart?


#8