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

Reward Points Module for ZC v13x

Locked

Views: 470,638

Results 481 to 500 of 2,476
This thread is locked. New replies are disabled.
1 Oct 2008, 12:05 AM
#481
dscott1966 avatar

dscott1966

Zen Follower

Join Date:
Apr 2005
Posts:
298
Plugin Contributions:
0

Reward Points Module for ZC v13x

dscott1966:

I have a problem i do not know if this can be fixed or not hoping it can be. I'm using the mod price updater. The problem is some of my attributes have different prices, the reward points are not updating to reflect the price change. But it is reflecting the price change in the checkout is there away to get it to reflect the price change on the product info page?

Can be seen Here: http://dealz-r-us.com/index.php?main_page=product_info&cPath=5_15_6&products_id=9

Thank you

Can iget some help with this Question? Has anyone run into this problem.

1 Oct 2008, 3:47 PM
#482
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

dscott1966:

Can iget some help with this Question? Has anyone run into this problem.

I'm sorry, I cannot guarantee that the RP mod will work with any other mod that does price changing.

2 Oct 2008, 4:04 PM
#483
andy avatar

andy

Zen Follower

Join Date:
Feb 2004
Posts:
162
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hi Andy
do you have a time scale for looking at the PayPal part of this module?

thanks

Andy

2 Oct 2008, 6:04 PM
#484
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

I too am having problems with this mod not correctly calculating point values.

I want it to calculate based on the subtotal. Good enough and understood how to do that.

The problem comes in when I adjust the "Point Reward Rounding" field in the admin.

If I set it to "0" (no adding before rounding) then the system consistently mis-calculates the reward point total UNDER the amount it should be. This is more evident with larger orders. The larger the order the larger the discrepancy.

Without a doubt this looks to be a problem with the way the Rewards points Rounds numbers to determine how many points to reward.

Is there way in the code to simply look at the SUBTOTAL of the order and drop the decimals then generate points from that?

For example, if the subtotal is $330.00 then the reward points (if 1 point per dollar spent) should be 330.

Currently my system is calculating that at 336 points? Even with no other options (no shipping, no discounts) being used?

2 Oct 2008, 6:52 PM
#485
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

I know why it is doing what it is now.

Let me see if I can explain. It DOES have to do with the way the system Loops through the "rounding" portion of the rewards points.

Currently (and in my previous example posted) the system loops PER PRODUCT in the cart.

The problem is that it also loops through and adds the "rounding" portion to each product. What the rounding portion should do is simply round 1 time based on the final order total (either up or down.)

Right?

Let me go back to my previous example and it may seem clearer:

In that example I had 24 products in my cart for a total of $330 (excluding shipping, discounts etc...)

I had the rounding factor (in the admin) set to ".25".

Instead of receiving "330 points" based on the subtotal I got "336" points awarded. This came about because I determined that the system took 24 products and multiplied EACH ONE times "rewards rounding" of .25.

Doing the math you find that 24 x .25 = 6.

Add those 6 points to the 330 subtotal and you get 336. (6 more points than should be awarded).

When I set the rounding factor to "0" or anything less than .25 the system is off in the other direction by that same amount.

It's a calculation problem in the mod apparently.

Does that sound right or am I missing something?

3 Oct 2008, 3:39 AM
#486
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

I figured it out.

The problem was that there was a missing parameter in the super_orders_funtctions.php file.

Around lines 409 - 412 you'll find:

  $db->Execute("UPDATE " . TABLE_ORDERS . " SET
                orders_status = '" . $new_status . "'
                WHERE orders_id = '" . (int)$oID . "'");
}

Change that to:

  $db->Execute("UPDATE " . TABLE_ORDERS . " SET
                orders_status = '" . $new_status . "', last_modified = now()
                WHERE orders_id = '" . (int)$oID . "'");
}

And you are all set. This must have been altered in an update release somewhere because it was working in previous versions I had.

3 Oct 2008, 3:49 AM
#487
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

econcepts:

I figured it out.

The problem was that there was a missing parameter in the super_orders_funtctions.php file.

Around lines 409 - 412 you'll find:

$db->Execute("UPDATE " . TABLE_ORDERS . " SET
orders_status = '" . $new_status . "'
WHERE orders_id = '" . (int)$oID . "'");
}

