• Magento, eCommerce

    Magento and Pepperjam Integration

    Posted on October 20th, 2009

    Written by CJ

    Tags

    Magento and Pepperjam Network Affiliate Program Integration

    The Pepperjam Network is an Affiliate Program, like ShareaSale, Commission Junction, and Linkshare. All four have similar business models.

    One of my customers asked me to integrate Pepperjam’s Pixel Integration into Magento’s check out. He said he couldn’t find any information on Pepperjams website on how to set this up for Magento or any other shopping carts like osCommerce, Zen Cart, etc…

    Here is the instructions:

    It’s pretty straight forward once you get Pepperjam’s necessary codes to insert into your success.phtml page.

    The Magento success.phtml page is located here: app/design/frontent/default/default/template/checkout/success.phtml

    First, copy and paste this code into your success.phtml page below the Thank you for your purchase! line:

    <!-- Start Pepperjam Network Codes -->
    <!-- Start Magento Variables -->
    <?php $_customerId = Mage::getSingleton('customer/session')->getCustomerId(); $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $order = Mage::getSingleton('sales/order'); $order->load($lastOrderId); $_totalData =$order->getData(); $_sub = $_totalData['subtotal']; ?>
    <!-- End Magento Variables -->

    Second, after you sign up with Pepperjam, they should of sent you a link to their “pepperjamNETWORK Pixel Integration Instructions” web page where you auto create the necessary codes. Once you auto create the code to your preference, only two variables of this code needs to be changed to reflect magento’s variable ids.

    You need to change the SaleAmount and OrderID. Without going into detail for each variable, the following is what the code would look like. Your auto created code will look different. And you need to edit the two variables and place your code inside of your success.phtml page below End Magento Variables:

    <!-- End Magento Variables -->
    <!-- Start Auto Created Codes -->
    <iframe src="https://t.pepperjamnetwork.com/track?PID=555&AMOUNT=<?php echo $_sub ?>&TYPE=1&OID=<?php echo $this->getOrderId() ?>&CURRENCY=USD" height="1" width="1" frameborder="0"></iframe>
    <!-- End Auto Created Codes -->
    <!-- End Pepperjam Network Codes -->

    Lastly, after you copy your code into your success.phtml page, go back to Pepperjam’ “pepperjamNETWORK Pixel Integration Instructions” web page and follow their instructions.

    Please note: Only copy and paste the first code into your success.phtml page. The second code will be different and personalized by you. You can dissect it and customize it to fit your installation. For example the mechant ID 5555 is a random number I chose, you will have your own merchant ID assigned to you, your currency might be different, etc…

    The rest should be easy enough.

    This entry was posted on Tuesday, October 20th, 2009 at 6:19 pm and is filed under Magento, eCommerce. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 0 Comments

    Take a look at some of the responses we've had to this article.

  • Post a Comment

    Let us know what you thought.

  • Name:

    Email:

    Website:

    Message: