| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Add Related Category's Icon to SmartSearch results | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Add Related Category's Icon to SmartSearch results
I'm trying to modify SmartSearch to display a grid layout of related categories with their respective category icon.
I've figured out what file to edit: /common_files/modules/Smart_Search/smart_search.tpl and where to put the code: below Code:
But I don't know how to get the url for the category icon. I tried this code that I found in /common_files/customer/main/subcategories_t.tpl Code:
Any help would be much appreciated! Once I figure it out, I'll post what I've done. I feel this is a superior way to display the related categories as most people's eyes are drawn to images rather than text. THANKS!
__________________
X-Cart 4.4.5 PHP 5.3.14-1 MySQL 5.0.51 Linux + Apache Mods: AlteredCart SmartSearch w/ AJAX Predictive Search w/ Extras Add-On v2, BuyTogether, Checkout One, OnSale ********* PowerFilter WebsiteCM CDSEOPro Phpmagicscripts Reviews-Controller CFL Systems Products Page Layout, System Messages mod Custom work by CFLSystems Custom work by us |
|||||||
#2
|
|||||||
|
|||||||
Re: Add Related Category's Icon to SmartSearch results
OK, so nobody has an answer to this, but how about a simple question:
How do you get a category's Icon (image) only from the CategoryID? The smartSearch PHP file "_searcy.php" already includes common.php, which sounds to me like where the category functions are supposed to be, but the {get_category_image_url category=????} doesn't seem to work. Is there some other file I need to include?
__________________
X-Cart 4.4.5 PHP 5.3.14-1 MySQL 5.0.51 Linux + Apache Mods: AlteredCart SmartSearch w/ AJAX Predictive Search w/ Extras Add-On v2, BuyTogether, Checkout One, OnSale ********* PowerFilter WebsiteCM CDSEOPro Phpmagicscripts Reviews-Controller CFL Systems Products Page Layout, System Messages mod Custom work by CFLSystems Custom work by us |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Add Related Category's Icon to SmartSearch results
SmartSearch is not a module supplied with XC by default. It is a paid one. You could get answers only from those who are using it.
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#4
|
|||||||
|
|||||||
Re: Add Related Category's Icon to SmartSearch results
ADDISON, thanks for the reply. I know it's not a stock X-Cart module, but I figured there would be enough people on this forum that have used and/or modified the SmartSearch mod that might be able to help. I refuse to give up hope!
THANKS!
__________________
X-Cart 4.4.5 PHP 5.3.14-1 MySQL 5.0.51 Linux + Apache Mods: AlteredCart SmartSearch w/ AJAX Predictive Search w/ Extras Add-On v2, BuyTogether, Checkout One, OnSale ********* PowerFilter WebsiteCM CDSEOPro Phpmagicscripts Reviews-Controller CFL Systems Products Page Layout, System Messages mod Custom work by CFLSystems Custom work by us |
|||||||
#5
|
|||||||
|
|||||||
Re: Add Related Category's Icon to SmartSearch results
OK. Figured it out. Really not that hard.
Within the section that starts Code:
Change Code:
to Code:
Now, I also got rid of the <ul> and made it a grid format copying section info from the manufacturer_categories template.
__________________
X-Cart 4.4.5 PHP 5.3.14-1 MySQL 5.0.51 Linux + Apache Mods: AlteredCart SmartSearch w/ AJAX Predictive Search w/ Extras Add-On v2, BuyTogether, Checkout One, OnSale ********* PowerFilter WebsiteCM CDSEOPro Phpmagicscripts Reviews-Controller CFL Systems Products Page Layout, System Messages mod Custom work by CFLSystems Custom work by us |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Add Related Category's Icon to SmartSearch results
Nice!
If you are storing images in the filesystem (recommended) then try to avoid using image.php as enough requests like that on a busy page could cause server load to go up. Instead, try to find a way to reference the actual image path. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|