Re: Official Opencart v2.3.0.2 bug reports
Posted: Sun Aug 07, 2016 8:18 pm
straightlight wrote:Can you post a screenshot of what you describe?opencartArab wrote:the transaction calculated by minus
OpenCart Community Forum - Discuss shopping cart and e-commerce solutions.
https://forum.opencart.com/
straightlight wrote:Can you post a screenshot of what you describe?opencartArab wrote:the transaction calculated by minus
Are there extensions order totals installed aside from the core or this is based on the order totals store credit from the core you're describing?opencartArab wrote:straightlight wrote:Can you post a screenshot of what you describe?opencartArab wrote:the transaction calculated by minus
Code: Select all
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_extension'),
'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=theme', true)
);
Code: Select all
<?php
// Heading
$_['heading_title'] = 'Default Store Theme';
// Text
$_['text_theme'] = 'Themes';
$_['text_success'] = 'Success: You have modified the default store theme!';
$_['text_edit'] = 'Edit Default Store Theme';
$_['text_general'] = 'General';
$_['text_product'] = 'Products';
$_['text_image'] = 'Images';
// Entry
Notice: Undefined index: total in /xxx/httpd.www/catalog/model/extension/total/sub_total.php on line 21Notice: Undefined index: total in /xxx/httpd.www/catalog/model/extension/total/shipping.php on line 24Notice: Undefined index: taxes in /xxx/httpd.www/catalog/model/extension/total/tax.php on line 4Warning: Invalid argument supplied for foreach() in /xxx/httpd.www/catalog/model/extension/total/tax.php on line 4Notice: Undefined index: total in /xxx/httpd.www/catalog/model/extension/total/total.php on line 9
no .. its fresh install 2.3.0.2straightlight wrote: Are there extensions order totals installed aside from the core or this is based on the order totals store credit from the core you're describing?
Also, can you provide the step-by-step procedure you did in order to see these results?
Code: Select all
'value' => -$credit,
Code: Select all
$total['total'] -= $credit;
Thanks straightlight ..straightlight wrote:Thanks opencartArab. That is an odd issue, indeed.
In catalog/model/extension/total/credit.php file, the following two instances may need to be adjusted:
and:Code: Select all
'value' => -$credit,
which returns negative value if the $credit variable is below 0. See if by removing the negation signs on each equals resolves the problem.Code: Select all
$total['total'] -= $credit;
The controllers calling the order totals should definitely involve an if statement in order to validate along with the active status of each modules the float value that are above or equal to 0. There would be no possibility on showing negative prices as this is highly unlikely that a total price could be added on the bill with negative signs.
In addition to my above suggestion would be to add an event handler to those locations as well so to inform the merchants that negative values may have been found from one of the order totals (which, understandably, may not be tracked specifically).
Code: Select all
$credit = min($balance, $total);
Code: Select all
if ($balance > $total['total']) {
$credit = $total['total'];
} else {
$credit = $balance;
}
You sure about that? Looking at the fix and looking at the code, I see the change... its in a slightly different spot, but the code fix is there. Not tested but at first glance seems like it should work, at least for the customer email on line 761straightlight wrote:A persisting bug has been discovered. The admin order statuses still insists on sending the emails even though the check mark is removed. The first post has been updated accordingly in order to implement the bug-fix solution.
Actually this should work fine:opencartArab wrote: in the same file:
catalog/model/extension/total/credit.php
i change :to:Code: Select all
$credit = min($balance, $total);
i take code from 2.2.0.0Code: Select all
if ($balance > $total['total']) { $credit = $total['total']; } else { $credit = $balance; }
Code: Select all
$credit = min($balance, $total['total']);
There has been multiple posts this week regarding the order statuses change without check-marking the notification as customers are still receiving the emails. It is good strategy to validate the admin settings before sending out any emails in those cases to avoid odd situations which can also be leaded to undeclared installed extensions since the core, originally, would restrict the emails to be sent out based on validations from the catalog/model/checkout/order.php especially when multiple locations in the platform are directing to the same route and method location.Qphoria wrote:You sure about that? Looking at the fix and looking at the code, I see the change... its in a slightly different spot, but the code fix is there. Not tested but at first glance seems like it should work, at least for the customer email on line 761straightlight wrote:A persisting bug has been discovered. The admin order statuses still insists on sending the emails even though the check mark is removed. The first post has been updated accordingly in order to implement the bug-fix solution.
Yes but the code is there. I'll test it later today.straightlight wrote:There has been multiple posts this week regarding the order statuses change without check-marking the notification as customers are still receiving the emails. It is good strategy to validate the admin settings before sending out any emails in those cases to avoid odd situations which can also be leaded to undeclared installed extensions since the core, originally, would restrict the emails to be sent out based on validations from the catalog/model/checkout/order.php especially when multiple locations in the platform are involved.Qphoria wrote:You sure about that? Looking at the fix and looking at the code, I see the change... its in a slightly different spot, but the code fix is there. Not tested but at first glance seems like it should work, at least for the customer email on line 761straightlight wrote:A persisting bug has been discovered. The admin order statuses still insists on sending the emails even though the check mark is removed. The first post has been updated accordingly in order to implement the bug-fix solution.
Notice: Undefined index: total in /xxx/httpd.www/catalog/model/extension/total/sub_total.php on line 21Notice: Undefined index: total in /xxx/httpd.www/catalog/model/extension/total/shipping.php on line 24Notice: Undefined index: taxes in /xxx/httpd.www/catalog/model/extension/total/tax.php on line 4Warning: Invalid argument supplied for foreach() in /xxx/httpd.www/catalog/model/extension/total/tax.php on line 4Notice: Undefined index: total in /xxx/httpd.www/catalog/model/extension/total/total.php on line 9
I'm not really sure what to do.straightlight wrote:Welcome to the Opencart forum. This error message is due to the new location of extensions that needs to rather be addressed. Followed is the new methodology on how to load the extensions / modules: http://forum.opencart.com/viewtopic.php?f=183&t=165958
I did upload all the files.straightlight wrote:Did you also uploaded all the files for v2.3.0.2? If so, ensure to go to your admin - > systems - > users - > user permissions - > edit permission - > uncheck all - > check all for both lists. Save changes.