Skip to main content
Integrating Sharpei with your Website

Integrate in your website

Lucia clifford avatar
Written by Lucia clifford
Updated over a week ago

In order to use Sharpei, you need to integrate it with your existing website.

If you are using Wordpress or Shopify for your website, you can now activate the solution from the plugins marketplace.

If you're not using Wordpress, Shopify or Prestahop, follow the next steps:


General steps

  1. Log into your Sharpei account at app.gosharpei.com

  2. Navigate to your Admin portal to get the codes clicking on the right hand user icon

3. Go to the Install Shapei section, "Embed checkout" tab.

As we are using javascript and rails for the integration, select "Install with a code snippet"

4. Copy this html and follow closely the instructions described on the platform:

<!-- SHARPEI --> <sharpei-button product-id={{ item.id }}></sharpei-button>
  • The item.id is the id of the application that renders the product variant.

5. Copy and save the code snippet that appears on the platform.

(This is a screenshot)

This code already has the public key inserted in it.


Access your Website through FTP

  1. Make a backup copy of the files you will be changing, you never know if a change could potentially break the website so make sure you create a backup of the pages you will be changing.

  2. Find your head code and paste the script code you have previously copied.

  3. Find the file where your product information is and inside of the file search for the 'Add to cart' button and paste the html there.

  4. Save the file and navigate to your website, check the Network to see if the JS is running. Search for validate_api_key . If you find that and it returns a 200, it means the js is injecting properly.

5. If you haven't already configure your remote_ids to on your Sharpei backoffice for the HTML to run. The button will not show unless its Active and the remote_id matches that of the product.id in your websites.

Did this answer your question?