Shopify / buy-button-js

BuyButton.js is a highly customizable UI library for adding ecommerce functionality to any website.

Home Page:http://shopify.github.io/buy-button-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move Cart Toggle to Header/Nav

ravish-goel opened this issue · comments

Hi folks,

As you already know the cart toggle options are very limited. How can I render the cart toggle inside a div in the header so that I can open that from any of the site pages? For now it appears on the extreme right side of the screen in the middle (vertically). But as soon as I navigate away from the product page, I lose the option to open my cart. So I want to move it to the top inside the header.

commented

If you put buy button code starting at <script type="text/javascript"> (don't use the div section) into the header code of your website, you can get the cart to display on all pages (still on the right side).

That might also work if you're able to insert an actual HTML section into the header/menu of your website (haven't tried that)

<script type="text/javascript"> /*