ShopSocially tag can be easily integrated with 3dCart. With this, you can activate ShopSocially apps on your store and start running campaigns in matter of minutes.


Note: These instructions are reference only. Kindly change the code according to your cart customization.


Here are steps to integrate ShopSocially tag into 3dCart.


Basic Integration


Step 1: Copy the ShopSocially Basic Integration Code


Login to your ShopSocially admin console and click on the Integration Tab.

Copy the basic integration code.

Partner id is available on the integration page.



Step 2: Locate Header Template


Login to your 3dCart admin console.

Navigate to Settings –> Design –> Header and Footer.


 


Step 3: Enable the Header


Paste the javascript code in the header section and enable the “Global Header”.

Save changes to complete the basic integration.



Advanced Integration

Note: Advanced integration instructions shown below is just for reference. Kindly change the code as per the cart customization. Before reading the below instructions, kindly read the general advanced integration instructions carefully.


Step 1: Select the Template to Edit


Navigate to Settings –> Design –> Template Editor.

Select “checkoutsinglepage” and “checkout-step4” to edit.



Step 2: Code on “checkoutsinglepage”


Copy the code below and paste it in the template file and click save.

 


<script type="text/javascript">

ss_mi.product_data_extractor = function(){

    var prod_info = [];

    cart_elements = document.getElementById ('divCart').getElementsByClassName('item');

    for (i = 0; i< cart_elements.length; i=i+5)

{

    image_url = cart_elements[i].getElementsByTagName('img')[0].src;

    page_url = cart_elements[i+1].getElementsByTagName('a')[0].href;

    prod_title = cart_elements[i+1].getElementsByTagName('a')[0].text;

    prod_quant = cart_elements[i+2].innerText;

    prod_price = cart_elements[i+3].innerText;

    prod_info.push({ prod_img_url: image_url,

      prod_page_url: page_url,

      prod_title: prod_title,

      quantity: prod_quant,

      prod_price: prod_price});

  }

  ss_mi.setCookie('prodData',JSON.stringify(prod_info));

  }</script> 



Step 3: Code on “checkout-step4”


Copy the code below and paste it in the “checkout-step4” template file. Kindly use the partner id available in the settings tab of your ShopSocially merchant console.


 

<div id="ssFrame"></div>

<script language="javascript" type="text/javascript">_ssq = [];</script>

<script language="javascript" type="text/javascript" src="https://shopsocially.com/js/all.js"></script>

<script language="javascript" type="text/javascript">

ss_mi.init({

    user_email: $('#Table8 td')[$('#Table8 td').length-1].innerText, /* OPTIONAL: Email Address of Shopper */ user_first_name: $('#Table8 td')[1].innerText.split(' ')[0], /* OPTIONAL: First Name of Shopper */

    user_last_name: $('#Table8 td')[1].innerText.split(' ')[1], /* OPTIONAL: Last Name of Shopper */

    order_id: $('.checkout-headers')[0].innerText.split(' ')[1], /* OPTIONAL: Internal Order ID */

    is_oc_page: true, /* REQUIRED: Boolean. Indicates that this script is only on the thank you page */

    partner_id: 'REPLACE THIS TEXT WITH YOUR PARTNER ID' /* REQUIRED: Also known as Account ID */

});

var prod_info = JSON.parse(ss_mi.getCookie('prodData'));

ss_mi.add_products(prod_info);

ss_mi.load_ssFrame();

</script>

 

Kindly mail your questions to support@shopsocially.com.