Post by Qphoria » Wed Mar 23, 2016 4:20 am

Please test my latest upgrade script improvements:
http://forum.opencart.com/viewtopic.php?f=181&t=159898

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Fri Mar 25, 2016 1:37 am

tabook wrote:
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 :)
That's actually a pretty good idea. Thx

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by donmck » Sat May 28, 2016 12:55 pm

atnaples wrote: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
Any further clues on this one.

I have Version 2.1.0.2 and can't get my "Log in with PayPal" working.

The full details are at:
http://www.dontronics.com/login-with-paypal.htm

Thanks in advance,

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by i2Paq » Sun May 29, 2016 6:47 pm

donmck wrote:
atnaples wrote: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
Any further clues on this one.

I have Version 2.1.0.2 and can't get my "Log in with PayPal" working.

The full details are at:
http://www.dontronics.com/login-with-paypal.htm

Thanks in advance,

Cheers Don...
I have really no clue why you re posting a 2.1.0.2 support question in a 2.2.0.0 release topic?

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 CypherUK » Mon May 30, 2016 1:46 am

He's just a user with a question.

Rather than snapping his head off for posting in the wrong thread, how about being helpful and directing him to the relevant thread or maybe try and helping with the problem?

Also, have you thought that the reason it’s posted here is there is no thread for 2.1.0.2? and the thread for 2.1.0.1 is locked?

Just an idea.

@donmck Have you considered upgrading to the latest version?

You may find the issue has already been fixed.

User avatar
New member

Posts

Joined
Sun Oct 17, 2010 7:36 pm
Location - Essex, United Kingdom

Post by donmck » Mon May 30, 2016 6:33 am

CypherUK wrote:He's just a user with a question.

Rather than snapping his head off for posting in the wrong thread, how about being helpful and directing him to the relevant thread or maybe try and helping with the problem?

Also, have you thought that the reason it’s posted here is there is no thread for 2.1.0.2? and the thread for 2.1.0.1 is locked?

Just an idea.

@donmck Have you considered upgrading to the latest version?

You may find the issue has already been fixed.
Thanks for the positive support CypherUK.
Yes you are correct.

Trouble is we installed the latest version at the time, and have been doing custom mods to get Opencart up to the standard we had in our old xcart installation. To upgrade now, would mean going over all of the mods again. You have to stop at a point where you are happy, and not continually upgrade for the sake of upgrading. Yes, I couldn't find any relevant information anywhere else but this thread.

Any help appreciated.

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by donmck » Mon May 30, 2016 1:21 pm

I set up a new V2.2.0.0 cart in a subdirectory under my main shop.

I double checked the PayPal credentials, and added the sub directory to the new return URL.
Unfortunately I got the same error. When I set up the incorrect URL (without the sub-dir), I got a URL error, so I know that PayPal was connecting to my site in some way.

I just rang PayPal again and they are still trying to find the time to check the string that is sent to them from me. If they can't tell me if it is my problem, or their problem, there isn't much hope of fixing it. They suggested I get back to them in a few days. I will leave the V 2.2.0.0 shopping cart intact for now, but it doesn't look promising.

I have heard that there could be a USA setting (or code) that doesn't allow my Australian shop to connect correctly.

I am wondering if there is an Australian based Opencarter with any V2x that has "Log in with Paypal" working.

