SlideShare a Scribd company logo
1 of 12
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

What's hot

Choosing a Templating System
Choosing a Templating SystemChoosing a Templating System
Choosing a Templating SystemPerrin Harkins
 
Cakefest 2010: API Development
Cakefest 2010: API DevelopmentCakefest 2010: API Development
Cakefest 2010: API DevelopmentAndrew Curioso
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaJason Noble
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHPEric Johnson
 
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...Kunle Campbell
 
Zen and the Art of Claroline Module Development
Zen and the Art of Claroline Module DevelopmentZen and the Art of Claroline Module Development
Zen and the Art of Claroline Module DevelopmentClaroline
 
"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, TembooYandex
 
Bullet: The Functional PHP Micro-Framework
Bullet: The Functional PHP Micro-FrameworkBullet: The Functional PHP Micro-Framework
Bullet: The Functional PHP Micro-FrameworkVance Lucas
 
Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@
 Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@ Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@
Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@hujil454
 
PHP Server side restful API - linkedin
PHP Server side restful API - linkedinPHP Server side restful API - linkedin
PHP Server side restful API - linkedinVũ Quang Sơn
 
Introduction to HAML
Introduction to HAMLIntroduction to HAML
Introduction to HAMLJon Dean
 

What's hot (20)

jQuery Intro
jQuery IntrojQuery Intro
jQuery Intro
 
Choosing a Templating System
Choosing a Templating SystemChoosing a Templating System
Choosing a Templating System
 
Cakefest 2010: API Development
Cakefest 2010: API DevelopmentCakefest 2010: API Development
Cakefest 2010: API Development
 
Ph pbasics
Ph pbasicsPh pbasics
Ph pbasics
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp Atlanta
 
Plugins unplugged
Plugins unpluggedPlugins unplugged
Plugins unplugged
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
 
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
 
Debugging PHP Code
Debugging PHP CodeDebugging PHP Code
Debugging PHP Code
 
Zen and the Art of Claroline Module Development
Zen and the Art of Claroline Module DevelopmentZen and the Art of Claroline Module Development
Zen and the Art of Claroline Module Development
 
"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo
 
Bullet: The Functional PHP Micro-Framework
Bullet: The Functional PHP Micro-FrameworkBullet: The Functional PHP Micro-Framework
Bullet: The Functional PHP Micro-Framework
 
Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@
 Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@ Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@
Artisan Perfumery or Being Led by the Nose [P.D.F_book]@@
 
Dash of ajax
Dash of ajaxDash of ajax
Dash of ajax
 
ApacheCon 2005
ApacheCon 2005ApacheCon 2005
ApacheCon 2005
 
PHP Server side restful API - linkedin
PHP Server side restful API - linkedinPHP Server side restful API - linkedin
PHP Server side restful API - linkedin
 
HTML 5 Basics Part One
HTML 5 Basics Part OneHTML 5 Basics Part One
HTML 5 Basics Part One
 
Android - Values folder
Android - Values folderAndroid - Values folder
Android - Values folder
 
Introduction to HAML
Introduction to HAMLIntroduction to HAML
Introduction to HAML
 

Similar to 6 global library function provided by open cart

Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress developmentSteve Mortiboy
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2Sergii Shymko
 
MVCL pattern, web flow, code flow, request and response in OpenCart
MVCL pattern, web flow, code flow, request and response in OpenCartMVCL pattern, web flow, code flow, request and response in OpenCart
MVCL pattern, web flow, code flow, request and response in OpenCartSelf
 
Rails antipattern-public
Rails antipattern-publicRails antipattern-public
Rails antipattern-publicChul Ju Hong
 
Php Best Practices
Php Best PracticesPhp Best Practices
Php Best PracticesAnsar Ahmed
 
Php Best Practices
Php Best PracticesPhp Best Practices
Php Best PracticesAnsar Ahmed
 
Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3kidtangerine
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP frameworkDinh Pham
 
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkHanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkNguyen Duc Phu
 
Kohana 3.2 documentation
Kohana 3.2 documentationKohana 3.2 documentation
Kohana 3.2 documentationdmthuan1
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Applitools
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyLeslie Doherty
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3David Bisset
 
Ei cakephp
Ei cakephpEi cakephp
Ei cakephpeiei lay
 
LAB PHP Consolidated.ppt
LAB PHP Consolidated.pptLAB PHP Consolidated.ppt
LAB PHP Consolidated.pptYasirAhmad80
 

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

Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2
 
MVCL pattern, web flow, code flow, request and response in OpenCart
MVCL pattern, web flow, code flow, request and response in OpenCartMVCL pattern, web flow, code flow, request and response in OpenCart
MVCL pattern, web flow, code flow, request and response in OpenCart
 
Rails antipattern-public
Rails antipattern-publicRails antipattern-public
Rails antipattern-public
 
Php Best Practices
Php Best PracticesPhp Best Practices
Php Best Practices
 
Php Best Practices
Php Best PracticesPhp Best Practices
Php Best Practices
 
Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP framework
 
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkHanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
 
Kohana 3.2 documentation
Kohana 3.2 documentationKohana 3.2 documentation
Kohana 3.2 documentation
 
PHP Basic
PHP BasicPHP Basic
PHP Basic
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3
 
Ei cakephp
Ei cakephpEi cakephp
Ei cakephp
 
Cakeph pppt
Cakeph ppptCakeph pppt
Cakeph pppt
 
LAB PHP Consolidated.ppt
LAB PHP Consolidated.pptLAB PHP Consolidated.ppt
LAB PHP Consolidated.ppt
 

Recently uploaded

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

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
  • 11. https://www.packtpub.com/web-development/opencart-theming For Detail description read “OpenCart Theme and Module Development” book