Announcement

Collapse
No announcement yet.

Showing POA when no price

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

    Showing POA when no price

    In our store we have a range of guitars that we do not have prices listed for, the customer has to contact us and we give them a price over the phone.

    When we put the price in the price appears in large red Text (example)

    However if we dont enter anything in the price box it does not have show anything (example)

    What i want to do is make it so it displays POA in the red font when there isn't a price listed, i want this on the single product page AND the product group page (example)

    Can this be done (and more importantly is it relativly simple )
    www.incredibid.co.uk

    #2
    The way to add it in would be through a customvar against the product and styled using CSS to show it as red and at a certain size.

    It could be possible to automate this using Javascript so if the price is blank it writes "POA" to the page automatically - will leave that possibility to the script guru's to comment on the feasibility


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      Aye well its an automated version that i want, as some of our products we cant give prices over time, but eventualy the prices will be put in place.

      anybody out there got any idea of how i can automate this

      thanks in advance
      www.incredibid.co.uk

      Comment


        #4
        I'm no guru (we got it from p13 Advanced User Guide) but we have the following in the HEAD section of Act_Primary.html:

        <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
        function StockLevels(pItem)

        {
        var strIDs = 'Stock Message: '
        {
        if (pItem >= 1)
        {
        strIDs = '- In stock - immediate delivery is available on this item.'
        }
        else
        {
        strIDs = '- OUT OF STOCK - more on the way - please allow up to 14 days.'
        }
        }
        return strIDs
        }

        </script>


        and the following in Act_ProductLine.html:

        <script language="Javascript">
        document.write(StockLevels(NETQUOTEVAR:STOCKLEVEL))
        </script>


        This returns the appropriate message based on the value of NETQUOTEVAR:STOCKLEVEL - you could probably change this to produce a message based on the value of a CUSTOMVAR or even the price.

        Mark.

        Aquazuro - designer stainless steel accessories

        Comment


          #5
          righto, just had a very quick argument with a notepad++ trying to make this work
          First of all let me say "I have no real knowledge of javascript" just what i have learnt trying to fudge my way through changing templates and such

          right so i tried to use the javascript mentioned above

          I tried to change it to make it work with what i wanted to do, i put the 2nd bit of code in the act_productprice.html template because this is where the price label comes from, but changed it to read the cost not stocklevels:-

          <script language="Javascript">
          document.write(PricePoint(NETQUOTEVAR:COST))
          </script>

          the other section should still be able to go in the HEAD section of the act_primary HTML file and i have got this far with the code

          <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
          function PricePoint(pItem)
          {
          var strIDs = 'PriceMessage: '
          {
          if (pItem = PROBLEM BIT)
          {
          strIDs = '- NETQUOTEVAR:PRICEPROMPT'
          }
          else
          {
          strIDs = '- £POA.'
          }
          }
          return strIDs
          }
          </script>


          As shown above i have a problem bit, with the stock levels code you are working with a number, but with the price your have a £ sign thrown in making it txt, so a simple 'equal to or greater than' will not work,
          I need to modify this to be basicaly

          if (pItem = if there is text here then show price, if not show £POA)

          the if function just needs to be able to see if NETQUOTEVAR:COST will actully put text on the page, if it does show it, if it doesn't show POA instead,
          The rest of the script seems fine,

          Any idears you helpful helpful people
          www.incredibid.co.uk

          Comment


            #6
            I think the problem you are finding is that
            Code:
            NETQUOTEVAR:COST
            contains £ symbols and decimal separators so it cannot be validated by the JavaScript. It's a shame you are not on v8 as this would be really easy to do. There is no simple number variable for the price of the item in v7 - so I don't think this is possible. Sorry.

            Comment


              #7
              A couple of questions:
              • In our Act_ProductLine.html the price is shown using NETQUOTEVAR:PRODUCTPRICE, not cost.
              • If the price field in Actinic is left blank, the resulting displayed price is also blank, ie there is nothing - it is not £0.00, therefore NETQUOTEVAR:PRODUCTPRICE must have no value? Surely javascript could be used to tell whether NETQUOTEVAR:PRODUCTPRICE is blank using ==null or string length=0 etc?


              Mark

              Aquazuro - designer stainless steel accessories

              Comment


                #8
                Originally posted by Mark H
                • If the price field in Actinic is left blank, the resulting displayed price is also blank, ie there is nothing - it is not £0.00, therefore NETQUOTEVAR:PRODUCTPRICE must have no value? Surely javascript could be used to tell whether NETQUOTEVAR:PRODUCTPRICE is blank using ==null or string length=0 etc?
                This is what i was looking for, i basicaly need the bit that goes into act_productprice.html to look and see if NETQUOTEVAR:COST will actually put anything onto the page, you are correct in saying that if i dont enter a price nothing is put on the page, so i need the bit of javascript to see if NETQVAR:COST will put anything on the page, if it does display the price, if it dont display POA

                Originally posted by Mark H
                • In our Act_ProductLine.html the price is shown using NETQUOTEVAR:PRODUCTPRICE, not cost.
                NETQUOTEVAR:PRODUCTPRICE seems to call the contents of the template ACT_productprice.html which is all the parts that go into making up the price label (cost, tax info, that kind of thing)
                www.incredibid.co.uk

                Comment


                  #9
                  Javascript Guru Needed ASAP

                  Despite what Chris says I still think we're barking (!) up the right tree, but you need the javascript guru to take you the final few yards - not me I'm afraid. In the meantime it might be worth Googling "javascript null field/variable" or something similar.

                  Aquazuro - designer stainless steel accessories

                  Comment


                    #10
                    I'm definately no guru, but I've been helped in the past with a problem which may help you. Add the following code into Act_ProductPrice.html:

                    <script language=JavaScript>
                    var priceprompt = 'NETQUOTEVAR:PRICEPROMPT';
                    </script>

                    <script language=JavaScript>
                    var prodcost = 'NETQUOTEVAR:COST';
                    </script>

                    <script language=JavaScript>
                    var taxtag = 'NETQUOTEVAR:TAXMESSAGE';
                    </script>

                    I then inserted NETQUOTEVAR:PRODUCTPRICE near the top of my product template, but formated using css as display:none.

                    This then enabled me to use the code below which strips the £ sign etc from the price and writes ' Free Delivery' if a product is over £300.

                    <script language=JavaScript>
                    <!--
                    var cost = prodcost; // get cost as string
                    cost = cost.replace(/&#163;|&#44;|&#36;/g,""); // strip pound, dollar, and any commas
                    cost = cost.replace(/&#46;/,".") - 0; // fix decimal point and make numeric
                    if (cost > 300)
                    {
                    document.write(" & Free Delivery")
                    }
                    // -->
                    </script>

                    Could help you if price is 0.00 or set to a specific price, then coded using 'if' product cost = 0 show POA else show product cost, but in proper java.

                    As I said, I no guru, but this might point you in the right direction.

                    Wyn
                    www.firesonline.co.uk
                    The wood burning stove specialists.

                    Comment

                    Working...
                    X