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

Reward Points Module for ZC v13x

Locked

Views: 470,636

Results 441 to 460 of 2,476
This thread is locked. New replies are disabled.
13 Sep 2008, 11:28 AM
#441
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Reward Points Module for ZC v13x

hem:

The IPN mod does use notifiers though (Google Checkout doesn't). All I can think is that the mod does not call any user created classes. The problem is that debugging IPN is close to impossible.

IIRC in ZC1.3.7 the PayPal IPN Handler uses its own application_top.php file which does not load any of the auto loaders so user defined notifiers and classes will not get loaded. ZC1.3.8 uses the standard application_top so autoloaders should get loaded. I don't recall ipn_main_handler.php triggering any notifiers at the point of order creation or status update though.

The last time I had to hook into the order creation process I ended up just changing the includes/classes/order.php file. It meant changing a core file but it ensured that all orders were caught and everything was simpler.

Regards,
Christian.

14 Sep 2008, 5:26 AM
#442
excalibur avatar

excalibur

New Zenner

Join Date:
May 2007
Posts:
15
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Einstin:

Andrew,
Tried the new class files posted at http://www.zen-cart.com/forum/showpost.php?p=605598&postcount=413 and had an order come in last night using PayPal IPN and was an instant payment transaction type unique. No points were added to the customers pending balance. No errors were shown or logged anywhere that I could find. Had to add the points manually for the customer this morning.

Same here although only happened on one sale as the otherts just sat in pending.

16 Sep 2008, 3:39 PM
#443
hem avatar

hem

Totally Zenned

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

Re: Reward Points Module for ZC v13x

CJPinder:

The last time I had to hook into the order creation process I ended up just changing the includes/classes/order.php file. It meant changing a core file but it ensured that all orders were caught and everything was simpler.

Regards,
Christian.

I really don't want to hack the core orders.php file as this could have severe implications for anyone using ZenCart, not only those who are using PayPal IPN

16 Sep 2008, 3:48 PM
#444
hem avatar

hem

Totally Zenned

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

Re: Reward Points Module for ZC v13x

Okay, I've had a long hard look at the IPN code and followed through the logic. I nearly wrote a test environment which would simulate a valid IPN session but then sanity kicked in.

I think I may have been wrongly assuming that my observer class never got called. It looks like now that the class is being called but IPN is not passing the customer_id via a $_SESSION variable.

So, I've done two things. I've changed the hook (again) and also told the mod to look for the customer_id in other places.

Fingers crossed that this works. At this stage I've spent more time trying to debug IPN than it took me to write the mod in the first place.

16 Sep 2008, 4:29 PM
#445
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Okay, I have installed this latest observer class. Will let you know as soon as I have a IPN customer and let you know whether or not it works

17 Sep 2008, 1:41 AM
#446
kenwahl avatar

kenwahl

New Zenner

Join Date:
Feb 2008
Posts:
32
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

Okay, I've had a long hard look at the IPN code and followed through the logic. I nearly wrote a test environment which would simulate a valid IPN session but then sanity kicked in.

I think I may have been wrongly assuming that my observer class never got called. It looks like now that the class is being called but IPN is not passing the customer_id via a $_SESSION variable.

So, I've done two things. I've changed the hook (again) and also told the mod to look for the customer_id in other places.

Fingers crossed that this works. At this stage I've spent more time trying to debug IPN than it took me to write the mod in the first place.

:clap:

Hem

This new class.reward_points.php fixed the Google Checkout problem! It now awards points with Google Checkout. Outstanding job! Thanks for all the hard work I know it was a pain and time consuming to fix. Hopefully it also fixed the Paypal IPN issue (I don't use Paypal and can't test it).

Thanks
Ken

Paws4Deals

17 Sep 2008, 8:06 AM
#447
excalibur avatar

excalibur

New Zenner

Join Date:
May 2007
Posts:
15
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Cheers for the update and all your hard work, I have installed the new class and will report back if it works when someone next uses paypal on my site.

17 Sep 2008, 9:41 AM
#448
hem avatar

hem

Totally Zenned

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

Re: Reward Points Module for ZC v13x

kenwahl:

:clap:

Hem

This new class.reward_points.php fixed the Google Checkout problem! It now awards points with Google Checkout. Outstanding job! Thanks for all the hard work I know it was a pain and time consuming to fix. Hopefully it also fixed the Paypal IPN issue (I don't use Paypal and can't test it).

Thanks
Ken

Paws4Deals

I just came here to post that the new version should also fix the Google Checkout problem too. You beat me to it. :P

17 Sep 2008, 9:57 AM
#449
hem avatar

hem

Totally Zenned

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

Re: Reward Points Module for ZC v13x

Okay, presuming Paypal IPN and Google Checkout are now working (fingers crossed) I can now devote so time into adding further features. I have on the wishlist:

  1. A better Customer Reward Point admin interface
  2. The ability to display earned and pending points in a customer email/newsletter
  3. Round points on quantity*price rather than just price.

The 3rd item is where 0 points are being awarded for an item priced say 0.5 even when 20 of them are purchased. Just out of interest how would people expect to see the Reward Points displayed for this item??? Have something like "buy 2 and get 1 reward point"???

Anyone any other items I should add to the wishlist???

17 Sep 2008, 10:14 AM
#450
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Rasyr:

Okay, I have installed this latest observer class. Will let you know as soon as I have a IPN customer and let you know whether or not it works

Sorry, but no points were awarded (pending) to the Paypal customer who made a purchase last night...

17 Sep 2008, 7:35 PM
#451
hem avatar

hem

Totally Zenned

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

Re: Reward Points Module for ZC v13x

Rasyr:

Sorry, but no points were awarded (pending) to the Paypal customer who made a purchase last night...

What version of ZenCart are you running?

17 Sep 2008, 8:13 PM
#452
hem avatar

hem

Totally Zenned

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

Re: Reward Points Module for ZC v13x

Here's a newer version with a minor refinement.

17 Sep 2008, 9:59 PM
#453
lilshopofsecrets avatar

lilshopofsecrets

New Zenner

Join Date:
Mar 2008
Posts:
25
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

Okay, presuming Paypal IPN and Google Checkout are now working (fingers crossed) I can now devote so time into adding further features. I have on the wishlist:

  1. A better Customer Reward Point admin interface
  1. The ability to display earned and pending points in a customer email/newsletter
  1. Round points on quantity*price rather than just price.

The 3rd item is where 0 points are being awarded for an item priced say 0.5 even when 20 of them are purchased. Just out of interest how would people expect to see the Reward Points displayed for this item??? Have something like "buy 2 and get 1 reward point"???

Anyone any other items I should add to the wishlist???

I would love to see the calculation of points work around group pricing, discount coupons, etc so that the points awarded are accurate. I'm sure it's a huge job but it would be so wonderful!

17 Sep 2008, 11:30 PM
#454
rasyr avatar

rasyr

Zen Follower

Join Date:
Aug 2006
Posts:
233
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

What version of ZenCart are you running?

I am running the latest version of Zen Cart -- 1.3.8a

18 Sep 2008, 3:06 AM
#455
beadfaery avatar

beadfaery

New Zenner

Join Date:
Aug 2008
Posts:
26
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

The 3rd item is where 0 points are being awarded for an item priced say 0.5 even when 20 of them are purchased. Just out of interest how would people expect to see the Reward Points displayed for this item??? Have something like "buy 2 and get 1 reward point"???

Anyone any other items I should add to the wishlist???Hmmmm? good point.....maybe have it as '.5 points' ?? or what you suggested would be good :) I'll just be happy if the points are awarded.

