Page 1 of 2

1.5.6.2 bug fix release

Posted: Sat Apr 05, 2014 5:10 am
by James
Daniel updated the utf8 helpers on 1.5.6.1 which have been moved into a new branch now, 1.5.6.2.

Taking the opportunity to patch a few bugs with the last release before making the download public.

I have already added a few - https://github.com/opencart/opencart/commits/v1.5.6.2

If you know of any more bugs on the last release please update below (if possible with suggested fix / idea), ensure that you check the commit log before posting in case the issue has already been resolved.

I will release in 2-3 days.

Re: 1.5.6.2 bug fix release

Posted: Sat Apr 05, 2014 7:53 am
by SelfMan
Hi,
I sugggested a modification the CE version.
There a is a piece of code on multiple places:

Code: Select all

 if ($this->customer->isLogged()) {
 $customer_group_id = $this->customer->getCustomerGroupId();
 } else {
 $customer_group_id = $this->config->get('config_customer_group_id');
 }
this check and set should be done directly within getCustomerGroupId() method.
I suggest to modify system\library\customer.php to:

Code: Select all

public function getCustomerGroupId() {
 if ($this->isLogged()) {
 return $this->customer_group_id;
 } else {
 return $this->config->get('config_customer_group_id');
 }
 }

Re: 1.5.6.2 bug fix release

Posted: Sat Apr 05, 2014 10:28 pm
by James
Thanks selfman, this release is about bug fixes though. There isn't a bug with the code, its just not as you suggest very well optimised. Good suggestion for 2.0 though which I will check through in a bit.

Re: 1.5.6.2 bug fix release

Posted: Sun Apr 06, 2014 8:07 am
by rph
It would be worth updating the installer to check for mbstring and/or iconv.

Re: 1.5.6.2 bug fix release

Posted: Sun Apr 06, 2014 9:20 am
by SelfMan
James wrote:Thanks selfman, this release is about bug fixes though. There isn't a bug with the code, its just not as you suggest very well optimised. Good suggestion for 2.0 though which I will check through in a bit.
Hi James. The significant problem is that when guests are shopping, the group id is not set at all.
I found this to be a problem when an extension relies on the group id value.
Still good to know that the fix will make it to the 2.0 branch.

Re: 1.5.6.2 bug fix release

Posted: Mon Apr 07, 2014 6:10 am
by James
rph wrote:It would be worth updating the installer to check for mbstring and/or iconv.
Yeah I agree - added on last commit:

https://github.com/opencart/opencart/co ... ccf3b0db26

since you can have mbstring or inconv for the utf8 helper really not sure which took precedent. From what i saw mbstring is better and should also be easier to enable if neither are available. If iconv is available though it won't bother the user as it should be available in php by default now.

Re: 1.5.6.2 bug fix release

Posted: Wed Apr 09, 2014 8:45 pm
by sml
James wrote:Daniel updated the utf8 helpers on 1.5.6.1 which have been moved into a new branch now, 1.5.6.2.
I will release in 2-3 days.
No stress .. but just touching base on the latest release date please :)

Re: 1.5.6.2 bug fix release

Posted: Wed Apr 09, 2014 8:49 pm
by James
Just working on some last few things like; a change log format and a final PayPal Express patch...and we should be good to go :) I will try to sort for later today if not tomorrow..

Re: 1.5.6.2 bug fix release

Posted: Thu Apr 10, 2014 2:32 pm
by sirsubliminal
There is a bug I'm surprised no one ever has mentioned.
Can't go into details because I'm not sure when/where this happens.

Sometimes (seems random) when visitors create an account (not sure if it is standalone create or in the order process) they fiddle around with their addresses and they get a customer_id 0 in the table address.

Re: 1.5.6.2 bug fix release

Posted: Thu Apr 10, 2014 2:37 pm
by rph
Which version of OpenCart are you using? I can't find any occurrences on databases I have access to.

Re: 1.5.6.2 bug fix release

Posted: Thu Apr 10, 2014 6:34 pm
by qahar
From the title I thought the download is already available for public ;D
You should use "Release Candidate" to make it clear and give more time until it published.
Assuming that community will help 1.5.6.2 as stable as possible as if this is the latest released of 1.5.x

Re: 1.5.6.2 bug fix release

Posted: Fri Apr 11, 2014 12:12 am
by James
1.5.6.2 has now been released.

You should be able to update directly from 1.5.6.1 -> 1.5.6.2 by just updating the files - initial tests indicate everything works perfectly so unless you have 3rd party modules that have conflicts it should be an easy upgrade.

Swapping my efforts back to helping Daniel with 2.0 and OpenBay Pro but if anyone has any further bug reports please add them to the Github bug tracker and we can look at adding them for a later release.

