You've built a website using HTML, CSS, and JavaScript.

The design looks great, your pages are responsive, and you've even created product cards with images, descriptions, prices, and Add to Cart buttons.

But there is one problem.

How do you turn those product cards into a working online store where customers can add products to a cart, make payments, and place orders?

Creating a shopping cart interface with JavaScript is relatively straightforward. Building a complete e-commerce system behind that interface is a different challenge.

You need to handle:

  • Product management.
  • Shopping cart functionality.
  • Product prices and quantities.
  • Inventory tracking.
  • Customer information.
  • Payment processing.
  • Payment verification.
  • Order management.
  • Order notifications.

You could build all of this yourself using Node.js, PHP, Python, or another backend technology.

However, if your goal is to start selling products from an existing HTML website, you don't necessarily need to build and maintain your own ecommerce backend.

In this tutorial, I'll show you how to add a working shopping cart and checkout to your HTML website using Shoprivet.

You'll be able to manage products, accept payments, track inventory, and receive orders while keeping your existing website.

Shoprivet product catalog and shopping cart embedded into an existing website

An example of a working product catalog embedded into an existing website.

Can You Build a Shopping Cart Using Only HTML, CSS, and JavaScript?

Yes, you can build the frontend of a shopping cart using HTML, CSS, and JavaScript.

For example, you could create a product card like this:

<div class="product">
  <img src="tshirt.jpg" alt="Classic Cotton T-Shirt" />

  <h2>Classic Cotton T-Shirt</h2>

  <p>$45.00</p>

  <button onclick="addToCart()">
    Add to Cart
  </button>
</div>

You could then use JavaScript to store the selected products in an array or in the browser's localStorage.

This works for demonstrating basic shopping cart functionality.

However, what happens when a customer wants to complete their purchase?

You still need a reliable way to:

  • Verify product prices.
  • Check whether products are in stock.
  • Calculate the final order total.
  • Process customer payments.
  • Verify that payments were successful.
  • Store orders.
  • Notify the business owner.

You should not rely on browser-side JavaScript alone to perform these operations.

For example, a customer could modify a product's price using the browser's developer tools if your checkout blindly trusts prices supplied by the frontend.

A production ecommerce system needs trusted server-side processing.

The good news is that you don't necessarily have to build that backend yourself.

Three Ways to Add a Shopping Cart to an HTML Website

There are several approaches you can take.

| Approach | How it works | Best for | |---|---|---| | Build your own ecommerce backend | Implement product management, cart, checkout, payments, and orders yourself | Applications requiring specialized business logic | | Use payment links | Link individual products to a hosted payment page | Selling a small number of products with simple purchasing requirements | | Use an embeddable ecommerce platform | Embed a product catalog, shopping cart, and checkout into your website | Businesses and developers who want a complete shopping experience without maintaining a backend |

For this tutorial, we'll use the third approach.

Instead of building a shopping cart from scratch, we'll connect our HTML website to Shoprivet using a small JavaScript embed snippet.

What Is Shoprivet?

Shoprivet is an ecommerce platform that allows developers and businesses to sell products through existing websites, hosted storefronts, or custom ecommerce applications.

It provides three main ways to sell products:

  • Embeddable product catalogs: Add products, a shopping cart, and checkout to an existing website.
  • Hosted storefronts: Create and publish a complete online store using a visual builder.
  • Commerce REST API: Build custom ecommerce experiences using supported backend endpoints.

For this tutorial, we'll focus on the embeddable product catalog.

This allows us to add ecommerce functionality to an HTML website without creating a separate backend application.

Shoprivet landing page

How the Shopping Cart Integration Works

The architecture is relatively simple.

Your HTML website continues to handle your pages, branding, content, and overall design.

Shoprivet handles the commerce functionality.

Your HTML Website
        |
        v
Embedded Product Catalog
        |
        v
Customer Adds Products to Cart
        |
        v
Shopping Cart
        |
        v
Checkout
        |
        v
Connected Payment Gateway
        |
        v
Payment Verification
        |
        v
Shoprivet Orders Dashboard

You manage your products, prices, inventory, and orders from a central dashboard.

Your website displays the products through the embedded catalog.

You do not need to install a database, create your own payment API, or implement an order management dashboard.

What You'll Need

Before getting started, you'll need:

  • An HTML website or access to its source code.
  • A Shoprivet account.
  • At least one product to sell.
  • An account with a supported payment provider if you want to accept online payments.

