HELP: Where is the template for fieldlist in Products?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

HELP: Where is the template for fieldlist in Products?

Post 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
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

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

Post by inyerface »

I can see the template is part of "categorylist" but how can I create a dropdown for each fieldlist?
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

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

Post by inyerface »

Sorry to bump this but I really need help, paid or not.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

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

Post 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.
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

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

Post 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.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

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

Post 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?
Last edited by applejack on Tue Oct 01, 2013 2:40 am, edited 1 time in total.
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

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

Post by inyerface »

Any suggestions? Can you get it to work? I'd rather not post in the help wanted since this is already created
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

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

Post by applejack »

You need to explain what you are trying to do.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

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

Post 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
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

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

Post 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>
Attachments
shopby.jpg
shopby.jpg (21.63 KiB) Viewed 4891 times
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

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

Post by applejack »

Is this to filter products already loaded or to select and then load based upon which selection?
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

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

Post 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'}
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

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

Post by applejack »

It can't be both. URL would help.
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

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

Post by inyerface »

I feel like the worst submitter of Forum posts... good point. Here's is the URL: http://treasureselite.com/products/
peterbisset

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

Post 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.
Post Reply

Return to “Modules/Add-Ons”