HELP: Where is the template for fieldlist in Products?
HELP: Where is the template for fieldlist in Products?
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
*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?
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?
Sorry to bump this but I really need help, paid or not.
Re: HELP: Where is the template for fieldlist in Products?
Code: Select all
{Products action='fieldlist' field='Price' sortby='f:Price sortorder='asc' categorylisttemplate='Drop-Downs'}
Code: Select all
{foreach from=$categorylist item='obj'}
{if $obj->name != "Please Select"}
<option value="{$obj->name}">{$obj->name}</option>
{/if}
{/foreach}
Re: HELP: Where is the template for fieldlist in Products?
Thanks applejack!!
I have the dropdown working using
But it won't reload the page on selection.
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>
Re: HELP: Where is the template for fieldlist in Products?
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?
Last edited by applejack on Tue Oct 01, 2013 2:40 am, edited 1 time in total.
Re: HELP: Where is the template for fieldlist in Products?
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?
You need to explain what you are trying to do.
Re: HELP: Where is the template for fieldlist in Products?
If you want the selected option to trigger something you may need some of these...
http://www.w3schools.com/tags/ref_eventattributes.asp
http://www.w3schools.com/tags/ref_eventattributes.asp
Re: HELP: Where is the template for fieldlist in Products?
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:
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>
- Attachments
-
- shopby.jpg (21.63 KiB) Viewed 4891 times
Re: HELP: Where is the template for fieldlist in Products?
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?
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?
It can't be both. URL would help.
Re: HELP: Where is the template for fieldlist in Products?
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?
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.