This may be a strange topic, I didn't think so but then I couldn't find any other topics on it so I am posting this question...
Is there anyway to handle fractional or decimal quantities in the basket and on orders?
I have a client that sells things by the yard. He does not require that you purchase his material in whole yards so you might want to order 2.5 yards. I see the basket item and order item tables store the item quantities as small int. Now what?
I see only two possible solutions.
1 - I change the BasketItem and OrderItem tables to allow decimal item quantities. That sounds like a nightmare and may not even be possible since I don't have access to all the code in the CommerceBuider.dll. I can see where that would just cause too many problems. Anyone ever done that?
2 - I force his price per item to be in inches and then essentially the store would be selling his material in inches. Then I would have to change the receipt pages, etc. to convert the quantity and price from per inch to per yard. That still sounds crazy but at least it seems like it would be managable. It would be a lot of code to touch thought. Anyone ever done that?
If I am missing something and somebody has a better suggestion please let me know.
Thanks
Fractional/Decimal item quantities in basket and orders
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Fractional/Decimal item quantities in basket and orders
We have done it by the half yard. We left the database alone, changed code on the product edit pages so that the merchant put in 1/2 yard prices, then we saved as full yard prices, then on all the store pages we put custom code to handle the fractions. It was quite a bit of work, as you say.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Fractional/Decimal item quantities in basket and orders
What about using Options & Varaiants for the different units: 1/4 yd, 1/2 yd, 1 yd,...
Then the customer would choose the unit from dropdowns. To buy 2.5 yds they would first buy 2 yds, then 1/2 yd. Not as nice for the customer but not real bad with the minibasket in the sidebar. It wouldn't require any custom code but would make inventory tracking a problem.
Then the customer would choose the unit from dropdowns. To buy 2.5 yds they would first buy 2 yds, then 1/2 yd. Not as nice for the customer but not real bad with the minibasket in the sidebar. It wouldn't require any custom code but would make inventory tracking a problem.
Re: Fractional/Decimal item quantities in basket and orders
I tried just changing the fields in the tables to see what would happen. It crashed as expected, invalid cast.
I'd probably need the CommerceBuilder code to do that and I think that would be the wrong way to go.
I'd probably need the CommerceBuilder code to do that and I think that would be the wrong way to go.