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

Reward Points Module for ZC v13x

Locked

Views: 470,640

Results 601 to 620 of 2,476
This thread is locked. New replies are disabled.
17 Nov 2008, 9:24 PM
#601
hem avatar

hem

Totally Zenned

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

Reward Points Module for ZC v13x

BlessIsaacola:

Andrew,

Thanks for this great mod. When you time permits can you please post the preferred configuration settings? i.e. order total versus sub-total and why a shop owner might want one versus other. I know this is really a business decision but somehow I have a feel that some settings create less headaches just reading from all the posts.

I am going to download the updated version from your site and try that one as we would like to offer this for Christmas shopping.

I'm writing a manual at the moment so I'll make sure I cover this option.

18 Nov 2008, 2:06 AM
#602
neteasy avatar

neteasy

Zen Follower

Join Date:
Mar 2004
Location:
Ontario, Canada
Posts:
128
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

hem:

Question- Do you have Points rewarded by Product or Points rewarded by Total/Subtotal set?
i have set points rewarded by product

18 Nov 2008, 8:11 AM
#603
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

Question- Do you have Points rewarded by Product or Points rewarded by Total/Subtotal set?

I have my points awarded by Total, so that it takes off any discounts first and then applies the reward points, also have it set to take the points from special prices as well....I hope that helps in some way :)

18 Nov 2008, 8:13 AM
#604
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

neteasy:

thanks Christon. I had PDT token setup in Admin but Paypal order didn't add reward points... also tried the new version Andrew just posted but with no luck. :(

I'm really sorry that didn't work :(

I installed the mod thinking I would have to add in points manually after reading the rest of the thread....I only offer PP IPN and direct bank transfer lol so I was pleasantly surprised to find I didn't have to do anything but move them to Earned :)

18 Nov 2008, 9:22 AM
#605
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

christon26:

I have my points awarded by Total, so that it takes off any discounts first and then applies the reward points, also have it set to take the points from special prices as well....I hope that helps in some way :)

Well that sort of confirms my suspicions- IPN works with v1.20 when set to Reward by Total but not when set to Reward by Product.

18 Nov 2008, 10:20 AM
#606
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Makes me wish I knew enough about coding (or programming? lol) to know why it works for one and not the other LOL!

18 Nov 2008, 3:02 PM
#607
neteasy avatar

neteasy

Zen Follower

Join Date:
Mar 2004
Location:
Ontario, Canada
Posts:
128
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

hem:

Well that sort of confirms my suspicions- IPN works with v1.20 when set to Reward by Total but not when set to Reward by Product.
if that's the case, i'm going to switch to Reward by Product :clap:

18 Nov 2008, 7:09 PM
#608
neteasy avatar

neteasy

Zen Follower

Join Date:
Mar 2004
Location:
Ontario, Canada
Posts:
128
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

