Follow the following steps to print last executed query in CakePHP2: To print last executed query: Add below code in app_model.php file which is located at root/cake/libs/model. public function getLastQuery() { Configure::write('debug', '2'); $dbo = $this->getDatasource(); $logs = $dbo->getLog(); $lastLog = end($logs['log']); return $lastLog['query']; } Add below line in your model where you want print […]
Author: Shivika Tomar
How to Send Copy of Order Confirmation Mail to Store Owner (Admin) in Opencart ?
In Opencart there is functionality to automate sending order email to admin which we send to the customer after placing an order. For Opencart 2.2 Follow the following steps to automate sending order emails to the admin: Open the admin panel and go to System -> Setting. On this page, you will see a store […]
Show all products when search is blank (Opencart 2.3.x)
Objectives of the blog After reading this blog you will be able to display all products when the search is blank. Problem Statement Currently in Opencart, when user search for any string using search functionality, then no products are returned if no search product found in database. We want to make it return all the […]
Get latest products without special prices (Opencart 2.3)
Objectives of the blog After reading this blog you will be able to fetch products from Opencart database on the basis of parameter which is passed from URL. Requirement We have to display latest products on the basis of passed parameter in the URL. Using this parameter we have to decide that whether we have […]
How to create SEO friendly URLs in Opencart 2.x ?
Introduction This document will give an idea about how to create SEO Friendly URLs in Opencart (version 2.x). Also will explain how to customize the Opencart function to create SEO URLs other than default pages (product page, category page etc.). This document will also explain how to 301 redirect URLs from old URL to new […]
Implementing Reactions Functionality Like Facebook using PHP, jQuery and HTML
Introduction Reactions are more expressive as compared to the simple like and dislike buttons. Using reactions the user can easily express their thought because emoticons are basically a way to show the emotions. On the other hand if we use like and dislike button then the user can not show the exact emotion. Using emoticons […]