Your website can be hosted on Cloudflare Pages, Netlify, Vercel, GitHub Pages, or another static website hosting platform that supports the required JavaScript and external resources.

You do not need to change your hosting provider.

Step 1: Create a Free Shoprivet Account

Visit Shoprivet and create an account.

Enter your name, email address, and password, then complete the email verification process and sign in.

Shoprivet account registration page

Shoprivet offers a free plan that allows you to create a store, add products, and test the ecommerce integration before choosing a paid plan.

Step 2: Create Your Store

Once you have signed in, create a new blank store.

The store creation process takes you through three stages.

Enter Your Store Details

Give your store a name and optionally add a description.

For this tutorial, we'll create a clothing store called Mode & Co.

Shoprivet store name and description configuration

Choose Your Store Type

Select whether you want to sell physical or digital products.

For example:

  • Physical products: Clothing, accessories, electronics, skincare products, or furniture.
  • Digital products: Ebooks, templates, downloadable resources, or other digital goods.

Since we're creating a clothing store, we'll select physical products.

Shoprivet physical and digital product store selection

Select Your Store Currency

Choose the currency you want to use for your product prices.

For this example, we'll use USD.

Shoprivet store currency selection

When choosing your currency, make sure it is compatible with the payment provider you intend to connect.

Once the store has been created, you can start adding products.

You do not need to create or publish a separate hosted storefront for this tutorial.

Step 3: Add Products to Your Store

From your Shoprivet dashboard, navigate to Products and click Add product.

Shoprivet products dashboard showing the Add product action

Let's create our first product.

Product name: Classic Cotton T-Shirt

Description:
Comfortable everyday cotton T-shirt made
for casual wear.

Price: $45.00

Inventory: 50 units

Upload your product images and configure the relevant product information.

Shoprivet product editor showing product details, pricing, images, and inventory

You can save products as drafts while preparing them.

When a product is ready to be displayed on your website, publish it.

Publishing a product from the Shoprivet dashboard

Published products become eligible to appear in your public product catalog.

You can repeat this process to add more products.

For example:

| Product | Price | Stock | |---|---:|---:| | Classic Cotton T-Shirt | $45 | 50 | | Essential Hoodie | $75 | 30 | | Everyday Sneakers | $90 | 20 | | Canvas Tote Bag | $25 | 40 |

These are example products for our demonstration store.

What About Product Sizes and Colors?

If you're selling clothing or other products with different options, you may need product variants.

For example:

  • Small, medium, and large sizes.
  • Black, white, and blue colors.
  • Different product configurations.

Shoprivet supports product options and variants on eligible paid plans.

You can review the pricing page if your store requires this functionality.

Step 4: Connect a Payment Gateway

A shopping cart allows customers to select products, but you also need a way for them to complete their purchases.

Shoprivet provides merchant payment integrations for:

  • Stripe.
  • Paystack.
  • Flutterwave.
  • Razorpay.
  • PayPal.

The available options depend on your merchant account, country, store currency, and provider configuration.

From your store dashboard, open Settings and navigate to the payment settings.

Shoprivet payment gateway settings showing supported payment providers

Choose the payment gateway you want to connect.

For example, if you already have a Stripe account, select Connect and provide the required configuration.

Connecting Stripe to a Shoprivet store

Use the provider's test environment while developing and testing your website.

Configure any required payment webhooks according to the instructions provided in the dashboard and the payment provider's documentation.

Where Does the Customer's Money Go?

Shoprivet uses your connected merchant payment provider to process customer payments.

You do not need to transfer your sales revenue from a separate Shoprivet wallet.

Shoprivet does not add a separate platform sales commission to customer purchases. However, your payment provider may charge its own processing fees.

Do I Need to Write Payment Processing Code?

For the standard embedded catalog integration, you do not need to implement your own payment processing endpoints.

The checkout uses the connected payment gateway.

You should still test the entire payment and order verification workflow before accepting real customer payments.

Never include private payment gateway credentials in your HTML or frontend JavaScript.

Step 5: Create Your Embeddable Product Catalog

Now that we have products and a payment gateway configured, we can create the product catalog that will appear on our HTML website.

From your Shoprivet dashboard, navigate to Catalog widgets.

Shoprivet Catalog widgets dashboard

A default widget is created automatically, and you can also create additional widgets for different product selections or website pages.

