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

Reward Points Module for ZC v13x

Locked

Views: 472,227

Results 2,281 to 2,300 of 2,476
This thread is locked. New replies are disabled.
22 Jul 2013, 3:18 PM
#2281
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Reward Points Module for ZC v13x

In my installation reward points are not credited until there is a change in order status - e.g. pending to processing

23 Jul 2013, 12:34 PM
#2282
mariscrap avatar

mariscrap

New Zenner

Join Date:
Jun 2012
Posts:
31
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hi Paul, tysm for trying to help me.

I think is what I have in my status track (see the image above)

31 Jul 2013, 8:02 PM
#2283
geeker avatar

geeker

New Zenner

Join Date:
Mar 2011
Posts:
52
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Thanks for answering my last question. I have another.

Is there a setting that will allow for fractional points, not rounded off? So points awarded can be 1.25 and points can be redeemed as well.

I am hoping there is a way other than going in and messing with the code.

Thanks in advance!

1 Aug 2013, 3:53 AM
#2284
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Reward Points Module for ZC v13x

geeker:

Thanks for answering my last question. I have another.

Is there a setting that will allow for fractional points, not rounded off? So points awarded can be 1.25 and points can be redeemed as well.

I am hoping there is a way other than going in and messing with the code.

Thanks in advance!

Short answer to your question is no. Why in the world would you want to give out fraction of points in the first place. That would be custom code. You will have to hire someone to rewrite the Reward Points module to do that.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

1 Aug 2013, 3:56 AM
#2285
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Reward Points Module for ZC v13x

Mariscrap:

Hi Paul, tysm for trying to help me.

I think is what I have in my status track (see the image above)

If they are not showing in the admin area then you have not installed Reward points right, or a file or files didn't upload all the way. Go back and check your installation of Reward Points.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

1 Aug 2013, 1:31 PM
#2286
geeker avatar

geeker

New Zenner

Join Date:
Mar 2011
Posts:
52
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

countrycharm:

Short answer to your question is no. Why in the world would you want to give out fraction of points in the first place. That would be custom code. You will have to hire someone to rewrite the Reward Points module to do that.

I figured it would be custom and I'm looking into it. We are using this as a "store credit" reward so customers are given 3% back on every purchase as store credit. It's what my boss wants to have so ... I will make it so. Thanks!

1 Aug 2013, 2:08 PM
#2287
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Reward Points Module for ZC v13x

geeker:

I figured it would be custom and I'm looking into it. We are using this as a "store credit" reward so customers are given 3% back on every purchase as store credit. It's what my boss wants to have so ... I will make it so. Thanks!

Why don't you try the Store Credits and Rewards Points Module. It might serve your purpose.
That module allows store owners to offer store credit to their customers. Credit can be manually set from the Zen Cart admin, or awarded to customers after each purchase by giving a percentage of their order total as store credits.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

1 Aug 2013, 2:37 PM
#2288
geeker avatar

geeker

New Zenner

Join Date:
Mar 2011
Posts:
52
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Thanks I will give that a shot as well. I have this mod installed and a few changes to the rounding functions and not casting a few values as int seem to be doing the trick.

2 Aug 2013, 4:38 AM
#2289
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Reward Points Module for ZC v13x

geeker:

Thanks I will give that a shot as well. I have this mod installed and a few changes to the rounding functions and not casting a few values as int seem to be doing the trick.

After you test it for a while maybe you can share what you did with the community just in case someone else needs to do the same thing.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

6 Aug 2013, 6:06 AM
#2290
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Reward Points Module for ZC v13x

If anyone can help resolve this issue I'd greatly appreciate it. Just upgraded our rewards points today to 2.1b on Zen Cart 1.5.1 and I am getting the following error:

