Forums / All Other Contributions/Addons / Reward Point Mod beta now available

Reward Point Mod beta now available

Views: 56,815

Results 161 to 180 of 323
11 Apr 2008, 10:52 PM
#161
hem avatar

hem

Totally Zenned

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

Reward Point Mod beta now available

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.

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

11 Apr 2008, 10:52 PM
#162
pinetreecandles avatar

pinetreecandles

Zen Follower

Join Date:
Feb 2008
Location:
West Virginia
Posts:
135
Plugin Contributions:
0

Re: Reward Point Mod beta now available

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. :clap:

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.

Zen Cart: 1.3.8a
PHP: 5.2.4
MySQL: 5.0.45

Pine Tree Candles

12 Apr 2008, 3:37 AM
#163
fiji avatar

fiji

New Zenner

Join Date:
Oct 2007
Posts:
42
Plugin Contributions:
0

Re: Reward Point Mod beta now available

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

12 Apr 2008, 4:27 AM
#164
fiji avatar

fiji

New Zenner

Join Date:
Oct 2007
Posts:
42
Plugin Contributions:
0

Re: Reward Point Mod beta now available

just tried on the fresh copy, same error as above.

Did I do something wrong?

12 Apr 2008, 10:34 AM
#165
pinetreecandles avatar

pinetreecandles

Zen Follower

Join Date:
Feb 2008
Location:
West Virginia
Posts:
135
Plugin Contributions:
0

Re: Reward Point Mod beta now available

