Print Page | Close Window

Accruing Reward Points For ALL Orders

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=1675
Printed Date: 27-November-2024 at 9:19pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Accruing Reward Points For ALL Orders
Posted By: toyjam
Subject: Accruing Reward Points For ALL Orders
Date Posted: 30-May-2008 at 3:10pm

The current functionality of the Reward Points program allows retails customers to accrue points on new purchases.  But when they use their points on subsequent orders, they do not accrue any points for those order which points are applied.

Is there a way to always allow the user to accrue points on orders on which points were applied?  This is a discount my customers really like.



Replies:
Posted By: Hamish
Date Posted: 01-June-2008 at 7:03pm
Hi,
  Having looked into this on the surface it looks like a small change is required.

Before I get into the code change required I'd just like to clarify -
Is it OK for the whole value of the current purchase to accrue points - even though the  purchase is then discounted by existing points?
In this scenario - If someone has accrued enough points to purchase, say, a $20 item purely with reward points they will get new points on the full $20 purchase  even though the actual cost to them is zero.


Posted By: Hamish
Date Posted: 02-June-2008 at 12:32pm
Hi,
  Just a quick follow up on this.
I did a quick calculation on this. If, for example you set the reward points to 5%  then  the ACTUAL points in the scenario above (points on all purchases) are a more generous 5.26%. This is due to points being accrued on points purchases.
On the other hand, with the existing system the reward points can work out at actually slightly less than the full 5% - By how much depends on what percentage of the purchase is covered by the existing reward points, as they accrue no reward points for the balance of the purchase.

The ideal  would be, IMHO, to accrue reward points on purchases, ignoring any part of the purchase covered by  reward points.  It's certainly possible to do that, but will require more code changes to achieve.  

  


Posted By: toyjam
Date Posted: 07-June-2008 at 1:48am
Your ideal situation makes the best sense - accrue reward points while ignoring the part of the purchase covered by the points.  So if someone got something free, they would not get any points, but if someone purchased an item for $20 and their points covered $5, then they could still get some points for the $15 of real money they spent.


Posted By: caughlan
Date Posted: 11-August-2008 at 8:10pm
Lets say I didn't care if the system gave full points on a purchase where points were redeemed... is this where I'd change something to make that happen?
iRewardPointsAccrued = rstemp("iRewardPointsAccrued")
iRewardPointsUsed = rstemp("iRewardPointsUsed")
if iRewardPointsAccrued="" then
    iRewardPointsAccrued=0
end if
if iRewardPointsUsed="" then
    iRewardPointsUsed=0
end if
iBalance = INT(iRewardPointsAccrued) - Int(iRewardPointsUsed)
if iBalance=0 then
    iDollarValue =0
else
    iDollarValue = iBalance * (RewardsPercent / 100)
end if
iRewardPointsHistory=iRewardPointsAccrued
rstemp.Close
Stacelynn (who's always workin' hard to make logic out of code!)


Posted By: macleather
Date Posted: 12-August-2008 at 1:03pm
Hi,

I would be interested in Hamish's "ideal" situation as well. I think that makes the most sense.

Alan


Posted By: Hamish
Date Posted: 12-August-2008 at 1:17pm
Hi Stacelynn,
  Blimey, I'd forgotten about this one. I'm just getting ready to go on Hols for a week, so I haven't got time to look at code today - but it certainly looks like a/the right spot. Be careful in case there are other places which carry out related calculations - not that it's likely to invalidate any change you make, just that you may not cover all the bases. A quick scan for iRewardPointsUsed shows 7 references in /admin and 7 in /pc.

Don't forget - backup the unmodified version of the code to give yourself a "get out of jail free" card & TEST as thoroughly as you feel is necessary.


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net