示例#1
0
 public function getProductsToBoot($productIds, $userId)
 {
     $productModel = new productModel();
     $util = new Util();
     $google = $util->initGoogle();
     if (!count($productIds)) {
         throw new \Exception('BAD Product ID');
     }
     $products = $productModel->getProductsToBoot($productIds);
     foreach ($products as &$product) {
         $product->list_gallery = $product->galleries;
         $product->price = 0;
         $product->caption = '👝👜👛' . ucfirst($product->name) . '<br>🤑Giá: ' . formatMoney($product->sell_price - $product->discount) . '<br>🎒👝💼' . $product->short_description;
         $product->sell_price = formatMoney($product->sell_price);
     }
     return $products;
 }