Forums / General Questions / where is the code that subtracts the stock when an order is placed?

where is the code that subtracts the stock when an order is placed?

Locked

Started by ink on 28 Jan 2008, 4:51 PM · Views: 1,055

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
28 Jan 2008, 4:51 PM
#1
ink avatar

ink

Zen Follower

Join Date:
Jul 2004
Posts:
140
Plugin Contributions:
0

where is the code that subtracts the stock when an order is placed?

Hi

Can any of you Zen gurus tell me where the query is that subtracts the stock from the products_quantity field when an order is placed?

I have looked and looked in this forum but to no avail - please help!

Thanks

28 Jan 2008, 5:00 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,705
Plugin Contributions:
0

Re: where is the code that subtracts the stock when an order is placed?

What are you wanting to do?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

28 Jan 2008, 5:14 PM
#3
ink avatar

ink

Zen Follower

Join Date:
Jul 2004
Posts:
140
Plugin Contributions:
0

Re: where is the code that subtracts the stock when an order is placed?

Hi

I think it is in the orders class - around line 657, however the stock is not deducting when an order is placed - I am using 1.3.7.

Do you have any clues as to where I could look, with regards as to where else could be not functioning properly?

I ask this as it is probably a mod which I installed at some point but didnt notice this problem until now!

28 Jan 2008, 5:20 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,705
Plugin Contributions:
0

Re: where is the code that subtracts the stock when an order is placed?

What are your settings in Admin> Configuration> Stock?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

28 Jan 2008, 11:21 PM
#5
ink avatar

ink

Zen Follower

Join Date:
Jul 2004
Posts:
140
Plugin Contributions:
0

Re: where is the code that subtracts the stock when an order is placed?

Hi

Thanks for your reply. I looked there earlier as I found some reference to those configuration setfings in other threads.

However I searched my config table and dont seem to have the configuration values installed under I think it is cong group id 12 - I have Sage stock installed but am not using Sage, do you think that when I installed that it effectively paused the Zen stock control?

I which case do you know what SQL off hand, I should run to repair that process?

29 Jan 2008, 12:07 AM
#6
ink avatar

ink

Zen Follower

Join Date:
Jul 2004
Posts:
140
Plugin Contributions:
0

Re: where is the code that subtracts the stock when an order is placed?

Hi

In the unlikely event that anybody else runs into this same problem, with a bit of (tired) thinking this is how I just solved the problem:

  1. If not present for some bizarre reason add:

9 Stock Stock configuration options 9 1

into table configuration_group

  1. Again if not present add:

233 Subtract stock STOCK_LIMITED true Subtract product in stock by product orders 9 2 0000-00-00 00:00:00 2008-01-11 17:35:15 zen_cfg_select_option(array('true', 'false'),

into table configuration

  1. Stock take :)