For example, you might want:

  • A catalog containing all your products.
  • A catalog containing only clothing.
  • A catalog containing selected accessories.
  • A catalog for a promotional landing page.

Each widget can have its own product selection and appearance settings.

Create a new widget or open the existing default widget.

Step 6: Customize Your Product Catalog and Shopping Cart

One advantage of using an embeddable product catalog is that you can customize its appearance to fit your existing website.

Open the catalog widget editor.

Shoprivet visual catalog widget editor

Select the Products You Want to Display

You can configure which products should appear in the catalog.

Shoprivet catalog widget product selection

For example, if your HTML website has a dedicated clothing page, you can configure its catalog to display only the relevant products.

Customize the Product Layout

Depending on your widget configuration, you can adjust the available design settings, including:

  • Product grid layout.
  • Number of columns.
  • Mobile layout.
  • Product display options.
  • Buttons.
  • Filters.

Shoprivet product catalog design settings

The goal is to make the product catalog fit naturally into your existing website rather than forcing you to adopt an entirely new website design.

Customize the Shopping Cart

You can also configure the shopping cart's appearance.

Shoprivet shopping cart settings tab

Shoprivet shopping cart design settings

Customizing the shopping cart icon in Shoprivet

Once you're satisfied with the catalog and shopping cart appearance, save your changes.

You now have a product catalog with shopping cart functionality that can be embedded into your HTML website.

Step 7: Copy Your Shopping Cart Embed Code

From the widget editor, open Settings and locate the embed code.

You can also use the copy action from the Catalog widgets dashboard.

Shoprivet catalog widget embed code

The generated embed code follows a structure similar to this:

<div
  data-shoprivet="YOUR_STORE_SLUG"
  data-shoprivet-widget="YOUR_WIDGET_ID"
></div>

<script
  src="https://YOUR_API_ORIGIN/widget.js"
  async
></script>

This is an illustrative example.

Copy the actual embed code from your Shoprivet dashboard because it contains your store identifier, widget identifier, and the correct JavaScript resource URL.

The HTML element determines where the catalog will appear on your website.

The JavaScript resource loads the catalog and its associated ecommerce functionality.

Unlike a simple payment link, the widget provides a product browsing and shopping cart experience within your website.

Step 8: Add the Shopping Cart to Your HTML Website

Let's create a simple HTML website and embed our Shoprivet catalog into it.

If you already have an existing website, you can skip creating a new page and insert the embed code into the appropriate section.

Create a file called index.html.

Add the following code:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />

  <meta
    name="viewport"
    content="width=device-width, initial-scale=1.0"
  />

  <title>Mode & Co. | Online Store</title>

  <style>
    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: Arial, sans-serif;
      color: #171717;
      background-color: #ffffff;
      line-height: 1.6;
    }

    header {
      border-bottom: 1px solid #e5e7eb;
      background-color: #ffffff;
    }

    nav {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
    }

    .logo {
      font-size: 24px;
      font-weight: bold;
    }

    .nav-links {
      display: flex;
      flex-wrap: wrap;
      gap: 24px;
    }

    .nav-links a {
      color: #171717;
      text-decoration: none;
    }

    .hero {
      background-color: #f5f5f5;
      padding: 80px 24px;
      text-align: center;
    }

    .hero h1 {
      font-size: clamp(32px, 5vw, 48px);
      line-height: 1.2;
      margin: 0 0 16px;
    }

    .hero p {
      color: #666666;
      max-width: 600px;
      margin: 0 auto 28px;
    }

    .hero a {
      display: inline-block;
      padding: 14px 24px;
      background-color: #171717;
      color: #ffffff;
      border-radius: 6px;
      text-decoration: none;
    }

    .shop-section {
      max-width: 1200px;
      margin: 0 auto;
      padding: 64px 24px;
    }

    .section-heading {
      text-align: center;
      margin-bottom: 40px;
    }

    .section-heading h2 {
      font-size: 32px;
      margin-bottom: 8px;
    }

    .section-heading p {
      color: #666666;
    }

    .about-section {
      background-color: #f5f5f5;
      padding: 64px 24px;
      text-align: center;
    }

    .about-section p {
      max-width: 600px;
      margin: 0 auto;
    }

    footer {
      padding: 24px;
      text-align: center;
      border-top: 1px solid #e5e7eb;
      color: #666666;
    }

    @media (max-width: 600px) {
      nav {
        flex-direction: column;
      }

      .hero {
        padding: 56px 20px;
      }

      .shop-section {
        padding: 40px 16px;
      }
    }
  </style>
