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
Views: 472,227
Zen Follower
In my installation reward points are not credited until there is a change in order status - e.g. pending to processing
New Zenner
Hi Paul, tysm for trying to help me.
I think is what I have in my status track (see the image above)
New Zenner
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!
Totally Zenned
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
Totally Zenned
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
New Zenner
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!
Totally Zenned
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
New Zenner
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.
Totally Zenned
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
Totally Zenned
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!
Isaacola
Online Shopping Mall
Totally Zenned
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
Contribs: - Time Zone Fix/Offset ■ Google Adsense ■ betterCategoriesEzInfo ■ Multi Cross Sell
Totally Zenned
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!
Isaacola
Online Shopping Mall
Totally Zenned
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
Contribs: - Time Zone Fix/Offset ■ Google Adsense ■ betterCategoriesEzInfo ■ Multi Cross Sell
Totally Zenned
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.
Isaacola
Online Shopping Mall
Totally Zenned
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.
Contribs: - Time Zone Fix/Offset ■ Google Adsense ■ betterCategoriesEzInfo ■ Multi Cross Sell
Totally Zenned
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 :)
Isaacola
Online Shopping Mall
Totally Zenned
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!
New Zenner
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.
New Zenner
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 40However 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.
Zen Follower
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....
Tell staff why this post should be reviewed.