Announcement

Collapse
No announcement yet.

Product Quantity with a Decimal in Admin?

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

    Product Quantity with a Decimal in Admin?

    We sell numerous products by the square foot. Often the customer's order needs to be adjusted to reflect the exact quantity they're shipped. For example, customer orders 5 square feet but we need to ship 5.3 or 4.9 due to the way the material is inventoried.

    So we need to be able to adjust the orders this way. Admin doesn't allow for decimal in the product quantity field. What can we do about this? Is there another way to skin this cat?

    Thanks,
    Mark

    #2
    Re: Product Quantity with a Decimal in Admin?

    Hey Mark,

    Any way you could change the logic, or unit of measure, for how it's sold on the site? So qty of 10 equals 1 square foot?

    Could you give an example?
    Ron Frigon
    Jedi Webmaster Obi-Ron Kenobi

    Comment


      #3
      Re: Product Quantity with a Decimal in Admin?

      Thanks for the input, Ron. I'll ponder that one.

      Comment


        #4
        Re: Product Quantity with a Decimal in Admin?

        Here's an example of what I'm thinking: http://www.gpencil.com/product/PM400T-GOLF.php

        We sell the pencils by the gross, 144 pieces per unit. We show pricing by the gross with volume pricing. Using toolkit we break that down to an each price and qty. The customer can also choose either by piece or by gross for their purchase qty. Purchase qty is rounded up to the nearest gross. The qty passed to the cart is always by the gross.

        Thinking you could reverse engineer this logic to some extent for what you're trying to do?
        Ron Frigon
        Jedi Webmaster Obi-Ron Kenobi

        Comment


          #5
          Re: Product Quantity with a Decimal in Admin?

          I've handled problems like this for some of my clients. The entire store is written with the assumption that quantities will be integers, so this requires a creative solution. For instance, I can provide a module that multiplies the quantities by 10 when customers enter them, and divides them by 10 whenever they're displayed. Then the numbers in the database would always be integers, representing ten times the actual quantity. If you want two digits after the decimal point, you can multiply/divide by 100.

          Another approach would be to remove the Quantity box from the pages for these products, and replace it with a hidden field so that the value is always 1. Then you create a text-box attribute named Quantity. A module can read the attribute value and compute the proper price on the fly when a customer puts one of these products in their basket.

          Both of these approaches have some side-effects that would need to be addressed, but I think they are feasible. Modules are probably required, although you might be able to implement one of these with one of the Tool modules (Toolkit, Toolbelt, etc.) and some complex template coding.
          Kent Multer
          Magic Metal Productions
          http://TheMagicM.com
          * Web developer/designer
          * E-commerce and Miva
          * Author, The Official Miva Web Scripting Book -- available on-line:
          http://www.amazon.com/exec/obidos/IS...icmetalproducA

          Comment

          Working...
          X