Example #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;
 }