Jump to content

PS 1.7 Display Category Position number in the product-list.tpl


m3442a

Recommended Posts

Hello,

have a special category (ID 1) and always change the positions of the products positions manually in the BO. i would to Display the Position number in the product-list.tpl like Product 1 is in BO at Postion1 so = No.1 Product 2 is in BO at Postion2 so = 2, If i sort in the Backoffice the products then also want to change the numbers in the frontend. For detail: i would to see the sql entry from ps_category_products column position for this category only. I try in the frontend like this:

{if $product.id_category_default == '1'}
    <p class="ranking">{$product.id_product.position}</p>
{/if}

Category filter working ( the placeholder shows only in that category ) But the numbers not working, the smarty $product.id_product.position not working. is there another option how this possible?

Prestashop 1.7

thanks for help

Link to comment
Share on other sites

  • 2 years later...

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...