Zen Cart Logo
Forums / All Other Contributions/Addons / Reward Points system...

Reward Points system...

Locked

Views: 10,749

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
5 Feb 2008, 7:51 PM
#1
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Reward Points system...

I'm aware that this a popular request for a contrib. I've put my effort up here:

http://www.omnicia.com/zencart/

While it's not finished, the system calculates Reward Points, displays them against products and in the shopping cart, and accumulates them for the customer once an order is successfully completed. Reward Points can be set for all items, by category or by product.

Still left to do is the admin interface for setting the Reward Points and to work out how to redeem the points. All suggestions welcome.

5 Feb 2008, 7:54 PM
#2
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Reward Points system...

Actually there is already one mod for this, I would be better if you improve that one instead of starting from scratch. But anyhow, it's your choice.

hem:

I'm aware that this a popular request for a contrib. I've put my effort up here:

http://www.omnicia.com/zencart/

While it's not finished, the system calculates Reward Points, displays them against products and in the shopping cart, and accumulates them for the customer once an order is successfully completed. Reward Points can be set for all items, by category or by product.

Still left to do is the admin interface for setting the Reward Points and to work out how to redeem the points. All suggestions welcome.

5 Feb 2008, 8:29 PM
#3
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points system...

I'm not aware of any mod and typing 'point' and 'reward' into the contribs download does not show up anything.

5 Feb 2008, 11:02 PM
#5
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points system...

It looks good but I think I've gone in a slightly different direction. So I guess I'll just finish what I've started.

12 Mar 2009, 1:53 AM
#6
4thwave avatar

4thwave

Zen Follower

Join Date:
Sep 2007
Posts:
125
Plugin Contributions:
0

Re: Reward Points system...

Can anyone help?
I need to uninstall Rewards Mod and I have read the posts re; removing all of the files with the word Reward and then in Myphp dropping the three tables with the word reward but not sure where in the file structure to "restore" the order.php file?

:lamo:

12 Mar 2009, 9:14 AM
#7
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points system...

4thwave:

Can anyone help?
I need to uninstall Rewards Mod and I have read the posts re; removing all of the files with the word Reward and then in Myphp dropping the three tables with the word reward but not sure where in the file structure to "restore" the order.php file?

:lamo:

What version are you using? The RP mod's been using the Observer/Notifier system for over a year now so there are no changes to the order.php file any more.

12 Mar 2009, 12:51 PM
#8
4thwave avatar

4thwave

Zen Follower

Join Date:
Sep 2007
Posts:
125
Plugin Contributions:
0

Re: Reward Points system...

Thank you for the reply!
I finally got it. I must have been leaving a file somewhere so went back through and deleted all of the files and everything is back. As so often happens with ZC it's easy to miss something if not careful.

Thank you for a great mod, I hope to use it soon but was out voted on this one.

Thank's Sir,

4thwave

30 May 2009, 1:48 PM
#9
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Reward Points system...

G'day Folks,

I've just spent more hours than I'd like to admit trying to get Andrew Moore's Reward points module working on a customers store.
I had no problems on my own store.

I've eventually tracked the problem down as being due to the customers server not doing the 'right' thing with the $_REQUEST variables in the ot_reward_points.php file, and because of this the module was failing the if($_REQUEST['redeem_checkout_flag']) and if($_REQUEST['redeem_flag']) checks, which caused the $_SESSION save to fail which in turn meant that the rewards could never be redeemed.

I appear to have overcome the problem by changing the $_REQUEST checks to $_POST checks. Things now look as though all is working as it should.

Has anyone else experienced this problem?

Would there be any unforeseen repercussions from making this change?

Is there a better fix to this problem than the one I have come up with?

Any feedback will be greatly appreciated.

Cheers
RodG

1 Jun 2009, 3:23 PM
#10
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points system...

RodG:

G'day Folks,

I've just spent more hours than I'd like to admit trying to get Andrew Moore's Reward points module working on a customers store.
I had no problems on my own store.

I've eventually tracked the problem down as being due to the customers server not doing the 'right' thing with the $_REQUEST variables in the ot_reward_points.php file, and because of this the module was failing the if($_REQUEST['redeem_checkout_flag']) and if($_REQUEST['redeem_flag']) checks, which caused the $_SESSION save to fail which in turn meant that the rewards could never be redeemed.

I appear to have overcome the problem by changing the $_REQUEST checks to $_POST checks. Things now look as though all is working as it should.

Has anyone else experienced this problem?

Would there be any unforeseen repercussions from making this change?

Is there a better fix to this problem than the one I have come up with?

Any feedback will be greatly appreciated.

Cheers
RodG

