I'll test it locally and let you know if I come across any problems. Thanks for the download![]()
I'll test it locally and let you know if I come across any problems. Thanks for the download![]()
Just a note- there's now order.php mods for both 1.3.7 and 1.3.8. I'm thinking of ways to get around changing a core file- Currently the two ideas I have are:
1. Use MySQL triggers to do the same job. However this would mean anyone who wanted to use the mod would need MySQL v5.0.2 or greater.
2. Handle the same function when the user logs in- This means that there will be a chance that the points will get "out of sync". Admin will still show points pending until the customer logs in.
Otherwise I think I'll just let it slide until v1.4 appears as it's possible that Notifiers will be added to Admin then.
Nice work on the mod andy! I installed it locally on a fresh copy of Zen and tested all the aspects I could.
The install was easy enough since it was just upload it all. I did come across a warning when I ran the SQ statement. I forgot to write down what it was, but it had to do with the "IGNORE" statement you used. It came back and said it couldn't find the "IGNORE" table so it was going to disregard it. It seems to work anyway.
During testing I found that the globally set Redeem ration did not work for me. It displayed the correct amount of points, but the value showed $0.00. I had global redeem value set to .05. The test account had 20 points so it should have showed a $1.00 value. I was only about to get it to work after I created a Redeem group and placed the test account into it. After that it displayed properly. Do you have to create a group and place a customer into it for this to work or is this a bug?
It looks like the points earned are still tied to the product and not to the total after discounts. Is this correct?
Other than what I mentioned it seems to work fine.
I have another test account setup locally that mimics my live site that I use for testing before I make changes to the live. The mod no longer works as it's not placing the points into the database, either pending or earned. I'm sure it's from a compatibility issue with another mod. Going to work on that now and if I figure out which one I will make a post so everyone else knows which mod.
Thanks again.
Thank you for your Contributions.
I test it on the local zen138a with other Contributions. (Not fresh copy)
1. when patch SQL, shows error messgae:
"1017 Can't find file: '.\138atest\reward_product_points.frm' (errno: 2)
in:
[RENAME TABLE reward_product_points TO reward_master;]
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."
2. click Admin->Catalog->Reward Points shows error:
"1146 Table '138atest.reward_master' doesn't exist
in:
[SELECT * FROM reward_master WHERE scope=0 AND scope_id=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."
3. Admin->Configuration->Reward Points, I didn't find such option.
4. Customer->Group Reward Redeem shows error:
"1146 Table '138atest.reward_master' doesn't exist
in:
[SELECT * FROM reward_master WHERE scope=0 AND scope_id=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."
5. Admin->Customer->Reward Points shows error:
"1146 Table '138atest.reward_customer_points' doesn't exist
in:
[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 customers as c LEFT JOIN (reward_customer_points as r) ON (r.customers_id=c.customers_id) LEFT JOIN(group_pricing as gp) ON (gp.group_id=c.customers_group_pricing) LEFT JOIN(reward_master as rm) ON (rm.scope=3 AND rm.scope_id=c.customers_group_pricing) ORDER BY c.customers_lastname;]
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."
6. when open 'Shopping Cart with Rewards' sidebox, the whole right column missing.
Maybe some code conflict with other mod? I will try it on the fresh copy later.
Thank you, hem
just tried on the fresh copy, same error as above.
Did I do something wrong?
Use the Install SQL Patches from the zen cart admin. Copy and paste all but the very top line if the install.sql file in the mod.
This is the very top lineLeave that out and then run the patch. That should work. You may get a warning about an IGNORE table not being found. Not sure what that is about, but it still seems to work.Code:RENAME TABLE `reward_product_points` TO `reward_master`;
Then make sure you have everything uploaded in the correct areas of your site. I tested it on a fresh copy and it works.
Andy-
I think I found a bug in the Reward Points Admin.
I was playing around with the different functions like adding points and removing them and so forth.
I added 10 points to the pending and it worked fine and displayed correctly on the customer line. I then transfered all the points to Earned and that worked fine also, but when I transfered the points from earned to Pending, Pending went to -10 and earned went to 20. See photo.
http://pinetreecandles.com/picts/001.3d.jpg
If I find anything else I will post it.
I found an incompatibility with Ty Package Tracker. If you use it to update the status of the order when you send a customer a tracking number, the reward Points are never updated since the check for a status change is done in orders.php and that is bypassed by the Ty Package Tracker.
To make it compatible, open admin/tracker.php and find (about line 160 for me)
and place this directly above it:Code:$messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success'); } else { $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning'); }
A few lines down the file (around line 177 for me) find:Code:UpdateOrderRewardPointsStatus($oID,$status,$check_status->fields['orders_status']); // !!! AGM
Place this directly below:Code:zen_remove_order($oID, $_POST['restock']);
I made those changes and it works for me now.Code:DeleteOrderRewardPoints($oID);
I would imagine that any mod that bypasses the order.php will need to have those two lines added to it before Reward Points mod will work.
pinetreecandles,
Thanks, it works.
Just ignore the first line when import the SQL patch.
Now I found another bug:
If the price is $100, and the discount price is $50, the reward point should be depend on the discount price. (50 point).
But it still show 100 point. It maybe a bug.![]()
same problem, have to created a Redeem group and add customer to this group to redeem the point.