Announcement

Collapse
No announcement yet.

How to Display Stock Levels in Search Results

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

    How to Display Stock Levels in Search Results

    I desperately need to show how many items are in stock on the search results. It is very frustrating when you bring up a list of matching search results, and the then go to the product, only to find it is out of stock.

    Is there a way to get the stock level to display in the Search Results?

    #2
    Have you tried adding

    We have <actinic:variable name="stocklevel" /> available

    in the Search Results Layout?
    Bill
    www.egyptianwonders.co.uk
    Text directoryWorldwide Actinic(TM) shops
    BC Ness Solutions Support services, custom software
    Registered Microsoft™ Partner (ISV)
    VoIP UK: 0131 208 0605
    Located: Alexandria, EGYPT

    Comment


      #3
      It doesnt work - it reports that Variable "StockLevel" is used out of context when we add it to the Search Results code. It will not let us update the site.

      Comment


        #4
        OK, thought that might be the case - you could create a new variable and find a way of setting it equal to the stocklevel just before you upload your site, then try using that variable.
        Bill
        www.egyptianwonders.co.uk
        Text directoryWorldwide Actinic(TM) shops
        BC Ness Solutions Support services, custom software
        Registered Microsoft™ Partner (ISV)
        VoIP UK: 0131 208 0605
        Located: Alexandria, EGYPT

        Comment


          #5
          Bill,

          Would you not need to make the variable available to the scripts somehow? With the page being built on the fly surely you can't get anything other than what is coded into the scripts to display on the search page????
          Cheers

          David
          Located in Edinburgh UK

          http://twitter.com/mcfinster

          Comment


            #6
            The search results Perl scripts use a dedicated file containing just enough information to display what you already see in the Search Results options list. The stock level isn't there.

            It might be possible to open the .cat files and extract the OUT_OF_STOCK flag so you could indicate whether the item in in stock or not. There isn't a stock level value available so it would have to be an in/out of stock message. This would require significant coding and also would require a lot of extra CPU time on the server when the results were being displayed.

            Alternatively you could use some PHP on the product layouts to write an extra file containing the product ref and stock level. SearchScript.pl could then interrogate that and display the level. Again a lot of custom code needed.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment

            Working...
            X