webocreation.com@gmail.com
:@rupaknpl : onlinegyannepal
https://webocreation.com
OpenCart Module Development
OpenCart Library Global Methods
What this video series covers
Making hello world module
Workflow or markup to make hello world module
-- Installing a module
-- Configuration of module
-- Managing layout and position
-- Uninstalling the module
Admin files created to make hello world module
-- Controller creation
-- Language file creation
-- Template file creation
Front end files created to make hello world
-- Controller creation
-- Language file creation
-- Template file creation
OpenCart Flow
• Introduction
• Why OpenCart?
• Features of OpenCart
• Prerequisites
• Downloading example code
• Installing OpenCart
-Steps to create custom URL to work locally
• Describing folders and files of OpenCart
• OpenCart Framework:
-Registry, loader, request, response, database,
session , cache, unlimited colors theme,
language, event, Event Register, Config
Autoload, Language Autoload, Library
Autoload, Model Autoload, Front Controller,
Pre Actions, Dispatch and Output.
• OpenCart Code flow
• Request and Response in OpenCart
• Database table schema
• OpenCart Library Global Methods
Namespace in OpenCart
• A namespace is like a directory and by adding ‘namespace’, Affiliate is
now under ‘Cart’.
• To use ‘Affiliate’, we call or instantiate as new CartAffiliate()
• Adding a ‘namespace’ to a class is like organizing files from one
directory into a bunch of sub-directories.
• The use statement lets us call class by a nickname.
OpenCart Library Global Methods
• Code only what you need, if you missed these global methods then
you may repeat codes
• You can find global methods at system/library
• Opencart has many predefined methods that can be called in
Controller and Model
system/library/cart/affiliate.php
• $this->affiliate->login($email, $password);
• You can find code used at catalog/controller/affiliate/login.php validate()
method.
• Affiliate login script at system/library/cart/affiliate.php is used to provide the
authentication for Affiliate section of OpenCart. Affiliate session is activated
for affiliate_id, firstname, lastname, email, telephone, fax and code.
• $this->affiliate->logout()
• You can find code used at catalog/controller/affiliate/logout.php index()
method.
• Affiliate logout script at system/library/cart/affiliate.php is used to unset the
affiliate session and assign empty value to affiliate_id, firstname, lastname,
email, telephone and fax of Affiliate. By this Affiliate is logged out.
Affiliate
Affiliate contd.
• $this->affiliate->isLogged()
• You can find code used at catalog/controller/affiliate/account.php index()
method.
• Affiliate isLogged script at system/library/cart/affiliate.php is used to check
whether affiliate_id is active or not.
• $this->affiliate->getId()
• You can find code used at catalog/model/affiliate/affiliate.php
editAffiliate($data) method.
• Affiliate getId script at system/library/cart/affiliate.php is used to return
active affiliate_id.
Affiliate contd.
• $this->affiliate->getFirstName()
• You can find code used at catalog/controller/affiliate/login.php index()
method.
• Affiliate getFirstName script at system/library/cart/affiliate.php is used to
return active affiliate first name.
• $this->affiliate->getLastName()
• You can find code used at catalog/controller/affiliate/login.php index()
method.
• Affiliate getLastName script at system/library/cart/affiliate.php is used to
return active affiliate last name.
Affiliate contd.
• $this->affiliate->getEmail()
• You can find code used at catalog/controller/affiliate/edit.php validate()
method.
• Affiliate getEmail script at system/library/cart/affiliate.php is used to return
active affiliate email.
• $this->affiliate->getTelephone()
• Not used in OpenCart but you can use it .
• Affiliate getTelephone script at system/library/cart/affiliate.php is used to
return active affiliate Telephone number.
Affiliate contd.
• $this->affiliate->getCode()
• You can find code used at catalog/controller/affiliate/tracking.php index()
method.
• Affiliate getCode script at system/library/cart/affiliate.php is used to return
active affiliate tracking code which is used to track referrals.
• $this->affiliate->getFax()
• Not used in OpenCart but you can use it .
• Affiliate getFax script at system/library/cart/affiliate.php is used to return
active affiliate Fax number.
Other Global Methods
• Cart
• Currency
• Customer
• Length
• Tax
• User
• Weight
• Config
• DB
• Document
• Encryption
• Image
• Language
• Log
• Mail
• Openbay
• Pagination
• Request
• Response
• Session
• Template
• URL
https://www.packtpub.com/web-development/opencart-theming
For Detail description read
“OpenCart Theme and
Module Development” book
webocreation.com@gmail.com
:@rupaknpl : onlinegyannepal
https://webocreation.com
Thanking you

More Related Content

ZIP
Presentation.Key
PDF
Entry-level PHP for WordPress
PPTX
I Love codeigniter, You?
PPT
10 Email Etc
PDF
Rails antipatterns
PPTX
Childthemes ottawa-word camp-1919
PDF
Introduction to php
PPTX
Catalog display
Presentation.Key
Entry-level PHP for WordPress
I Love codeigniter, You?
10 Email Etc
Rails antipatterns
Childthemes ottawa-word camp-1919
Introduction to php
Catalog display

What's hot (20)

PPT
jQuery Intro
PPT
Choosing a Templating System
PPTX
Cakefest 2010: API Development
PPT
PPTX
Intro to Rails Give Camp Atlanta
PPTX
Plugins unplugged
PPT
PPT
Introduction to PHP - SDPHP
PDF
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
PPTX
Debugging PHP Code
ODP
Zen and the Art of Claroline Module Development
PDF
"Managing API Complexity". Matthew Flaming, Temboo
PDF
Bullet: The Functional PHP Micro-Framework
PDF
Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@
PPTX
Dash of ajax
PDF
ApacheCon 2005
PPT
PHP Server side restful API - linkedin
PPTX
HTML 5 Basics Part One
PPT
Android - Values folder
PPTX
Introduction to HAML
jQuery Intro
Choosing a Templating System
Cakefest 2010: API Development
Intro to Rails Give Camp Atlanta
Plugins unplugged
Introduction to PHP - SDPHP
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Debugging PHP Code
Zen and the Art of Claroline Module Development
"Managing API Complexity". Matthew Flaming, Temboo
Bullet: The Functional PHP Micro-Framework
Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@
Dash of ajax
ApacheCon 2005
PHP Server side restful API - linkedin
HTML 5 Basics Part One
Android - Values folder
Introduction to HAML
Ad

Similar to 6 global library function provided by open cart (19)

PPTX
MVCL pattern, web flow, code flow, request and response in OpenCart
PPTX
Finding Your Way: Understanding Magento Code
PPTX
Make me a sandwich, Tienda
PDF
A Successful Magento Project From Design to Deployment
PPTX
WordCamp LA 2014- Writing Code that Scales
DOCX
How to Create Module to Track Affiliate Conversions?
PPTX
Database table schema explained of Opencart
PPTX
Magento 2.0: Prepare yourself for a new way of module development
PPTX
OpenCart Ebay Connector Plugin
ODP
Silverstripe Ecommerce
PPTX
Installing OpenCart 3 module
PDF
Symfony World - Symfony components and design patterns
PPTX
Oscommerce Presentation
PDF
Opencart extensions (1)
PDF
Medicine For World
PDF
End-to-End OpenCart Implementation Services.pdf
PDF
Modul-Entwicklung für Magento, OXID eShop und Shopware (2013)
PDF
Smart 0pencart smart retail store_menus and dashboard_presentation_2_version ...
PDF
Best Practices for Magento Debugging
MVCL pattern, web flow, code flow, request and response in OpenCart
Finding Your Way: Understanding Magento Code
Make me a sandwich, Tienda
A Successful Magento Project From Design to Deployment
WordCamp LA 2014- Writing Code that Scales
How to Create Module to Track Affiliate Conversions?
Database table schema explained of Opencart
Magento 2.0: Prepare yourself for a new way of module development
OpenCart Ebay Connector Plugin
Silverstripe Ecommerce
Installing OpenCart 3 module
Symfony World - Symfony components and design patterns
Oscommerce Presentation
Opencart extensions (1)
Medicine For World
End-to-End OpenCart Implementation Services.pdf
Modul-Entwicklung für Magento, OXID eShop und Shopware (2013)
Smart 0pencart smart retail store_menus and dashboard_presentation_2_version ...
Best Practices for Magento Debugging
Ad

Recently uploaded (20)

PPTX
Viber For Windows 25.7.1 Crack + Serial Keygen
PDF
CapCut PRO for PC Crack New Download (Fully Activated 2025)
PPTX
Human-Computer Interaction for Lecture 2
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PDF
MiniTool Power Data Recovery 12.6 Crack + Portable (Latest Version 2025)
PPTX
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
PDF
Cloud Native Aachen Meetup - Aug 21, 2025
PPTX
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
PDF
infoteam HELLAS company profile 2025 presentation
PDF
SOFTWARE ENGINEERING Software Engineering (3rd Edition) by K.K. Aggarwal & Yo...
PDF
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
PPTX
Python is a high-level, interpreted programming language
PDF
What Makes a Great Data Visualization Consulting Service.pdf
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PDF
BoxLang Dynamic AWS Lambda - Japan Edition
PDF
Internet Download Manager IDM Crack powerful download accelerator New Version...
PPTX
HackYourBrain__UtrechtJUG__11092025.pptx
PDF
PDF-XChange Editor Plus 10.7.0.398.0 Crack Free Download Latest 2025
PPTX
Bandicam Screen Recorder 8.2.1 Build 2529 Crack
Viber For Windows 25.7.1 Crack + Serial Keygen
CapCut PRO for PC Crack New Download (Fully Activated 2025)
Human-Computer Interaction for Lecture 2
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
MiniTool Power Data Recovery 12.6 Crack + Portable (Latest Version 2025)
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
Cloud Native Aachen Meetup - Aug 21, 2025
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
infoteam HELLAS company profile 2025 presentation
SOFTWARE ENGINEERING Software Engineering (3rd Edition) by K.K. Aggarwal & Yo...
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
Python is a high-level, interpreted programming language
What Makes a Great Data Visualization Consulting Service.pdf
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
BoxLang Dynamic AWS Lambda - Japan Edition
Internet Download Manager IDM Crack powerful download accelerator New Version...
HackYourBrain__UtrechtJUG__11092025.pptx
PDF-XChange Editor Plus 10.7.0.398.0 Crack Free Download Latest 2025
Bandicam Screen Recorder 8.2.1 Build 2529 Crack

6 global library function provided by open cart

  • 2. What this video series covers Making hello world module Workflow or markup to make hello world module -- Installing a module -- Configuration of module -- Managing layout and position -- Uninstalling the module Admin files created to make hello world module -- Controller creation -- Language file creation -- Template file creation Front end files created to make hello world -- Controller creation -- Language file creation -- Template file creation OpenCart Flow • Introduction • Why OpenCart? • Features of OpenCart • Prerequisites • Downloading example code • Installing OpenCart -Steps to create custom URL to work locally • Describing folders and files of OpenCart • OpenCart Framework: -Registry, loader, request, response, database, session , cache, unlimited colors theme, language, event, Event Register, Config Autoload, Language Autoload, Library Autoload, Model Autoload, Front Controller, Pre Actions, Dispatch and Output. • OpenCart Code flow • Request and Response in OpenCart • Database table schema • OpenCart Library Global Methods
  • 3. Namespace in OpenCart • A namespace is like a directory and by adding ‘namespace’, Affiliate is now under ‘Cart’. • To use ‘Affiliate’, we call or instantiate as new CartAffiliate() • Adding a ‘namespace’ to a class is like organizing files from one directory into a bunch of sub-directories. • The use statement lets us call class by a nickname.
  • 4. OpenCart Library Global Methods • Code only what you need, if you missed these global methods then you may repeat codes • You can find global methods at system/library • Opencart has many predefined methods that can be called in Controller and Model
  • 5. system/library/cart/affiliate.php • $this->affiliate->login($email, $password); • You can find code used at catalog/controller/affiliate/login.php validate() method. • Affiliate login script at system/library/cart/affiliate.php is used to provide the authentication for Affiliate section of OpenCart. Affiliate session is activated for affiliate_id, firstname, lastname, email, telephone, fax and code. • $this->affiliate->logout() • You can find code used at catalog/controller/affiliate/logout.php index() method. • Affiliate logout script at system/library/cart/affiliate.php is used to unset the affiliate session and assign empty value to affiliate_id, firstname, lastname, email, telephone and fax of Affiliate. By this Affiliate is logged out. Affiliate
  • 6. Affiliate contd. • $this->affiliate->isLogged() • You can find code used at catalog/controller/affiliate/account.php index() method. • Affiliate isLogged script at system/library/cart/affiliate.php is used to check whether affiliate_id is active or not. • $this->affiliate->getId() • You can find code used at catalog/model/affiliate/affiliate.php editAffiliate($data) method. • Affiliate getId script at system/library/cart/affiliate.php is used to return active affiliate_id.
  • 7. Affiliate contd. • $this->affiliate->getFirstName() • You can find code used at catalog/controller/affiliate/login.php index() method. • Affiliate getFirstName script at system/library/cart/affiliate.php is used to return active affiliate first name. • $this->affiliate->getLastName() • You can find code used at catalog/controller/affiliate/login.php index() method. • Affiliate getLastName script at system/library/cart/affiliate.php is used to return active affiliate last name.
  • 8. Affiliate contd. • $this->affiliate->getEmail() • You can find code used at catalog/controller/affiliate/edit.php validate() method. • Affiliate getEmail script at system/library/cart/affiliate.php is used to return active affiliate email. • $this->affiliate->getTelephone() • Not used in OpenCart but you can use it . • Affiliate getTelephone script at system/library/cart/affiliate.php is used to return active affiliate Telephone number.
  • 9. Affiliate contd. • $this->affiliate->getCode() • You can find code used at catalog/controller/affiliate/tracking.php index() method. • Affiliate getCode script at system/library/cart/affiliate.php is used to return active affiliate tracking code which is used to track referrals. • $this->affiliate->getFax() • Not used in OpenCart but you can use it . • Affiliate getFax script at system/library/cart/affiliate.php is used to return active affiliate Fax number.
  • 10. Other Global Methods • Cart • Currency • Customer • Length • Tax • User • Weight • Config • DB • Document • Encryption • Image • Language • Log • Mail • Openbay • Pagination • Request • Response • Session • Template • URL