Installing Shoprocket on your website or blog is exceptionally easy.

To get started, create an account at the Shoprocket signup page.

Once you have completed the signup process, you can obtain your installation code here.

Tip

If you use one of the many popular frameworks or template systems, add this to your footer, and it will appear on every page.

Next, copy and paste the first code block into your template footer, ideally just before the closing </body> tag.

It will look something like this:

<!— jQuery —>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<!— Shoprocket JavaScript —>
<script>var $=jQuery.noConflict();</script>
<script>var JSR=jQuery;</script>
<script language="javascript" src="https://space.shoprocket.co/frontend/v10/sr.js"></script>
<input type="hidden" name="sr-companyid" id="sr-companyid" value="xxx">

<!— Shoprocket Basket Widget —>
<div id="sr-basket-widget" class="sr-right"><span class="sr-confirm-amount"></span></div> 

The above code block contains 3 things:

  1. jQuery version 3.4.1 - Shoprocket currently requires a recent version of jQuery to function. (If you already have jQuery included in your site you may not need to include this line)
  2. The sr.min.js JavaScript file - This is the primary link to Shoprocket and is is always required.
  3. sr-basket-widget - We've also added the basket widget and by default it will sit in the top right corner corner of your webpage; however, it can be placed wherever you like and styled using your own custom CSS.

Take Notice!

The sample code above is missing a company ID, it has been replaced with "xxxxx". This is just a placeholder. In the code, you copy from the signup page and your company ID will already be set. You can find your install code ready to use here.

jQuery Required

Currently, Shoprocket requires a recent version of jQuery in your page to run smoothly, we recommend version 3.4.1, which is already included in your install code snippet.

If your website already has a recent version of jQuery, you can remove the reference to jQuery from your install code snippet.


Congratulations, you’ve successfully installed Shoprocket!

You should now see a basket widget in the top right corner of your page, it won't be active until you add some products. It should, however, display a cart symbol followed by your currency symbol and 0.00.

If your cart shows "cart (0)", it means Shoprocket has failed to initiate. This could be for a number of reasons, but most likely it is a conflict with an existing JavaScript plugin on your site. It's usually very easy to fix and a member of our support team is always available to help.

Did this answer your question?