| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
A-Z Dropdown Listings - Helpful Navigation | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
A-Z Dropdown Listings - Helpful Navigation
Ive been having problems with my search on my site not reutrning the correct results and therefore customers have been having trouble trying to find what they need. So i decided i needed a A-Z Dropdown menu which is accessible from all pages. Very much like a site map but in a drop down menu form.
LIVE Example: http://www.qvsdirect.com/home.php 1) Replace this part of the code in <x-cart_directory>/auth.php script: $smarty->assign("printable", $printable); $smarty->assign("logout_user", $logout_user); ?> with: Code:
2) Next open this template file <x-cart_directory>/skin1/customer/home.tpl and insert the JS code below after for example: { include file="meta.tpl" } <LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"> Code:
3) And finally add this new form to the same <x-cart_directory>/skin1/customer/home.tpl template file. Code:
If you are looking to take some of the catagories out of the A-Z list then find {foreach from=$sub item=s} <option value="home.php?cat={$s.categoryid}">{$s.category} </option> in home.tpl and replace with: {foreach from=$sub item=s} {if ($s.category ne "Catagory1") and ($s.category ne "Catagory2") and ($s.category ne "Catagory3") and ($s.category ne "Catagory4")} <option value="home.php?cat={$s.categoryid}">{$s.category} </option> {/if} Catagory 1, 2, 3, 4 represents the catagory names which it will take out of the list. You can have as many as you like in the list. just make sure the last catagory ends with )} like above. This works on 4.0.14 but im sure it will be fine for other versions. I would like if anyone maybe able to add ideas or further develop this. thanks
__________________
xcart version 4.1.6 UK - Brighton QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more. |
|||||||
#2
|
|||||||||
|
|||||||||
Re: A-Z Dropdown Listings - Helpful Navigation
Great mod - I've been looking for something like this.
Nice one, thanks.
__________________
X-Cart Gold | v 4.0.18 | Unix | php 4.3 | phpMyAdmin 2.8.0.3 | |
|||||||||
#3
|
|||||||
|
|||||||
Re: A-Z Dropdown Listings - Helpful Navigation
glad its helped
tested on 4.1.6 - works fine.
__________________
xcart version 4.1.6 UK - Brighton QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more. |
|||||||
#4
|
|||||||
|
|||||||
Re: A-Z Dropdown Listings - Helpful Navigation
THIS IS AMAZING! thanks!
its exactly what I was looking for, now I have 2 questions 1) how do I make the "manufacturers" list instead of "categories" 2) right now, after you select the category it goes back to "select category.." how do I make the "select category.." automatically change to display the current category or manufacturer after the selection is made? thank you very much, and I appreciate all youve done
__________________
Version 4.1.8 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: A-Z Dropdown Listings - Helpful Navigation
very nice mod. but there's a minor error with it. when the user selects a category from the drop down list, the category shows up as well as database errors. what is the fix to hide those database errors?
Code:
__________________
X-Cart Gold v4.4.4 Apache v2.2.20 PHP v5.3.8 MySQL v5.1.56-log Linux kernel v2.6.18-238.19.1.el5xen |
|||||||||
#6
|
|||||||
|
|||||||
Re: A-Z Dropdown Listings - Helpful Navigation
Thanks for the nice mod.
I have a question though. The original method only displays the main categories for me, which is kind of redundant since they are already displayed in the category box. Is there a way to list all of my subcategories as well or perhaps links to static pages? Thanks
__________________
version 4.4.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|