X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Category sensitive search and menu bars (https://forum.x-cart.com/showthread.php?t=5328)

issay 11-24-2003 12:45 PM

Category sensitive search and menu bars
 
Is it possible to have a category sensitive search feature? Eg. when customer is in Computer>Hardware>Storage, a search box is to be available which has already selected the subcategory Storage. Customer's search will be restricted to this category by default.

And also, is it possible to change the vertical menu bars on both sides of the screen depedending on the category customer is currently in? What are the files needed to modify this?

issay 12-01-2003 12:03 AM

I have been able to do category sensitive search using the following codes in a new .tpl file and then include this file in the customer/subcategories.tpl file. Additional categories can be included in the list...
Code:

<form action="search.php" name="productsearchbyprice_form">
<font color="#000000" size="2">Search in</font>
<select name="in_category">
{section name=cat_num}
<option value="{ $current_category.categoryid}">{$current_category.category|regex_replace:"/.*\//":""}</option>

{/section}
{if $current_category.categoryid ne 6}
<option value=6>Bargain Center</option>
{/if}
<option value="">All Categories</option>
</select>
<font color="#000000" size="2">for</font>
<input type="text" name="substring" size="20" value="{$smarty.get.substring}">

{include file="buttons/search.tpl"}
</form>


check http://www.shopping.com.mv/mall for a demo. Select subcategories and the search category changes.... Hope this is of use to someone... Thanks


All times are GMT -8. The time now is 04:26 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.