Page 1 of 1

HELP: Where is the template for fieldlist in Products?

Posted: Tue Sep 24, 2013 12:58 am
by inyerface
Created a new field list PRICE but it's not a dropdown and I don't know where the template is for fieldlist. Help

*Dropdown Options (applicable only for dropdown fields)

Select ---
Under 10
10 to 29.99
30 to 49.99
50 to 69.99
70 to 99.99
100 to 199.99
200 to 499.99
500 to 999.99
Over 1000

Re: HELP: Where is the template for fieldlist in Products?

Posted: Tue Sep 24, 2013 1:16 am
by inyerface
I can see the template is part of "categorylist" but how can I create a dropdown for each fieldlist?

Re: HELP: Where is the template for fieldlist in Products?

Posted: Mon Sep 30, 2013 2:24 am
by inyerface
Sorry to bump this but I really need help, paid or not.

Re: HELP: Where is the template for fieldlist in Products?

Posted: Tue Oct 01, 2013 2:18 am
by applejack

Code: Select all

{Products action='fieldlist' field='Price' sortby='f:Price sortorder='asc' categorylisttemplate='Drop-Downs'}
Drop-Downs template

Code: Select all

{foreach from=$categorylist item='obj'}
{if $obj->name != "Please Select"}
<option value="{$obj->name}">{$obj->name}</option>
{/if}
{/foreach}
This may have changed a bit as this is from an old version of Products.

Re: HELP: Where is the template for fieldlist in Products?

Posted: Tue Oct 01, 2013 2:26 am
by inyerface
Thanks applejack!!

I have the dropdown working using

Code: Select all

<select>
{foreach from=$categorylist item='obj'}
{if $obj->name != "Please Select"}
<option value="{$obj->name}">{$obj->name}</option>
{/if}
{/foreach}
</select>
But it won't reload the page on selection.

Re: HELP: Where is the template for fieldlist in Products?

Posted: Tue Oct 01, 2013 2:37 am
by applejack
It has to be part of a form to where you direct it to another page and then do further calls to get the results. Depends what you are trying to do with it?

Re: HELP: Where is the template for fieldlist in Products?

Posted: Tue Oct 01, 2013 2:40 am
by inyerface
Any suggestions? Can you get it to work? I'd rather not post in the help wanted since this is already created

Re: HELP: Where is the template for fieldlist in Products?

Posted: Tue Oct 01, 2013 11:35 am
by applejack
You need to explain what you are trying to do.

Re: HELP: Where is the template for fieldlist in Products?

Posted: Tue Oct 15, 2013 8:11 pm
by Dr.CSS
If you want the selected option to trigger something you may need some of these...

http://www.w3schools.com/tags/ref_eventattributes.asp

Re: HELP: Where is the template for fieldlist in Products?

Posted: Thu Oct 17, 2013 1:07 am
by inyerface
Thanks. The code below now works for filtering products but there are just a few things I can't quite figure out.

applejack, this is what I'm trying to do (attached). I want a dropdown/pulldown menu for filtering products by custom fieldlists. <select> with <option value="xxxx"> in this case {$obj->summary_url} worked fine.

Dr.CSS, thanks for the link that got me to this point at least :)

What's really want:
==================
1) The pulldowns to begin with "Select Option"
2) A "Go" button so you can filter the fist items list (because right now I can't)

Here's the code I used:

Code: Select all

<select onChange="location = this.options[this.selectedIndex].value;">

{foreach from=$categorylist item='obj'}
  {if $obj->name != "Please Select"}
    <option value="{$obj->summary_url}">{$obj->name ({$obj->count})</option>
  {/if}
{/foreach}

</select>

Re: HELP: Where is the template for fieldlist in Products?

Posted: Thu Oct 17, 2013 2:37 am
by applejack
Is this to filter products already loaded or to select and then load based upon which selection?

Re: HELP: Where is the template for fieldlist in Products?

Posted: Thu Oct 17, 2013 2:41 am
by inyerface
Hey applejack.. I'd say it's both?? Here's the smarty I'm using (below). Essentially when you select from a drop down it should filter the correct fieldlist.

Code: Select all

Shop by Color:

{Products action='fieldlist' field='color' categorylisttemplate='Drop-Downs'}

Shop by Price:

{Products action='fieldlist' field='price' categorylisttemplate='Drop-Downs'}

Re: HELP: Where is the template for fieldlist in Products?

Posted: Thu Oct 17, 2013 2:48 am
by applejack
It can't be both. URL would help.

Re: HELP: Where is the template for fieldlist in Products?

Posted: Thu Oct 17, 2013 3:00 am
by inyerface
I feel like the worst submitter of Forum posts... good point. Here's is the URL: http://treasureselite.com/products/

Re: HELP: Where is the template for fieldlist in Products?

Posted: Sun Aug 24, 2014 2:26 pm
by peterbisset
Did you guys ever come up with a solution to this in the end? I essentially want to filter products on a page based on one custom field. I have category pages with shoe types and want to have a dropdown with the custom field that I have created called size so that only results in a specific size are displayed.