Announcement

Collapse
No announcement yet.

Showing Stock Status (not levels)

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

    Showing Stock Status (not levels)

    I have been looking at ways to allow pre orders of products that are out of stock and also show customers a stock status (not stock level EG: 4 in stock) so for example if i have an item which has plenty of stock simply display In Stock, if i have an item which is down to 1 in stock i wanted display Limited Stock and if the product was out of stock display Out of Stock etc etc.

    what i did was add the following code:

    Code:
             
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%200" >
    </br>Availabilty: In Stock
    </actinic:block>
             
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%3d%20%3cactinic%3avariable%20name%3d%22StockWarningLevel%22%20%2f%3e" >
    </br>Availabilty: In Stock
    </actinic:block>
    
    <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%200%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%20%3cactinic%3avariable%20name%3d%22StockWarningLevel%22%20%2f%3e">
    		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%3d%200" >
    <br/>Availabilty: Limited Stock
    		</actinic:block>
    </actinic:block>
    
    <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%200%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e">
    		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e">
    <br/>Availabilty: Pre Order</font>
    		</actinic:block>
    </actinic:block> 
    		
    <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%200%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e" >
    		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e" >
    <br/>Availabilty: Out of Stock
    		</actinic:block>
    </actinic:block>
    Basically it works like this:

    If stock is not monitored it will simply display: Availability: In Stock

    If stock is monitored and the stock level is greater than warn if below level display: Availability: In Stock

    If stock is monitored and stock level is less than the warn level but greater than the suspend level and at least 1 in stock display: Availability: Limited Stock

    If stock is monitored and and stock level greater than suspend level equal to or less than 0 display: Availability: Pre Order

    If stock is monitored and stock level less than or equal to suspend level display: Out of stock


    My thoughts here were during busier times such as Christmas and we are out of stock of a product but know stock is arriving and how many I can set the suspend level to the quantity I know is coming and effectively take pre-orders instead of potentially loosing a sale, I can also limit the times when we have 1 in stock, 2 people order and i have to call/email a customer with the unexpected bad news albeit i still have to call/email them at least they have had a warning that the item was limited stock.

    I then thought wouldn't it be good if i could expand this so if items are out of stock allow ordering but also display a stock due date and instead of an add to cart button change the button to a pre order button to try and limit the confusion for customers ordering the product and make them very aware they are pre-ordering the product.

    Rather than waffle on more (as i'm sure a few of you are on your third flask of coffee by now anyway) and go through the relatively simple changes i made to do this i'll see if there is any interest in the above stock status tweak and if anyone is then interested in adding a pre order button and a stock due date before i add the details of what i did to achieve them both.

    #2
    A very useful contribution Adrian. I have made a few adjustments to mine to display a lead time before shipment by creating a product variable, instead of displaying "Out of stock". This information is more useful to customers and it may prevent some from going elsewhere.
    John Legg
    The Debug Store

    sigpic
    http://www.TheDebugStore.com

    Comment


      #3
      Originally posted by Ginnys Attic View Post
      I have been looking at ways to allow pre orders of products that are out of stock and also show customers a stock status (not stock level EG: 4 in stock) so for example if i have an item which has plenty of stock simply display In Stock, if i have an item which is down to 1 in stock i wanted display Limited Stock and if the product was out of stock display Out of Stock etc etc.

      what i did was add the following code:

      Code:
               
      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%200" >
      </br>Availabilty: In Stock
      </actinic:block>
               
      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%3d%20%3cactinic%3avariable%20name%3d%22StockWarningLevel%22%20%2f%3e" >
      </br>Availabilty: In Stock
      </actinic:block>
      
      <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%200%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%20%3cactinic%3avariable%20name%3d%22StockWarningLevel%22%20%2f%3e">
      		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%3d%200" >
      <br/>Availabilty: Limited Stock
      		</actinic:block>
      </actinic:block>
      
      <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%200%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e">
      		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e">
      <br/>Availabilty: Pre Order</font>
      		</actinic:block>
      </actinic:block> 
      		
      <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%200%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e" >
      		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e" >
      <br/>Availabilty: Out of Stock
      		</actinic:block>
      </actinic:block>
      Basically it works like this:

      If stock is not monitored it will simply display: Availability: In Stock

      If stock is monitored and the stock level is greater than warn if below level display: Availability: In Stock

      If stock is monitored and stock level is less than the warn level but greater than the suspend level and at least 1 in stock display: Availability: Limited Stock

      If stock is monitored and and stock level greater than suspend level equal to or less than 0 display: Availability: Pre Order

      If stock is monitored and stock level less than or equal to suspend level display: Out of stock


      My thoughts here were during busier times such as Christmas and we are out of stock of a product but know stock is arriving and how many I can set the suspend level to the quantity I know is coming and effectively take pre-orders instead of potentially loosing a sale, I can also limit the times when we have 1 in stock, 2 people order and i have to call/email a customer with the unexpected bad news albeit i still have to call/email them at least they have had a warning that the item was limited stock.

      I then thought wouldn't it be good if i could expand this so if items are out of stock allow ordering but also display a stock due date and instead of an add to cart button change the button to a pre order button to try and limit the confusion for customers ordering the product and make them very aware they are pre-ordering the product.

      Rather than waffle on more (as i'm sure a few of you are on your third flask of coffee by now anyway) and go through the relatively simple changes i made to do this i'll see if there is any interest in the above stock status tweak and if anyone is then interested in adding a pre order button and a stock due date before i add the details of what i did to achieve them both.
      Good evening.
      I spotted your post, and have attempted to place your code into my website, but i'm not very good technically with html. Can you tell me exactly how and where to put this code, as it would be ideal for my store? Do i paste all or just one at a time? Thanks.

      Comment


        #4
        Neil, go to the design tab and click on the text or image roughly near where you want it and paste in the code. See what happens. You can always cut the code back out and try it again somewhere else, also you should be able to do ctrl z to undo. And if you want peace of mind do a backup before you start playing around
        "If my answers frighten you then you should cease asking scary questions"

        Comment


          #5
          If you're copying direct from here, paste it into notepad or similar first and then into actinic.

          Sometimes actinic won't pick up the variable correctly if you paste straight into the layout.

          Army Gore-tex
          Winter Climbing Mitts
          webD's Blog: Website design, SEO and other ramblings…
          Twitter LinkedIN

          If you think a post is good, rate it!

          Find the answers in the Knowledge Base | Have you read the User Guides

          Comment


            #6
            Originally posted by johngwms View Post
            A very useful contribution Adrian. I have made a few adjustments to mine to display a lead time before shipment by creating a product variable, instead of displaying "Out of stock". This information is more useful to customers and it may prevent some from going elsewhere.
            I use a second variable which i call stock date to display the eta of out of stock products which we have on order and what i have also done is if a product is out of stock but has a stock date that the buy now button becomes a pre-order button which allows people to still make a purchse and gives them all the necessary details of when the product should arrive.

            Basically all i do is set the custom stock date variable with the estimated arrival date and then set the suspend orders if below to the number of the products which i have on order so if i have 10 coming i simply set the suspend level to -10. Its throughout the year not the most necessary or important feature throughout the year but when it comes to September, October, November and December essential as it allows us to continue to take orders for goods which we know will be arriving and have on pre-order with our suppliers.

            Comment


              #7
              This is great and just what I was looking for, Is there a way to use images I have made for "in stock" " out of stock" instead of the plain text? This would be great!

              Comment


                #8
                Yes there is a way.
                Look up the 'html <img...>' tag on Google and use that instead of the text.
                "If my answers frighten you then you should cease asking scary questions"

                Comment


                  #9
                  Small problemo,

                  Here is how my products look using the code above

                  http://www.digi-com.co.uk/acatalog/O...e_Audio_2.html

                  The products showing BLANK / no buttons are out of stock, Why is it not showing my out of stock button on this section page? Any help on this appreciated

                  Anthony

                  Comment


                    #10
                    presumably whatever code you're using is set to hide the 'add to cart' button when a product is out of stock and so as you're using that condition (isinstock, perhaps?) to dictate when your/which buttons show, it's hiding that too.

                    Without seeing your WHOLE code, it's hard to say.
                    Tracey

                    Comment


                      #11
                      Originally posted by TraceyHand View Post
                      presumably whatever code you're using is set to hide the 'add to cart' button when a product is out of stock and so as you're using that condition (isinstock, perhaps?) to dictate when your/which buttons show, it's hiding that too.

                      Without seeing your WHOLE code, it's hard to say.

                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductFormUsed%22%20%2f%3e">
                      <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />">
                      <input type="hidden" name="SID" value="<Actinic:Variable Name="SectionID"/>" />
                      <input type="hidden" name="PAGE" value="PRODUCT" />
                      <input type="hidden" name="PAGEFILENAME" value="<actinic:variable name="SectionPageName" />" />
                      <Actinic:SECTION BLOB='<Actinic:Variable Name="SectionCatFile"/>'/>
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
                      <!-- Hidden field when in trial mode -->
                      <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />
                      </actinic:block>
                      </actinic:block>

                      <div class="product_list">
                      <div class="image_product"><a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self"><img alt="<actinic:variable name="SectionName" encoding="strip"/>" src="<actinic:variable Name="SectionImageFileName"/>" border="0" /></a></div>
                      <div style="float: right;">
                      <actinic:block type="ProductList" >
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductType%22%20%2f%3e%20%21%3d%202" >
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsAddToCartButtonShown%22%20%2f%3e%20AND%20%0d%28%3cactinic%3avariable%20name%3d%22NumberAttributesInPushButtonGrid%22%20%2f%3e%20%3d%3d%200%29" >
                      <actinic:variable name="AttributeList" />
                      <actinic:variable name="ComponentList" />
                      <actinic:variable name="AddToCartButton" />
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%200" >
                      <img src="instock.gif" alt="Item Is In Stock" /></br>
                      </actinic:block>

                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%3d%20%3cactinic%3avariable%20name%3d%22StockWarningLevel%22%20%2f%3e" >
                      <img src="instock.gif" alt="Item Is In Stock" /></br>
                      </actinic:block>

                      <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%200%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%20%3cactinic%3avariable%20name%3d%22StockWarningLevel%22%20%2f%3e">
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3e%3d%200" >
                      <img src="limstock.gif" alt="Less Than 5 Is Stock" /></br>
                      </actinic:block>
                      </actinic:block>

                      <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%200%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e" >
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e%20%3d%3d%201%20AND%20%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e" >
                      <img src="outstock.gif" alt="Item Is Out Of Stock" /></br>
                      </actinic:block>
                      </actinic:block>

                      </br>
                      <a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self"><img src="info123.gif" alt="More Info" /></a><br>
                      </actinic:block>
                      </actinic:block>
                      </div>
                      <actinic:block php="true" >
                      $sShort = "";
                      $nCount = 0;
                      $sOriginal = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />';
                      foreach(explode(" ", $sOriginal) as $sWord)
                      {
                      if ($nCount > 10)
                      {
                      $sShort .= "...";
                      break;
                      }
                      $sShort .= $sWord . " ";
                      $nCount++;
                      }
                      echo $sShort;
                      </actinic:block>
                      <br/>
                      <br/>
                      <span class="actrequired"><Actinic:Variable Name="QuantityPrompt"/></span>
                      <input type="text" name="Q_<Actinic:Variable Name="ProductID"/>" size="4" value="<Actinic:Variable Name="DefaultQuantity"/>" class="form_input_general" />
                      </div>
                      <div>
                      <div class="section_link_footer"><div style="float:left"><a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self"><span><actinic:variable name='SectionName'/></span></a></div>
                      <div align="right"><actinic:block type="PriceList" ><actinic:variable name="PriceLayout" /></div>
                      </actinic:block>
                      </div>
                      </div>
                      </actinic:block>

                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductFormUsed%22%20%2f%3e">
                      </form>
                      </actinic:block>
                      Thanks In advance.

                      Comment


                        #12
                        Is it possible that this block:

                        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsAddToCartButtonShown%22%20%2f%3e%20AND%20%0d%28%3cactinic%3avariable%20name%3d%22NumberAttributesInPushButtonGrid%22%20%2f%3e%20%3d%3d%200%29" >

                        is encapsultaing all the code for showing your images and so none of them show when the product is Out of Stock? I'm not sure if a stock level of 0 automatically sets the IsAddtoCartButtonShown flag to false....
                        ActiveStock
                        On-line, real-time stock control plug-in for Actinic V7, V8 and V9
                        **New - Captcha plug-in for your Contact Us form**

                        ActiveStock website
                        Free 30 Day Trial
                        ActiveStock Blog (including a new tutorial on a 'Sort By' function for long section pages)

                        Comment


                          #13
                          what can I do to get around this? is it possible?

                          Comment


                            #14
                            I'd simply try removing that block, since you are controlling the display of the Add to Cart / Out of Stock images using the other blocks.
                            ActiveStock
                            On-line, real-time stock control plug-in for Actinic V7, V8 and V9
                            **New - Captcha plug-in for your Contact Us form**

                            ActiveStock website
                            Free 30 Day Trial
                            ActiveStock Blog (including a new tutorial on a 'Sort By' function for long section pages)

                            Comment


                              #15
                              when I just remove that block, I get code errors and the page goes tits up

                              Comment

                              Working...
                              X