Announcement

Collapse
No announcement yet.

Null variables not hiding

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

    Null variables not hiding

    I'm using a blockif to hide a variable if there's a null value. which works on most products, but not on others.

    If you go to http://000.artinet.co.uk/acatalog/On...mport_2_2.html and look at the first product, it shows Edition: 500, then the next couple of products have no edition number, so Edition: is hidden.

    If you go down to product ref. 10574 "B 61 Charlie" (sorry about the long page, it's still in rough import form, I still have to categorise everything!), you can see that it's normal, but the next product down shows Edition:, and so on down to product 10613 where it starts behaving itself again, then further down Edition: appears again!

    In between some of the products where it changes are some hidden products that are temporarily sold out - this must be relevant but I can't for the life of me think why - any ideas?

    Malcolm
    ¤ The world wide web needn't cost the earth
    ¤ ARTISAN INTERNET LTD
    ¤ www.artinet.co.uk

    #2
    Add some code to display your variable on the page (with delimeters around it so you can see if it's really empty or has spaces, etc in there).
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman
      Originally posted by NormanRouxel View Post
      Add some code to display your variable on the page (with delimeters around it so you can see if it's really empty or has spaces, etc in there).
      I'm using a custom variable (called ShowShipping) to display the edition number when it has been entered in the products properties, e.g. Edition: 500, and the blockif condition should hide Edition: if no number has been entered.

      The problem is that Edition: sometimes isn't hidden, although most times it is, with no apparent logic other than the proximity of hidden products seem to have a bearing on this. Madness!

      Malcolm
      ¤ The world wide web needn't cost the earth
      ¤ ARTISAN INTERNET LTD
      ¤ www.artinet.co.uk

      Comment


        #4
        My suggestion (above) would be to display the variable you're testing (before your existing code). This will let you see whether the problem is in the Variable or the Condition.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          I've located the cause of the problem, it's so simple - the import file had empty Edition fields for products with no edition number, but the import has created a space, therefore the Edition field is no longer empty! Removing the space removes the problem.

          Many thanks for your help, Norman, it's very much appreciated.

          Malcolm
          ¤ The world wide web needn't cost the earth
          ¤ ARTISAN INTERNET LTD
          ¤ www.artinet.co.uk

          Comment

          Working...
          X