Jump to content

Setting a Product Flag for a Category


Recommended Posts


I'm new to prestashop development.
I want to add new product flag for products from a certain category.

The theme I'm using used ApPageBuilder
Below is the listing from the "product_flags.tpl" 

I allready add a new Product Flag "BACK SOON"

I now want to add a new flag for products that are in a specific category.
In pseudo code 

      <li class="product-flag NEW-FLAG">NEW FLAG</li>

* @Module Name: AP Page Builder
* @Website: apollotheme.com - prestashop template provider
* @author Apollotheme <[email protected]>
* @copyright Apollotheme
* @description: ApPageBuilder is module help you can build content for your shop
<!-- @file modules\appagebuilder\views\templates\front\products\file_tpl aw -->
{block name='product_flags'}
<ul class="product-flags">
  {foreach from=$product.flags item=flag}
    <li class="product-flag {$flag.type}">{$flag.label}</li>
 {if $product.quantity_all_versions <= 0}
      <li class="product-flag out-of-stock">BACK SOON</li>

But I don't know what parameters I can acces from $PRODUCT.

Help is appreciated.

Best Regards,


Share this post

Link to post
Share on other sites

  • 6 months later...
  • 1 month later...


would you know how to always show the 'new' label (flag) in the product thumbnail?

Now it only shows on hover, I need to see it even earlier.


Thank you,

Best regards

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More