Post by aymanelsharkawy » Thu Jul 14, 2016 6:28 am

please.
I am working on eclipse with PHP Development Tools (PDT).
and autocomplete feature working perfectly in php code only.
how can i add opencart MVC library (include path) to enjoying with autocomplete feature in opencart code ?


Posts

Joined
Thu Jul 14, 2016 6:17 am

Post by straightlight » Fri Jul 15, 2016 12:56 am

There has been a lot of discussion in the past regarding variation of tools that can be used to autocomplete feature for PHP: http://forum.opencart.com/viewtopic.php?t=11466.

However, here's a fully documented screenshot and steps on how to proceed with PHP Eclipse for Opencart: https://www.eclipse.org/forums/index.php/t/944334/

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by artcore » Fri Jul 15, 2016 1:59 am

For autocomplete across the entire library just add the phpdoc @property

eg on top of your controller
/**
* @property ModelCatalogProduct $model_catalog_product
*/

Now whenever you use $this->model_catalog_product->... it will autocomplete the available methods and hint the arguments as well.
You can add all the @properties in the main \Controller or just the onces relevant to the current controller/model/etc file

I do the second option but the first is probably smarter :)

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands
Who is online

Users browsing this forum: No registered users and 30 guests