18 Sep 2008, 3:07 AM
#456
beadfaery avatar

beadfaery

New Zenner

Join Date:
Aug 2008
Posts:
26
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

Here's a newer version with a minor refinement.
What is the 'minor refinement' ? Is it worth applying this upgrade, or better to wait until there's more? :smile:

Oh and....I'm not very knowledgable with this kind of thing....where do I put this update?

18 Sep 2008, 3:49 AM
#457
beadfaery avatar

beadfaery

New Zenner

Join Date:
Aug 2008
Posts:
26
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

beadfaery:

What is the 'minor refinement' ? Is it worth applying this upgrade, or better to wait until there's more? :smile:

Oh and....I'm not very knowledgable with this kind of thing....where do I put this update?
would it go in /includes/classes/observers?

18 Sep 2008, 3:50 AM
#458
beadfaery avatar

beadfaery

New Zenner

Join Date:
Aug 2008
Posts:
26
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

lilshopofsecrets:

I would love to see the calculation of points work around group pricing, discount coupons, etc so that the points awarded are accurate. I'm sure it's a huge job but it would be so wonderful!
I second this :smile:

18 Sep 2008, 6:50 AM
#459
excalibur avatar

excalibur

New Zenner

Join Date:
May 2007
Posts:
15
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

one thing I would like to see on the wishlist and would be good & useful if its possible is to allow 100% claim (zero cost) for paypal as normally anything totalling zero goes through the freecharge card payment module rather than paypal, but with this, it is still passed through to paypal as zero charge which can not be handled by them.

I hope that makes sense ? :)

18 Sep 2008, 8:00 AM
#460
kenwahl avatar

kenwahl

New Zenner

Join Date:
Feb 2008
Posts:
32
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

Here's a newer version with a minor refinement.

Hem

I don't know if it fixed Paypal IPN, but the tweak didn't break Google Checkout. It still works with the change.

Ken

Paws4Deals