[06-Aug-2013 01:24:05 America/New_York] PHP Fatal 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 '11178''
				AND ((prp.scope_id=p.products_id AND prp.scope='2') 
				OR (p.pro' at line 3 :: SELECT prp.point_ratio*p.products_price AS reward_points, prp.point_ratio, p.products_price, p.products_priced_by_attribute 
				FROM reward_master prp, products p, products_to_categories p2c 
				WHERE p.products_id='11178''
				AND p2c.products_id='11178''
				AND ((prp.scope_id=p.products_id AND prp.scope='2') 
				OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id AND prp.scope='1')
				OR (prp.scope='0'))
				ORDER BY prp.scope DESC LIMIT 1; in /MASKED/includes/classes/db/mysql/query_factory.php on line 120

Thanks for your help!

6 Aug 2013, 6:20 AM
#2291
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

BlessIsaacola:

If anyone can help resolve this issue I'd greatly appreciate it. Just upgraded our rewards points today to 2.1b on Zen Cart 1.5.1 and I am getting the following error:

[06-Aug-2013 01:24:05 America/New_York] PHP Fatal 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 '11178''
AND ((prp.scope_id=p.products_id AND prp.scope='2')
OR (p.pro' at line 3 :: SELECT prp.point_ratio*p.products_price AS reward_points, prp.point_ratio, p.products_price, p.products_priced_by_attribute
FROM reward_master prp, products p, products_to_categories p2c
WHERE p.products_id='11178'[B]'[/B] [B]<-problem here[/B]
AND p2c.products_id='11178'[B]'[/B] [B]<- and here[/B]
AND ((prp.scope_id=p.products_id AND prp.scope='2')
OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id AND prp.scope='1')
OR (prp.scope='0'))
ORDER BY prp.scope DESC LIMIT 1; in /MASKED/includes/classes/db/mysql/query_factory.php on line 120

> 
> Thanks for your help!You have extra single quotes (shown in red) which are causing problems in at least 2 places
6 Aug 2013, 1:20 PM
#2292
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Reward Points Module for ZC v13x

gilby:

You have extra single quotes (shown in red) which are causing problems in at least 2 places

Thank you so much. I look inside the file that contains the information but I am not sure if you see what's wrong below. I have pasted the three areas that could potentially have issues.

if(zen_get_products_price_is_free($products_id)==false || REWARD_POINTS_ALLOW_ON_FREE=='1') // Allow RP on free items (Admin settable)
	{
		$sql = "SELECT prp.point_ratio*p.products_price AS reward_points, prp.point_ratio, p.products_price, p.products_priced_by_attribute 
				FROM ".TABLE_REWARD_MASTER." prp, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c 
				WHERE p.products_id='" . $products_id . "'
				AND p2c.products_id='" . $products_id . "'
				AND ((prp.scope_id=p.products_id AND prp.scope='".SCOPE_PRODUCT."') 
				OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id AND prp.scope='".SCOPE_CATEGORY."')
				OR (prp.scope='".SCOPE_GLOBAL."'))
				ORDER BY prp.scope DESC LIMIT 1;";
	
		$result=$db->Execute($sql);
$sql = "SELECT prp.point_ratio 
			FROM ".TABLE_REWARD_MASTER." prp, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c 
			WHERE p.products_id='" . $products_id . "'
			AND p2c.products_id='" . $products_id . "'
			AND ((prp.scope_id=p.products_id AND prp.scope='".SCOPE_PRODUCT."') 
			OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id AND prp.scope='".SCOPE_CATEGORY."')
			OR (prp.scope='".SCOPE_GLOBAL."'))
			ORDER BY prp.scope DESC LIMIT 1;";
	
	$result=$db->Execute($sql);
$sql = "SELECT redeem_ratio 
	        FROM ".TABLE_REWARD_MASTER." prp, ".TABLE_CUSTOMERS." as c
			LEFT JOIN(".TABLE_GROUP_PRICING." as gp) ON (gp.group_id=c.customers_group_pricing)
			WHERE c.customers_id='".(int)$customers_id."'
			AND ((prp.scope_id='".$customers_id."' AND prp.scope='".SCOPE_CUSTOMER."')
			OR (gp.group_id=c.customers_group_pricing AND prp.scope_id=gp.group_id AND scope='".SCOPE_GROUP."')
			OR (prp.scope='".SCOPE_GLOBAL."'))
			ORDER BY prp.scope DESC LIMIT 1;"; 

	$result=$db->Execute($sql);

I hope you or someone else sees what's wrong in the above and can guide me.

Thanks!

6 Aug 2013, 11:21 PM
#2293
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

It appears that its the first of those sql queries.
However the code appears fine.
The only way that I can see it producing the code thats in the error is if $products_id is corrupt
ie: $products_id = 11178' <- note the trailing apostrophre

7 Aug 2013, 1:53 AM
#2294
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Reward Points Module for ZC v13x

gilby:

It appears that its the first of those sql queries.
However the code appears fine.
The only way that I can see it producing the code thats in the error is if $products_id is corrupt
ie: $products_id = 11178' <- note the trailing apostrophre

We may have to do away with the Rewards points module because I can't figure out what's going on. I do not see any problem with that product id in the DB and it happens with other products as well so it definitely cannot be an issue with the id.

Thanks for helping to troubleshoot though. I am surprised that I am the only one seeing this problem in the log.

7 Aug 2013, 2:35 AM
#2295
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

BlessIsaacola:

We may have to do away with the Rewards points module because I can't figure out what's going on. I do not see any problem with that product id in the DB and it happens with other products as well so it definitely cannot be an issue with the id.

Thanks for helping to troubleshoot though. I am surprised that I am the only one seeing this problem in the log.Be aware that $products_id is NOT in the database.
It is a php variable that has been assigned somewhere.

p.products_id and p2c.products_id ARE in the database

Have you tried uploading the files again. It could be a corrupt upload.

7 Aug 2013, 5:03 AM
#2296
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Reward Points Module for ZC v13x

gilby:

Be aware that $products_id is NOT in the database.
It is a php variable that has been assigned somewhere.

p.products_id and p2c.products_id ARE in the database

Have you tried uploading the files again. It could be a corrupt upload.

Thanks so much for the pointer about $products_id. I searched Zen Cart and all the files that uses this seems to have (int)$products_id instead of ```
$products_id


This is driving me crazy :)
11 Aug 2013, 9:51 AM
#2297
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hi everyone. I have Super Orders and Edit Orders installed(current) on v1.51, it seems to work well. Until I try to edit an order.

I am able to make edits to an order. But when I try to update and order, I get a blank screen. This is the the error log:
[11-Aug-2013 05:40:33] PHP Fatal error: Call to undefined function getrewardpoints() in /hsphere/local/home/c376292/luxuriouspurse.com/shop/includes/modules/order_total/ot_reward_points_display.php on line 40

However the edits made to the order are actually saved. Any idea how to fix this? Thank you!

20 Aug 2013, 2:47 PM
#2298
thegoofyone avatar

thegoofyone

New Zenner

Join Date:
Jul 2012
Posts:
8
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Has anyone gotten pagination to work in admin. With over 250 customers that start with A, it's taking the database ages to pull the report on 250 customers. Ihave even more in S. If I set it to 50 the database pulls the data in a number of seconds, but I can't get to the rest of my customers.

27 Aug 2013, 3:02 AM
#2299
nikerymis avatar

nikerymis

New Zenner

Join Date:
Oct 2009
Location:
Ohio
Posts:
19
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

joyjoy:

Hi everyone. I have Super Orders and Edit Orders installed(current) on v1.51, it seems to work well. Until I try to edit an order.

I am able to make edits to an order. But when I try to update and order, I get a blank screen. This is the the error log:
[11-Aug-2013 05:40:33] PHP Fatal error: Call to undefined function getrewardpoints() in /hsphere/local/home/c376292/luxuriouspurse.com/shop/includes/modules/order_total/ot_reward_points_display.php on line 40

However the edits made to the order are actually saved. Any idea how to fix this? Thank you!

I am also having this issue (and am a complete PHP n00b) on my test site (where I'm trying out Edit Orders for the first time). I have no issues on my main site (where I only have Reward Points and no order plugins). Any thoughts on how to fix? My test site, where I'm encountering this error is running Zen Cart v1.5.1 and Edit Orders 4.1.2, but no Super Orders. I'm using PHP version 5.3.x. Let me know if you need more details.

8 Sep 2013, 11:18 PM
#2300
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Sorry if this has been answered before - been looking around and can't find much. This add-on is excellent, however I'm looking for some docs or instructions that explain the workings of this to my customer. Has anyone written a good doc that I could pillage for my site that explains how everything works to my customer base?

Thanks in advance and again apologies if this has been answered elsewhere....