Magento Forum

   
if else problem in magento
 
bigil
Jr. Member
 
Total Posts:  17
Joined:  2011-07-01
 

i would like to write an if else statement in contact_form.html page

it’s path is app\locale\en_US\template\email\contact_form.html

i have written like this

{{if var data.bulk == ‘bulk’}}
<!--@subject Bulk orders@-->
{{else}}
<!--@subject Contact Form@-->

but it is not woking.

any one know the basic syntax of if else stament in magento, in html pages

i am a fresher in magento?

please help

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiefair
Mentor
 
Avatar
Total Posts:  1839
Joined:  2009-06-04
 

Depending on the computer language, if conditional blocks usually need a closing entry like endif or fi depending on the syntax you’re using, unless they’re composed with curly braces, etc enclosing the operations block carried out by the if test.

The template macro language works like this

{{if var data.bulk == ‘bulk’}}
    
<!--@subject Bulk orders@-->
{{else}}
    
<!--@subject Contact Form@--> 
{{/if}}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top