Jump to content

rifaia

Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • First Name
    Rifai
  • Last Name
    A

rifaia's Achievements

Newbie

Newbie (1/14)

0

Reputation

1

Community Answers

  1. After some trial and error, i found the below way to get the product quantity in the product itself on webservice if you don't have combinations. Go to file /classes/Product.php Search around line 387 for 'quantity' => array( 'getter' => 'false', 'setter' => false ), and change it to 'quantity' => array( 'getter' => 'getMyStockforWebService', 'setter' => false ), Then add the following method. public function getMyStockforWebService(){ return StockAvailable::getQuantityAvailableByProduct($this->id, 0); } This might help someone
  2. Hi, I am new to Prestashop. Currently i am able to access my store through webservice and do all the CRUD operations successfully with the help of this official tutorial. I need a custom option of receiving the product (or) product list with the quantity of stock_availables in the product itself, without the need to query again with the stock_available id of the product. Thanks in Advance.
×
×
  • Create New...