Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quantity 169491525423738 reduces price to £1!


oscjww103

Recommended Posts

I was messing about with trial orders on my site to figure out P&P charges and found that the magic quantity of 169491525423738 reduces the price to £1, anything over that is only maginally more expensive.

 

How can this be fixed?

 

or How can I code a maximum order quantity?

Link to comment
Share on other sites

You are right, it does muck up the price!

Is a problem though? Would any merchant be liable?

It did throw up an error, but I didn't dare press "Confirm Order" in case it went through at the correct price!!

there's no liability no but its not very professional. there must be a simple way to impose a quantity limit or a limit on the number of digits. suggestions anyone?

Link to comment
Share on other sites

Just checked that in my own store now, in shoppingcart, if you update to that number, you`ll see that the price goes down.

But when you tried to go to checkout, well $9.593.393.939.931.234 :D

 

So if the customer want`s this amount and pays for it, go ahead :D hehe

 

But the limit on text field is nice to have, say max 5 maybe 99999

 

Cheers, Cyber

Link to comment
Share on other sites

I guess you could add an improvment that came with the RC1.

 

[iMPROVEMENT] Maximum Order Product Quantities [+SQL]

 

 

Database Changes to Perform:

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Product Quantities In Shopping Cart', 'MAX_QTY_IN_CART', '99', 'Maximum number of product quantities that can be added to the shopping cart (0 for no limit)', '3', '19', now());

 

In catalog/includes/classes/shopping_cart.php

 

after line 82 add:

 

if (defined('MAX_QTY_IN_CART') && (MAX_QTY_IN_CART > 0) && ((int)$qty > MAX_QTY_IN_CART)) {
	$qty = MAX_QTY_IN_CART;
  }

 

after line 139 add:

 

	  if (defined('MAX_QTY_IN_CART') && (MAX_QTY_IN_CART > 0) && ((int)$quantity > MAX_QTY_IN_CART)) {
	$quantity = MAX_QTY_IN_CART;
  }

 

When done, you can decide how many items are possible to add to cart. The setting is in Admin->Configuration->Maximum Values->Product Quantities In Shopping Cart.

 

I believe the document that I'm reffering to, is within the RC1 release, better consult that document beforehand!

Link to comment
Share on other sites

there's no liability no but its not very professional. there must be a simple way to impose a quantity limit or a limit on the number of digits. suggestions anyone?

I added a contrib called Change number of products ordered easily. The downloaded file is called ordmaxdropdown. This adds a dropdown to the shopping cart. Too many customers were changing quantities but not clicking update cart. With this mod, the cart auto updates when a new quantity is selected. Max quantity allowed is set in admin.

 

Then I added another one for deleting products. Remove product from cart button; it puts a little trash can image to click on and that deletes that item.

 

Tim

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...