Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

keeping the cPath in advanced search results


Recommended Posts

For the product info page i've set up automatic picture frames to wrap around the product image, this is dictated by the cPath, which is fine for navigating using links, but searching within the product search completely omits the cPath and consequently the wrong frame is displayed.


Does anyone know how to force it to put in the cPath for the relevant product?


I know the specific line is here:

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';


Even if i get rid of

($cPath ?'




it's not picking it up and just returns the following in the url for search results



I really need to return the cPath of the products in search results


Any help is greatly appreciated.



Link to comment
Share on other sites

1. You need to get the value (number) of the products category in the SQL in advanced_search_result.php

2. You need to amend includes/modules/product_listing.php to show the value.


Should be fairly straightforward.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...