weaverlizzie Posted August 13, 2010 Posted August 13, 2010 I have installed partial quantity mod, but can't seem to get it to work. It drops the decimal portion of the number instead of carrying it through to completion of the transaction. Does anyone have this mod working? I need this mod or another way to have fractional amounts in each transaction. Julie Quote
steve_s Posted August 14, 2010 Posted August 14, 2010 I have installed partial quantity mod, but can't seem to get it to work. It drops the decimal portion of the number instead of carrying it through to completion of the transaction. Does anyone have this mod working? I need this mod or another way to have fractional amounts in each transaction. Julie Hi Julie, i think you will also have to modify the table(s) and change qty from integer to real have you missed an instruction out? Steve Quote
weaverlizzie Posted August 15, 2010 Author Posted August 15, 2010 The instructions have you make the following changes to the tables ALTER TABLE `customers_basket` CHANGE `customers_basket_quantity` `customers_basket_quantity` DECIMAL( 3, 2 ) NOT NULL DEFAULT '0'; ALTER TABLE `orders_products` CHANGE `products_quantity` `products_quantity` DECIMAL( 3, 2 ) NOT NULL DEFAULT '0'; ALTER TABLE `products` CHANGE `products_quantity` `products_quantity` DECIMAL( 4, 2 ) NOT NULL DEFAULT '0'; Which, if i am reading it correctly, changes them to decimal numbers. Installed the mod twice and came up with the same result. Don't believe that I missed any steps in the instructions, double checked the file changes and they seemed to be what was asked for. Should the last line above read ALTER TABLE `products` CHANGE `products_quantity` `products_quantity` DECIMAL( 3, 2 ) NOT NULL DEFAULT '0'; could this be causing the problem? Thanks for your previous response and any additional help you can give. Julie Quote
Jan Zonjee Posted August 15, 2010 Posted August 15, 2010 I have installed partial quantity mod, but can't seem to get it to work. I don't know how old this contribution is, but somewhere along the includes/classes/shopping_cart.php, function update_quantity was changed to only accept integers for quantity: if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity) && ($attributes_pass_check == true)) { $this->contents[$products_id_string] = array('qty' => (int)$quantity); // update database Quote
weaverlizzie Posted August 15, 2010 Author Posted August 15, 2010 includes/classes/chopping_cast.php change the line if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity) && ($attributes_pass_check == true)) { $this->contents[$products_id_string] = array('qty' => (int)$quantity); // update database to if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity) && ($attributes_pass_check == true)) { $this->contents[$products_id_string] = array('qty' => $quantity); // update database makes so that partial quantity mod works as far as i can tell at this time. I have run several shopping carts to completion and it has worked. Julie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.