cancel
Showing results for 
Search instead for 
Did you mean: 

How make dynamic product quantity in Magento 2?

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How make dynamic product quantity in Magento 2?

I created a module which create new product type. And I want to set dynamic product quantity (calculation from other) for checkout. Like custom function getQty().

UPDATE: I found a solution to this problem.

I used DI for \Magento\CatalogInventory\Model\Stock\Item class and changed getQty() method. It only works for the catalog, but it suits me.

Cong ty thiet ke website chuyen nghiep uy tin gia re | nhan thiet ke web ban hang online gia re chuan mobile