Page 3 of 12

Re: Official Opencart v2.3.0.2 bug reports

Posted: Sun Aug 07, 2016 8:18 pm
by opencartArab
straightlight wrote:
opencartArab wrote:the transaction calculated by minus
Can you post a screenshot of what you describe?
1.jpg

1.jpg (52.47 KiB) Viewed 5868 times


Re: Official Opencart v2.3.0.2 bug reports

Posted: Sun Aug 07, 2016 8:22 pm
by straightlight
opencartArab wrote:
straightlight wrote:
opencartArab wrote:the transaction calculated by minus
Can you post a screenshot of what you describe?
1.jpg
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?

Re: Official Opencart v2.3.0.2 bug reports

Posted: Sun Aug 07, 2016 10:14 pm
by cyclops12
Have just downloaded oc2.3.0.2 into xammp

I have noticed a language error/bug....when you go into extensions/extensions and edit theme the breadcrumbs are not correct..see below
breadcrumb-error.JPG

breadcrumb-error.JPG (27.32 KiB) Viewed 5859 times

and in admin/controller/extension/theme/theme_default.php you have

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)
		);
yet in admin/language/en-gb/extension/theme/theme_default.php is

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
So is this an error in the controller or in the language file ??

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 2:46 am
by straightlight
Thanks for addressing the change cyclops12.

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 5:47 am
by Druvan
After installing v2302 i get following error when choosing Klarna invoice as payment.
I do not get any errors when using cod or banktransfer.
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

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 7:44 am
by straightlight
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

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 6:14 pm
by opencartArab
straightlight 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?
no .. its fresh install 2.3.0.2

its very simple my frind :D

if i add any transaction amount to the customer .. its add by minus
05-11-37 12-41-06 م.jpg

05-11-37 12-41-06 م.jpg (94.22 KiB) Viewed 5817 times

after that if i add any product to the cart .. it will be calculated by minus value also
05-11-37 12-45-22 م.jpg

05-11-37 12-45-22 م.jpg (114.81 KiB) Viewed 5817 times

and after finish checkout, the transaction amount back to zero
3.jpg

3.jpg (111.06 KiB) Viewed 5817 times


Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 6:30 pm
by straightlight
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:

Code: Select all

'value'      => -$credit,
and:

Code: Select all

$total['total'] -= $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.

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. ;D

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).

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 7:09 pm
by opencartArab
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:

Code: Select all

'value'      => -$credit,
and:

Code: Select all

$total['total'] -= $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.

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. ;D

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).
Thanks straightlight ..

i try another suggestion and its work fine

in the same file:
catalog/model/extension/total/credit.php

i change :

Code: Select all

$credit = min($balance, $total);
to:

Code: Select all

if ($balance > $total['total']) {
				$credit = $total['total'];
			} else {
				$credit = $balance;
			}
i take code from 2.2.0.0

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 7:12 pm
by straightlight
Thanks for posting the feedback and solution opencartArab. :)

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 8:03 pm
by Qphoria
straightlight 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.
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 761

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 8:06 pm
by Qphoria
opencartArab wrote: in the same file:
catalog/model/extension/total/credit.php

i change :

Code: Select all

$credit = min($balance, $total);
to:

Code: Select all

if ($balance > $total['total']) {
				$credit = $total['total'];
			} else {
				$credit = $balance;
			}
i take code from 2.2.0.0
Actually this should work fine:

Code: Select all

$credit = min($balance, $total['total']);
the min was applying to the array instead of the new total index. This was a bug in 2.2 as well actually.

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 8:06 pm
by straightlight
Qphoria wrote:
straightlight 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.
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 761
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.

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 8:07 pm
by Qphoria
straightlight wrote:
Qphoria wrote:
straightlight 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.
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 761
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.
Yes but the code is there. I'll test it later today.

Re: Official Opencart v2.3.0.2 bug reports

Posted: Mon Aug 08, 2016 8:10 pm
by straightlight
Ok, no problem.

Re: Official Opencart v2.3.0.2 bug reports

Posted: Tue Aug 09, 2016 2:46 am
by Druvan
After installing v2302 i get following error when choosing Klarna invoice as payment.
I do not get any errors when using cod or banktransfer.
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
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'm not really sure what to do.
I have deleted all the old folders.
I have uninstalled ALL extensions i could.
I have re-installed only the important ones.
What else can i do?

Klarna invoice is built in so to check controller files seems maybe odd but i have checked and all old files are overwritten and why are both cod and banktransfer working with no error. I must be missing or doing something wrong then but what?

Re: Official Opencart v2.3.0.2 bug reports

Posted: Tue Aug 09, 2016 3:15 am
by straightlight
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.

Re: Official Opencart v2.3.0.2 bug reports

Posted: Tue Aug 09, 2016 3:54 am
by Druvan
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.
I did upload all the files.
I unchecked all permissions and checked them again, sorry but still not working.
Will upload all the files again but strange that other payments are working.
I get the error in checkout, step 6 when selecting Klarna and press continue if it helps.
Try any other payment? if it helps?

Re: Official Opencart v2.3.0.2 bug reports

Posted: Tue Aug 09, 2016 3:58 am
by straightlight
I sent you a PM.

Re: Official Opencart v2.3.0.2 bug reports

Posted: Thu Aug 11, 2016 3:24 am
by Qphoria
I've added 2 solutions for the "Error: Could not load model total!" issue in the first post.