logoSellhub
Sellhub Guides
Sellhub Guides
Widgets: Embeds

This guide tells you how to enable Sellhub embeds on any web app or website. You can embed your products, bundles and cart on any website or web app using the Sellhub embeds.

Getting Started

  1. Navigate to your product or bundle page.
  2. Make sure that your product or bundle is published on your store.
  3. Navigate to the variant or bundle you want to embed.
  4. Click on the "Generate Embed Button" provided in the general tab.

Adding Embed to Website

We will now implement the embed code on a website.

  1. You can add the following code to your store where you want the embed button to appear.

Using Embed Buttons

Make sure to replace the placeholders with the actual IDs.

<!-- for viewing variants -->
<button data-sellhub-variant="variant-id">Buy Variant</button>
 
<!-- for viewing bundles -->
<button data-sellhub-bundle="bundle-id">Buy Bundle</button>
 
<!-- for viewing products -->
<button data-sellhub-product="product-id">Buy Product</button>
<!-- for using add to cart on variants -->
<button data-sellhub-cart-variant="variant-id">Add to Cart</button>
 
<!-- for using add to cart on bundles -->
<button data-sellhub-cart-bundle="bundle-id">Add to Cart</button>
 
<!-- for viewing cart items -->
<button data-sellhub-open-cart-store-url="store-url">Open Cart</button>

Store URL

Store URL should be in the format of https://store-name.sellhub.cx

  1. Also add the following code in the product page which ensures the embed buttons works properly.
<script type="module" src="https://public.sellhub.cx/embeds.js"></script>

You should now have necessary embeds successfully connected with your Sellhub store.

On this page