Referral Theme Integration

Referral URL/e-mail/code in the checkout registration page

Here's how the referral box in the checkout looks:

Following these instructions will insert the referral/affiliate URL/e-mail/code field set into your checkout section.

/design/frontend/<your_package>/<your_theme>/template/checkout/onepage/billing.phtml

<li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
<?php endif;?>
</ul>
</fieldset>
<?php /*MageRewards CODE BEGIN:*/ ?>
<?php echo $this->getChildHtml('rewards_referral_field'); ?>
<?php /*MageRewards CODE END:*/ ?>
<fieldset>
<?php if ($this->canShip()): ?>
<p>
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" <?php if ($this->isUseBillingAddressForShipping()) {?>checked="checked" <?php }?>onclick="$('shipping:same_as_billing').checked = true;" /> <label for="billing:use_for_shipping_yes"><?php echo  $this->__('Ship to this address') ?></label>     <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0" <?php if (!$this->isUseBillingAddressForShipping()) {?>checked="checked" <?php }?>onclick="$('shipping:same_as_billing').checked = false;" /> <label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
</p>

Plain text source:

<?php /*MageRewards CODE BEGIN:*/ ?>
<?php echo $this->getChildHtml('rewards_referral_field'); ?>
<?php /*MageRewards CODE END:*/ ?>

Referral URL/e-mail/code in the Idev Onestep Checkout

/design/frontend/<your_package>/<your_theme>/template/onestepcheckout/billing_fields.phtml

Last Line Add below code

<?php /*MageRewards CODE BEGIN:*/ ?>
<?php echo $this->getLayout()->createBlock('rewardsref/field_checkout')->setTemplate('rewardsref/onepage/field.phtml')->toHtml();  ?>
<?php /*MageRewards CODE END:*/ ?>

Referral URL/e-mail/code in the Apptha's Onestep Checkout page

/design/frontend/<your_package>/<your_theme>/layout/rewardsref.xml

Line 59 Comment below line

<checkout_onepage_index>
<reference name="checkout.onepage.billing">
<block type="rewardsref/field_checkout" name="rewards_referral_field" template="rewardsref/onepage/field.phtml" />
</reference>
</checkout_onepage_index>

Add

<onestepcheckout_index_index>
<reference name="onestepcheckout.onestep.billing">
<block type="rewardsref/field_checkout" name="rewards_referral_field" template="rewardsref/onepage/field.phtml" />
</reference>
</onestepcheckout_index_index>

/design/frontend/<your_package>/<your_theme>/template/onestepcheckout/onestep/billing.phtml 

Add

<?php /*MageRewards CODE BEGIN:*/ ?>
<?php echo $this->getChildHtml('rewards_referral_field'); ?>
<?php /*MageRewards CODE END:*/ ?>

Referral URL/e-mail/code in the New User registration page

/design/frontend/<your_package>/<your_theme>/template/customer/form/register.phtml 

For Magento Version 1.6+ you need to add code in 
/design/frontend/<your_package>/<your_theme>/template/persistent/customer/form/register.phtml
</div>
</li>
</ul>
</fieldset>
<?php /*MageRewards CODE BEGIN:*/ ?>
<?php echo $this->getChildHtml('rewards_referral'); ?>
<?php /*MageRewards CODE END:*/ ?>
<div class="button-set">
<p class="required"><?php echo $this->__('* Required Fields') ?></p>

Plain text source:

<?php /*MageRewards CODE BEGIN:*/ ?>
<?php echo $this->getChildHtml('rewards_referral'); ?>
<?php /*MageRewards CODE END:*/ ?>

Still need help? Get Help Get Help