| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
displaying category in search results | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
displaying category in search results
I'd like to make it so when someone does a search the results display the category for each product. We sell dvd and vhs so a search result could have the exact same title so it would be nice if the category was displayed also. I was able to make it show up in the category listing page pretty easily, but it doesn't work for the search results page. Any help would be appriciated.
thanks Ryan |
|||||||
#2
|
|||||||
|
|||||||
i'd like that aswell
|
|||||||
#3
|
|||||||
|
|||||||
ok, just figured it out....
add this line : {$products[product].category | escape} ie. in /customer/main/products.tpl <font class=TableCenterProductTitleBlack>{$lng.lbl_categ ory}: {$products[product].category | escape}</font> <font class=TableCenterProductTitleOrange>{$lng.lbl_our_ price}: {include file="currency.tpl" value=$products[product].price}</font> |
|||||||
#4
|
|||||||
|
|||||||
just found that if you have featured products then it doesn't display the category and leaves it blank which doesn't look good, you can remove the category txt if their isn't a category for the item ie. featured products, using the if command
eg. {if $products[product].category ne ""}<font class=TableCenterProductTitleBlack> {$lng.lbl_category}: {$products[product].category | escape}</font> {/if} Hope this helps ya. |
|||||||
#5
|
|||||||
|
|||||||
Good job!
thanks |
|||||||
#6
|
|||||||
|
|||||||
no problem
|
|||||||
#7
|
|||||||
|
|||||||
Re: displaying category in search results
Hmmm... I just tried this and it didn't work. I'm using version 4.1.3. I tried adding {$products[product].category | escape} to customer/main/products.tpl and nothing is displayed.
Also, is there a way to show the category breadcrumbs for each result. For instance: Main Category > Sub Cat 1 > Sub Sub Cat 10 Thanks! Ian
__________________
--------------------------- http://www.internetsimplicity.net Effective Web Solutions x-cart version: 4.0.12 |
|||||||
#8
|
|||||||
|
|||||||
Re: displaying category in search results
I'd like to know the answer as well, since the abovementioned code doesn't work for me either.
Thanks
__________________
v???? |
|||||||
#9
|
|||||||
|
|||||||
Re: displaying category in search results
Anybody?
__________________
--------------------------- http://www.internetsimplicity.net Effective Web Solutions x-cart version: 4.0.12 |
|||||||
#10
|
|||||||
|
|||||||
Re: displaying category in search results
We received the answer below.
>> I have examined your cart and fixed the problem. The thing was that the "skins/default/en/main.tpl" file was modified a bit incorrectly. The case-sensitive parameter "showLocationPath" was renamed to "showlocationpath". As a result, the flag to display location path was not passed to the necessary template. << Check your tpl. Perhaps you have the same typo there...
__________________
v???? |
|||||||
|
|||
X-Cart forums © 2001-2020
|