Jump to content

Edit History

menegonfabio

menegonfabio

Hello everybody!
I am new to Prestashop, and I must admit that I know very little about PHP.
I was asked to add a table on a product page in the subcategory. The categories are divided as follows: Home / Products / Boxes / Boxes model.
Now, I was able to add the table in the desired position by working in the Category.tpl file, but the problem that I encounter, and that I cannot solve, is that in addition to putting the table in the last subcategories, it also displays it in the sub-categories previous categories.
My request is: could someone help me in making sure that the table is displayed only in the last subcategory ???
I assume I have to do a condition with a foreach in the Category.php file, but besides not understanding how to do it, I'm not sure it's the right solution.
Thanks in advance for those who will answer.

 

PrestaShop Version: 1.7.7.5

PHP Version: 7.4.21

menegonfabio

menegonfabio

Hello everybody!
I am new to Prestashop, and I must admit that I know very little about PHP.
I was asked to add a table on a product page in the subcategory. The categories are divided as follows: Home / Products / Boxes / Boxes model.
Now, I was able to add the table in the desired position by working in the Category.tpl file, but the problem that I encounter, and that I cannot solve, is that in addition to putting the table in the last subcategories, it also displays it in the sub-categories previous categories.
My request is: could someone help me in making sure that the table is displayed only in the last subcategory ???
I assume I have to do a condition with a foreach in the Category.php file, but besides not understanding how to do it, I'm not sure it's the right solution.
Thanks in advance for those who will answer.

 

PrestaShop Version: 1.7.7.5

PHP Version: 7.4.21

menegonfabio

menegonfabio

Hello everybody!
I am new to Prestashop, and I must admit that I know very little about PHP.
I was asked to add a table on a product page in the subcategory. The categories are divided as follows: Home / Products / Cassettes / cassette model.
Now, I was able to add the table in the desired position by working in the Category.tpl file, but the problem that I encounter, and that I cannot solve, is that in addition to putting the table in the last subcategories, it also displays it in the sub-categories previous categories.
My request is: could someone help me in making sure that the table is displayed only in the last subcategory ???
I assume I have to do a condition with a foreach in the Category.php file, but besides not understanding how to do it, I'm not sure it's the right solution.
Thanks in advance for those who will answer.

×
×
  • Create New...