Page 1 of 13

OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 1:40 am
by Daniel
Here it is guys!

OPENCART 1.5.1.3

you can download it here:
http://opencart.googlecode.com/files/op ... .1.3.1.zip

If there are any bugs you can post them in this thread:
http://forum.opencart.com/viewtopic.php?f=161&t=42226

NEW:
Updated the tax system added new functionality to cope with new laws bought about by the US and EU.
Taxes can also be assigned to different customer groups
Added auto complete in the admin for search for products, orders, customers, etc..
Added new payment gateway called Web Payment Software

FIXED:
Added utf-8 helper fucntions so there is no need for mb extension to be installed.
Page speed rendering issue IE
Multi-Store Layout Change not working for second store

Please refer to the bug tracker list for all the fixes done:

http://code.google.com/p/opencart/issue ... %20Summary

Enjoy!

Attention Upgraders!
  • This version includes an updated upgrade script. Follow the instructions in the upgrade.txt file in the zip.
  • DO NOT USE IT TO UPGRADE FROM 1.4.x!!! 1.4.x upgrades must be done using this script:
    http://forum.opencart.com/viewtopic.php?f=2&t=36519
  • There are Extension Changes! The new tax system requires that order total extensions that call
    "$this->tax->getRate()" to be updated.
  • After upgrade, you should goto the System->Localisation->Tax Rates and add a "name" to the tax rate.
  • If you are using vQmod, after upgrading you will need to re-run the vQmod installer.

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 1:47 am
by Qphoria
Patch Only Version:
I've compiled a zip of only the changed files, for those that want to limit the upgrade to only the changed or new files.
Only use this zip if you have an existing 1.5.1.x version
ATTN DEVELOPERS:
There were some API impacts in this version...

1. New Tax System
The new tax system removes the old "Tax::getRate()" function from the system/library/tax.php file
This means any calls to "$this->tax->getRate()" will need to be replaced.

To show a coding example:
1.5.1.1:

Code: Select all

if ($this->session->data['shipping_method']['tax_class_id']) {
    if (!isset($taxes[$this->session->data['shipping_method']['tax_class_id']])) {
        $taxes[$this->session->data['shipping_method']['tax_class_id']] = $this->session->data['shipping_method']['cost'] / 100 * $this->tax->getRate($this->session->data['shipping_method']['tax_class_id']);
    } else {
        $taxes[$this->session->data['shipping_method']['tax_class_id']] += $this->session->data['shipping_method']['cost'] / 100 * $this->tax->getRate($this->session->data['shipping_method']['tax_class_id']);
    }
} 
Would be replaced with:

Code: Select all

if ($this->session->data['shipping_method']['tax_class_id']) {
    $tax_rates = $this->tax->getRates($this->session->data['shipping_method']['cost'], $this->session->data['shipping_method']['tax_class_id']);
    
    foreach ($tax_rates as $tax_rate) {
        if (!isset($taxes[$tax_rate['tax_rate_id']])) {
            $taxes[$tax_rate['tax_rate_id']] =  $tax_rate['amount'];
        } else {
            $taxes[$tax_rate['tax_rate_id']] +=  $tax_rate['amount'];
        }
    }
} 
Since this was done in a point release (unfortunately :-[ ), I recommend using a conditional to make it support both 1.5.1.1 and 1.5.1.3 in one file to save yourself from having to maintain 2 versions.
For this I use

Code: Select all

if (method_exists($this->tax, 'getRates')) { //v1.5.1.3 or later
   // Put the new method here
} else {
   // Put the old method here
} 
Take a look at the changes in other core order totals to get additional insight on the issue.

2. JSON library Changes

json.php was moved to the system/helper area
json is no longer loaded as a library because it is a helper. So you can remove the load step and
change "Json::encode" to "json_encode".
Again I recommend using a conditional for this change. I personally still use the tax change conditional as that is the most unique and monitorable change in this release:

Code: Select all

if (!method_exists($this->tax, 'getRates')) { //v1.5.1.2 or earlier
    $this->load->library('json');
    $this->response->setOutput(Json::encode($data));
} else {
    $this->response->setOutput(json_encode($data));
} 

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 2:12 am
by i2Paq
Looking great and thanks for all the hard work guys! :)

