Hi Andy
do you have a time scale for looking at the PayPal part of this module?
thanks
Andy
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?
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
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?
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
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:
Change that to:PHP Code:
$db->Execute("UPDATE " . TABLE_ORDERS . " SET
orders_status = '" . $new_status . "'
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.PHP Code:
$db->Execute("UPDATE " . TABLE_ORDERS . " SET
orders_status = '" . $new_status . "', last_modified = now()
WHERE orders_id = '" . (int)$oID . "'");
}
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
It's on the wishlist (http://www.zen-cart.com/forum/showpo...&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.
Last edited by econcepts; 7 Oct 2008 at 03:08 AM. Reason: edited copy
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Bookmarks