</head>

<body>

  <header>
    <nav>
      <div class="logo">Mode & Co.</div>

      <div class="nav-links">
        <a href="#home">Home</a>
        <a href="#shop">Shop</a>
        <a href="#about">About</a>
      </div>
    </nav>
  </header>

  <main>

    <section class="hero" id="home">
      <h1>Everyday Style, Made Simple.</h1>

      <p>
        Discover comfortable clothing and accessories
        designed for your everyday lifestyle.
      </p>

      <a href="#shop">Shop Collection</a>
    </section>

    <section class="shop-section" id="shop">

      <div class="section-heading">
        <h2>Our Products</h2>

        <p>
          Explore our latest collection and find
          something you love.
        </p>
      </div>

      <!--
        Paste the complete embed code copied
        from your Shoprivet dashboard here.
      -->

    </section>

    <section class="about-section" id="about">
      <h2>About Mode & Co.</h2>

      <p>
        We believe everyday essentials should be
        comfortable, stylish, and easy to shop.
      </p>
    </section>

  </main>

  <footer>
    <p>Mode & Co. All rights reserved.</p>
  </footer>

</body>
</html>

Replace the HTML comment inside the shop section with the actual embed code copied from your Shoprivet dashboard.

Your shop section will follow a structure similar to this:

<section class="shop-section" id="shop">

  <div class="section-heading">
    <h2>Our Products</h2>
    <p>Explore our latest collection.</p>
  </div>

  <!-- Your Shoprivet catalog container -->

  <div
    data-shoprivet="YOUR_STORE_SLUG"
    data-shoprivet-widget="YOUR_WIDGET_ID"
  ></div>

  <!-- Your actual Shoprivet widget script -->

  <script
    src="https://YOUR_API_ORIGIN/widget.js"
    async
  ></script>

</section>

Again, use the exact generated snippet from your dashboard rather than the placeholder values shown above.

Save the file and open your website using a local development server.

If you have Python installed, you can run:

python3 -m http.server 8000

Then open:

http://localhost:8000

Your HTML website should load the embedded product catalog, provided the widget is configured correctly and its external resources are accessible.

Here is an example of a Shoprivet catalog embedded into an existing website:

Shoprivet product catalog embedded into a live website

An example of an embedded catalog displaying products within an existing website. This screenshot is not a rendering of the sample HTML above.

Notice that we haven't created a backend application.

We haven't installed Node.js dependencies, configured a database, written a shopping cart state management system, or implemented payment processing endpoints.

Our website handles the presentation, while Shoprivet provides the commerce functionality.

Step 9: Test the Shopping Cart

Open your website in the browser and select a product.

Click Add to Cart.

The shopping cart allows customers to review their selected products before proceeding to checkout.

Shoprivet shopping cart displaying selected products and order totals

Test the following customer interactions:

  • Adding a product to the cart.
  • Adding multiple products.
  • Increasing or decreasing product quantities.
  • Removing products.
  • Reviewing product prices and totals.
  • Proceeding to checkout.

You should also test the shopping cart on mobile devices.

This is particularly important because many customers browse and purchase products using their phones.

Do I Need to Implement Cart State Management?

Not for the standard Shoprivet catalog widget.

You do not need to create your own JavaScript shopping cart array, React Context, Redux store, or custom localStorage implementation for the embedded cart.

The widget provides the shopping cart experience.

This is useful if you're building static websites and want to avoid introducing an entire frontend framework just to manage ecommerce functionality.

Step 10: Test the Checkout and Payment Flow

Once you have added products to the shopping cart, proceed to checkout.

Customers provide the required order information and select an available payment method.

Shoprivet checkout interface

Checkout showing test payment details.

The exact checkout and payment experience depends on the connected payment gateway and store configuration.

Complete a test transaction using your payment provider's supported test environment.

Successful Shoprivet checkout confirmation

Before accepting real customer payments, verify that:

  • The correct products appear in the order.
  • Product quantities are correct.
  • The order total matches the expected amount.
  • The payment gateway processes the transaction.
  • Payment verification completes successfully.
  • The order appears in your Shoprivet dashboard.
  • Failed or cancelled payments are handled appropriately.

A successful redirect or checkout confirmation page alone is not sufficient proof that a payment has been verified.

