Jump to content

How to block sql qeury updating quantity after order placed?


treepek

Recommended Posts

Hi,

 

I have in catalog 60 000 products

 

I want to set:

- 23 000 products must have active state (you can see in shop)

- 37 000 products must have disable sate (you can't see in shop) but if i want i can quick enebale it in future

 

From the 23 000 active products:

-60% - must have quantity = 0 (user can't order product but see "not available in stock - call us" description)

- 40% - must have quntity between 1and 10 on stock,  and i want the values of quantity will be present at product cart, and i want that after order placed, the values of quantity will not change (reduce).

 

So i need to have to virtual stock (quantities) for this 40% products and show the quantity values at product cart. For examle i have a product and the product quantity is 5. When client byuing a product (when he clicking "ORDER") the state of quantity is changing from 5 to 4. But i want to block the state of quantity and need the situation when user bought a product the quantity will still the same (5 not 4).

 

If i set 'stock managment' to OFF, engine prestashop set " Allow ordering of out-of-stock products " option to ON as default and this is wrong for me (in this case-60% product with quantity=0 will be aavailable for order).

 

Actual state of quantity is keeping in ps_stock_available -> quantity table in DB.

 

Anyone maybe know how to block sql qeury updating state (and which php file and php-method) is connected with changing (reducing) state of quantity product after order is placed ?

 

I see some queries in this files:

./classes/stock/StockManager.php
./classes/stock/StockAvailable.php

 

... but i'm not sure that this files is responsible for qunatity update after order placed.

 

Any idea?

 

PS1: my prestashop is 16.1.1

PS1: sorry for my english ;-)

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...