Adding shopfront components to your online store

This article outlines the steps to add shopfront components to your online store. Basket2go shopfront components technology enables your site to provide your customers more information about their order.

What is Shopfront Components

You can use Basket2go innovative shopfront components to display information about the customer's purchases in your site. These components are:

  • View basket link
  • Total number of items in their cart
  • Number of items in the cart
  • Total cost of items in the cart
  • A summary list of the cart items

These components can be placed anywhere convenient in your webpage and merge together with your other content. This component will be updated dynamically when the shopping cart contents have changed. Go to our demo shop to see a demonstration; add products to the shopping cart and see how the information in "Your shopping basket" section at left column of the demo shop updates dynamically.

Difficulity level - simple. Basic HTML knowledge required.

Include Basket2go script

Make sure the following script has been added into your <head> tag for any webpages. This script should already be present if you have already set-up add-to-cart links.

<script id="basket2go-script" type="text/javascript" src="http://checkout.basket2go.net/cart.js" shopid="your-shop-id" ui="0" ></script>

Remember to replace your-shop-id with your own shop id.

Add shopfront components

The following components can be added anywhere to your code.

View Basket

Add a class tag and name it "thickbox" to your view basket link.

<a href="#" class="thickbox" > Click here to view your shopping cart </a>
<a href="#" class="thickbox" > <img src="/sites/default/files/addtobasket.gif" class="thickbox"/> </a>

Display number of items

Insert a pair of span or div tag within your code where you want to display the total number of items in the shopping cart. The data will be updated and inserted into the tag.

You have <span class="b2g_totalitems"></span> items in your shopping cart

Display total price

Insert a pair of span or div tag within your code where you want to display the total price of items in the shopping cart. The data will be updated and inserted into the tag.

Total cost: <span class="b2g_totalprice"></span>

Display cart summary

Insert a pair of span or div tag within your code where you want to display a list of all items in the shopping cart. The field will be populated with item name, quantity, and price for each item in the cart respectively. Make sure there are sufficient space to display the information.

<h3>Cart Summary</h3> <span class="b2g_summary"></span>

Display last item that has been added

You can also display a summary of last item that has been added to the shopping cart. This method works best when you do not want to show the shopping basket whenever the customer click "add-to-cart" link.
The following will display the name of the last item that has been added to the cart:

Last item added: <span class="b2g_additemname"></span>

The following will display the option of the last item that has been added to the cart:

<span class="b2g_additemoption"></span>

The following will display the quantity of the last item that has been added to the cart:

<span class="b2g_additemqty"></span>

The following will display the price of the last item that has been added to the cart:

<span class="b2g_additemprice"></span>

Conclusion

Shopfront components can help keep your customer inform about their orders throughout your webpage and leading to more sales conversion.


Register free shopping cart

Seller Login