Zen Cart Logo
Forums / All Other Contributions/Addons / Reward Points Module for ZC v13x

Reward Points Module for ZC v13x

Locked

Views: 470,633

Results 2,001 to 2,020 of 2,476
This thread is locked. New replies are disabled.
14 Apr 2012, 3:38 PM
#2001
aztintpimp avatar

aztintpimp

New Zenner

Join Date:
Apr 2012
Location:
AZ
Posts:
1
Plugin Contributions:
0

Reward Points Module for ZC v13x

I want to use this module to make a website striclty for rewards points sort of like credit card miles site or coke rewards. I want to add points to cusomters everytime they refer a client to my brick and mortar location.
2 qustions. Will this work like that?

If so would someone be willing to help me install for a fee. I have tried and tried and tried to no avail. I have read thousands of post and read and reread the install stuff I still cant get it.

Thanks in advance

14 Apr 2012, 11:11 PM
#2002
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

aztintpimp:

I want to use this module to make a website striclty for rewards points sort of like credit card miles site or coke rewards. I want to add points to cusomters everytime they refer a client to my brick and mortar location.
2 qustions. Will this work like that?

If so would someone be willing to help me install for a fee. I have tried and tried and tried to no avail. I have read thousands of post and read and reread the install stuff I still cant get it.

Thanks in advance

Check your PM

15 Apr 2012, 3:21 PM
#2003
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

OK this update on Reward Points is now active in the downloads area. NO UPGRADE NEEDED. In this update I have created and upgrade folder and created a upgrade.txt file. Maybe this will be a lot easier for the installer when installing. NO VERSION CHANGE STILL V2.1a.

22 Apr 2012, 7:58 PM
#2004
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

damiantaylor:

If anyone is wanting to display a different message for COWOA custmers, here's how I did it...as for having a negative impact, I haven't noticed.
In fact, I have had customers sign up for a full account and ask if they can have their points from their COWOA order, which I'm always glad to do!
The good thing about this mod is the points do get stored against the COWOA order so you can see how many points to transfer across to the full account.

Add the following defines to file includes/languages/english/modules/order_total/ot_reward_points_display.php

define('MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TITLE', 'With a full account, you could have earned');
define('MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TAG', 'points!');
define('FONT_RED','<font color="red">');
define('UNFONT','</font>');

