Skip to content

Opencart Code snippets extension for the visual studio code

Notifications You must be signed in to change notification settings

rupaknepali/opencartsnippetsvscode

Repository files navigation

Opencart Snippets for VScode by webocreation.com

This VSCode extension is for OpenCart developer which has a collection of OpenCart snippets. This is just start, Please let us know if need to add more Contact Us

Video Tutorial

Opencart Snippets for VScode

Documentation

All snippets starts with oc. Some of the snippets are:

PHP page supported snippets:

  • occ : It creates new Controller class
  • ocm : It creates new Method or function
  • occm : It creates new starter Model class
  • ocl : It creates new variables for language files
  • ocprf : It creates print_r with pre
  • occacheget: It creates to get the cache
  • occacheset: It creates to set the cache
  • occachedelete: It creates to delete the cache
  • occonfigget: It creates to get the config
  • occonfigset: It creates to set the config
  • ocdbquery: It creates to query the database
  • ocdbescape: It creates to escape the database fields
  • ocdbcount: It creates to count the rows affected of the database
  • ocdocumentsettitle: $this->document->setTitle(title)
  • ocdocumentgettitle: $this->document->getTitle()
  • ocdocumentsetdescription: $this->document->setDescription()
  • ocdocumentgetdescription: $this->document->getDescription()
  • ocdocumentsetkeywords: $this->document->setKeywords()
  • ocdocumentgetkeywords: $this->document->getKeywords()
  • ocdocumentaddlinks: $this->document->addLinks()
  • ocdocumentgetlinks: $this->document->getLinks()
  • ocdocumentaddstyles: $this->document->addStyles(....)
  • ocdocumentgetstyles: $this->document->getStyles()
  • ocdocumentaddscripts: $this->document->addScripts(..)
  • ocdocumentgetscripts: $this->document->getScripts(postion)
  • ocencryptionencrypt: $this->encryption->encrypt(...)
  • ocencryptiondecrypt: $this->encryption->decrypt(...)
  • oclanguageset: $this->language->set(...)
  • oclanguageget: $this->language->get(key)
  • oclanguageall: $this->language->all()
  • oclanguageload: $this->language->load(filename)
  • oclog: $this->log->write(message)
  • ocmail: It creates the new Mail, it parameter, SMTP configuration needed, set to, set from, set subject, set the html type and send code.
  • ocpagination: It creates the code for basic pagination needed.
  • ocrequestget: $this->request->get[...]
  • ocrequestpost: $this->request->post[...]
  • ocrequestcookie: $this->request->cookie[cookiename]
  • ocrequestfiles: $this->request->files[filename]
  • ocrequestserver: $this->request->server[REQUEST_METHOD]
  • ocresponseredirect: Response redirect code
  • ocresponsesetoutput: Response set output
  • ocresponsejson: Response JSON code
  • ocsession: Session Data
  • ocurllink: URL link
  • occart: Cart $this->cart->
  • occurrency: Currency format
  • occheckuserpermission: Check user permission

Twig page supported snippets:

  • oct : It creates starting template layouts in twig files
  • octfor : It creates for loop in twig files
  • octif : It creates if statement in twig files
  • ocbtn : It creates button markup
  • ocimg : It creates image markup
  • ocbc : It creates breadcrumbs loop in twig files

OCMOD XML page supported snippets:

  • ocmod : It creates OCMOD xml code boilerplate
  • ocmodf : It creates OCMOD xml code boilerplate for files only

Release Notes

Users appreciate release notes as you update your extension.

[1.5.1]

[1.3.0]

[1.2.1]

  • Auto folder and file name in controller and model class

[1.2.0]

  • OCMOD support added.
  • ocmod - for install.xml boilerplate creation
  • ocmodf - OCMOD XML file boilerplate
  • ocprf - print_r with pre

1.0.0

  • Initial release of Opencart Snippets for VScode
  • Added some snippets. Others are comming soon.

For more information

Enjoy!

About

Opencart Code snippets extension for the visual studio code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published