Affiliate Software Documentation
Commission Integration with Magento
To integrate with Magento Commerce:
-
Open up the file app/design/frontent/default/default/template/checkout/success.phtml
-
Scroll down in the file where it says the following lines of code, and paste your integration code in the area specified:
<div class="page-head"> <h3><?php echo $this->__('Your order has been received') ?></h3> </div> <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> <p><strong><?php echo $this->__('Thank you for your purchase!') ?></strong></p> <p> <?php if ($this->canPrint()) :?> <?php echo $this->__('Your order # is: <a href="%s">%s</a>', $this->getViewOrderUrl(), $this->getOrderId()) ?>.<br/> <?php else :?> <?php echo $this->__('Your order # is: %s', $this->getOrderId()) ?>.<br/> <?php endif;?> <!-- START INTEGRATION CODE --> <?php $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()); $amount = number_format($order->subtotal,2); ?> <img src="https://get.jrox.com/sale/amount/<?php echo $amount; ?>/trans_id/<?php echo $this->getOrderId()?>" /> <!-- END INTEGRATION CODE --> <?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?><br/> <?php if ($this->canPrint()) :?> <?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?> <?php endif;?> </p> <div class="button-set"> <button class="form-button" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><?php echo $this->__('Continue Shopping') ?></span></button> </div>
- Go ahead and Save the File.
- You now have the affiliate software integrated into your Magento Commerce Shopping Cart.