As $_REQUEST is supposed to return all the $_POSTs I'm surprised that it didn't work. Any idea what the customers server settings were that affected it?

2 Jun 2009, 1:48 AM
#11
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Reward Points system...

hem:

As $_REQUEST is supposed to return all the $_POSTs I'm surprised that it didn't work. Any idea what the customers server settings were that affected it?

Alas, no I don't.

What I do know is that it is one of the few sites I've worked on that that uses FreeBSD, so that may be relevent.

I also know that some $_REQUEST variables are available.

These 3 appear to be consistant:
_REQUEST["_csuid"]
_REQUEST["zenAdminID"] (only when logged in as admin)
_REQUEST["zenid"]

I've no idea what the _csuid is.

Other possible useful info....

Server OS: FreeBSD 4.10-RELEASE
Server Up Time: 1:30AM up 815 days,
HTTP Server: Apache/1.3.41 (Unix) FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7m

Does that give any further clues?

Cheers
Rod

25 Oct 2009, 1:53 AM
#12
thepollywog avatar

thepollywog

New Zenner

Join Date:
Oct 2009
Posts:
10
Plugin Contributions:
0

Re: Reward Points system...

Andrew,

Are you the Andrew Moore who designed the rewards module? If so, thank you!

I have it installed and mostly working. I had trouble with points 4 and 4.1 of your readme:

"4. Switch on the 'Shopping Cart with Rewards' sidebox using Admin->Tools->Layout Box Controller

4.1. There is also a "Reward Points" sidebox which displays points in cart and points earned (if logged in)"

These do not appear in Admin->Tools->Layout Box Controller for me to check them off.

Could you help?

Dennis

28 Oct 2009, 1:30 PM
#13
achachet avatar

achachet

New Zenner

Join Date:
Jul 2009
Posts:
2
Plugin Contributions:
0

Re: Reward Points system...

Hi Andrew

First of all thank you very much for this very useful mod.

I have quite an issue with it, though: ZC computes VAT on the subtotal WITHOUT the discount!

Say I have a 10% tax rate in my country.

The customer places an order for 1000 € + 100 VAT = 1100.
Now he redeems 50€ worth of points.
The order appears as follows: 1000€ - 50 +100 VAT = 1050.
Unfortunately that's wrong.

His order should be :

(1000-50) + 95 VAT = 1045

because his pre-vat total is not 1000 but 950.

Despite the difference is very small as amounts are concerned, it poses a great problem in an accounting and fiscal perspective: the final bill does not have the right amount of tax displayed!

The solution is to reduce the '$value' returned by ot_tax.
Instead of returning $value, it should return:
$value - $points_worth * ($value / $order->info['subtotal']);

in my example : instead of 100 it returns : 100 - 50*(100/1000)=95

$value/$order->info['subtotal'] is used as a way to compute average tax rate on the order (you can have a mix of products with different tax rates)

I did change the ot_tax module (in a very dirty way, you might want to clean it a bit) to reflect these changes, feel free to contact me if I can help to update the module.

Warm regards,

Thomas

PS: since I do B2B, my redeem is applied before tax. If a shop sells to individuals, the issue would be the same, but the calculation would be different. In other words, you need to ask the administrator if the value of the points redeemed is pre- or post- VAT.

11 Jun 2010, 10:20 PM
#14
valhallasoapgal avatar

valhallasoapgal

New Zenner

Join Date:
Feb 2008
Location:
Washington State
Posts:
29
Plugin Contributions:
0

Re: Reward Points system...

Hello,
I had this installed to my cart by someone else and I'd like to set it up differetly. Can someone tell me where I might find some instruction or a tutorial on how to use this module?

Thanks!

11 Jun 2010, 11:52 PM
#15
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points system...

ValhallaSoapGal:

Hello,
I had this installed to my cart by someone else and I'd like to set it up differetly. Can someone tell me where I might find some instruction or a tutorial on how to use this module?

Thanks!

A year and a half ago I started writing a manual for it. I should really get round to finishing it.

In the meantime, if you have any questions- post them here: http://www.zen-cart.com/forum/showthread.php?t=95021

12 Jun 2010, 12:00 AM
#16
valhallasoapgal avatar

valhallasoapgal

New Zenner

Join Date:
Feb 2008
Location:
Washington State
Posts:
29
Plugin Contributions:
0

Re: Reward Points system...

Thanks Andrew :)
Hoping over there to post my main question. Hopefully it won't gripe too many folks. As I've got it posted (once accidentally) in two other places and gotten no answers.

12 Jun 2010, 1:49 AM
#17
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,616
Plugin Contributions:
0

Re: Reward Points system...

Stop reposting!