Esempio n. 1
0
 public function updateUserTotalProducts($user_id)
 {
     $p_count = $this->getTotalProduct($user_id);
     UsersShopDetails::where('user_id', '=', $user_id)->update(array('total_products' => $p_count));
 }
Esempio n. 2
0
 /**
  * Getting users shop details
  *
  * @author 		manikandan_133at10
  * @return 		array
  * @access 		public
  */
 public function getUsersShopDetails($user_id)
 {
     $shop_details_arr = array();
     $shop_details = UsersShopDetails::Select('id', 'user_id', 'is_shop_owner', 'shop_status', 'total_products', 'paypal_id')->where('user_id', $user_id)->get();
     if (count($shop_details) > 0) {
         foreach ($shop_details as $key => $vlaues) {
             $shop_details_arr['id'] = $vlaues->id;
             $shop_details_arr['user_id'] = $vlaues->user_id;
             $shop_details_arr['is_shop_owner'] = $vlaues->is_shop_owner;
             $shop_details_arr['shop_status'] = $vlaues->shop_status;
             $shop_details_arr['total_products'] = $vlaues->total_products;
             $shop_details_arr['paypal_id'] = $vlaues->paypal_id;
         }
     }
     return $shop_details_arr;
 }