Let me tell you why I have decided to write this article. I was looking to solve a problem which has appeared when I was working on one project here at the company. So as usual, I headed to the Magento forum for answers http://www.magentocommerce.com/boards There I found a simple solution for my problem, and worked on my karma by providing answers for a few other guys. The question was rather simple, but frequently asked, so I have decided to write about it here.

As you already understood from the name of the article, I will talk about decimal products.

Decimal Products is a very helpful option in the magento platform for people who are going to sell divisible quantities of products, for example: vegetables by pounds, fabric by yards, items which are usually sold in packs, but could be broken up etc...

How to set it up?

For adding these types of products you have to click on the inventory tab, inventory must be enabled for this product , some more choices will appear, one of these choices will be decimal products. You have to set yes for decimal products.decimal products magento

 Now customers are able to enter the desirable quantity. You just have to remind them somewhere that this product is  sold by pounds/yards/boxes…

For that reminder you just have to set up new attribute. Click on “add new attribute” in the catalog tab. Let’s say we need pounds. We can text it so we can add whatever we want there: pounds/yards/boxes…

Modify it :

/app/design/frontend/{interface}/{theme}/template/catalog/product/view/addtocart.phtml

After the qty input:

<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty"/>
<?php echo $_product->getpound(); ?>

Good luck!

I hope my karma gets better again after this article again:)