Announcement

Collapse
No announcement yet.

Problem! Fraction for the quantity.

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

    #31
    Kai,

    Textfile is on it way.

    Re selling in 0.1m units - just change the "5"'s in the JavaScript
    Code:
      var intval = Math.ceil(val * 5); 		// number of 20cm units rounded up
      val = intval / 5;                		// round back to decimal value to nearest 20 cm
    To be "10"'s and alter any descriptive text to suit.

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

    Comment


      #32
      Hi, Norman, Thx for the code. You may want to go http://www.hst.com.sg/acatalog/Fancy.html to see if i did it correctly. 1 problem is that, the price customers see is the price for 0.1 metre, can we write the price as per 1m at the product page for customer to see, and calculate as 0.1 at the cart.? Also, how to solve the enter thing? If cant is ok. U help alotssss.

      U may also will like to go http://www.hst.com.sg/acatalog/Plain.html to see what can i do for it. The page is simply too long. Thx Norman.

      Kai
      <a href = "http://www.hst.com.sg">
      "http://www.hst.com.sg"</a>
      The Online Fabric Store

      Comment


        #33
        Kai,

        Update is on it's way that fixes the Enter problem.


        I'm not sure if it's easy to fix the price prompt. I'll think about it. More later.

        Re the very long page - you'll just have to break that huge section into sub-sections regarding different types of fabric or colour ranges. No-one will want to look at a list that long.

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

        Comment


          #34
          Hi Norman, there is some minor porblem on the patch. U try placing a quantity then u press enter, nothing will change, u will have to click blank space outside the textbox then the quantity will round off, then u can press the enter button. Thx
          <a href = "http://www.hst.com.sg">
          "http://www.hst.com.sg"</a>
          The Online Fabric Store

          Comment


            #35
            That's right. The Enter key doesn't make the fractional quantity calculation correctly so I've disabled it just for those products.

            You have to use the Add to Cart Button.

            This is how nearly everyone expects to do things. Using the enter key when submitting a form is nearly always bad news as it leads to partially completed forms.

            I've also added a bit of code that will show the price per metre on the product page (alongside the price per 10cm unit). It's on it's way by e-mail.


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

            Comment


              #36
              Here's a patch to my patch that will display the product prices per metre on the product page.

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

              Comment


                #37
                Thx Norman!
                <a href = "http://www.hst.com.sg">
                "http://www.hst.com.sg"</a>
                The Online Fabric Store

                Comment

                Working...
                X