Always check the recorded payment status and your payment provider's transaction information.

Step 11: Receive Order Notifications

Once a customer places an order, the business owner needs to know about it.

Shoprivet provides order email notifications so that merchants can be informed when orders are placed.

Shoprivet order notification email containing customer order information

An example of an order notification email.

This is particularly useful for small businesses that do not want to constantly monitor an order management dashboard.

You do not need to implement your own email notification service for the standard order notification workflow.

During testing, confirm that the expected email notification is delivered.

An order notification should not be treated as independent proof that the customer's payment has been verified.

Step 12: Manage Orders From Your Dashboard

Receiving a customer payment is only part of running an online store.

You also need to manage the order after the purchase.

For example, if you sell physical products, you may need to:

  • Review the customer's order.
  • Prepare the purchased items.
  • Process the order.
  • Ship the products.
  • Mark the order as delivered.

From your Shoprivet dashboard, navigate to Orders.

Shoprivet orders dashboard showing customer orders and statuses

You can open an individual order to review its details.

Shoprivet individual order details and fulfillment controls

Shoprivet supports order fulfillment states such as:

| Status | Meaning | |---|---| | Pending | The order is awaiting further processing | | Processing | The business is preparing the order | | Shipped | The order has been dispatched | | Delivered | The order has reached the customer | | Cancelled | The order has been cancelled | | Refunded | The order is recorded as refunded |

Payment verification is separate from ordinary fulfillment updates.

For example, changing an order's fulfillment status does not independently verify a payment or establish that a refund has been processed by the payment provider.

This distinction is important when managing customer purchases.

Instead of building your own order management interface, you can manage the order workflow directly from Shoprivet.

What Happens When You Change a Product's Price?

Imagine you've created an HTML website containing 20 products.

If each product is hardcoded into your HTML, changing prices might require editing the source code and redeploying the website.

For example:

<div class="product">
  <h2>Classic Cotton T-Shirt</h2>
  <p>$45.00</p>
</div>

If the price changes to $39, you would need to update the HTML.

Now imagine managing hundreds of products or making frequent price changes.

This becomes increasingly difficult to maintain.

With Shoprivet, product information is managed from your dashboard.

You can update:

  • Product names.
  • Product descriptions.
  • Product images.
  • Prices.
  • Inventory.
  • Product availability.

Your embedded catalog loads the product information from Shoprivet.

Eligible updates appear when the catalog reloads.

If you add a new product, it can appear in the catalog without editing your website's HTML, provided the widget is configured to include that product.

If the widget displays an explicitly selected set of products, update its product selection first.

This means you can manage your ecommerce operations independently of your website's source code.

Managing Product Inventory Without Building a Database

Inventory management becomes important when selling physical products.

For example, suppose your business has:

  • 50 T-shirts.
  • 30 hoodies.
  • 20 pairs of sneakers.

You need a reliable way to manage product availability as customers place orders.

If you're building your own ecommerce system, you would need to design product inventory tables and implement logic for stock availability and order processing.

Shoprivet provides product inventory controls within its product management dashboard.

You can configure stock tracking for products that require it.

Before launching a store with limited inventory, test the behavior when products are out of stock and when multiple customers attempt to purchase the same product.

Inventory tracking is another reason why a complete ecommerce backend can be more useful than a basic JavaScript shopping cart.

Deploying Your HTML Ecommerce Website

Once you have tested the product catalog, shopping cart, checkout, and order workflow, you can deploy your website.

Because the commerce functionality is provided through an external widget, your website can remain static.

Common hosting options include:

| Hosting platform | Suitable for | |---|---| | Cloudflare Pages | Static websites and frontend projects | | Netlify | Static websites and Git-based deployments | | Vercel | Frontend applications and static websites | | GitHub Pages | Static HTML, CSS, and JavaScript websites |

Your hosting environment must allow the widget's JavaScript and required external resources to load.

If you're already hosting your website, simply deploy the updated HTML containing your embed code.

You do not need to migrate your website to Shoprivet.

After deployment, open the production website and test the shopping experience again.

A catalog that works locally should still be tested on the published domain, particularly if your website uses a restrictive Content Security Policy.

You might be wondering whether you actually need a complete ecommerce platform.

For some websites, a payment link may be sufficient.

For example, if you're selling a single ebook, you might only need a Buy Now button that redirects customers to a payment page.

