Our company constantly monitors the official Prestashop forum to be aware of the most common issues people face when using this system. And we see that a frequently asked question is how to create a custom sorting. So today we will show how to do this. At the end of the article you can download the ready-to-use module and customized tpl template product-sort.tpl. As an example we will add a new sorting for the field EAN13. (more…)
We continue pleasing our readers with new free modules. Following Background Switcher Free and Promotional Banner Free which have become super popular modules we are glad to introduce already a new one – Prestashop Category Info. The module has been developed as a consequence of certain requirements to one of our projects.
On the above picture you can see a block in the left-hand column, which contains the name of a category, the number of items in the current category and their price range.
The module’s configuration includes only selection of the column in which the block will be displayed.
The code of the module includes the following features:
- installConfiguration () //the function for setting configuration default values
- getTemplate($area, $file) //this is the way we use to set path to a tpl file
- getConfig($name) //a wrap for Configuration::get()
- setConfig($name, $value) //a wrap for Configuration:: updateValue ()
- displayCategoryInfo(&$return_html) //this functions converts the code of the module into html
- getModuleInfo($categoryObj) //this function calculates data for the module
- hookBackOfficeHome($params = array())
Used css files: modules/belvg_categoryinfo/css /belvg_categoryinfo.css
This is how the module layout looks in a standard theme:
We are really pleased to share our knowledge with the community and we hope that you will this module useful for you.