Admin order details needs to display spent reward points

3 months ago
It would be very helpful to be able to see if reward points were applied to an order, as well as having that value factored into the total profit calculation so that we don't have to do that math...

Order subtotal  $99.60 excl tax
Order subtotal discount  $9.96 excl tax
Order shipping  $0.00 excl tax
Order tax  $5.38
Order total  $76.73
Used discounts    DogDays10
Profit:  $53.35
3 months ago
But they are already displayed. Please check here.
3 months ago
I see...okay.
That must be new in 4.40...4.30 doesn't have it..
3 months ago
I looked in the view of my 4.30 site and see that the code is there....but it never renders.
So I commented out the if/then and it renders on the page as "0 points"
The order I'm viewing ABSOLUTELY used reward points, so I am not sure why nop thinks it is zero...

Any ideas?
3 months ago
I checked the database Order table and can see that there is no value saved in the RedeemedRewardPointsEntryId for this order.

How can it be possible for a customer to use reward points, but for the points not to be saved?
3 months ago
Yes in v4.3 I dont think order.RedeemedRewardPointsEntryId is set


            _rewardPointService.AddRewardPointsHistoryEntry(details.Customer, -details.RedeemedRewardPoints, order.StoreId,
                string.Format(_localizationService.GetResource("RewardPoints.Message.RedeemedForOrder", order.CustomerLanguageId), order.CustomOrderNumber),
                order, details.RedeemedRewardPointsAmount);


            order.RedeemedRewardPointsEntryId = await _rewardPointService.AddRewardPointsHistoryEntryAsync(details.Customer, -details.RedeemedRewardPoints, order.StoreId,
                string.Format(await _localizationService.GetResourceAsync("RewardPoints.Message.RedeemedForOrder", order.CustomerLanguageId), order.CustomOrderNumber),
                order, details.RedeemedRewardPointsAmount);
3 months ago
Yidna wrote:
Yes in v4.3 I dont think order.RedeemedRewardPointsEntryId is set

Reckon that was just an oversight?

I suppose I'll have to pay someone to recompile my nop kernel with this change or just do without it until we upgrade to 4.40 in a couple of years...?
2 months ago
Okay, so the issue was actually that 4.30 of nopCommerce had a bug related to Reward points that was preventing them from ever being subtracted from a customer account, so in reality the value was zero, and wouldn't have appeared...

Upgrade to 4.40 or apply all reward points changesets made for 4.40 to your version.