Announcement

Collapse
No announcement yet.

Displaying Real Time Stock Figures

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

    Displaying Real Time Stock Figures

    Hi All,

    Hope someone can help me here....

    We currently have Real Time Stock Numbers displaying on our website , however we want to limit this to showing on Stock Figures if the Stock Figure
    is below 100 , over 100 we would like to display a text message.

    Is this possible ?

    Thanks,

    Eck247

    #2
    Any help or advice would be very useful please...

    Comment


      #3
      It will be possible using Javascript, probably a bit more difficult than you think though, contact a Javascript expert will be your best bet as the actinic JS will need altering.

      Comment


        #4
        If you can live with a message like "Lots in stock", then it's a one-liner. Edit actinicextras.js in your Site folder and look for:
        Code:
        	arrStockElems[nIndex].innerHTML = mapStockByRef[sProdRef];
        Change it to:
        Code:
        	arrStockElems[nIndex].innerHTML = mapStockByRef[sProdRef] >= 100 ? 'Lots' : mapStockByRef[sProdRef];
        Change the word Lots to suit. The "in stock" bit comes from the layouts so you need to choose something that suits "in stock" following it.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          A more general solution is a two-step process. Edit layout "Display Stock Quantities" and delete the fragment of text " in stock.".

          Edit actinicextras.js in your Site folder and look for:
          Code:
          	arrStockElems[nIndex].innerHTML = mapStockByRef[sProdRef];
          Change it to:
          Code:
          	arrStockElems[nIndex].innerHTML = mapStockByRef[sProdRef] >= 100 ? 'Ample supplies' : mapStockByRef[sProdRef] + ' in stock';
          Change the bit Ample supplies to suit.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment

          Working...
          X