> 
> Add the code below shown in red to function process() in file includes/modules/order_total/ot_reward_points_display.php
> ```
    function process() 
	{
		global $order;

		$reward_points=GetRewardPoints($order->products);
		
		$GlobalRewardPointRatio=GetGlobalRewardPointRatio();
		$AdjustValue=GetRewardPointAdvancedCalculateValue();
		$reward_points+=$AdjustValue*$GlobalRewardPointRatio;
		
		if(isset($_SESSION['redeem_value']))
		{
			/*
			$redeem_ratio=GetRedeemRatio($_SESSION['customer_id']);
			$reward_points=$reward_points/$redeem_ratio;
			$reward_points=$reward_points-$_SESSION['redeem_value'];
			$reward_points=$reward_points*$redeem_ratio;
			*/
			$reward_points=$reward_points-($GlobalRewardPointRatio*$_SESSION['redeem_value']);
		}

		if($reward_points<0)
		 $reward_points=0;
		
		$reward_points=zen_round($reward_points,0);
		$_SESSION['REWARD_POINTS_EARNED']=$reward_points;
		
		if ($_SESSION['COWOA']) {
		 $this->output[] = array('title' => FONT_RED . MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TITLE . ' ' . $reward_points . ' ' . MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_COWOA_TAG . UNFONT,
                               'text' => '',
                               'value' => 0);
		} else {
		 $this->output[] = array('title' => $this->title . ':',
                               'text' => $reward_points,
                               'value' => 0);
		}
    }

This is great! Can you tell me the code to put it in the sidebox as well?

22 Apr 2012, 9:10 PM
#2005
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I have a fundamental misunderstanding of how to configure this module. I want it to give everyone 10 points for every dollar they spend. Then to redeem, I want the points to be worth 100 points = $1. I am not sure I understand how to do this (there are so many different configuration areas in different menus!) Can someone explain it in simple terms? Thanks.

Also, in the Order Total Modules section, whenever I configure the "Reward Points Tiered Discount" module it turns off the "Reward Points" module so that it's just a red dot again... I can't get both of these "on" at the same time--are they one or the other for some reason? What gives?

24 Apr 2012, 4:17 PM
#2006
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I have another question... my shopping cart template is HEAVILY modified. I tried using WinMerge to get the rewards points stuff into it but they were too different for it to make any sense. Can someone extract the relevant (rewards points) lines of code and tell me where they are, so I can figure out where to put them in my cart? Thanks so much. I couldn't find them myself--I looked!

24 Apr 2012, 4:22 PM
#2007
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Reward Points Module for ZC v13x

WebKat:

I have another question... my shopping cart template is HEAVILY modified. I tried using WinMerge to get the rewards points stuff into it but they were too different for it to make any sense. Can someone extract the relevant (rewards points) lines of code and tell me where they are, so I can figure out where to put them in my cart? Thanks so much. I couldn't find them myself--I looked!
You can probably get this information yourself by doing a file compare of the Rewards Points files against a vanilla set of Zen Cart files...

24 Apr 2012, 6:18 PM
#2008
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

I updated Reward Point to version 2.0b no major changes except the tpl_product_info_display.php file in the rewards points 2.0a package is missing the following code which displays the reward points on each on the product pages. This has been missing in previous version.

<!--bof Product Reward Points block --> <h2 id="productRewardPoints" class="productRewardPoints"> <?php /** * display the product reward points */ include($template->get_template_dir('/tpl_product_reward_points.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_product_reward_points.php'); ?> </h2> <!--eof Product Reward Points block -->

The update has been uploaded waiting on zen approval.

25 Apr 2012, 3:16 PM
#2009
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

DivaVocals:

You can probably get this information yourself by doing a file compare of the Rewards Points files against a vanilla set of Zen Cart files...

Actually I think I was thinking about a different module, because this one doesn't seem to edit the shopping cart. But it should. Is there a way to get the shopping cart to display something like "you will earn XX reward points for this order" underneath the total or something? I tried to hack it in based on the sidebox code but it was a miserable failure...

25 Apr 2012, 4:51 PM
#2010
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

Why do you want it to show in the first step of the shopping cart. The customer see's they will earn xxxx number of reward point on the product info page if they purchase the item. If and when they put the item in there cart they will see they are going to earn xxxx number of points in the Reward Points side box if you have it enabled. When your customer go's to checkout they will see it in there total they are getting xxxx number of Reward Points for this order. I guess I do not understand what it is you are saying or the issue you are having.

25 Apr 2012, 9:57 PM
#2011
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I guess it's just that when people get to the shopping cart, they're not looking at the sideboxes anymore... it would be nice if it showed the total reward points available in the cart in the general cart area...

25 Apr 2012, 10:59 PM
#2012
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Reward Points Module for ZC v13x

You could get them with:

<?php
    $products = $_SESSION['cart']->get_products();
    $reward_points=GetRewardPoints($products);
if ($reward_points > 0) {
echo '<div>';
echo 'REWARD POINTS: ' . $reward_points;
echo '</div>';
}
?>

Might need to jazz that up a bit ...

25 Apr 2012, 11:53 PM
#2013
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

Thanks Linda for this code. This works great on the shopping cart page.
Webkat if here's a snapshot. If you want to know where I added the code I will be glad to show you.

Attachment 10377

26 Apr 2012, 12:11 AM
#2014
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

Webkat there is also a Define Pages - Shopping Cart. The mod adds the ability to edit your shopping cart instructions via admin using the Define Pages Editor. I thought I would share that with you too.
http://www.zen-cart.com/downloads.php?do=file&id=607

26 Apr 2012, 1:38 AM
#2015
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

countrycharm:

Thanks Linda for this code. This works great on the shopping cart page.
Webkat if here's a snapshot. If you want to know where I added the code I will be glad to show you.

Oh that's perfect--if you could give me the code snippet right before it so I can find where to put it... is it the exact code that Linda posted? Thanks!

26 Apr 2012, 1:40 AM
#2016
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

countrycharm:

Webkat there is also a Define Pages - Shopping Cart. The mod adds the ability to edit your shopping cart instructions via admin using the Define Pages Editor. I thought I would share that with you too.
http://www.zen-cart.com/downloads.php?do=file&id=607

I'll have a look at it... in the meantime if you want to see what I mean... go to http://opalessenceshop.com and put (anything) in your cart and look at how I have my shopping cart set up and you will see what I mean. It's still getting tweaked for user-friendliness and readability. I may take the credit card/etc logos off the left because they crowd it a little if you have the browser window too narrow... opinions welcome.

26 Apr 2012, 3:45 AM
#2017
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

Yes the one Linda posted. Check you PM.

26 Apr 2012, 1:50 PM
#2018
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Thanks so much! It does exactly what I want! I really think that once customers are at the cart, they're not going to look at the sidebox anymore. You may want to consider adding that bit of code to the download package.

26 Apr 2012, 6:17 PM
#2019
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

I think I will add it in a later version.

28 Apr 2012, 10:04 PM
#2020
webkat avatar

webkat

Zen Follower

Join Date:
Jan 2012
Location:
New England
Posts:
238
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

When awarding someone extra reward points it would be cool to have a checkbox to send them an email letting them know about it... just a suggestion.