Announcement

Collapse
No announcement yet.

purchase by surface area

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

    purchase by surface area

    I've got a client who needs for his customers to order by surface area, ie: input a width and height, (retain these inputs for the checkout) then dependant upon these inputs generates a price, I figured that multiplying the width and height would give a suface area in cm squared and then multiply this by a cm squared price to give a final.

    Can this be done in Actinic V 6.1.3?

    #2
    The first thing you'll have to check is that your price per square cm will fit sensibly into Actinic's penny based pricing system. If that's OK then you can arrange for the calculation to be done with a bit of JavaScript and for the Quantity to be replaced by the product.

    The best way to retain the customer input values would be to fit them into the Other Info prompt where they would appear on the checkout.

    Another way would be to have drop-down boxes for width and breadth and these would also be would also be carried through to the checkout. Of course this assumes that these fit into sensible ranges for drop-down boxes.

    I did a demo site that shows an large amount of calculation going on. You can see it at http://www.drillpine.biz/voilenet/ac..._Products.html where the curtains are sold by area and a few other options. This required quite a bit of work however.

    It actually uses another technique that allows the price of a product to be calculated on the fly, removing the granularity problem associated with actinic price units.

    You may also want to search the Forum using keywords like width, breadth, area, etc as I'm sure I've posted such solutions before.

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hiya Norman

      thanks for the reply, you confirmed my initial thoughts. I've had a play using my limited knowledge of javascript and managed the area calculation utilising drop down boxesand managed to populate an input box which I imagine would then be used as the quantity to then calculate the price. Trouble is, I'm now failing on associating the dropdown list names from actinic with my names in the javascript I've cobbled together. Is this the correct way to go about it? Can I get at the "NETQUOTEVAR:ATTRIBUTEREF" to name it?

      Regards Garry

      PS: the example site you gave is exactly what I want, with drop and width etc.

      Comment


        #4
        I'd written a ReadMe that might help. Here it is.

        Norman
        Attached Files
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Grrr.... Actinic changed the Other Info Prompt code somewhat in 6.1.3. Here's the readme again with 6.1.2 and 6.1.3 compatibility.

          Norman
          Attached Files
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            I've updated the ReadMe to deal with:

            You might get confusing results should someone add an identical product twice.
            The Quantity would increase but the Other Info (which contains a total area) wouldn't. A patch to Cart.pm fixes this
            by treating any products with Other Info set as always different.

            Also I've added autocomplete="off" to Width and Depth input fields as buggy Internet Explorer doesn't fire the onchange event if you use autocomplete! Bummer.


            Norman
            Attached Files
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Hiya Norman

              Thank you a million, that read me and consequent changes worked wonderfully...

              ...on a PC. I design on a Mac (for my sins) and so tested it on this as well (plus my client uses an Apple Mac), the whole process falls over. Error below.

              "Quantity: The quantity must be a whole number between 1 and 32767."

              It seems that the width and height values aren't being 'transfered' into the "dimensions" input box and consequently neither is the area into the quantity, hence the app thinks no quantity has been input and so throws up the error.

              This is totally annoying as it works fine on my PC.

              Any ideas?

              URL: http://www.etchfx.co.uk/acatalog

              Comment


                #8
                I've no access to a Mac as I'm on holiday inTurkey. I can only suggest putting in some alert('We got here'); type statements to see whether or not it's detecting the Quantity field or whatever.

                Norman
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment

                Working...
                X