J

Re: 1.5.6.2 bug fix release

Posted: Fri Apr 11, 2014 4:51 am
by phatoa
Error pp_express payment modules in file

catalog/model/payment/pp_express.php

lines:

Code: Select all

        $data['PAYMENTREQUEST_0_ITEMAMT'] = number_format($value, 2, '.', '');
        $data['PAYMENTREQUEST_0_AMT'] = number_format($value, 2, '.', '');
must change to

Code: Select all

        $data['PAYMENTREQUEST_0_ITEMAMT'] = number_format($item_total, 2, '.', '');
        $data['PAYMENTREQUEST_0_AMT'] = number_format($item_total, 2, '.', '');

Re: 1.5.6.2 bug fix release

Posted: Fri Apr 11, 2014 5:34 am
by James
Thanks phatoa.

I have added a fix for this in the next release (currently named 1.5.6.3_rc on GH). You can copy the file from here to fix the current branch:
https://github.com/opencart/opencart/bl ... xpress.php

J

Re: 1.5.6.2 bug fix release

Posted: Fri Apr 11, 2014 7:05 am
by sirsubliminal
rph wrote:Which version of OpenCart are you using? I can't find any occurrences on databases I have access to.


1.5.6
I should'nt be the only one with this problem.

Dont know if my theme can f things up, dont think so but Im no expert on opencart.

Re: 1.5.6.2 bug fix release

Posted: Fri Apr 11, 2014 4:27 pm
by sirsubliminal
sirsubliminal wrote:
rph wrote:Which version of OpenCart are you using? I can't find any occurrences on databases I have access to.


1.5.6
I should'nt be the only one with this problem.

Dont know if my theme can f things up, dont think so but Im no expert on opencart.
Just found out that it is not in the create a customer process this happens. Opencart seems to add rows to the table address with customer_id 0 when people buy as guest. Does not mather If I use an extension or default. It just happens sometimes.

I thought that table (address) was just for "real" customers creating an account.

Re: 1.5.6.2 bug fix release

Posted: Fri Apr 11, 2014 4:57 pm
by sirsubliminal
sirsubliminal wrote:
sirsubliminal wrote:
rph wrote:Which version of OpenCart are you using? I can't find any occurrences on databases I have access to.


1.5.6
I should'nt be the only one with this problem.

Dont know if my theme can f things up, dont think so but Im no expert on opencart.
Just found out that it is not in the create a customer process this happens. Opencart seems to add rows to the table address with customer_id 0 when people buy as guest. Does not mather If I use an extension or default. It just happens sometimes.

I thought that table (address) was just for "real" customers creating an account.
Just figured out that it is a payment module for opencart that does this. I have alerted the payment system / developers for this module about this.

Re: 1.5.6.2 bug fix release

Posted: Sat Apr 12, 2014 3:03 am
by JNeuhoff
James wrote:1.5.6.2 has now been released.

You should be able to update directly from 1.5.6.1 -> 1.5.6.2 by just updating the files - initial tests indicate everything works perfectly so unless you have 3rd party modules that have conflicts it should be an easy upgrade.

Swapping my efforts back to helping Daniel with 2.0 and OpenBay Pro but if anyone has any further bug reports please add them to the Github bug tracker and we can look at adding them for a later release.

J
Here is little bug: In file system/database/mysqli.php, line 19, should contain this:

Code: Select all

			if ($query instanceof mysqli_result) {
instead of

Code: Select all

			if (isset($query->num_rows)) {
otherwise the mysqli query return true if there are zero results.

Re: 1.5.6.2 bug fix release

Posted: Sat Apr 12, 2014 4:53 am
by SelfMan
I found one more (annoying) bug. When you have a list of orders and hit the print invoice button without selecting one of the orders a blank page in a popup is shown. It would be logical to display a JS warning that no order was selected and the same in the print view.

Re: 1.5.6.2 bug fix release

Posted: Sat Apr 12, 2014 10:31 pm
by chongshengdz
phatoa wrote:Error pp_express payment modules in file

catalog/model/payment/pp_express.php

lines:

Code: Select all

        $data['PAYMENTREQUEST_0_ITEMAMT'] = number_format($value, 2, '.', '');
        $data['PAYMENTREQUEST_0_AMT'] = number_format($value, 2, '.', '');
must change to

Code: Select all

        $data['PAYMENTREQUEST_0_ITEMAMT'] = number_format($item_total, 2, '.', '');
        $data['PAYMENTREQUEST_0_AMT'] = number_format($item_total, 2, '.', '');

thanks,phatoa,“The totals of the cart item amounts do not match order amounts.” has been fixed.