We tried the "Check Out with PayPal" Orange button, but that drops shipping off the total. :-(

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by i2Paq » Mon May 30, 2016 6:30 pm

CypherUK wrote:He's just a user with a question.

Rather than snapping his head off for posting in the wrong thread, how about being helpful and directing him to the relevant thread or maybe try and helping with the problem?

Also, have you thought that the reason it’s posted here is there is no thread for 2.1.0.2? and the thread for 2.1.0.1 is locked?

Just an idea.

@donmck Have you considered upgrading to the latest version?

You may find the issue has already been fixed.
There is a reason why this topic is ONLY about the 2.2.0.0 release and why I'm reacting in this way.

If we would allow everyone to post question regarding their own issue in the wrong topic we would have a shitload of topics which are useless because of all the off-topic replies.

You are now contributing to this instead of advising him to open up his own topic so others will find your answer to his question instead of never finding your answer as it is now embedded in a topic about 2.2.0.0.

Furthermore, this is a topic about the release it self, not about issues, for this we have a separate topic "Official" 2.2.0.0 BUG topic.

How hard can it be to just follow the lines set out instead of always wanting to do whatever you want, granting others to go off-topic and thus creating chaos?

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 donmck » Mon May 30, 2016 9:16 pm

sorry, now I am confused, as I did a clean install of V 2.2.0.0 and I now have two new problems. "Log in with Payal" doesn't work, and "Check out with PayPal" doesn't add postage.

Where should I be posting these messages?

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by i2Paq » Mon May 30, 2016 9:19 pm

donmck wrote:sorry, now I am confused, as I did a clean install of V 2.2.0.0 and I now have two new problems. "Log in with Payal" doesn't work, and "Check out with PayPal" doesn't add postage.

Where should I be posting these messages?

Cheers Don...
i2Paq wrote: for this we have a separate topic "Official" 2.2.0.0 BUG topic.

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 donmck » Mon May 30, 2016 9:42 pm

Sorry I am in the wrong forum for V2.1.0.2, so I install V 2.2.0.0 and attempt to get answers here.

Sorry I am still in the wrong forum, I need to go to V 2.2.0.0 bugs forum.

If that is the case, you should attempt to chase off many of the posters in this forum to the bug or other forums also.

Please, what is this forum for again?
It isn't about problems with clean installs and bugs, I think I found that out.

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by i2Paq » Fri Jun 03, 2016 9:34 pm

Working with OC 2.2.0.0 for 2 weeks now and part from 1 bug I'm impressed by its stability.

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 donmck » Sun Jun 05, 2016 6:52 am

i2Paq wrote:Working with OC 2.2.0.0 for 2 weeks now and part from 1 bug I'm impressed by its stability.
On V2.2.0.0 is "your Login with Paypal" working?

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by i2Paq » Mon Jun 06, 2016 6:53 pm

donmck wrote:
i2Paq wrote:Working with OC 2.2.0.0 for 2 weeks now and part from 1 bug I'm impressed by its stability.
On V2.2.0.0 is "your Login with Paypal" working?

Cheers Don...
I'm not using that.

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 donmck » Fri Jun 10, 2016 4:21 pm

BTW.

With the help of users in another thread, I was able to overcome my "Login with PayPal" problem in V2.0.1.2 and V2.2.0.0

The scopes needed to be set in the PP App.
Github mentions this, but on the phone with PP when they hand directed me through it step by step, this wasn't covered at all. Plug the values in, and away it goes.

So all is working fine.

Thanks Guys.

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by Cue4cheap » Sat Jun 11, 2016 5:55 am

donmck wrote:BTW.

With the help of users in another thread, I was able to overcome my "Login with PayPal" problem in V2.0.1.2 and V2.2.0.0

The scopes needed to be set in the PP App.
Github mentions this, but on the phone with PP when they hand directed me through it step by step, this wasn't covered at all. Plug the values in, and away it goes.

So all is working fine.

Thanks Guys.

Cheers Don...
Could you detail what was done? Or the place you found the fix?

Thank you,
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by donmck » Sat Jun 11, 2016 6:19 am

Sure Mike, it is covered in detail in this thread:
http://forum.opencart.com/viewtopic.php?f=191&t=163571

However the final fix, and my problem, can be found towards the end of that thread.
Hope this helps.
Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by thekrotek » Sun Jul 03, 2016 12:37 am

It might be too late and everybody, probably, already figured out a workaround for getTotal() new behavior. But here's what I did for my extensions and what I consider less costly.

In short, you need to do the following:
  • Add version dependent class helper (MyExtensionHelper), which will extend Model class instead of the main class (ModelMyExtension).
  • Extend helper class (MyExtensionHelper) with your main class (ModelMyExtension).
  • Rename getTotal() function in main class (ModelMyExtension) to something different (e.g.: calculateTotal()).
  • Add references to the beginning of the renamed function (calculateTotal()).

Code: Select all

if (version_compare(VERSION, '2.2', '<')) {
    class MyExtensionHelper extends Model
    {
    	public function getTotal(&$total_data, &$total, &$taxes)
    	{		    		
    		$data = array('totals' => &$total_data, 'total' => &$total, 'taxes' => &$taxes);

    		$this->calculateTotal($data);
    	}
    }
} else {
    class MyExtensionHelper extends Model
    {
    	public function getTotal($data)
    	{		    		
    		$this->calculateTotal($data);
    	}    
    }
}

class ModelMyExtension extends MyExtensionHelper 
{
	public function calculateTotal($data)
	{
		$total_data =& $data['totals'];
		$total =& $data['total'];
		$taxes =& $data['taxes'];

		// Your old code goes here.
	}
}
Tested it on 2.2 and 2.0.3.1, both worked fine.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am

Who is online

Users browsing this forum: Semrush [Bot] and 40 guests