However, the requirements change when customers need to browse multiple products, select quantities, add products to a shopping cart, and complete a combined purchase.

Here is how the approaches compare.

| Feature | Custom JavaScript Cart | Payment Links Alone | Shoprivet | |---|---|---|---| | Display products | Build yourself | Build separately | Built-in catalog | | Shopping cart | Build yourself | Generally not included | Built-in | | Product management | Build yourself | Provider-dependent | Built-in | | Inventory management | Requires backend implementation | Provider-dependent | Available | | Payment processing | Requires integration | Provided by payment service | Connected merchant gateways | | Payment verification | Requires trusted backend | Provider-dependent | Integrated workflow | | Order dashboard | Build yourself | Provider-dependent | Built-in | | Order email notifications | Implement separately | Provider-dependent | Available | | Product variants | Implement yourself | Provider-dependent | Available on paid plans | | Custom frontend | Full control | Control over surrounding website | Configurable widget or REST API | | Backend maintenance | Your responsibility | Limited | Managed commerce backend |

A custom ecommerce backend may be appropriate if you need specialized business logic or complete control over every aspect of the purchasing experience.

Payment links may be appropriate if your purchasing requirements are simple.

But if you want a complete product catalog, shopping cart, checkout, inventory management, and order dashboard, an embeddable ecommerce platform can save considerable development effort.

Adding Ecommerce to Multiple Client Websites

If you're a freelance developer or web development agency, you might regularly build websites for businesses that want to sell products.

For example:

  • A clothing business selling apparel.
  • A skincare business selling beauty products.
  • A bakery selling packaged goods.
  • An artist selling prints.
  • A furniture business selling home accessories.
  • A creator selling digital products.

Without a reusable e-commerce solution, you might need to implement similar functionality for every client.

You would repeatedly build or integrate:

  • Product management.
  • Shopping carts.
  • Payment processing.
  • Inventory tracking.
  • Order management.
  • Customer notifications.

With Shoprivet, you can create separate stores for different client websites, subject to your subscription plan.

Each store can have its own products, catalog widgets, payment configuration, and orders.

Your workflow becomes:

Create a store for the client
            |
            v
Add and publish products
            |
            v
Connect the client's payment gateway
            |
            v
Create and customize a catalog widget
            |
            v
Embed the widget into the client's website
            |
            v
Test checkout and order processing
            |
            v
Launch the website

The client can manage products and orders through the appropriate dashboard access arrangement without requiring you to manually update product cards every time a price changes.

For agencies, this creates a repeatable approach to delivering ecommerce websites without maintaining separate custom commerce backends for every project.

Review the available account and store management options before deciding how client ownership and access will be handled.

What If I Want Complete Control Over the Shopping Cart Design?

The embedded catalog is useful when you want to add ecommerce functionality quickly.

However, some developers may want to build their own product pages and create a completely custom shopping experience.

Shoprivet also provides a commerce REST API.

This allows developers to build custom frontends using technologies such as:

  • React.
  • Next.js.
  • Vue.
  • Astro.
  • Svelte.
  • HTML and JavaScript.

You can use supported commerce endpoints according to the current API documentation.

Generate the appropriate credentials from the Developers section of your dashboard.

Never expose private merchant API keys in public frontend code.

Depending on the endpoints and authentication requirements, a custom API integration may require a secure server-side component.

If your primary goal is to add a shopping cart to a static HTML website without writing backend code, the catalog widget is the simpler approach.

Explore Shoprivet's developer features.

What If I Don't Already Have an HTML Website?

You can also use Shoprivet to create a complete hosted online store.

Instead of writing your own HTML, CSS, and JavaScript, you can choose a storefront template and customize it using the visual storefront builder.

Shoprivet storefront templates gallery

Additional Shoprivet storefront templates

Choose a design that suits your business, then customize its sections, text, images, and available layout settings.

Shoprivet visual storefront builder

Customizing an online store using the Shoprivet visual builder

Once your store is ready, publish the storefront.

You can use a Shoprivet subdomain or configure a custom domain on an eligible paid plan.

This gives you three ways to build your ecommerce website without starting over as your requirements change.

| Approach | Best for | |---|---| | Embedded catalog | Adding ecommerce to an existing website | | Hosted storefront | Creating a complete online store without coding | | Commerce REST API | Building a custom ecommerce frontend |

Explore Shoprivet storefront templates.

How Much Does It Cost to Add a Shopping Cart to Your HTML Website?

