“Preоrder available” Status for Products on Category Pages in Prestashop

“Preоrder available” Status for Products on Category Pages in Prestashop

In this article I will describe how to add the status “Preоrder available” to a category page  using the module Prestashop Pre-order and Waiting list. We are unable to include this feature into the module by default because older versions of Prestashop do not allow hooks for catalog pages. Also, we do not want to replace the product-list.tpl file completely as some other developers do because this has been proven a bad practice: quite often a template may contain certain modifications, so if you completely replace it this may cause problems with markup. I would also like to apologize that we did not include this chapter into the user guide, so some of our clients got confused when they did not see the status appear on the page as shown on the demo:

Preоrder available

Use the js-function “overrideButtonsInTheList” to place the status in a category page.

To make this feature work properly you need to edit the file product-list.tpl and insert the element with id=” belvg_pp_prоduсt_{id_prоduсt}” before the closing tag </li>

To display this status on the homepage there is the js-function “overrideButtonsInTheHome” in the module homefeatured.

This function resembles the previous one and for the proper functioning you need to edit the file themes/yоur_theme/modules/hоmefeаtured/hоmefeаtured.tpl. Add the element with id=“belvg_pp_product_{id_product}”:

Both files for the default theme are attached to this article.



Post a new comment

top