Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue about the store credit in opencar 1.5.6 #2127

Closed
shyandsy opened this issue Oct 26, 2014 · 2 comments
Closed

issue about the store credit in opencar 1.5.6 #2127

shyandsy opened this issue Oct 26, 2014 · 2 comments

Comments

@shyandsy
Copy link
Contributor

If I place order on the backend of opencart for a customer , and the customer hold $200 credit.

the order which place in backend will be calculated by the (order total - credit),

but the credit in customer information does not change.

for example :

the order total is : $500 credit is : $200

then in the end, the order total is : $500 - $200 = $300 but the credit is still: $200

are there some one meet same problem?

///////////////////////////////////////////////////////////////////////////////////////////////////////////

@danielkerr

I try to change the status of that order , both processing and setting, but it doesnt work.

the transaction in customer info page does not change .

and I checked the code in backend, there is no code to operate the oc_customer_transaction table

the screenshot for code search:
qq 20141026103614

the screenshot for customer transaction balance:
qq 20141026103716

the screenshot for order #5, which is used the store credit
qq 20141026103741

the screenshot for the order status, and I tried the "update order total" on the bottom of order edit page, it does not work.

///////////////////////////////////////////////////////////////////////////////////////////////////

in frontend, there is a function in /catalog/model/total/credit.php

public function confirm($order_info, $order_total) {
$this->language->load('total/credit');
if ($order_info['customer_id']) {
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_transaction SET customer_id = '" . (int)$order_info['customer_id'] . "', order_id = '" . (int)$order_info['order_id'] . "', description = '" . $this->db->escape(sprintf($this->language->get('text_order_id'), (int)$order_info['order_id'])) . "', amount = '" . (float)$order_total['value'] . "', date_added = NOW()");
}
}

it will be call on the checkout process in frontend. It is responsible for recalculate customer credit balance. but I haven't found this in backend.

@danielkerr
Copy link
Member

ask in the forums stop posting here!

@shyandsy
Copy link
Contributor Author

ok thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants