Book Image

Getting Started with OpenCart Module Development

By : Rupak Nepali
Book Image

Getting Started with OpenCart Module Development

By: Rupak Nepali

Overview of this book

OpenCart is an online shopping tool which is free to use. It has become widely popular because of its support for custom extensions and module development. This book helps you understand how to use the features available in OpenCart using step-by-step instructions. Getting Started with OpenCart Module Development gives you step-by-step explanations and illustrations on how to clone, customize, and develop modules and pages with OpenCart. This book shows you how to create custom OpenCart modules and pages which are needed as per the requirements of the clients to manage custom data. It describes each and every code used to make a Hello World module, a feedback module, a tips module, an order total module, and a shipping and payment module. The book covers installing, configuring, and uninstalling modules as well as how to clone them. It also discusses all the available Global Library methods of OpenCart as well as ways to handle the files and folders of a shipping and payment module. At the end of the book, you will learn how to make custom pages to manage data by creating a feedback module and how to create the order total using a tips module. In Getting Started with OpenCart Module Development, you will learn everything you need to know to create custom OpenCart modules.
Table of Contents (10 chapters)

The Payment module


Any module can be made by cloning an existing module with similar functionality as it will make coding very easy and fast. You can view the list of Payment modules by navigating to Admin | Extensions | Payments.

Now you can also make the Payment module similar to the Shipping module. While making the Payment module, we have to work out in the Payment folder.

Before starting to write a payment module, you need to know the on-site payment and off-site payment, which are the broad categories of the payment methods.

Off-site payment

Off-site payment means making payment to the payment service by redirecting to the payment service website and making the transaction; upon success or failure, they are returned back to the relevant pages. If payment is successful, it shows the success page, else it will show the failure message.

Some of the off-site payment modules are: PayPal Standard, Moneybookers, LiqPay, PayPoint, and so on.

If you are using the off-site payment, choose one of the...