Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...