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.
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 —>
<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:
- jQuery version 1.10.2 - 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)
- 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.
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.
Currently, Shoprocket requires a recent version of jQuery in your page to run smoothly, we recommend version 1.10.2, 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.