Open Embeded Cart without Clicking The Cart Icon

New Member
7 0 0

We are trying to figure out if there's a way to open the embeded cart on our external site.

Once you add something to the cart, it shows up with an icon and how many things are in the cart.

We want to be able to click the View Cart link at the top of the page in our navigation to open the embeded cart along with the clicking the icon on the side of the page. 

See the picture below.


Shopify Staff
Shopify Staff
144 0 18

Hi Roger, 

Thanks for your post!

This one's a bit tricky so I had a colleague help me out. A suggestion that was brought up was that your best bet would be to redirect to a product page by changing 




That may be a posssible workaround. You'll likely need to confirm and discuss with Expert. 

Here's a link on editing buttons or carts though for your reference:

I hope this helps!




Shopify Expert
9981 85 1492

That's good advice from John above.

If you're feeling a little experimental however: When the embed button is added to the page there's a series of other scripts added in as well. Now I would expect this to possibly change in the future but as of right now you can open the cart by firing this JavaScript function.


For safety you'd at least want to make sure that the Shopfy embed code is even on the page to start with. A verbose safety check could look like so:

if(typeof ShopifyEmbed === 'object'){
  if(typeof ShopifyEmbed.root === 'object'){
    if(typeof ShopifyEmbed.root.showCartContent === 'function'){


★ Winning Partner of the Build a Business competition. ★
1 Like
New Member
7 0 0

Thank you both for your responses. Jason's reply is just what I was looking for. I put the code in a fuction below where the code for the embeded cart is. Worked like a charm. Thank you both.

While I've got your attention though, is there a way enlarge the text in the embeded cart that says "Shipping and discount codes are added at checkout." at the bottom?

And this may not be possible, but is there a way to change the text at the bottom of the checkout from Terms of Service to something else. Just wondering.


New Member
2 0 0

@Jason  Dear Jason,


Please might you be able to tell me what code I would need now as I think as you alluded to, your excellent solution no longer works?


Thanks so much,