Sell in fractions ie 1.5 kg

Do you have an idea for a feature you would like to see included in a future release? Post it here, and your ideas may be in the next release.

Moderators: Koibito, Stefko, Randy

Sell in fractions ie 1.5 kg

Postby deons » Thu Nov 08, 2007 9:36 am

One of my Clients, a butcher would like to use NOPCart but has to sell his meat in fractions of a unit, ie 1.5 kg of Steak

Is there a way to incorporate this requirement into NOPCart
deons
WebMaster
 
Posts: 1
Joined: Thu Nov 08, 2007 9:30 am

Re: Sell in fractions ie 1.5 kg

Postby Koibito » Thu Nov 08, 2007 1:26 pm

Yes. Do a search for the 'Product selector mod' and for 'toggle price'.
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: Sell in fractions ie 1.5 kg

Postby Randy » Thu Nov 08, 2007 4:36 pm

Nopcart was designed not to allow ordering fractional items! :lol:

Do a search of nopcart.js and change any parseInt(fields[1]) to parseFloat(fields[1]). (I found 6 places in the original.)
On line 259 in the AddToCart function there is a parseInt(strQUANTITY) that will need to be changed as well.

In the original nopcart.js the CKquantity and ChangeQuantity functions work with fractions, but if you run into wierd errors, check them as well.

Other than that, you should be able to use it without any problems.

Someone is using nopcart for fabric that is sold in fractions as well.

Randy
Randy
Guru
 
Posts: 1511
Joined: Tue Apr 22, 2003 12:21 pm
Location: Thunder Bay, Ontario


Return to Future Enhancements

Who is online

Users browsing this forum: No registered users and 1 guest

cron