AddShoppers Installation Guide

1. 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.

2. Discovery Wall Installation

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

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

3. Social Login Installation

a. In your root Magento folder, create a new file called create.php. Copy and paste the contents of this page into that file and save.

b. Copy the contents of this page into a static block called "addshoppers_social_login" in Magento. 

c. Call the "addshoppers_social_login" block using this snippet in each template (My Account, Checkout, and Register) where you want the social login buttons to display:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('addshoppers_social_login')->toHtml(); ?> 

4. 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:

/* 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; ?>',
<?php endif; ?>

5. 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>

6. 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>

7. 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.