Announcement

Collapse
No announcement yet.

Controlling portions of text in product description

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Controlling portions of text in product description

    I want to be able to have some additional text in some product descriptions - but not for all products - eg "Last order date for Christmas for this item is X" or "Special Offer buy 1 get 1 free" but I want the text for these messages to be a set size, colour etc.

    Is there anyway of controlling how certain bits of text appear without having to put the html code around it everytime?

    Kathy
    Kathy Newman

    #2
    custom variable (text), maybe?
    that way it'll only display on the products you fill it in on (IYSWIM)
    I'm a big fan of custom variables (stick a blockif around it so it only displays if it's not empty too, that way you won't get a blank space if you're not using it on some products)
    Tracey

    Comment


      #3
      you could do it with a single custom variable, and some blockifs.

      <phpblock>
      $myvariable = "actiniccustomvar";

      if ($myvariable=="xmas") {
      echo "Some text for a chrimbo offer w00t!";
      }

      if ($myvariable=="sale") {
      echo "A sale is happening!";
      }
      </phpblock>

      The reason I diddnt just put the message in the custom var, is that php allows you to have more text in there,and the possibility for html in the template, if required.

      Comment

      Working...
      X