Jump to content

Feature higlights TRUE/FALSE


xertog

Recommended Posts

Hi,

 

I want to make use of the new advanced slider orderform template. The products in a certain product category can have a true/false value for a feature. I would like to show this with an x or v symbol (fontaweome).

 

Currently the advanced slider does not see a difference between these two values, which is logical to mee because they are both text strings.

 

Does anyone in the community have experiences with TRUE/FALSE or YES/NO values other dan boolean (0/1) for comparison?

Link to comment
Share on other sites

as a basic example, if you wanted to replace a '0' feature value with a font awesome X, you could modify the following line in universalslider/products.tpl

 

<span>{$value}</span>

and change it to...

 

<span>{if $value eq "0"}<i class="fa fa-times"></i>{else}{$value}{/if}</span>

if you wanted to use TRUE and FALSE, you could use the following line...

 

<span>{if $value eq "FALSE"}<i class="fa fa-times"></i>{elseif $value eq "TRUE"}<i class="fa fa-check"></i>{else}{$value}{/if}</span>

that will show a cross for FALSE, a tick for TRUE or if neither, show the value.

 

xiVBF9u.png

Link to comment
Share on other sites

Hi Brian,

 

Thanks for your quick response. I was initially aiming for a solution without customizing the universal slider template but your posted solution should do the job and I will go for that route by creating a new order template based on the universal slider.

 

- - - Updated - - -

 

The reason why I would like to replace the 0 and 1 is to benefit from the progress bar which needs an integer in the value to work correctly. For the customer I want to represent true false with nice icons. The posted solution from Brian is a proper solution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated