Announcement

Collapse
No announcement yet.

A section has no products in, can an automated message be shown?

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

    A section has no products in, can an automated message be shown?

    Hi,

    I basically have a section where products will eventually be, however at the minute no products are in this section.
    Instead of the boring blank u get in the middle, is it possible to display an automated message, or an image instead?

    Many thanks
    Barry
    Barry Hughes
    H.A Innovations
    www.hainnovations.co.uk

    #2
    I recall once seeing a message that no sections in this section type of message, only once mind you and could not repeat it, but an option might be to simply add a Fragment to the empty section, with details of what is to come, and then if you have a number of sections like this, then once you have created one with some default (non specific to the section) content, then copy 'n' paste it into the others - which seems the easiest solution to me.

    Comment


      #3
      Ok then. I will give that a go. Thanks alot
      Barry Hughes
      H.A Innovations
      www.hainnovations.co.uk

      Comment


        #4
        This can be automated quite easily. I'm a bit busy now but I'll post what you need tomorrow.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          It is very annoying for a customer to drill down to find an empty section. I would use the hide on website tick box and not upload the section at all.

          Although if you use the ideas above you could place a coming soon fragment as the text could be read and indexed by search engines thus your page will be ready to go when products are added.

          Then again adding a good fragment for SEO is just as time consuming as adding a couple of products

          Comment


            #6
            Here's my idea for displaying such a message.
            Code:
            Displaying a message if no products are in stock
            
            This works by detecting the anchor tags that are attached to products.  
            If none are found then an warning message is displayed.
            A dummy anchor is attached to the Section Link template so that you don't 
            get this warning on a page that only contains a list of child sections.
            
            INSTALLATION
            
            
            Edit your Child Section template(s) - usually Act_SectionLine.html and just above
            
            NETQUOTEVAR:NEXT
            
            insert the following
            
            <!-- dummy named anchor -->
            <a name="adummy"></a>
            
            
            Edit Act_ProductBody.html and right at the bottom add
            
            
            <script type="text/javascript">
            <!-- display message if no products in section
            var NoProducts = true;
            var df = document.getElementsByTagName('a');
            for ( var i=0; i < df.length; i++ ) 
              {
              if ( df[i].name.indexOf('a') == 0 )
                {
                NoProducts = false;
                break;
                }
              }
            if ( NoProducts )
              {
              document.write("<b>Sorry but we're temporarily out of stock of these items.</b>");
              }
            // -->
            </script>
            You can add extra document.write lines if you want a longer message. Don't use the double quote ( " ) character in these lines.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment

            Working...
            X