Jump to content

[RESOLVED] Products List


menegonfabio

Recommended Posts

Hello everyone!!
Browsing my test shop in Prestashop, until yesterday, clicking on "All products" in the product showcase made me a list of all the products.
This morning, always clicking on "All products" makes me enter the "HOME" category but without any product list.
Would anyone know how to help me ?? Below I leave an image so as to better understand the situation.
Thanks in advance for who will answer.

PrestaShop version: 1.7.7.5

PHP version: 7.4.21

Immagine 2021-07-22 085026.png

Edited by menegonfabio (see edit history)
Link to comment
Share on other sites

Hello, 

Did you modify any template file like category.tpl or etc. from perfromance you can disable the cache and then check.

It looks some kind of modification is done in template when cache auto clear they render from original template.

 

You can enable the debug mode from Performance and check is their any error show or not

Thank you

Link to comment
Share on other sites

@SmartDataSoft

The only change I made was in the "Category-header.tpl" file, but that's not what gives me the problem.
I activated the debugger as recommended and doing the action that gives me problems gives me the error you see in the image below.
(Unfortunately I still don't have this knowledge from understanding something, by any chance would you be able to help me? I would be grateful)

 

Immagine 2021-07-22 error.png

Link to comment
Share on other sites

Hello, the error indicate that you try to access a value is is null . You need to check null value  line 35 of your  Category-header.tp

 

Null value handel will prevent this. So when value got they will work other wise not. 

{if !($array|is_empty)}
  Array is not empty
{else}
  Array is empty
{/if}

 

Thank you

Link to comment
Share on other sites

18 minuti fa, SmartDataSoft dice:

Si prega di utilizzare isset per la variabile poiché il livello 4 non viene sempre trovato

grazie

 

 

I put isset() to line variable 35, but it didn't solve, did I write wrong ??

 

{if isset($category.image.large.yrl)}

Link to comment
Share on other sites

3 minuti fa, SmartDataSoft dice:

Please use  for it.

 {if ! isset($category.level_depth)}

 

I think the issue will solved.

 

thank you

It is not solved, but if it hits the if loop I should replace it with a foreach loop, as the subcategories are not always 4, so I would like it to count the subcategories and when I reach the last one, print the table.
I would have asked in yesterday's discussion, but since it came out in this one, I take advantage of it.

But I've already tried doing a foreach loop, but it doesn't work for me

Link to comment
Share on other sites

5 hours ago, menegonfabio said:

Hello everyone!!
Browsing my test shop in Prestashop, until yesterday, clicking on "All products" in the product showcase made me a list of all the products.
This morning, always clicking on "All products" makes me enter the "HOME" category but without any product list.
Would anyone know how to help me ?? Below I leave an image so as to better understand the situation.
Thanks in advance for who will answer.

PrestaShop version: 1.7.7.5

PHP version: 7.4.21

Immagine 2021-07-22 085026.png

Il tuo PS non è compatibile con php 7.4, scendi al 7.3, pulisci la cache, compresa quella del browser.

Your PS is incompatible with php 7.4. 

Danny

Link to comment
Share on other sites

3 minutes ago, menegonfabio said:

@Danny

Fino a ieri andava, non ho cambiato ne versione di PS nè quella di PHP, come può di punto in bianco non andare bene la versione??

 

non vuol dire niente. Andava male. Al massimo con php e quella versione puoi arrivare alla 7.3 se no prima o poi ti saltano fuori problemi che poi non si capisce da dove arrivano. Attenzione non sto dicendo che il problema che hai sia strettamente collegato (può essere). Quello che ti sto dicendo è che non puoi stare con quella versione php. Poi vedi gli eventuali problemi che hai. Magari li risolvi, magari ti accorgi di altro. Quello che è sicuro è che conviene partire da una base pulita. Questo intendo. e con php 7.4 non lo è. https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

Danny

Link to comment
Share on other sites

  • menegonfabio changed the title to [RESOLVED] Products List

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