I would appreciate some assistance with understanding the Opencart rewards system in v2.3.0.2. I am confused as to how the reward point dollar amount is calculated?
I understand that the reward is based on a per product basis. As an example, we have a product which sales for 7.99.
In the rewards tab of the product, we set the "Points" to 799 (points needed to buy this item)
In each "Customer Group" section, for this product, we enter 26 (points received for each purchase)
Below was taken from an order that we received this weekend. The customer bought 5 items, each priced at 7.99 (Subtotal below 39.95). The customer had 1642 reward points on their reward account. Checkout calculated those 1642 reward points to have a dollar amount of -28.82, which was deducted from the order amount. The customer paid 12.13 for the order.
Sub-Total $39.95
Reward Points (1624) $-28.82
Free Shipping $0.00
CA Tax $1.00
Total $12.13
What we don't understand, is how the reward point dollar amount (28.82) was calculated?
In system/library/cart/cart.php file:
Then, gets recalculated in your catalog/model/extension/total/reward.php file:
Code: Select all
'points' => ($product_query->row['points'] ? ($product_query->row['points'] + $option_points) * $cart['quantity'] : 0),
Code: Select all
$points_total = 0;
foreach ($this->cart->getProducts() as $product) {
if ($product['points']) {
$points_total += $product['points'];
}
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 204 guests