:oops: switched to Reward by Total and still not working :(

18 Nov 2008, 10:43 PM
#609
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

christon26:

Makes me wish I knew enough about coding (or programming? lol) to know why it works for one and not the other LOL!

It's all about what PayPal IPN returns back to the Reward Point handler. Apparently it's not the full cart.

18 Nov 2008, 11:51 PM
#610
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Dare I say then that Paypal probably needs a smacking....and I reckon there's a few around willing to volunteer LOL!

If it might possibly help anyone, these are my settings in Config:

Reward Point Mode 1
Reward Point Sidebox Display 0
Reward Point Status Track Simple
Reward Point Sunrise Period 0
Reward Point Redeem Minimum 0
Reward Point Redeem Maximum 0
Reward Point Rounding 0.5
Max Transactions to Display in Customer Admin 100
Delete Old Reward Transactions Period 0
Adjust Reward Points for Sales/Specials 1
Allow Reward Points on Free Products 0
Allow Redeem of Reward Points on Order Total or Subtotal 1
Set Minimum Order Value to Redeem Points Against 0I don't know if that will help at all, but I hope it does LOL

19 Nov 2008, 3:53 AM
#611
neteasy avatar

neteasy

Zen Follower

Join Date:
Mar 2004
Location:
Ontario, Canada
Posts:
128
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

:clap::clap:
You are the star... Christon !
I change the Reward Point Status Track to SIMPLE and Paypal reward points works now !
I had it in Advanced mode which was the problem.

Thanks Andrew again for this great module!

Notes: I have Moneybookers Payment and Google Checkout installed.

19 Nov 2008, 5:09 AM
#612
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Woohoo, pleased I could help! grinz

19 Nov 2008, 9:33 AM
#613
enjoyhobbies avatar

enjoyhobbies

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I installed the Reward Points Module a few months ago, but can't work on paypal, so i uninstall the Reward Points Module, now i re-install it, but problem appears, when i visit customers - reward points, my site have about 2000 customers, but just a few customers appears, and i can't delete or upgrade any informaton on the customers.

Any idear?

19 Nov 2008, 1:00 PM
#614
neteasy avatar

neteasy

Zen Follower

Join Date:
Mar 2004
Location:
Ontario, Canada
Posts:
128
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

/admin/customers_reward_points.php line 249

find:
$limit=" LIMIT 40";

replace with:
$limit=" LIMIT 200";

then you will be able to see 200 customers

Also you can use the "search" function to search for customer. But it only does for Firstname and Lastname.
You can modify the following line to support email and Customer ID search...

find:
$search=" WHERE (c.customers_lastname LIKE ".$safe_search_string." OR c.customers_firstname LIKE ".$safe_search_string.")";

replaced with:
$search=" WHERE (c.customers_lastname LIKE ".$safe_search_string." OR c.customers_firstname LIKE ".$safe_search_string." OR c.customers_id LIKE ".$safe_search_string." OR c.customers_email_address LIKE ".$safe_search_string.")";

find:
$customer_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_group_pricing, r.pending_points, r.reward_points, gp.group_name, rm.redeem_ratio from ".TABLE_CUSTOMERS." as c LEFT JOIN (".TABLE_REWARD_CUSTOMER_POINTS." as r) ON (r.customers_id=c.customers_id) LEFT JOIN(".TABLE_GROUP_PRICING." as gp) ON (gp.group_id=c.customers_group_pricing) LEFT JOIN(".TABLE_REWARD_MASTER." as rm) ON ((c.customers_group_pricing!=0 AND rm.scope=".SCOPE_GROUP." AND rm.scope_id=c.customers_group_pricing) OR (c.customers_group_pricing=0 AND rm.scope=".SCOPE_GLOBAL." AND rm.scope_id=0))".$search.$order_by.$limit.";";

replaced with:
$customer_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, r.pending_points, r.reward_points, gp.group_name, rm.redeem_ratio from ".TABLE_CUSTOMERS." as c LEFT JOIN (".TABLE_REWARD_CUSTOMER_POINTS." as r) ON (r.customers_id=c.customers_id) LEFT JOIN(".TABLE_GROUP_PRICING." as gp) ON (gp.group_id=c.customers_group_pricing) LEFT JOIN(".TABLE_REWARD_MASTER." as rm) ON ((c.customers_group_pricing!=0 AND rm.scope=".SCOPE_GROUP." AND rm.scope_id=c.customers_group_pricing) OR (c.customers_group_pricing=0 AND rm.scope=".SCOPE_GLOBAL." AND rm.scope_id=0))".$search.$order_by.$limit.";";

19 Nov 2008, 1:15 PM
#615
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

I noticed recently that the administrative section on one of our sites has slowed to a crawl. So much so that it actually times out at various intervals.

This only happens in the admin (front end is ok).

I narrowed this problem down to a query in the Rewards Points module and once I commented out that query the admin ran fine again. (I found this query by looking at my server processes in MySQL by the way.)

I localized the rewards points query that was slowing down the entire admin and listed it below. Once I commented this out to test, the admin ran fine again. With it active the admin slows to a crawl.

I realize this query is used to keep things up-to-date automatically from within the admin (as far as points are concerned) but is there a way to get it to operate more efficiently? Right now it makes it virtually impossible to operate.

The query is found in the "extra functions" area (it's the rewards points function file) around line 25 and looks like this:

	// Remove all reward point history records for deleted orders. Update customers pending points removing any deleted order with points still pending
	if($db->Execute("UPDATE ".TABLE_REWARD_CUSTOMER_POINTS." rc SET `pending_points`=`pending_points`-IFNULL((SELECT SUM(`reward_points`) FROM ".TABLE_REWARD_STATUS_TRACK." ph WHERE ph.`customers_id`=rc.`customers_id` AND ph.`status`=0 AND ph.`orders_id` NOT IN (SELECT `orders_id` FROM ".TABLE_ORDERS.")),0);"))
	 $db->Execute("DELETE FROM ".TABLE_REWARD_STATUS_TRACK." WHERE `orders_id` NOT IN (SELECT `orders_id` FROM ".TABLE_ORDERS.");");
 }

How can we optimize this query to run more efficiently?

We've got about 8000 customers in the database with tens of thousands of rewards points (obviously).

19 Nov 2008, 4:40 PM
#616
neteasy avatar

neteasy

Zen Follower

Join Date:
Mar 2004
Location:
Ontario, Canada
Posts:
128
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

Just noticed some Paypal orders still didn't generate Reward Points :(
I guess I have to wait for the next release...

19 Nov 2008, 7:20 PM
#617
neteasy avatar

neteasy

Zen Follower

Join Date:
Mar 2004
Location:
Ontario, Canada
Posts:
128
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

it looks like if txn_type=web_accept then the Reward Point gets generated... if txn_type=unique then there is no Reward Point for Paypal order

19 Nov 2008, 11:18 PM
#618
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

neteasy:

it looks like if txn_type=web_accept then the Reward Point gets generated... if txn_type=unique then there is no Reward Point for Paypal order

Any idea what causes the different transaction types?

19 Nov 2008, 11:27 PM
#619
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Would Paypal themselves be able to give you that information? I know for my records, every single Paypal transaction since I put in the PDT Token has been web_accept, I only sell downloadables or virtual services and I don't do tax or shipping lol

20 Nov 2008, 7:06 AM
#620
enjoyhobbies avatar

enjoyhobbies

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Thanks. neteasy. I fell that all customers should appear in the 'Customers - Reward Points'. It seems it won't

First issue.
I put on a test order in my site, then i get 160 points when purchase 160 dollars( one dollar earn on point), but there isn't any points appear in 'Customers - Reward Points'.

When i log in my site with the test account, there isn't any points appear in the 'Reward Points' sidebox.

Second issue
on the test order detail: it shows that 'Reward Points earned: 160', but in the 'Reward Points' sidebox, it shows that '185 reward points in cart', The total order with the shipping is 185 dollars. Why do the shipping cost be eared the points?

The Reward Points configration is

Reward Point Mode 1
Reward Point Sidebox Display 0
Reward Point Status Track Simple
Reward Point Sunrise Period 0
Reward Point Redeem Minimum 0
Reward Point Redeem Maximum 250
Reward Point Rounding 0.5
Max Transactions to Display in Customer Admin 12
Delete Old Reward Transactions Period 0
Adjust Reward Points for Sales/Specials 1
Allow Reward Points on Free Products 0
Allow Redeem of Reward Points on Order Total or Subtotal 1
Set Minimum Order Value to Redeem Points Against 0

Any help would be appreciated.