Playing with it now and will report any issues a.s.a.p.

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 2:20 am
by opencartArab
thanks :joker:

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 2:58 am
by marvmen21
Great! Thanks for all the hard work! Can't wait to start playing with it. ;D

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 4:04 am
by rlec
Was the ability to edit an order not included in this release?

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 4:32 am
by andrew222
Many thanks Daniel.

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 4:34 am
by i2Paq
rlec wrote:Was the ability to edit an order not included in this release?
No.

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 4:40 am
by rlec
i2Paq wrote:You have to wait for 1.5.1.3, according to Daniel that version will have the Order Edit back.

I believe that this release is around the corner and could be finished the upcoming week.
I based my questions off the response I received earlier this week...

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 4:54 am
by i2Paq
rlec wrote:
i2Paq wrote:You have to wait for 1.5.1.3, according to Daniel that version will have the Order Edit back.

I believe that this release is around the corner and could be finished the upcoming week.
I based my questions off the response I received earlier this week...
I was wrong.

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 5:25 am
by Qphoria
i2Paq wrote: I was wrong.
That happened to me.... once 8)

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 5:43 am
by jonthee
Qphoria wrote:Attention Upgraders!
This version includes an updated upgrade script.
Follow the instructions in the upgrade.txt file in the zip.
It will convert you from any existing 1.5.x to the latest 1.5.x

DO NOT USE IT TO UPGRADE FROM 1.4.x
1.4.x upgrades must be done using this script:
http://forum.opencart.com/viewtopic.php?f=2&t=36519

Patch Only Version:
I've compiled a zip of only the changed files, for those that want to limit the upgrade to only the changed or new files.
Only use this zip if you have an existing 1.5.1.x version
patch_151x_to_1513.zip
No Extension Changes!
There should be NO affect on existing 1.5.x extensions or modules.
All existing 1.5.1 extensions should work without change on this newer version.
Hi! Thanks!

Sorry for missing this forumthread, thanks a lot Qphoria! =) Dumb of me to start a new thread about this, next time I will search the forum a lot better than this time..

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 9:38 am
by aguinaldoalves
I did the upgrade from OpenCart 1.5.1.1 to 1.5.1.3 but when I access my store in "extensions/payment" the sistem show this messenge: "Notice: Error: Could not load language payment/web_payment_software!"
What I need to do?
Best Regards

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 9:43 am
by bigal
Thanks Daniel,

Will download the updates.

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 11:15 am
by Daniel
aguinaldoalves wrote:I did the upgrade from OpenCart 1.5.1.1 to 1.5.1.3 but when I access my store in "extensions/payment" the sistem show this messenge: "Notice: Error: Could not load language payment/web_payment_software!"
What I need to do?
Best Regards
if you are using english then you are missing a file. try to reupload. if not then you need to get a translation for this file. or a dummy one.

i might put language fallback in the next version. i see why its important now.

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 12:18 pm
by Daniel
guys you need to redownload the latest version.

or make the changes manually here:

http://code.google.com/p/opencart/sourc ... gister.php


i found a checkout register bug.

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 12:27 pm
by Qphoria
Daniel wrote: i might put language fallback in the next version. i see why its important now.
:dance: :yahoo: :clap:

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 1:23 pm
by i2Paq
Daniel wrote: i might put language fallback in the next version. i see why its important now.
:dance: :yahoo: :clap:

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 1:31 pm
by marcelwoo
Qphoria wrote:Patch Only Version:
I've compiled a zip of only the changed files, for those that want to limit the upgrade to only the changed or new files.
Only use this zip if you have an existing 1.5.1.x version
patch_151x_to_1513.zip
O0 thank you, Daniel, Q and other opencart team member for all your hard work!
I love this hot patch! Or I will have to go through all the new files, compare them and find what codes have been changed and added(nightmare >:D )!
Cannot wait to try this!

Re: OpenCart 1.5.1.3 Released

Posted: Fri Sep 30, 2011 1:48 pm
by i2Paq
THIS IS A RELEASE TOPIC, so do NOT post any upgrade or other issues here but place them in the appropriate part of our forums.

THANKS