Factory Orthotic Installation Guide

Account Details:

email: matt@ignitedigital.ca

password: temp1234 (change after logging in)

1. Install Social Analytics code

Copy and paste into the global footer template:

<script type="text/javascript">
var js = document.createElement('script'); js.type = 'text/javascript'; js.async = true; js.id = 'AddShoppers';
js.src = ('https:' == document.location.protocol ? 'https://shop.pe/widget/' : 'http://cdn.shop.pe/widget/') + 'widget_async.js#540ddd4ea3876477bed6173a';
document.getElementsByTagName("head")[0].appendChild(js);
</script>

2. Install ROI Tracking code

Copy and paste the following code into app/design/frontend/base/default/YOUR_THEME/checkout/success.phtml

<?php 
$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()); 
$amount = number_format($order->subtotal,2); 
?>
<script type="text/javascript">
AddShoppersConversion = {
        order_id: '<?php echo $this->getOrderId(); ?>',
        value: '<?php echo $amount; ?>'
};
var js = document.createElement('script'); js.type = 'text/javascript'; js.async = true; js.id = 'AddShoppers';
js.src = ('https:' == document.location.protocol ? 'https://shop.pe/widget/' : 'http://cdn.shop.pe/widget/') + 'widget_async.js#540ddd4ea3876477bed6173a';
document.getElementsByTagName("head")[0].appendChild(js);
</script>

3. Add sharing buttons

In your AddShoppers dashboard, go to Apps > Smart Buttons > Activate, choose the buttons you want, and paste the code where you want them to show up.

4. Discovery Wall Installation

Copy and paste the following code where you want the Discovery Wall to appear:

<div id="AddShoppersWall"></div>

5. Social Login Installation

Click here for Instructions and code for social login installation on Magento.

6. Purchase Sharing Installation

Copy and paste the following code AFTER the ROI Tracking code (step #2) into app/design/frontend/base/default/YOUR_THEME/checkout/success.phtml:

<?php
/* get most expensive item as shared item */

$highestPrice = 0;
$order_items = $order->getAllItems();
foreach($order_items as $item) {
    $product = Mage::getModel('catalog/product')->load($item->getProductId());
    if($product->getPrice() > $highestPrice){
        $highestPrice = $product->getPrice();
        $prodimgurl = $product->getMediaConfig()->getMediaUrl($product->getData('image'));
        $prodname = $product->getName();
        $proddesc = $product->getData('description');
        $produrl = $product->getProductUrl();
    }
}
?>
<?php /* if all variables are assigned then set them in addshoppers tracking */ ?>
<?php if($prodimgurl && $prodname && $proddesc && $produrl): ?>
    <script type="text/javascript">
        AddShoppersTracking = {
            auto: true,
            header: "Share your purchase with your friends!",
            async: false,
            image: '<?php echo $prodimgurl; ?>',
            url: '<?php echo $produrl; ?>',
            name: '<?php echo $prodname; ?>',
            description: '<?php echo $proddesc; ?>',
        }    
    </script>
<?php endif; ?>

7. Add Share for Coupon button to cart page

Copy and paste the following code into the cart page template by the coupon code box:

<div class="share-buttons share-buttons-panel" data-style="coupon" data-counter="true" data-oauth="true" data-hover="true" data-promo-callout="left"></div>

8. Install Refer a Friend

a. Configure your Refer a Friend setting in your AddShoppers dashboard under Apps > Enhance > Refer a Friend.

b. Add a new CMS page in Magento.

c. Copy and paste the following code into the HTML editor:

<div id="AddShoppersRefer"></div>

9. Social Rewards

Create the coupon that you want to use for Social Rewards, then go to your AddShoppers dashboard under Apps > Social Rewards > Activate and configure the Social Reward.