Building an ecommerce backend yourself involves more than the initial development cost.

You may also need to pay for hosting, database infrastructure, monitoring, maintenance, and additional integrations.

Shoprivet provides free and paid plans based on your store's requirements.

The published monthly pricing structure includes:

| Feature | Free | Premium | Business | |---|---:|---:|---:| | Monthly price | $0 | $15 | $39 | | Products | 25 | Unlimited | Unlimited | | Orders per billing period | 50 | 1,000 | 10,000 |

Plan limits apply at the account level.

The Free plan includes one store, while paid plans provide higher store and payment configuration allowances.

Shoprivet does not charge a separate platform commission on customer purchases.

Your connected payment gateway may still charge its standard processing fees.

Check the current Shoprivet pricing page for the latest pricing, limits, and feature availability.

When Should You Consider the Premium Plan?

The free plan is useful for testing the integration or starting a small online store.

However, as your business grows, you may need:

  • More than 25 products.
  • Higher order allowances.
  • Product variants for sizes and colors.
  • Additional stores.
  • Additional payment gateway configurations.
  • A custom domain for your hosted storefront.

For example, a clothing business selling products with multiple sizes and colors may benefit from product variants from the beginning.

An established business processing regular customer orders may also need higher monthly order allowances.

Premium provides an upgrade path for businesses with these requirements.

When Should You Consider the Business Plan?

If you're a developer or agency managing multiple ecommerce websites, your requirements may be different from those of an individual merchant.

You may need to manage more stores, support higher order volumes, and configure multiple payment gateways.

The Business plan is designed for larger commerce requirements.

Rather than maintaining a separate ecommerce backend for every client website, you can use a shared commerce platform while organizing products and orders into their respective stores.

Compare Shoprivet plans.

Troubleshooting Your HTML Shopping Cart Integration

My Product Catalog Is Not Showing

First, confirm that you copied the complete embed code from your Shoprivet dashboard.

Make sure that:

  • The store identifier is correct.
  • The widget identifier is correct.
  • The JavaScript resource URL is correct.
  • The widget has been saved.
  • Your products have been published.
  • The products are included in the widget's selection.

Open your browser's developer tools and check the Console and Network tabs for errors.

My Products Are Missing From the Catalog

Check whether the products have been published.

Products saved as drafts are not eligible to appear in public catalogs.

Also check whether your widget displays all eligible products or only an explicitly selected group.

If it displays selected products, update the widget configuration to include the missing products.

My Shopping Cart Works Locally but Not After Deployment

Check whether your published website permits the widget's external JavaScript and network requests.

A restrictive Content Security Policy can prevent third-party scripts or external resources from loading.

Review the actual browser error and configure the necessary trusted origins.

Do not disable your entire security policy just to make the widget work.

Customers Cannot Complete Their Payments

Open your store's payment settings and confirm that your payment provider is configured correctly.

Check:

  • Merchant credentials.
  • Test or live environment selection.
  • Supported store currency.
  • Merchant account activation.
  • Required payment webhooks.
  • Errors returned by the payment provider.

A configured payment gateway does not automatically guarantee successful transactions.

Test the complete checkout and payment verification workflow before accepting customer orders.

The Payment Was Successful but the Order Status Is Incorrect

Review the payment provider's transaction record and the corresponding Shoprivet order.

Check whether any required payment webhooks or verification steps have completed.

Do not manually mark an order as paid solely because a customer has returned to a success page.

Confirm the payment using the appropriate trusted payment information.

My Product Price Has Changed but the Website Still Shows the Old Price

Confirm that the updated product information has been saved.

Reload the website so the catalog can retrieve the updated product data.

If the old information continues to appear, inspect the widget's network requests and any relevant caching behavior.

My Shopping Cart Does Not Look Right on Mobile

Open the catalog widget editor and review the available responsive layout and cart design settings.

Also check your website's surrounding CSS.

For example, a parent container with a fixed width or restrictive overflow settings may interfere with the embedded catalog's appearance.

Test the final website on both desktop and mobile devices.

Frequently Asked Questions

Can I add a shopping cart to an HTML website without a backend?

Yes. You can embed a product catalog and shopping cart provided by a hosted ecommerce backend such as Shoprivet.

Your HTML website remains responsible for its design and content, while Shoprivet provides the commerce functionality.

Can I create a shopping cart using only JavaScript?

