Announcement

Collapse
No announcement yet.

Variables

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

    Variables

    Hi,
    I have included a variable in products to display a low on stock message. This works fine to a point as set to appear when stock reaches a level of less than 2. Unfortunately it still remains when completely out of stock.
    Question: I have tried several expressions but without any luck.

    Can anyone help with an expression or work around that will hide the comment as soon as 0 stock is reached.

    As presently entered below.

    Thanks

    Mike

    <actinic:variable name="IsStockMonitored" /> AND (<actinic:variable name="StockLevel" /> < 2)

    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20AND%20%28%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%202%29" >
    <br/>Unfortunately this product is running low on stock. Please contact us to check availability.
    </actinic:block>

    #2
    A BlockIf does not work online dynamically, they are used at page build time offline and the page is then sent online. So to update a message fired by a BlockIf, you would need to upload the site again, the update would then be seen online. They are exclusively an offline feature.

    Comment


      #3
      Add another AND:
      Code:
      AND (<actinic:variable name="StockLevel" /> > 0)
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Variables

        Did my head in trying to sort that and you sorted the problem in seconds, so damn simple, why didn't I think of that? Fantastic, yessss!

        Thanks

        Mike

        Comment

        Working...
        X