Page 2 of 3

Re: OpenCart 2.2.0.0 Released!!

Posted: Wed Mar 09, 2016 4:07 am
by hfxracing
These upgrades are Horrible every 3 months. Nobody checks the dam thing either they just release it.
What are the New Features from 2.1.0.2 Security Features or fixes? No change log updated? that page is blank. I have to navigate to another website for information? Github??? That should be here. I just upgraded and that was full of bugs upgrade script didn't work had to manually add new tables. For a Novelist it would have been a nightmare Thank God I know to test first.

I am starting to agree with others I have a business to run not play with updates & new code every 3 months. I hate to be negative on your progress I love the cart don't get me wrong my sales are up since switching shopping carts.

I would like to see more testing before a Release is done. If your going to add some features lets hope they are good ones.
I am still baffled that none of the banners can set start & stop dates I would think that would go hand in hand with running a sale or discount which you can set dates. Or how about discount by category.Trying to run a sale on 50 Products is a real chore but if I had the products in a category then Discounted the Category life would be simple.

I know I could pay for a extension to do that but why should I when every other cart has these 2 basic things. I notice too that extensions get uploaded for sale that do the exact same thing the core code does. A rant for another day I guess

I would like to see this become the Best open source cart but to do that you have to offer everything everyone else is & more or at least make it easy.

I suggest you go install every other FREE cart & say do we have this feature? if not add it or add it but make it better.
Every little thing does not need to be in the core but some things are Truly necessary.
Make people looking for a cart say opencart it's a no brainer.

I only changed carts because this cart is more Google Friendly. Sorry for the rant I have been reading for months biting my tongue watching business owners stumble through upgrades. We don't have time for that we have e-commerce sites because we are trying to grow a business.

Re: OpenCart 2.2.0.0 Released!!

Posted: Wed Mar 09, 2016 4:41 pm
by atnaples
one thing i can tell: "log in with paypal" finally works... and more the code could be used with previous version... rest - is nightmare again

Re: OpenCart 2.2.0.0 Released!!

Posted: Wed Mar 09, 2016 8:27 pm
by labeshops
ThePath wrote:A quick note.

I performed an update from 2.1.0.2 to 2.2.0.0 and on the category page received a load of warnings including:

Warning: imagecreatetruecolor(): Invalid image dimensions in
Warning: imagecolorallocate() expects parameter 1 to be resource, boolean given in
Warning: imagefilledrectangle() expects parameter 1 to be resource, boolean given in

and a load more.

I immediately went to the image settings in the store admin and noticed all but the store logo and favicon settings had vanished. I resaved with no change and wondered if the settings were present in the DB, they were. Very strange.

Thought I would then delete the DB, blank the config files, reupload the install folder and do a "freshish" install. This resolved the warnings but the image settings are still not there. Thought perhaps they had been moved? But after a quick scan of the admin I can't find them if they have been.

Cheers
Image sizes are now set from extensions > theme > yourtheme

Re: OpenCart 2.2.0.0 Released!!

Posted: Wed Mar 09, 2016 8:29 pm
by pm-netti
ThePath wrote:But I have done a freshish install so does this have to happen after a fresh install?

Also it throws an sql syntax error when you try and runn your queries above.

#1064 - You have an error in your SQL syntax;

Thanks
This is theme change issue:
http://forum.opencart.com/viewtopic.php ... 22#p607799

Re: OpenCart 2.2.0.0 Released!!

Posted: Fri Mar 11, 2016 5:35 pm
by Snoek Products
Hello,

Maybe a small thing but when are you going to update the demo to the latest version so people can see the changes?

Kind Regards

Re: OpenCart 2.2.0.0 Released!!

Posted: Sat Mar 12, 2016 5:40 am
by moneycarlo
Snoek Products wrote:Hello,

Maybe a small thing but when are you going to update the demo to the latest version so people can see the changes?

Kind Regards
when the upgrade script is done..?
O0

Re: OpenCart 2.2.0.0 Released!!

Posted: Mon Mar 14, 2016 12:55 pm
by Qphoria
moneycarlo wrote:
Snoek Products wrote:Hello,

Maybe a small thing but when are you going to update the demo to the latest version so people can see the changes?

Kind Regards
when the upgrade script is done..?
O0
I've made a pull request for the upgrade script now
https://github.com/opencart/opencart/pull/4103/files

Re: OpenCart 2.2.0.0 Released!!

Posted: Wed Mar 16, 2016 9:42 pm
by thbr02
What happened with the pull request?

Re: OpenCart 2.2.0.0 Released!!

Posted: Wed Mar 16, 2016 11:06 pm
by labeshops
thbr02 wrote:What happened with the pull request?
I think Daniel has included it in the main opencart project, but not sure.

Take a look at this thread where Q had been including download files http://forum.opencart.com/viewtopic.php ... 4&start=40

Re: OpenCart 2.2.0.0 Released!!

Posted: Thu Mar 17, 2016 12:53 am
by Qphoria
Yes Daniel added my v2 pull
https://github.com/opencart/opencart/pull/4126

It looks like there may still be an outstanding issue with existing ocmod cache that needs to be cleaned up manually until I can add it to the upgrade script

Re: OpenCart 2.2.0.0 Released!!

Posted: Thu Mar 17, 2016 3:58 am
by N1kko
Also after upgrading lang seems to be missing as in admin is showing

tab_general tab_store text_home etc etc

Re: OpenCart 2.2.0.0 Released!!

Posted: Thu Mar 17, 2016 6:25 pm
by paulfeakins
chilledworld wrote:If you are constantly looking to upgrade your store to the brand new and shiny Opencart version then maybe you should ask why
I agree, there needs to be a good business case for upgrading.

Re: OpenCart 2.2.0.0 Released!!

Posted: Thu Mar 17, 2016 7:45 pm
by tabook
Why the signature of the 'total' modules method 'getTotal' was changed from

Code: Select all

public function getTotal(&$total_data, &$total, &$taxes) {
}
to

Code: Select all

public function getTotal($total) {
}
Boring? Tonns of the extensions has stopped working, it's needed to handle 2 installers - for version prior 2.2 and after...
because I did not see any way to handle those changes in runtime.
Why do not use the same approach as for 'shipping' or 'payment' modules when function return array with data? Why the 'params by ref' is needed ? Or rename new method and keep old one for backward compatibility...

Re: OpenCart 2.2.0.0 Released!!

Posted: Fri Mar 18, 2016 2:29 am
by Qphoria
tabook wrote:Why the signature of the 'total' modules method 'getTotal' was changed from

Code: Select all

public function getTotal(&$total_data, &$total, &$taxes) {
}
to

Code: Select all

public function getTotal($total) {
}
Boring? Tonns of the extensions has stopped working, it's needed to handle 2 installers - for version prior 2.2 and after...
because I did not see any way to handle those changes in runtime.
Why do not use the same approach as for 'shipping' or 'payment' modules when function return array with data? Why the 'params by ref' is needed ? Or rename new method and keep old one for backward compatibility...

In the confirm.php file I see:

Code: Select all

// Because __call can not keep var references so we put them into an array. 
$total_data = array(
	'totals' => &$totals,
	'taxes'  => &$taxes,
	'total'  => &$total
);
I guess since they changed to use the proxy design now, they have to pass a byval array of byref variables. But yea this is bad news. I cannot figure any way to handle byref within the function and PHP doesn't support handling both:
http://stackoverflow.com/questions/1143 ... l-argument

Re: OpenCart 2.2.0.0 Released!!

Posted: Fri Mar 18, 2016 1:40 pm
by tabook
Qphoria wrote:I guess since they changed to use the proxy design now, they have to pass a byval array of byref variables. But yea this is bad news. I cannot figure any way to handle byref within the function and PHP doesn't support handling both:
http://stackoverflow.com/questions/1143 ... l-argument
Exactly!
I've tried many ways, no luck (

Code: Select all

.....
    function __call($name, $args) {
        if ($name == "getTotal") {
            $ov = explode('.', VERSION);
            $opencartVersion = floatval($ov[0].$ov[1].$ov[2].'.'.(isset($ov[3]) ? $ov[3] : 0));
            return ($opencartVersion < 220) ? call_user_func(array($this, "getTotalOld"), array(&$args)) : call_user_func(array($this, "getTotal220"), $args);
        }
    }
...

Impossible to throw ref params via __call's "double proxy" (

Empty args list was an variant

Code: Select all

public function getTotal() {
...
if (func_num_args() == 3) {
            // Old code
        }
else {
 // New real world (((
}
But there is no way to change byref args in this case

No our life is not boring!

Re: OpenCart 2.2.0.0 Released!!

Posted: Mon Mar 21, 2016 12:52 am
by Daniel
put it into an array

Re: OpenCart 2.2.0.0 Released!!

Posted: Tue Mar 22, 2016 1:39 am
by Qphoria
Daniel wrote:put it into an array
The point was trying to support both 2.1 and 2.2 with the same code cannot be done now because the byref call is at the function call level, not something we can put a conditional around. We'll just have to make 2 versions of the code

I've found a rather simple conversion for my mods, might work for others as well to simplify the process.
You'll still need separate files for the catalog/model/total/xxx.php
But at least it's a small change.

2.1.x version

Code: Select all

public function getTotal(&$total_data, &$total, &$taxes) { //v2.1.x or older
2.2.x version

Code: Select all

public function getTotal($totals) { //v2.2.x or newer

	// Break out the 2.2.x arrays byref so I don't have to change any other code
	$total_data =& $totals['totals'];
	$total =& $totals['total'];
	$taxes =& $totals['taxes'];
	//
That's it. You shouldn't have to adjust any other code within assuming it currently uses the 2.1.x or older format.

Re: OpenCart 2.2.0.0 Released!!

Posted: Tue Mar 22, 2016 7:05 pm
by tabook
Finally, I did it using dynamic extension code generation. Now I have one installation for all OC versions (however there are two 'total' files in model folder).

Re: OpenCart 2.2.0.0 Released!!

Posted: Tue Mar 22, 2016 8:01 pm
by Qphoria
tabook wrote:Finally, I did it using dynamic extension code generation. Now I have one installation for all OC versions (however there are two 'total' files in model folder).
oh yea? I'd love to hear your method.

Re: OpenCart 2.2.0.0 Released!!

Posted: Tue Mar 22, 2016 9:07 pm
by tabook
Qphoria wrote:
tabook wrote:Finally, I did it using dynamic extension code generation. Now I have one installation for all OC versions (however there are two 'total' files in model folder).
oh yea? I'd love to hear your method.
The main idea is - virtually install and handle both 'total' extensions, but handle their statuses dynamically. So we need to put 2 DB records into extensions table:
total -> my_total (oc < 220)
total -> my_total2 (oc >= 220)
Now within a admin area total's settings we need to read/write 'status' and 'sort_order' properties on-the-fly based on current OC version (my_total_status or my_total2_status etc). Just save/load settings that we need and do not forget to disable secord 'total' extension that should not use in the store.

Thats all :)