Reward Points not working on purchase

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
After I upgraded to 4.0 Reward Points stopped working for purchases in my store - unless they are made by an Admin using impersonation. It worked previously in 3.9 and I have it set up the same.
5 years ago
It seems the Reward Points are only added after the order is set to "Delivered". Is there any way to get it working without having to get to that stage as with the couriers we use we are never sure when the actual parcel is delivered and so we cannot update this correctly, leaving the customer without points or with incorrect information that their parcel has been delivered (when it hasn't). The old system let you nominate at which stage to add the points which worked better for us. Is there a way around this? Could you let me know please? Thanks.
5 years ago
Hi,
we had the same problem with it. We are giving reward points when an order is getting the status of Shipped.
You have to modify the code for this. Just a few lines in OrderProcessingService.cs file  (v.4.0 Source)

in the SetOrderStatus  function

comment out these lines, like so:
            //if (order.OrderStatus == OrderStatus.Complete)
            //{
            //    AwardRewardPoints(order);
            //}

to the   Ship function:

if (order.HasItemsToAddToShipment() || order.HasItemsToShip())
{
    order.ShippingStatusId = (int)ShippingStatus.PartiallyShipped;
}
else
{
    order.ShippingStatusId = (int)ShippingStatus.Shipped;
    AwardRewardPoints(order);     //  <--------  add this line
}


Alternatively you can reward points upon the order is marked as paid  (ultimately this is the action we are thankful for :-)
In this case add AwardRewardPoints(order); to the MarkOrderAsPaid function in the same file.

PS. It is not a problem even if you left in the AwardRewardPoints at Complete order, this function is idempotent. ( will not repeatedly add the points even if called several times for the same order)
5 years ago
Thanks for your reply mate, that is much appreciated.
5 years ago
I was looking up why my rewards points are no longer given when an order is complete. This occurred after upgrading to 3.9 from 3.8.
In this thread it states that the order must be set to delivered for the update to take place.

I'm adding my two cents worth because the logic behind making this change from the behavior in 3.8 is flawed. If a customer who is more than 1 days distance from shipping point, places an order on Tuesday and another on Wednesday, expecting to get to use his rewards points from Tuesday's order, is going to be upset that his points for his most recent order haven't been added, not to mention the fact that confirmation of delivery is not always convenient.

I'll modify the code but someone needs to re-think their logic.


And by the way, the person responsible for shipping who marked the order complete in 3.8 may not be the person responsible for checking on delivered orders
5 years ago
libor wrote:
Hi,
we had the same problem with it. We are giving reward points when an order is getting the status of Shipped.
You have to modify the code for this. Just a few lines in OrderProcessingService.cs file  (v.4.0 Source)

in the SetOrderStatus  function

comment out these lines, like so:
            //if (order.OrderStatus == OrderStatus.Complete)
            //{
            //    AwardRewardPoints(order);
            //}

to the   Ship function:

if (order.HasItemsToAddToShipment() || order.HasItemsToShip())
{
    order.ShippingStatusId = (int)ShippingStatus.PartiallyShipped;
}
else
{
    order.ShippingStatusId = (int)ShippingStatus.Shipped;
    AwardRewardPoints(order);     //  <--------  add this line
}


Alternatively you can reward points upon the order is marked as paid  (ultimately this is the action we are thankful for :-)
In this case add AwardRewardPoints(order); to the MarkOrderAsPaid function in the same file.

PS. It is not a problem even if you left in the AwardRewardPoints at Complete order, this function is idempotent. ( will not repeatedly add the points even if called several times for the same order)


Hi Libor
This is going to sound like a novice question (and it is), but I am unfamiliar with the way the site is structured and compiled. Hence, I have changed the CS file as you suggested, re-built the Solution, but now I am unsure of where the new file is that I need to upload and overwrite on the live website. As the source is all Classes and the live site is dlls, I'm somewhat confused. Could you enlighten me please?
5 years ago
Can anybody help with this one for me? I'm guessing it is a simple thing if you know how the system works, I just need that missing piece of info. Cheers.
5 years ago
dashdesigns wrote:
Can anybody help with this one for me? I'm guessing it is a simple thing if you know how the system works, I just need that missing piece of info. Cheers.


Tell me what version you're using and I'll see if I can get you an answer. The overview is that you need to build the project and then copy the updated dll or dlls to the website, replacing the original files. If you've never done anything like this just make sure you make a backup copy of anything you're going to change.

The specifics will take me a day or two. I'm getting ready to launch our first 4.0 site and I'll mock up what you need while I'm getting everything going.
5 years ago
Thanks mate. It's 4.0 I have and I have re-built the project, but I am not sure if it is just the services.dll that I need to upload over the existing one on the server in case it has something in it created on the server that I will overwrite. Not 100% sure how this new core system works.
5 years ago
dashdesigns wrote:
Thanks mate. It's 4.0 I have and I have re-built the project, but I am not sure if it is just the services.dll that I need to upload over the existing one on the server in case it has something in it created on the server that I will overwrite. Not 100% sure how this new core system works.


Take a look at the modified dates on all of your dlls and compare them to the dates on your production server. Sort them by date desc in your file explorer window.

I'm almost done setting up this new project and I can be more specific once I get a good look at all of the file structures; I've been using 3.9 until now so I need to see all the changes myself
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.