Community Forums

Allow negative value for quantity when editing an order

Support for mods, payments, shipping, totals, modules, and languages in OpenCart v1.x

Re: Allow negative value for quantity when editing an order

Postby bagellord » Wed Jun 06, 2012 1:09 pm

Okay. I'm running on Ubuntu Server (and later Redhat) because my network admin is OCD about his Windows Servers so any IDE beyond gedit is out of the question lol.
bagellord
 
Posts: 24
Joined: Thu May 17, 2012 8:27 pm

Re: Allow negative value for quantity when editing an order

Postby bagellord » Wed Jun 06, 2012 2:29 pm

I did some debugging (writing values to a text file) in catalog/controller/checkout/manual.php and the negative values don't seem to be making it there.
bagellord
 
Posts: 24
Joined: Thu May 17, 2012 8:27 pm

Re: Allow negative value for quantity when editing an order

Postby rph » Wed Jun 06, 2012 4:12 pm

It's there.

edit_post.png
edit_post.png (52.55 KiB) Viewed 104 times


Post data is assigned to $quantity and then run through the add function in system/library/cart.php.

So here we are, right back where we were in the very beginning. You need to write a custom cart function and run it through that.
-Ryan
VQMod Manager: FREE extension to fully manage your VQMods from Admin!
Admin Enhancement Suite: Powerful Admin features and enhancements
Dependent Options: Option values displayed based on customer input
Catalog Mode: Disable "Add to Cart" and display your store in view-only
Unofficial OpenCart Wiki | Commercial Support and Development
User avatar
rph
 
Posts: 2697
Joined: Thu Jan 07, 2010 9:05 pm
Location: Lincoln, Nebraska

Re: Allow negative value for quantity when editing an order

Postby bagellord » Thu Jun 07, 2012 8:15 pm

Thanks for your help. I was able to modify the code to allow me to set the number of items rather than increase or decrease them. I also removed the functionality to add or delete items from an order, they can only be set to amounts that are in stock >= 0. My next step is adding/changing a field somewhere to set the shipping total since it will be different for each order.
bagellord
 
Posts: 24
Joined: Thu May 17, 2012 8:27 pm

Previous

Return to Extension Support

Who is online

Users browsing this forum: No registered users and 15 guests

Hosted by Arvixe Web Hosting