Hi - again!
As the title says really,
I want to show a list of products, but only show the products that have got a custom field tickbox (with a tick in it).
For example - only show campsites that allow campfires.
Any ideas?
Products Module - only show products with custum field checkbox tick
-
- Forum Members
- Posts: 72
- Joined: Wed Apr 04, 2007 9:54 am
Re: Products Module - only show products with custum field checkbox tick
Use {get_template_vars} in your summary or hierarchy template to see what variables are available. To you in that mode. I think your checkbox should be there.
Then inside of your foreach loop you can do something like this:
That's a really rough draft on how to do it. But this could get you some great direction on where to go.
You can also check out Calguy's blog post on custom templating here: http://calguy1000.com/Blogs/12/60/basic ... kills.html
There is also good information here: http://forum.cmsmadesimple.org/index.ph ... 689.0.html
You can take the information from both articles and use it to work your way through your setup.
Then inside of your foreach loop you can do something like this:
Code: Select all
{if $checkboxVariable == "checkedValue}
Display product information
{/if}
You can also check out Calguy's blog post on custom templating here: http://calguy1000.com/Blogs/12/60/basic ... kills.html
There is also good information here: http://forum.cmsmadesimple.org/index.ph ... 689.0.html
You can take the information from both articles and use it to work your way through your setup.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
Re: Products Module - only show products with custum field checkbox tick
Could be easier if you set similar category "campfires"
Re: Products Module - only show products with custum field checkbox tick
That's actually a very good suggestion. It passed through my mind while I was responding and forgot to address it.
It will still allow for campfires to be selected with a checkbox and you can just the categorylist option to display all campsites that have that box checked.
It will still allow for campfires to be selected with a checkbox and you can just the categorylist option to display all campsites that have that box checked.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.