Post by opencartArab » Sun Aug 07, 2016 8:18 pm

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 3576 times


https://www.opencartarab.com
التعليمات باللغة العربية موجودة على الرابط التالي
https://www.opencartarab.com/docs


Expert Member

Posts

Joined
Thu Apr 01, 2010 3:31 am

Post by straightlight » Sun Aug 07, 2016 8:22 pm

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?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cyclops12 » Sun Aug 07, 2016 10:14 pm

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 3567 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 ??

Active Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by straightlight » Mon Aug 08, 2016 2:46 am

Thanks for addressing the change cyclops12.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Druvan » Mon Aug 08, 2016 5:47 am

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
Last edited by straightlight on Mon Aug 08, 2016 7:43 am, edited 1 time in total.
Reason: Added quote tags.

Newbie

Posts

Joined
Mon Aug 08, 2016 5:39 am

Post by straightlight » Mon Aug 08, 2016 7:44 am

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

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by opencartArab » Mon Aug 08, 2016 6:14 pm

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 3524 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 3524 times

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

3.jpg (111.06 KiB) Viewed 3524 times


https://www.opencartarab.com
التعليمات باللغة العربية موجودة على الرابط التالي
https://www.opencartarab.com/docs


Expert Member

Posts

Joined
Thu Apr 01, 2010 3:31 am

Post by straightlight » Mon Aug 08, 2016 6:30 pm

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

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by opencartArab » Mon Aug 08, 2016 7:09 pm

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

https://www.opencartarab.com
التعليمات باللغة العربية موجودة على الرابط التالي
https://www.opencartarab.com/docs


Expert Member

Posts

Joined
Thu Apr 01, 2010 3:31 am

Post by straightlight » Mon Aug 08, 2016 7:12 pm

Thanks for posting the feedback and solution opencartArab. :)

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Qphoria » Mon Aug 08, 2016 8:03 pm

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

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Mon Aug 08, 2016 8:06 pm

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.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by straightlight » Mon Aug 08, 2016 8:06 pm

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.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Qphoria » Mon Aug 08, 2016 8:07 pm

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.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by straightlight » Mon Aug 08, 2016 8:10 pm

Ok, no problem.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Druvan » Tue Aug 09, 2016 2:46 am

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?
Last edited by straightlight on Tue Aug 09, 2016 2:50 am, edited 1 time in total.
Reason: Added quote tags.

Newbie

Posts

Joined
Mon Aug 08, 2016 5:39 am

Post by straightlight » Tue Aug 09, 2016 3:15 am

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.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Druvan » Tue Aug 09, 2016 3:54 am

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?

Newbie

Posts

Joined
Mon Aug 08, 2016 5:39 am

Post by straightlight » Tue Aug 09, 2016 3:58 am

I sent you a PM.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Administrator

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Qphoria » Thu Aug 11, 2016 3:24 am

I've added 2 solutions for the "Error: Could not load model total!" issue in the first post.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 11 guests