Jump to content

Phantom products


Recommended Posts

I am having a problem in 1.5.1 where each product category page is being populated with items called “Home” which, when clicked, link back to the product page. This also obscures the actual products from ever being displayed in the category.

 

Attached is an image demonstrating the issue. There should be one product (as is stated at the top) called Test which is not there.

 

Could someone please help me fix this?

 

Updated info:

I have traced the issue to these lines of code in the “product-list.tpl” file.

 

<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a>
</div>
<h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3>

 

I have also tracked down where the word “Home” is coming from. It appears that $product.name is returning the value from the presta database from table ps_cms_category_lang , id_cms_category: 1, name which is: Home

If I change the “name” value for the first record in that table, it changes the word displayed on all the phantom items.

 

Unfortunately I do not know enough about smarty and the way it is accessing the database to work out why it is displaying this way or fix the code.

post-407642-0-38085800-1349515173_thumb.png

Link to comment
Share on other sites

×
×
  • Create New...