Yes, you can create the frontend shopping cart using JavaScript.

However, secure payment processing, authoritative pricing, inventory management, and order verification require trusted backend services.

You can either build those services yourself or use a hosted ecommerce backend.

Do I need Node.js or PHP to add a shopping cart to my website?

No. If you're using the Shoprivet catalog widget, you do not need to create a Node.js or PHP application for the standard integration.

You can embed the catalog using HTML and JavaScript.

Can I add a shopping cart to a static website?

Yes. A static website can load an external ecommerce widget.

You can use compatible hosting platforms such as Cloudflare Pages, Netlify, Vercel, or GitHub Pages without implementing your own ecommerce backend.

Can I accept Stripe payments on my HTML website?

Yes. Shoprivet supports Stripe merchant payment integration.

Connect your Stripe account through the payment settings and configure the required payment and verification workflow.

Availability depends on your merchant account, currency, and configuration.

Can I accept Paystack or Flutterwave payments?

Yes. Shoprivet provides merchant integrations for Paystack and Flutterwave.

These can be useful for businesses operating in supported African markets.

Check the payment provider's country, currency, and merchant eligibility requirements before configuring your store.

Can I use PayPal with my HTML shopping cart?

Yes. Shoprivet provides a PayPal merchant integration.

The available payment experience depends on your PayPal account and store configuration.

Can I add a shopping cart without using Shopify?

Yes. Shopify is not the only way to add ecommerce functionality to an existing website.

Shoprivet allows you to embed a product catalog, shopping cart, and checkout while keeping your existing website and hosting provider.

Can I keep my existing HTML website design?

Yes. You can retain your existing navigation, homepage, About page, branding, and other website sections.

The embedded catalog appears wherever you insert its generated code.

You can customize the available catalog and cart appearance settings from your Shoprivet dashboard.

If you need complete control over individual product markup and purchasing interactions, consider the commerce REST API and its authentication requirements.

Can I manage products without editing HTML?

Yes. Product information is managed from your Shoprivet dashboard.

You can update product prices, descriptions, images, and inventory without manually editing hardcoded product cards.

Eligible updates appear when the catalog reloads.

Can I sell products with different sizes and colors?

Yes. Shoprivet supports product options and variants on eligible paid plans.

This is useful for clothing, footwear, accessories, and other products with multiple configurations.

Can I add multiple product catalogs to my website?

Shoprivet supports multiple catalog widgets for a store.

You can configure different widgets to display different product selections across your website.

Test the shopping experience when using multiple widgets on the same page.

Can I sell digital products?

Shoprivet supports digital product stores as well as physical product stores.

Review and test the digital product purchase and delivery workflow before launching.

Does Shoprivet charge a percentage of my sales?

Shoprivet does not add a separate platform sales commission to customer purchases.

However, your connected payment gateway may charge payment processing fees.

Can I add a shopping cart to my HTML website for free?

Yes. Shoprivet provides a free plan that allows you to create a store, add products, and test the embedded shopping cart.

Usage allowances and advanced features depend on your selected plan.

Create a free Shoprivet account to get started.

Can I manage online stores for multiple clients?

Yes. Shoprivet supports multiple stores on eligible paid plans.

This can be useful for developers and agencies that want a repeatable ecommerce integration across client websites.

Review the store limits and account access arrangements before onboarding clients.

Final Thoughts

Adding a shopping cart to an HTML website does not have to mean building an entire ecommerce application from scratch.

You can keep your existing website while using a dedicated ecommerce backend to manage the commerce functionality.

With Shoprivet, you can:

  • Add a product catalog to your HTML website.
  • Provide a working shopping cart.
  • Connect supported payment gateways.
  • Manage products and inventory.
  • Receive customer orders and notifications.
  • Manage order fulfillment.
  • Organize multiple online stores.

All without building and maintaining your own ecommerce backend for the standard embedded catalog integration.

Whether you're building a website for your own business or developing ecommerce websites for clients, you can focus on creating a great website while Shoprivet handles the commerce workflow.

Your website is already built. You don't need to rebuild it just to start selling products.

Create your free Shoprivet store and add a working shopping cart to your website.

You can also explore the Shoprivet product catalog widget or compare the available plans.


Disclosure: I am the developer behind Shoprivet. This tutorial describes the platform's documented e-commerce functionality. Always test your website integration, payment gateway configuration, inventory behavior, and order verification before accepting real customer payments.