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

Reward Points Module for ZC v13x

Locked

Views: 470,639

Results 521 to 540 of 2,476
This thread is locked. New replies are disabled.
13 Oct 2008, 4:20 PM
#521
hem avatar

hem

Totally Zenned

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

Reward Points Module for ZC v13x

Okay, I found a couple of issues- First was with the update.sql (it didn't) and an install.sql crept back into the release. Second the version of zen_round I use may not be backward compatible so I've sorted that out too. Interim release here:

http://www.omnicia.com/zencart_reward_points_module.zip

13 Oct 2008, 8:24 PM
#522
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
730
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hello Andy,

I got it working in a fashion. The only thing for me, is I get this above the shopping cart:-

Warning: Invalid argument supplied for foreach() in /home/gemtree/public_html/includes/functions/extra_functions/reward_points_functions.php on line 16

I looked at the relevant section in that file:-

function GetRewardPoints($products)
{
$reward_points=0;
if(REWARD_POINT_MODE=='0')
{
foreach($products as $product)
if(isset($product['qty']))
$reward_points+=GetProductRewardPoints($product['id'],$product['attributes'])$product['qty'];
else
if(isset($product['quantity']))
$reward_points+=GetProductRewardPoints($product['id'],$product['attributes'])
$product['quantity'];
else
if(isset($product['quantityField']))
$reward_points+=GetProductRewardPoints($product['id'],$product['attributes'])*$product['quantityField'];
else
$reward_points="RP Error";

For the time being, I changed the 0 to a 1, and it works upon testing:-

if(REWARD_POINT_MODE=='0')

But it must be a setting in the config that I have set to 0, and it causes the error at the top.

Regards,

James

13 Oct 2008, 8:43 PM
#523
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

HeathenMagic:

Hello Andy,

I got it working in a fashion. The only thing for me, is I get this above the shopping cart:-

I looked at the relevant section in that file:-

For the time being, I changed the 0 to a 1, and it works upon testing:-

But it must be a setting in the config that I have set to 0, and it causes the error at the top.

Regards,

James

James- did you install the upgrade.sql file? The setting in question is the Reward Point Mode configuration item which is new for this version.

I think I know where the shopping cart issue is coming from- I'll check it and post a new version shortly.

13 Oct 2008, 8:51 PM
#524
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
730
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hello Andrew,

Yes I installed the upgrade.sql. What I think has happened is that I have three Reward Points config under configuration. But I am able to get rid of the duplicates. I beg your pardon, I have just spotted the Reward Points Mode, and setting it to 1 makes the error go (I reuploaded the original file to extra functions)

So thankyou very much for your help. If you have a donation email or url, please let us know. I think everyone who uses this successfully should be giving something back to you.

I know I mentioned it before, but I don't know if the reward points for each customer can be extracted to a newsletter. I don't know if it will work for me now, as I am on PHPlist and I guess that is a tricky way to extract. Say on a persons newsletter, it will say 'You have 250 reward points or something'.

Thanks again,

James :clap:

13 Oct 2008, 9:02 PM
#525
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

HeathenMagic:

Hello Andrew,

Yes I installed the upgrade.sql. What I think has happened is that I have three Reward Points config under configuration. But I am able to get rid of the duplicates. I beg your pardon, I have just spotted the Reward Points Mode, and setting it to 1 makes the error go (I reuploaded the original file to extra functions)

So thankyou very much for your help. If you have a donation email or url, please let us know. I think everyone who uses this successfully should be giving something back to you.

I know I mentioned it before, but I don't know if the reward points for each customer can be extracted to a newsletter. I don't know if it will work for me now, as I am on PHPlist and I guess that is a tricky way to extract. Say on a persons newsletter, it will say 'You have 250 reward points or something'.

Thanks again,

James :clap:

That explains why when I was just checking your website the problem disappeared :blink:

I think I know where the issue is- Can you tell me what mod you use for "Checkout Without Account Creation"- I'll install it locally and see if I can't track it down.

I will also see if I can get you a points-to-newsletter solution. If I produce something I want to make sure that it's easy to do and works across all newsletters.

Finally- thanks for the offer of a donation- not only thank you but thanks to everyone who have made similar offers. Really, I'm happy to do this- I think ZenCart is a great package and this is only my minor contribution to a much larger scheme. If you want to throw any money to someone, donate to the ZenCart community/design team- those are the guys that really need (and deserve) the support.

As for the Reward Point mod- I'm going to continue developing and debugging while people are still actively using the mod. Short term goal is to get the mod working for everyone. Long term goal is to incorporate everyone's wishes for a complete solution.

14 Oct 2008, 7:42 AM
#526
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
730
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hello Andrew,

I installed the Easy Sign Up mod, which is here:-

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=844

Well I thought it was only fair to enquire about donations - I'm due to make another donation to the Zen Cart team anyway, so I will bump that up.

Thanks again,

James

14 Oct 2008, 9:18 AM
#527
arthurhanlon avatar

arthurhanlon

New Zenner

Join Date:
Sep 2008
Posts:
14
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Firstly, awesome module and it seems to work on the whole for the short period of time I've been testing.

What I am noticing though is that the points that a customer is earning are not going in the pending section after they place their order.

I can place points directly into a customer account and they can redeem them just fine but when they place orders, they just don't seem to be getting the points.

I'm using a stock 1.3.7 install with no other modules installed.

Thanks in advance,
Arthur

14 Oct 2008, 9:26 AM
#528
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

arthurhanlon:

Firstly, awesome module and it seems to work on the whole for the short period of time I've been testing.

What I am noticing though is that the points that a customer is earning are not going in the pending section after they place their order.

I can place points directly into a customer account and they can redeem them just fine but when they place orders, they just don't seem to be getting the points.

I'm using a stock 1.3.7 install with no other modules installed.

Thanks in advance,
Arthur

Arthur, any chance that they are using PayPal IPN to pay for their purchases?

14 Oct 2008, 11:49 AM
#529
evan70 avatar

evan70

New Zenner

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

Re: Reward Points Module for ZC v13x

Hi Andy ;)

I' ve clean 1.3.8.a instalation with demo products without db prefixes on conf. >
Database: MySQL 4.0.27-log
PHP Version: 4.4.9 (Zend: 1.3.0)

i try to install your reward 1.20a mod, but always with same error :( >
1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT SUM(reward_points) FROM reward_status_track ph WHERE p
in:
[UPDATE reward_customer_points rc SET pending_points=pending_points-IFNULL((SELECT SUM(reward_points) FROM 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 orders)),0);]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

if i try to unistall.sql from phpMyAdmin get this error >
Error

SQL query:

DELETE IGNORE FROM configuration WHERE configuration_group_id = @group_id ;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'IGNORE FROM configuration WHERE configuration_group_id=@gro

Thanks for reply;)

14 Oct 2008, 3:53 PM
#530
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

evan70:

Hi Andy ;)

