Post by Xsecrets » Thu Oct 06, 2011 1:35 am

JNeuhoff wrote:
Qphoria wrote: dunno.. just shootin out ideas.
Perhaps implement the old Tax::getRate($tax_class_id) in a VQmod XML file and let it call in turn the new methods? This way there might be no need to change all the addons, have to look into it. Certainly my Google Checkout module is broken now in 1.5.1.3 because of the changes with the tax.
I feel your pain all of my mods were broken by 1.5.1.3

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by framos41 » Thu Oct 06, 2011 3:06 am

Hello,
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-v2.zip

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));
} 

I had used this to upgrade my OC v1.5.1 to v1.5.1.3 and now in admin i cant see the images in the product setting, if i add a new image it is shown in front end but not shown in admin, anyone with this same problem?

Regards

New member

Posts

Joined
Thu Sep 02, 2010 5:02 am

Post by i2Paq » Thu Oct 06, 2011 3:14 am

Daniel wrote:the next one is going to be 1.5.2 it will have the order editing system and pdf invoices.

is 1.5.2 ok?
JNeuhoff wrote:I think 1.5.2 will be fine.

I general, if we could use the following simple version numbering standard:

1.x.y.z

where

x indicates major new changes, including differences in the API or DB
y indicates new features, but keeps the API or DB the same or at least backward compatible
z indicates a bugfix release (can be omitted the first time a new y or x is introduced)


So we'd expect for example something like this in the foreseeable future

1.5.2 (new features e.g. order editing and PDF invoices)
1.5.2.1 (future bugfix release for 1.5.2)
1.5.2.2 (2nd bugfix release for 1.5.2)
......

I think that's how most OpenCart users and contributors interpreted the version numbering.

:yahoo: :dance: :ok:

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Qphoria » Thu Oct 06, 2011 3:21 am

JNeuhoff wrote:
Qphoria wrote: dunno.. just shootin out ideas.
Perhaps implement the old Tax::getRate($tax_class_id) in a VQmod XML file and let it call in turn the new methods? This way there might be no need to change all the addons, have to look into it. Certainly my Google Checkout module is broken now in 1.5.1.3 because of the changes with the tax.
That's another good idea too.. maybe a great idea

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Thu Oct 06, 2011 3:23 am

framos41 wrote:Hello,

I had used this to upgrade my OC v1.5.1 to v1.5.1.3 and now in admin i cant see the images in the product setting, if i add a new image it is shown in front end but not shown in admin, anyone with this same problem?

Regards
check your folder permissions on the image and image/data and image/cache folders

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by affect » Thu Oct 06, 2011 6:31 am

Just in case someone hasn't noticed yet, admin autocomplete has been modified so you need to add version check to your modules which use autocomplete ajax or it won't work with 1.5.1.3.

Code: Select all

$.ajax({
	<?php if (strcmp(VERSION,'1.5.1.3') >= 0) { ?>
		url: 'index.php?route=catalog/product/autocomplete&token=<?php echo $token; ?>&filter_name=' +  encodeURIComponent(request.term),
    <?php } else { ?>
		url: 'index.php?route=catalog/product/autocomplete&token=<?php echo $token; ?>',
		type: 'POST',
		data: 'filter_name=' +  encodeURIComponent(request.term),
    <?php } ?>
	dataType: 'json',
	success: function(data) {		
              ..
	}
});

MultiMerch Marketplace for OpenCart

Image


User avatar
Active Member

Posts

Joined
Sat Aug 13, 2011 5:04 pm


Post by tech.cnsb » Thu Oct 06, 2011 11:08 am

Package opencart_v1.5.1.3.1.zip the installation folder, still have .svn folder and files

Newbie

Posts

Joined
Wed Jan 12, 2011 11:44 am

Post by affect » Thu Oct 06, 2011 3:00 pm

Package opencart_v1.5.1.3.1.zip the installation folder, still have .svn folder and files
Yeah I already mentioned that. Not a huge issue since install folder gets deleted anyway.

MultiMerch Marketplace for OpenCart

Image


User avatar
Active Member

Posts

Joined
Sat Aug 13, 2011 5:04 pm


Post by framos41 » Thu Oct 06, 2011 11:41 pm

Qphoria wrote:
framos41 wrote:Hello,

I had used this to upgrade my OC v1.5.1 to v1.5.1.3 and now in admin i cant see the images in the product setting, if i add a new image it is shown in front end but not shown in admin, anyone with this same problem?

Regards
check your folder permissions on the image and image/data and image/cache folders
Hello,

i had checked the folder permissions, both in 777, what else could happen?

regards

New member

Posts

Joined
Thu Sep 02, 2010 5:02 am

Post by JCO » Fri Oct 07, 2011 10:50 pm

Daniel wrote:the next one is going to be 1.5.2 it will have the order editing system and pdf invoices.

