Thursday, 8 September 2016

Remove Reward Points from Opencart

For this tutorial I will be showing you how I removed the Rewards Points from my customers registered account on your store. For this I will be using my cPanel file manager and the dashboard of my opencart store.


First you need to go to your dashboard, on the panel on the left hand side you need to click on extensions. This will bring a drop down menu and click on order total. 



Dashboard - Extensions [1] - Order Totals [2].

Once you are on order total you will see an order total list, in that list should be a section called reward points, you will need to uninstall this.


Uninstall Reward Points.

After you have uninstalled this you will need to access your cPanel file manager and remove or alter some of the codes from the reward points as it still shows in the customers account.

Where the Reward Points still show.

To remove and alter these codes you will need to account.tlp (public_html/catalog/view/theme/default/template/account/account.tlp), you need to find the line 
<li><a href="<?php echo $reward; ?>"><?php echo $text_reward; ?></a></li> (line 32) and replace it with <span class="rew"><a href="<?php echo $reward; ?>"><?php echo $text_reward; ?></a></span>. This part of the file should look like this:

<?php if ($reward) { ?>
        <span class="rew"><a href="<?php echo $reward; ?>"><?php echo $text_reward; ?></a></span>
        <?php } ?>
        <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>

Save this change, now you need to go to the file product.tlp (public_html/catalog/view/theme/default/template/product/product.tlp), you need to find the line <li><?php echo $text_reward; ?> <?php echo $reward; ?></li> (line 133) and replace it with <span class="rew"><?php echo $text_reward; ?> <?php echo $reward; ?></span>. This part of the file should look like this:

<li><?php echo $text_model; ?> <?php echo $model; ?></li>
            <?php if ($reward) { ?>
            <span class="rew"><?php echo $text_reward; ?> <?php echo $reward; ?></span>
            <?php } ?>
            <li><?php echo $text_stock; ?> <?php echo $stock; ?></li>

Save this change and you need to find account.tlp (public_html/catalog/view/theme/default/template/module/account.tlp). (This is a different account.tlp to the one you accessed before). You will need to remove the line 
</a> <a href="<?php echo $reward; ?>" class="list-group-item"><?php echo $text_reward; ?></a> (line 9). This part of the file should look like this:

  <?php } ?>
  <a href="<?php echo $address; ?>" class="list-group-item"><?php echo $text_address; ?></a> <a href="<?php echo $wishlist; ?>" class="list-group-item"><?php echo $text_wishlist; ?></a> <a href="<?php echo $order; ?>" class="list-group-item"><?php echo $text_order; ?></a> <a href="<?php echo $download; ?>" class="list-group-item"><?php echo $text_download; ?></a><a href="<?php echo $recurring; ?>" class="list-group-item"><?php echo $text_recurring; ?> <a href="<?php echo $return; ?>" class="list-group-item"><?php echo $text_return; ?></a> <a href="<?php echo $transaction; ?>" class="list-group-item"><?php echo $text_transaction; ?></a> <a href="<?php echo $newsletter; ?>" class="list-group-item"><?php echo $text_newsletter; ?></a>
  <?php if ($logged) { ?>

Once you have done this save the changes and refresh your stores page, all the reward point should be removed.



Sam








0 comments:

Post a Comment