Easy way to fix issue of multiple filters not working in Category page of OpenCart

Today, I came across an issue of multiple filters not working in category page of PHP shopping cart OpenCart. I had two filter groups Gender and Color. If I chose Female in Gender and Red in Color Filter, it used to display the products of other Colors too. If you happen to come across similar error here is an easy way to fix the issue of multiple filters not working in Category page of OpenCart.

To solve the issue you need to add a few query in the category.php file located at “catalog\controller\product” as shown in the screenshot below: Continue reading Easy way to fix issue of multiple filters not working in Category page of OpenCart

How to fix Methods with the same name as their class will not be constructors in a future version of PHP

In the latest version of PHP 7 you will face an error message as Methods with the same name as their class will not be constructors in a future version of PHP. So, this post is about how to fix Methods with the same name as their class will not be constructors in a future version of PHP.

How to fix Methods with the same name as their class will not be constructors in a future version of PHP
how to fix methods with same name as their class will not be constructors future version of php

Earlier version of PHP supports below codes

As PHP 7 does not support a simple tweak will fix this issue. To fix the issue you just need to add a constructor function as below
class foo
{
public function __construct()
{
echo ‘I am the constructor’;// same as earlier
}

public function foo()
{
echo ‘I am the constructor’;
}
}