Abhicool Posted January 30, 2019 Share Posted January 30, 2019 Hello, I have tried to remove billing address custom fields based on product ids. As I have some free products which I don't want the user to fill the address, pin code, phone number and etc. As I know if I keep them to "hidden" and change all the values to "NA" but that's not the feasible solution. What I'm trying to do is hiding fields based on the total amount due, as the free product has "0" amount and if anything more than will show the fields. But I'm not able to get the desired result. Please help me {if $LANG.ordertotalduetoday eq "0"} <div class="form-group-noconflict"> <label for="inputState" class="col-lg-4 col-sm-3 control-label">{$LANG.clientareastate}</label> <div class="col-sm-6"> <input class="form-control" type="hidden" name="state" id="inputState" placeholder="{$LANG.orderForm.state}" value="NA"{if $loggedin} readonly="readonly"{/if}> </div> </div> {else $LANG.ordertotalduetoday > "0"} <div class="form-group-noconflict"> <label for="inputState" class="col-lg-4 col-sm-3 control-label">{$LANG.clientareastate}</label> <div class="col-sm-6"> <input class="form-control" type="text" name="state" id="inputState" placeholder="{$LANG.orderForm.state}" value="{$clientsdetails.state}"{if $loggedin} readonly="readonly"{/if}> </div> </div> {/if} 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 2, 2019 Share Posted February 2, 2019 if you're going to do it in the template like that, it should be... {if $total->toNumeric() eq 0} ... {elseif $total->toNumeric() gt 0} ... {/if} 0 Quote Link to comment Share on other sites More sharing options...
Abhicool Posted February 13, 2019 Author Share Posted February 13, 2019 On 2/2/2019 at 5:33 PM, brian! said: {if $total->toNumeric() eq 0} ... {elseif $total->toNumeric() gt 0} ... {/if} Thanks a lot brian just what I needed. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.