Zen Follower
- Join Date:
- May 2007
- Posts:
- 108
- Plugin Contributions:
- 0
Store credit and reward point module
This is a great plugin, but there was a one small issue for me - it would give reward points to all orders with status id >= than the one specified. Unfortunately, this is not practical in my shopping cart as I have scattered statuses for which I need to give reward points. I believe this is the case for most carts with default setup (Cancel status = 5 , which is less than Shipped status = 3 , etc. )
I figured out a fix, so if anyone else is interested, you can do the same:
- Replace function "_check_order_status" in store_credit.php file with:
function _check_order_status($orders_id) {
global $db;
$order_query = "SELECT orders_status FROM " . TABLE_ORDERS . "
WHERE orders_id = " . $orders_id . "
LIMIT 1";
$order_status = $db->Execute($order_query);
$order_status_rewarded = explode(",", MODULE_ORDER_TOTAL_SC_ORDER_REWARD_STATUS);
if (in_array($order_status->fields['orders_status'], $order_status_rewarded)) {
return true;
} else {
return false;
}
}
```2. Run this SQL on your DB:
UPDATE zen_configuration
SET use_function=NULL, set_function=NULL
WHERE configuration_title = "Required Order Status"
good luck