I' ve clean 1.3.8.a instalation with demo products without db prefixes on conf. >
Database: MySQL 4.0.27-log
PHP Version: 4.4.9 (Zend: 1.3.0)

i try to install your reward 1.20a mod, but always with same error :( >
1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT SUM(reward_points) FROM reward_status_track ph WHERE p
in:
[UPDATE reward_customer_points rc SET pending_points=pending_points-IFNULL((SELECT SUM(reward_points) FROM 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 orders)),0);]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

if i try to unistall.sql from phpMyAdmin get this error >
Error

SQL query:

DELETE IGNORE FROM configuration WHERE configuration_group_id = @group_id ;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'IGNORE FROM configuration WHERE configuration_group_id=@gro

Thanks for reply;)

You need MySQL v4.2 minimum to run this mod.

14 Oct 2008, 7:56 PM
#531
arthurhanlon avatar

arthurhanlon

New Zenner

Join Date:
Sep 2008
Posts:
14
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

Arthur, any chance that they are using PayPal IPN to pay for their purchases?

Nope, just standard "Cheque/Money Order" to process.

Does it not work with PayPal payments. I know that our live site has both ProtX Direct and the ProtX from in place for credit card payments. Will it work alongside this?

Thanks,
Arthur

14 Oct 2008, 8:08 PM
#532
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

arthurhanlon:

Nope, just standard "Cheque/Money Order" to process.

Does it not work with PayPal payments. I know that our live site has both ProtX Direct and the ProtX from in place for credit card payments. Will it work alongside this?

Thanks,
Arthur

