Forums / Setup & design / [SOLVED] Hide the dropdown menu if no multi-option is set
Christophe Bourcier
Monday 20 July 2009 9:21:39 am
Hi,
I'm using ezwebin to build an e-commerce solution.
Some products don't have any option, so I enter nothing in the multi-option field.
But on the product page I have a ":" and a blank dropdown menu.
The template I should modify is extension/ezwebin/design/ezwebin/override/templates/full/product.tpl
But I don't see which condition to use. I have tried:
{if $node.data_map.additional_options.has_content} <div class="attribute-multi-options"> {attribute_view_gui attribute=$node.object.data_map.additional_options} </div> {/if}
but it doesn't work.
Any ideas?
Thanks.
Jean-Luc Nguyen
Monday 20 July 2009 9:24:58 am
Hello,
1. Try to activate debug in the frontend and check List of used templates.The default additional options should use its own datatype template.
2.Instead of
{if $node.data_map.additional_options.has_content}
Try
{if $node.data_map.additional_options|count}
Hope this will help.
http://www.acidre.com
Monday 20 July 2009 9:38:36 am
Thank you for your quick reply.
The debug mode told me to look at extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezmultioption.tpl
I added {if $multioptions.name} before <label>{$multioptions.name}:</label> and {/if} after <select> and it worked.
Thanks again.