Page 2 of 2

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Tue May 01, 2012 9:19 pm
by gangsar.swapurba
thanks guys... :)

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Fri Jul 20, 2012 2:29 am
by oscprofessionals
Good reference document for quick solutions.
Highly appreciated.

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Fri Dec 07, 2012 6:37 am
by KollanH
Thank you so very much for this it is a lifesaver1

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Thu Nov 07, 2013 8:34 pm
by sputnik-1
Thanks for that Q.

Next question:

Do we actually have some sort of OpenCart Extension Developers Guide yet, to show how to write OC extensions, and integrate them into OC using these methods please?

I've got the OC 1.4 Template Design Cookbook by Packt Publishing but cannot find anything that deals with writing modules to extend OC's functionality.

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Thu Nov 07, 2013 8:53 pm
by JAY6390
As far as I know,this article I wrote on stack overflow is the most in depth guide for developers. It assumes you have some knowledge of PHP/MySQL and while it doesn't explain a "module" as such, it gives you the building blocks to figure out what a module's code is doing and why - and should help you replicate it

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Fri Nov 08, 2013 4:33 am
by sputnik-1
Thanks for that link Jay.

I'll take a closer look at that soon.

Is it possible to write an API class with a set of wrapper methods that could be included in the index.php file, and made available to all other PHP scripts in OC?

I'm just toying with the idea of writing something like that.

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Fri Nov 08, 2013 5:40 am
by sputnik-1

Code: Select all

$this->cart->hasProducts() - returns true if there is at least one item in the cart
$this->cart->hasStock() - returns false if there is at least one item in the cart that is out of stock
$this->cart->hasProducts() - returns true if there is at least one item in the cart that requires shipping
should this not be:

Code: Select all

$this->cart->hasProducts() - returns true if there is at least one item in the cart
$this->cart->hasStock() - returns false if there is at least one item in the cart that is out of stock
$this->cart->hasShipping() - returns true if there is at least one item in the cart that requires shipping
;)

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Fri Nov 08, 2013 5:50 am
by JAY6390
It should, and that's someone elses post not mine ;)

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Sat Nov 09, 2013 5:11 am
by sputnik-1
JAY6390 wrote:It should, and that's someone elses post not mine ;)
Yes I understand that.

The typo is in the PDF.

:)

Re: @Developers - OpenCart Global Library Methods [1.4.x]

Posted: Sat Nov 09, 2013 5:44 am
by Qphoria
sputnik-1 wrote:
JAY6390 wrote:It should, and that's someone elses post not mine ;)
Yes I understand that.

The typo is in the PDF.

:)
Looks like I made my one mistake for that year ;)