Works with Cheque/Money Order (it's what I use to test). All other forms of payment work too except for PayPal IPN due to the way it handles payments.

16 Oct 2008, 8:23 AM
#533
arthurhanlon avatar

arthurhanlon

New Zenner

Join Date:
Sep 2008
Posts:
14
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hmmm...still can't seem to get it to work. I mean in regards to placing the points into pending then into earned after order has been processed. Any ideas?

I may try to install it again on another clean system and see if I can spot if anything was missed but I think I managed it fine.

Thanks,
Arthur

19 Oct 2008, 2:45 AM
#534
travel124 avatar

travel124

Zen Follower

Join Date:
Mar 2006
Location:
White Pigeon, MI
Posts:
160
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I have the mod set up and thanks it looks like a great one. I have one problem.

In my admin catalog I cannot access my Reward Points.

Under Customers I cannot access Group Reward Points and Reward Points.

I am getting this error for all 3.

Sorry, your security clearance does not allow you to access this resource.

Please contact your site administrator if you believe this to be incorrect.

Sorry for any inconvenience.

Thank You for the help!

19 Oct 2008, 4:12 AM
#535
tim_ware avatar

tim_ware

New Zenner

Join Date:
Dec 2007
Posts:
25
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Thanks for the great Mod I have been using Version 1.10a for a number of months without a hitch apart from "the PayPal IPN not assigning points problem".

I just installed your latest version 1.20a on my test site and have noticed that when I redeem reward point from a previous order. The amount that is redeemed is subtracted from the amount of reward points I would get on this order.
Version 1.10a would not deduct any points from the order after redeeming reward points from previous orders.

Has anybody else noticed this..

Hey travel124,

Sorry, your security clearance does not allow you to access this resource.

Please contact your site administrator if you believe this to be incorrect.
Do you possibly have Admin Profiles installed. U may need to add the permissions...

Thanks again for the great mod..

19 Oct 2008, 1:19 PM
#536
travel124 avatar

travel124

Zen Follower

Join Date:
Mar 2006
Location:
White Pigeon, MI
Posts:
160
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Yes I do have Admin Profiles installed. I could not tell what permissions I need to set.

Thank You!

19 Oct 2008, 10:43 PM
#537
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

Tim Ware:

Thanks for the great Mod I have been using Version 1.10a for a number of months without a hitch apart from "the PayPal IPN not assigning points problem".

I just installed your latest version 1.20a on my test site and have noticed that when I redeem reward point from a previous order. The amount that is redeemed is subtracted from the amount of reward points I would get on this order.
Version 1.10a would not deduct any points from the order after redeeming reward points from previous orders.

Has anybody else noticed this..

Hey travel124,

Do you possibly have Admin Profiles installed. U may need to add the permissions...

Thanks again for the great mod..

Tim, thanks for the feedback. The "remove points when redeem points" was asked for by a number of people so I coded it in- If you want to still allow rewarded points even when redeeming I'll add it in as a configuration in the next release.

Nice catch on the Admin Profiles.

And to anyone still listening- I am determined to nail the Paypal IPN issue.

20 Oct 2008, 3:04 AM
#538
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hi,

After search customer last name in Admin->Customer->Reward Points Module

I click into customer which i found to edit point but i saw this trouble :

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status=0 ORDER BY date DESC LIMIT 12' at line 1
in:
[SELECT rewards_id, orders_id, date, reward_points, status FROM handicrareward_status_track WHERE customers_id= AND status=0 ORDER BY date DESC LIMIT 12;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Do you know how to fix this?

Thanks you!

20 Oct 2008, 7:01 PM
#539
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

kimsonvu:

Hi,

After search customer last name in Admin->Customer->Reward Points Module

I click into customer which i found to edit point but i saw this trouble :

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status=0 ORDER BY date DESC LIMIT 12' at line 1
in:
[SELECT rewards_id, orders_id, date, reward_points, status FROM handicrareward_status_track WHERE customers_id= AND status=0 ORDER BY date DESC LIMIT 12;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Do you know how to fix this?

Thanks you!

I'm guessing that you MySQL version is lower than 4.2

20 Oct 2008, 7:27 PM
#540
travel124 avatar

travel124

Zen Follower

Join Date:
Mar 2006
Location:
White Pigeon, MI
Posts:
160
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Please I would to know to what files to add permissions.

Thank You.