is 1.5.2 ok?
I am wondering if something like this is possible for Versions & Fixes? This could help everyone (including Daniel & Q) ... does not have to be a permanent way, but at least for a while (until we are notified).

Scenario (to stabilize & make easier for all):
1) Daniel develops the "order editing system" & "pdf invoices" external to SVN (Daniel, you might be doing this already)
2) Use SVN for fixes only for latest released version
- This will allow people to pull down latest SVN and get fixes only, without new un-tested function
3) When "order editing system" & "pdf invoices" development is complete, Daniel can then integrate the new function he created into SVN

Please consider concept ... thanks!

User avatar
JCO
Newbie

Posts

Joined
Thu Nov 11, 2010 11:39 am

Post by markman-b » Fri Oct 07, 2011 11:12 pm

I don't agree with that suggestion. You can't expect from ordinary OC-users they'll grab the bugfixes from SVN.

Daniel should learn to see things more from point of view/through the eyes of an ordinary OC user. And that's not an offense but constructive criticism. We all love OC, but updateprocedures should be more logical.

Closing your shop for 3 days, for implementing a "minor" 1.5.XXXX update, is ridiculous!
Maintaining my website is extremly time consuming so far, which is distracting me from my main goal: running my bussiness.

OC version 1.5.4.1


Active Member

Posts

Joined
Wed Aug 24, 2011 7:13 pm

Post by m1jd1 » Sat Oct 08, 2011 2:32 am

Daniel, do you plan to release a version with bugfixes which we can see in svn? (like fix for undefined language var etc.)
Thanks for answer.

Newbie

Posts

Joined
Fri Jul 29, 2011 4:15 pm

Post by dinmc » Sun Oct 09, 2011 4:47 pm

Was the ability to manuel edit and add order included in this release?

New member

Posts

Joined
Tue Mar 22, 2011 5:01 pm

Post by opencartrules » Sun Oct 09, 2011 5:18 pm

Was the ability to manuel edit and add order included in this release?
No, next release 1.5.2 , but I am curious about how the solution will or should work.
When the customer goes to checkout, payment method is selected and payment is completed, how can you benefit from the ability to edit an order, add or delete rows, how about the payment - additional payments and credits ?

New member

Posts

Joined
Tue Aug 09, 2011 9:47 pm

Post by i2Paq » Sun Oct 09, 2011 6:28 pm

opencartrules wrote:
Was the ability to manuel edit and add order included in this release?
No, next release 1.5.2 , but I am curious about how the solution will or should work.
When the customer goes to checkout, payment method is selected and payment is completed, how can you benefit from the ability to edit an order, add or delete rows, how about the payment - additional payments and credits ?
I have customers who change their mind about what they ordered. They send me an e-mail or phone me asking to adjust their order.
I "need" a solution to do this, the Order Edit.

I'm using 1.4.x with Order Edit and for me it is a live/time saver.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by opencartrules » Sun Oct 09, 2011 6:37 pm

I2Paq
I have customers who change their mind about what they ordered. They send me an e-mail or phone me asking to adjust their order.
Of course, I realize the benefits of it! In most Managament Information System it is a must.
But how about the payment solutions? If the customer has already paid with VISA card and the payment is completed?
Do you realize how much extra work it will create in the long run? Then you have to edit and adjust their order, make a credit or additional payments, how about the accounting ?

New member

Posts

Joined
Tue Aug 09, 2011 9:47 pm

Post by markman-b » Sun Oct 09, 2011 6:45 pm

Wouldn't it be nice if a next version of OC could help you to finish those extra task more efficiently?

OC version 1.5.4.1


Active Member

Posts

Joined
Wed Aug 24, 2011 7:13 pm

Post by i2Paq » Sun Oct 09, 2011 8:48 pm

opencartrules wrote:I2Paq
I have customers who change their mind about what they ordered. They send me an e-mail or phone me asking to adjust their order.
Of course, I realize the benefits of it! In most Managament Information System it is a must.
But how about the payment solutions? If the customer has already paid with VISA card and the payment is completed?
Do you realize how much extra work it will create in the long run? Then you have to edit and adjust their order, make a credit or additional payments, how about the accounting ?
I have been doing this in the last 6 years, even my old osCommerce store had an Order Edit which worked great.
It maybe looks like a lot of work but in the end it is not.
Additional payments where made by Banktransfer or PayPal.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Daniel » Mon Oct 10, 2011 2:06 pm

order edit is nearly done.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by opencartrules » Tue Oct 11, 2011 12:39 am

order edit is nearly done.
What does it mean Daniel? Are you intending to release v.1.5.2 soon? We are just about to upgrade to 1.5.1.3.1, hard decision to make. :)

New member

Posts

Joined
Tue Aug 09, 2011 9:47 pm
Who is online

Users browsing this forum: No registered users and 5 guests