> 
> Change that to:
> 
> ```php
  $db->Execute("UPDATE " . TABLE_ORDERS . " SET
                orders_status = '" . $new_status . "', last_modified = now()
                WHERE orders_id = '" . (int)$oID . "'");
}

And you are all set. This must have been altered in an update release somewhere because it was working in previous versions I had.
**
Forget this post it was supposed to go to the Super Orders thread.

It has nothing to do with this thread.**

6 Oct 2008, 9:48 PM
#488
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

andy:

Hi Andy
do you have a time scale for looking at the PayPal part of this module?

thanks

Andy

I'll have another go at it in the next couple of days.

6 Oct 2008, 9:51 PM
#489
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

econcepts:

I too am having problems with this mod not correctly calculating point values.

I want it to calculate based on the subtotal. Good enough and understood how to do that.

The problem comes in when I adjust the "Point Reward Rounding" field in the admin.

If I set it to "0" (no adding before rounding) then the system consistently mis-calculates the reward point total UNDER the amount it should be. This is more evident with larger orders. The larger the order the larger the discrepancy.

Without a doubt this looks to be a problem with the way the Rewards points Rounds numbers to determine how many points to reward.

Is there way in the code to simply look at the SUBTOTAL of the order and drop the decimals then generate points from that?

For example, if the subtotal is $330.00 then the reward points (if 1 point per dollar spent) should be 330.

Currently my system is calculating that at 336 points? Even with no other options (no shipping, no discounts) being used?

It's on the wishlist (http://www.zen-cart.com/forum/showpost.php?p=612867&postcount=449)

7 Oct 2008, 2:08 AM
#490
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

hem:

It's on the wishlist (http://www.zen-cart.com/forum/showpost.php?p=612867&postcount=449)

Thanks Andrew.

I developed a work around using the "round()" function in place of the (int). This built in PHP function automatically rounds my figures for me based on the final order total (other items I setup) and eliminates the need for me to use the "point rounding" factor in the admin config.

This solved my problem and both the rounding and points are right on the mark.

I sent you a PM with more detail.

7 Oct 2008, 10:44 AM
#491
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

econcepts:

Thanks Andrew.

I developed a work around using the "round()" function in place of the (int). This built in PHP function automatically rounds my figures for me based on the final order total (other items I setup) and eliminates the need for me to use the "point rounding" factor in the admin config.

This solved my problem and both the rounding and points are right on the mark.

I sent you a PM with more detail.

Replied to PM. Just to clarify for everyone else here:

The issue as I see it is that there looks to be two methods of awarding RP. One is as a fixed number of points per unit of product (which is as the mod stands now). The other is as a number of points based on the total (or subtotal) spend (which is the direction Eric is going).

With this in mind the next release of the RP mod will have a configuration item which will allow users to select their method of reward- Either by Product Unit or by Order Total. The Order Total method will also be able take into account any discounts (and hopefully cover other price changing mods). However it will mean that user will lose the ability to display Reward Points against each product (as it will not be fixed) and also it looks like any Product Group redeems will be lost too (the whole calculation will need to be done on the Global Reward Point Ratio).

7 Oct 2008, 10:59 AM
#492
beadfaery avatar

beadfaery

New Zenner

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

Re: Reward Points Module for ZC v13x

That sounds great for me, Hem.
I'm in the same boat as econcepts and most of my customers are getting more points than they should
I'd say this would also fix my problem with the cheap items (less than $0.50) not getting any points :smile:
If I could just award points on the subtotal, after discounts, it would be great. :smile:

7 Oct 2008, 2:34 PM
#493
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

v1.20a has been released and uploaded to Contributions.

1.20a:

  • Added new Reward Point Mode configuration item to select how points are rewarded.
  • Added Reward Point Mode to decide whether points are rewarded by product or by order (sub)total.
  • Refreshed screenshots.
  • Created global GetRewardPoints function
  • Order/Cart handlers added (fixed Google Checkout)
  • Fixed Customer Reward Admin not displaying for large number of customers (temporary Fixed)
7 Oct 2008, 5:58 PM
#494
yonghs avatar

yonghs

New Zenner

Join Date:
Jun 2008
Posts:
62
Plugin Contributions:
1

Re: Reward Points Module for ZC v13x

Arrg.. i just installed version 1.13a this morning :D

Anyway, a question.

At Customers->Group Reward Redeem , there is a way to set the redeem ratio for a group. But is there a way to change the default global redeem ratio ? (instead of using the default 0.01 for everyone)

Using Zen Cart 1.3.8a

Thanks.

7 Oct 2008, 8:05 PM
#495
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

yonghs:

Arrg.. i just installed version 1.13a this morning :D

Anyway, a question.

At Customers->Group Reward Redeem , there is a way to set the redeem ratio for a group. But is there a way to change the default global redeem ratio ? (instead of using the default 0.01 for everyone)

Using Zen Cart 1.3.8a

Thanks.

On the same page on the top right hand side there is a box which allows you to set the Global Redeem Ratio

7 Oct 2008, 9:51 PM
#496
asgoroth avatar

asgoroth

New Zenner

Join Date:
Jan 2008
Location:
Warner Robins, GA
Posts:
32
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Doesn't seem to be available yet..

hem:

v1.20a has been released and uploaded to Contributions.

1.20a:

  • Added new Reward Point Mode configuration item to select how points are rewarded.
  • Added Reward Point Mode to decide whether points are rewarded by product or by order (sub)total.
  • Refreshed screenshots.
  • Created global GetRewardPoints function
  • Order/Cart handlers added (fixed Google Checkout)
  • Fixed Customer Reward Admin not displaying for large number of customers (temporary Fixed)
7 Oct 2008, 9:59 PM
#497
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

Asgoroth:

Doesn't seem to be available yet..

Yeah, I haven't had a "Upload Available" yet. If it's not there by morning I'll post it up on my site.

8 Oct 2008, 2:04 AM
#498
yonghs avatar

yonghs

New Zenner

Join Date:
Jun 2008
Posts:
62
Plugin Contributions:
1

Re: Reward Points Module for ZC v13x

hem:

On the same page on the top right hand side there is a box which allows you to set the Global Redeem Ratio

:shocking: How did I miss that? .... Thanks. This is the best mod ever!

8 Oct 2008, 2:44 PM
#499
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

hem:

Yeah, I haven't had a "Upload Available" yet. If it's not there by morning I'll post it up on my site.

Okay, it's still not up. You can load it from here:

ZenCart Reward Points Mod

I'll remove it once the contribution is official posted.

8 Oct 2008, 3:32 PM
#500
beadfaery avatar

beadfaery

New Zenner

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

Re: Reward Points Module for ZC v13x

Just updated to your latest version and had a very quick play and it seems good :clap: It even rewards points for my cheapy items, where it wasn't before.
Thanks AGAIN for the work you've put into this, Andrew! It was already a great mod IMO and now it's even better :bigups: