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)
-   -   Another advanced seach question (https://forum.x-cart.com/showthread.php?t=1486)

cyberactive 02-13-2003 04:04 AM

Another advanced seach question
 
Hello there!

I want to make a pulldown menu in the advanced search page.
This is not that difficult, but I want the pulldown to hold the contents of param03 of the products table.

What I've did so far:
Code:

<select name="Genre">
{section name=genre loop=$products}
<option value="{ $products[genre].param03}"{$products[genre].param03|escape}</option>
{/section}
</select>


But this won't work.
I just want the customer to search thru the available genres, stored in the param03 of the products table.....

Can someone help me out here?

Next I want an nice and userfriendly way of showing the products. Perhaps a customer can browse all products based on the selected genre and the selected platform? (i'm building an online platform game shop, you see)
Is that possible too?

vincentjiang 02-13-2003 05:07 PM

The $products is not availabe in the advance_search.tpl...you have to assign this variables from somewhere or passing it from somewhere....

cyberactive 02-14-2003 12:05 AM

Thanks Vince....it helped me a lot.

The above code was correct, but the $products was not available in the search.php

I've added the following to search.php
Code:

$products = func_query("select distinct param03 from $sql_tbl[products] where $sql_tbl[products].param03 <>'' order by $sql_tbl[products].param03 asc");

$smarty->assign("products",$products);

Right after the require lines.

vincentjiang 02-14-2003 09:07 AM

u welcome..... :)


All times are GMT -8. The time now is 10:47 PM.

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