Exemplo n.º 1
0
 public static function createInfoForCustomProduct($userSid, $productSid, $listingSid, $price, $name, $type)
 {
     $productName = SJB_ProductsManager::getProductNameBySid($productSid);
     $userGroupSid = SJB_UserManager::getUserGroupByUserSid($userSid);
     $productInfo = array('custom_item' => "{$name} ({$productName})", 'custom_info' => array('listing_id' => (int) $listingSid, 'type' => $type, 'extraDescription' => "({$productName})", 'productSid' => (int) $productSid), 'name' => $name, 'number_of_listings' => 1, 'QtyPeriod' => 1, 'price' => $price, 'pricing_type' => 'fixed', 'sid' => -1, 'product_type' => 'post_listings', 'user_group_sid' => $userGroupSid);
     $productInfo['serialized_extra_info'] = serialize($productInfo);
     return $productInfo;
 }