fiji:

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 line ```
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.

Zen Cart: 1.3.8a
PHP: 5.2.4
MySQL: 5.0.45

Pine Tree Candles

12 Apr 2008, 1:34 PM
#166
pinetreecandles avatar

pinetreecandles

Zen Follower

Join Date:
Feb 2008
Location:
West Virginia
Posts:
135
Plugin Contributions:
0

Re: Reward Point Mod beta now available

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.

Zen Cart: 1.3.8a
PHP: 5.2.4
MySQL: 5.0.45

Pine Tree Candles

12 Apr 2008, 2:57 PM
#167
pinetreecandles avatar

pinetreecandles

Zen Follower

Join Date:
Feb 2008
Location:
West Virginia
Posts:
135
Plugin Contributions:
0

Re: Reward Point Mod beta now available

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)

$messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
        } else {
          $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
        }

and place this directly above it:

UpdateOrderRewardPointsStatus($oID,$status,$check_status->fields['orders_status']); // !!! AGM

A few lines down the file (around line 177 for me) find:

zen_remove_order($oID, $_POST['restock']);

Place this directly below:

DeleteOrderRewardPoints($oID);

I made those changes and it works for me now.

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.

Zen Cart: 1.3.8a
PHP: 5.2.4
MySQL: 5.0.45

Pine Tree Candles

12 Apr 2008, 3:36 PM
#168
fiji avatar

fiji

New Zenner

Join Date:
Oct 2007
Posts:
42
Plugin Contributions:
0

Re: Reward Point Mod beta now available

pinetreecandles,

Thanks, it works. :clap:
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.:oops:

12 Apr 2008, 4:26 PM
#169
fiji avatar

fiji

New Zenner

Join Date:
Oct 2007
Posts:
42
Plugin Contributions:
0

Re: Reward Point Mod beta now available

same problem, have to created a Redeem group and add customer to this group to redeem the point.

12 Apr 2008, 4:43 PM
#170
pinetreecandles avatar

pinetreecandles

Zen Follower

Join Date:
Feb 2008
Location:
West Virginia
Posts:
135
Plugin Contributions:
0

Re: Reward Point Mod beta now available

fiji:

same problem, have to created a Redeem group and add customer to this group to redeem the point.

A user can earn points without setting them in a group, however they can never spend them unless they are assigned to a group. Your correct on the display of discounted items for points.

This is something I think he was going to fix. I have a partial work around where I change the point ratio on the items that are reduced in price so they earn the correct amount of points. It's easy for me since I only have about 200 items. Would be a pain if you had thousands.

It also dosesn't work right for cases where an item is buy one get one free or buy one get the other at 50% off. They will get full points for the reduced and free item. Can manually remove the points via admin, but again that can be a pain and customers might wonder where their points went.:dontgetit

Zen Cart: 1.3.8a
PHP: 5.2.4
MySQL: 5.0.45

Pine Tree Candles

12 Apr 2008, 11:11 PM
#171
hem avatar

hem

Totally Zenned

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

Re: Reward Point Mod beta now available

Thanks for the feedback guys.

  1. Yes, I did worry about the RENAME sql line but could not find an IF EXISTS clause that would allow the sql to pass gracefully. I think I will take it out of the install.sql and put it in a pre 1.03 patch to be run before the main install.

  2. I'll check the Global Redeem- thanks for the heads up.

  3. And sorry- the Reward Points is still based on the base price. I will add a config item to select which price you want to base the points on. Also I think we need another config to select whether you can get points from a free item.

I think I will remove the dependency on the order.php core file. I'm a bit worried that this will mean that there will be a lot more sql transactions so I'll have to look into how to reduce this load but it needs to be done to "free" the mod and make it seamlessly work with other modifications.

PTC- Thanks for the interesting logic problem- I will look into it.

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

12 Apr 2008, 11:53 PM
#172
pinetreecandles avatar

pinetreecandles

Zen Follower

Join Date:
Feb 2008
Location:
West Virginia
Posts:
135
Plugin Contributions:
0

Re: Reward Point Mod beta now available

I really like the points admin. Thanks for all your hard work on this andy :clap:

Zen Cart: 1.3.8a
PHP: 5.2.4
MySQL: 5.0.45

Pine Tree Candles

13 Apr 2008, 3:38 AM
#173
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Reward Point Mod beta now available

Hi Andy and everyone!

I don't know if you have seen this yet or if this will help you add/fix functionality by comparing what this mod does, but Jaycode posted the xrewards module that he did a big overhaul on. I have attached it here for comparison/evaluation. I haven't tried any of the rewards mods yet, going to install them on test sites soon to compare.

Matt


Zen Cart and it's community are the best!!

13 Apr 2008, 9:50 PM
#174
hem avatar

hem

Totally Zenned

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

Re: Reward Point Mod beta now available

lankeeyankee:

Hi Andy and everyone!

I don't know if you have seen this yet or if this will help you add/fix functionality by comparing what this mod does, but Jaycode posted the xrewards module that he did a big overhaul on. I have attached it here for comparison/evaluation. I haven't tried any of the rewards mods yet, going to install them on test sites soon to compare.

Matt

It's a nice tight little mod. Thanks for the heads up and I look forward to seeing the comparisons.

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

13 Apr 2008, 9:51 PM
#175
hem avatar

hem

Totally Zenned

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

Re: Reward Point Mod beta now available

pinetreecandles:

I really like the points admin. Thanks for all your hard work on this andy :clap:

It'll be great when it works :wink:

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

14 Apr 2008, 9:27 AM
#176
fiji avatar

fiji

New Zenner

Join Date:
Oct 2007
Posts:
42
Plugin Contributions:
0

Re: Reward Point Mod beta now available

the x-rewards is working, but a little simple. It will give the point to customer after they place an order. not require admin to do anything.

The x-rewards solved two problems. One is the point based on discount price and two is don't have to add customer to group to refeem the point.

andrew, if you can combine it to your project, that will be the most powerful addon. :)

14 Apr 2008, 10:10 AM
#177
hem avatar

hem

Totally Zenned

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

Re: Reward Point Mod beta now available

fiji:

The x-rewards solved two problems. One is the point based on discount price and two is don't have to add customer to group to refeem the point.

Well, in fairness the second point is a bug in my mod- There is a Global Redeem but does not seem to be working- I'm looking at it right now.

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

14 Apr 2008, 11:52 AM
#178
hem avatar

hem

Totally Zenned

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

Re: Reward Point Mod beta now available

Interim fix. Fixes the Global Redeem not displaying in Admin->Customer->Reward Points and PTC's interesting logic puzzle which occured when all points were shifted between pending and earned and back again.

Unzip attached file to admin\ and replace the version there.

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

14 Apr 2008, 3:37 PM
#179
hem avatar

hem

Totally Zenned

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

Re: Reward Point Mod beta now available

Interim fix #2. This will handle the calculation of reward points for discounted/specials and free items.

Unzip the attached file into includes\functions\extra_functions

Then copy and paste the following into Admin->Tools->Install SQL Patches:

SET @group_id = '';
SELECT (@group_id := `configuration_group_id`) FROM `configuration_group` WHERE `configuration_group_title` LIKE 'Reward Points';

REPLACE INTO `configuration` 
(`configuration_id` ,`configuration_title` ,`configuration_key` ,`configuration_value` ,`configuration_description` ,`configuration_group_id` ,`sort_order` ,`last_modified` ,`date_added` ,`use_function` ,`set_function`)
VALUES (NULL , 'Adjust Reward Points for Sales/Specials', 'REWARD_POINTS_SPECIAL_ADJUST', '0', 'How to calculate Reward Points<br />0= Always use the base price.<br />1= Use price less Discounts and Specials.', @group_id, '7', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), ');

REPLACE INTO `configuration` 
(`configuration_id` ,`configuration_title` ,`configuration_key` ,`configuration_value` ,`configuration_description` ,`configuration_group_id` ,`sort_order` ,`last_modified` ,`date_added` ,`use_function` ,`set_function`)
VALUES (NULL , 'Allow Reward Points on Free Products', 'REWARD_POINTS_ALLOW_ON_FREE', '0', 'Set how points are rewarded for free products.<br />0= Free products give 0 Reward Points.<br />1= Allow Reward Points on free products.', @group_id, '8', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), ');

This will add two more config items to Admin->Configuration->Reward Points

Andrew

Andrew Moore
Omnicia Agile Development
www.omnicia.com

15 Apr 2008, 12:51 AM
#180
nullmind avatar

nullmind

Zen Follower

Join Date:
Jul 2007
Posts:
129
Plugin Contributions:
0

Re: Reward Point Mod beta now available

hoo, I was about to buy Xrewards ... but now I think i'll wait for this one :D

When do you think it will be ready for a live store ?