Hi sir,
Actually we need to add product inventory count in product view table. Please can you explain how can i add or display product inventory count in front of show table.
1 Answers
Hello,
Please follow the steps to add new columns to datatables :
https://www.laraship.com/docs/laraship/laraship-configuration/tables-configuration/
stock is saved under SKUs with json field :"inventory" , you can find quantity and stock status there.
Thank you for your response
Little bit confused and I can’t find out where i get inventory count and query .
I place below code in ‘ Corals/modules/marketplace/Transformers/ProductTransformer.php’
‘stock_count’ => $product->inventory->stock,
my humble request to you to check and let me know this is the correct format otherwise guide me and where i place the code.
Hello,
As mentioned earlier the stock is saved inside json field so you need to check laravel documentation how to grab the data from there
Please login or Register to submit your answer