superman16 Posted September 21, 2016 Share Posted September 21, 2016 (edited) Im having issues with the following code {if $product.status eq 'Active'} <button type="submit" class="btn btn-info btn-sm">Login to Control Panel</button> {else} <p>No active login functions, please contact support</p> {/if} Dispite if the product/service has a status of Active or other, it still displays: <p>No active login functions, please contact support</p> What i want it to do is show the submit button if the product status is 'Active' else just display the above text. Can anyone help me with this one? Edited September 21, 2016 by superman16 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 21, 2016 Share Posted September 21, 2016 try... {if $product.status eq 'Active'} 0 Quote Link to comment Share on other sites More sharing options...
superman16 Posted September 21, 2016 Author Share Posted September 21, 2016 Nope that didnt work ether, tried that before posting here :-( 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 21, 2016 Share Posted September 21, 2016 is this clientareaproductdetails.tpl ? if so, have you tried using... {if $status eq 'Active'} 0 Quote Link to comment Share on other sites More sharing options...
superman16 Posted September 21, 2016 Author Share Posted September 21, 2016 Great that worked thanks! Now i would like to extend on it slightly {if $status eq 'Active'} <button type="submit" class="btn btn-info btn-sm">Login to Control Panel</button>{else} {if $status eq 'Pending'} <div class="alert alert-info"Your order is still pending for review. Please contact support if you have any questions.</div>{else} {if $status eq 'Suspended'} <div class="alert alert-error">No active login functions, Your service is currently suspended. Please contact support</div> {/if} 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 21, 2016 Share Posted September 21, 2016 the above should work (apart from the missing >), though personally i'd change it to use elseif... {if $status eq 'Active'} <button type="submit" class="btn btn-info btn-sm">Login to Control Panel</button> {elseif $status eq 'Pending'} <div class="alert alert-info">Your order is still pending for review. Please contact support if you have any questions.</div> {elseif $status eq 'Suspended'} <div class="alert alert-error">No active login functions, Your service is currently suspended. Please contact support</div> {/if} 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.