479 lines
23 KiB
PHP
Executable File
479 lines
23 KiB
PHP
Executable File
<?php
|
|
|
|
class Product extends ProductCore
|
|
{
|
|
public $id_erp;
|
|
public $nb_per_box;
|
|
|
|
private static $categories_product = array();
|
|
|
|
public static $definition = array(
|
|
'table' => 'product',
|
|
'primary' => 'id_product',
|
|
'multilang' => true,
|
|
'multilang_shop' => true,
|
|
'fields' => array(
|
|
/* Classic fields */
|
|
'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
|
'id_erp' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
|
'nb_per_box' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
|
'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
|
'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
|
'reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32),
|
|
'supplier_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32),
|
|
'location' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 64),
|
|
'width' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
|
'height' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
|
'depth' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
|
'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
|
'quantity_discount' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
|
'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13),
|
|
'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc', 'size' => 12),
|
|
'cache_is_pack' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
|
'cache_has_attachments' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
|
'is_virtual' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
|
|
|
/* Shop fields */
|
|
'id_category_default' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'),
|
|
'id_tax_rules_group' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'),
|
|
'on_sale' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
|
'online_only' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
|
'ecotax' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'),
|
|
'minimal_quantity' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
|
'price' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice', 'required' => true),
|
|
'wholesale_price' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'),
|
|
'unity' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'),
|
|
'unit_price_ratio' => array('type' => self::TYPE_FLOAT, 'shop' => true),
|
|
'additional_shipping_cost' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'),
|
|
'customizable' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
|
'text_fields' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
|
'uploadable_files' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
|
'active' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
|
'redirect_type' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'),
|
|
'id_product_redirected' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'),
|
|
'available_for_order' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
|
'available_date' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'),
|
|
'condition' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isGenericName', 'values' => array('new', 'used', 'refurbished'), 'default' => 'new'),
|
|
'show_price' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
|
'indexed' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
|
'visibility' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isProductVisibility', 'values' => array('both', 'catalog', 'search', 'none'), 'default' => 'both'),
|
|
'cache_default_attribute' => array('type' => self::TYPE_INT, 'shop' => true),
|
|
'advanced_stock_management' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
|
|
'date_add' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDate'),
|
|
'date_upd' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDate'),
|
|
'pack_stock_type' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
|
|
|
|
/* Lang fields */
|
|
'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
|
|
'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
|
|
'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128),
|
|
'link_rewrite' => array(
|
|
'type' => self::TYPE_STRING,
|
|
'lang' => true,
|
|
'validate' => 'isLinkRewrite',
|
|
'required' => true,
|
|
'size' => 128,
|
|
'ws_modifier' => array(
|
|
'http_method' => WebserviceRequest::HTTP_POST,
|
|
'modifier' => 'modifierWsLinkRewrite'
|
|
)
|
|
),
|
|
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 128),
|
|
'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'),
|
|
'description_short' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'),
|
|
'available_now' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
|
|
'available_later' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'IsGenericName', 'size' => 255),
|
|
),
|
|
'associations' => array(
|
|
'manufacturer' => array('type' => self::HAS_ONE),
|
|
'supplier' => array('type' => self::HAS_ONE),
|
|
'default_category' => array('type' => self::HAS_ONE, 'field' => 'id_category_default', 'object' => 'Category'),
|
|
'tax_rules_group' => array('type' => self::HAS_ONE),
|
|
'categories' => array('type' => self::HAS_MANY, 'field' => 'id_category', 'object' => 'Category', 'association' => 'category_product'),
|
|
'stock_availables' => array('type' => self::HAS_MANY, 'field' => 'id_stock_available', 'object' => 'StockAvailable', 'association' => 'stock_availables'),
|
|
),
|
|
);
|
|
|
|
public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null,
|
|
$only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = null, $id_cart = null,
|
|
$id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null,
|
|
$use_customer_price = true)
|
|
{
|
|
global $cookie;
|
|
if (!$context) {
|
|
$context = Context::getContext();
|
|
}
|
|
|
|
if (is_null($id_customer) && Validate::isLoadedObject($context->customer)) {
|
|
$id_customer = $context->customer->id;
|
|
}
|
|
|
|
$cur_cart = $context->cart;
|
|
|
|
if ($divisor !== null) {
|
|
Tools::displayParameterAsDeprecated('divisor');
|
|
}
|
|
|
|
if (!Validate::isBool($usetax) || !Validate::isUnsignedId($id_product)) {
|
|
die(Tools::displayError());
|
|
}
|
|
|
|
// Initializations
|
|
$id_group = null;
|
|
if ($id_customer) {
|
|
$id_group = Customer::getDefaultGroupId((int)$id_customer);
|
|
}
|
|
if (!$id_group) {
|
|
$id_group = (int)Group::getCurrent()->id;
|
|
}
|
|
|
|
// If there is cart in context or if the specified id_cart is different from the context cart id
|
|
if (!is_object($cur_cart) || (Validate::isUnsignedInt($id_cart) && $id_cart && $cur_cart->id != $id_cart)) {
|
|
/*
|
|
* When a user (e.g., guest, customer, Google...) is on PrestaShop, he has already its cart as the global (see /init.php)
|
|
* When a non-user calls directly this method (e.g., payment module...) is on PrestaShop, he does not have already it BUT knows the cart ID
|
|
* When called from the back office, cart ID can be inexistant
|
|
*/
|
|
if (!$id_cart && !isset($context->employee)) {
|
|
die(Tools::displayError());
|
|
}
|
|
$cur_cart = new Cart($id_cart);
|
|
// Store cart in context to avoid multiple instantiations in BO
|
|
if (!Validate::isLoadedObject($context->cart)) {
|
|
$context->cart = $cur_cart;
|
|
}
|
|
}
|
|
|
|
$cart_quantity = 0;
|
|
if ((int)$id_cart) {
|
|
$cache_id = 'Product::getPriceStatic_'.(int)$id_product.'-'.(int)$id_cart;
|
|
if (!Cache::isStored($cache_id) || ($cart_quantity = Cache::retrieve($cache_id) != (int)$quantity)) {
|
|
$sql = 'SELECT SUM(`quantity`)
|
|
FROM `'._DB_PREFIX_.'cart_product`
|
|
WHERE `id_product` = '.(int)$id_product.'
|
|
AND `id_cart` = '.(int)$id_cart;
|
|
$cart_quantity = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
|
Cache::store($cache_id, $cart_quantity);
|
|
} else {
|
|
$cart_quantity = Cache::retrieve($cache_id);
|
|
}
|
|
}
|
|
|
|
$id_currency = Validate::isLoadedObject($context->currency) ? (int)$context->currency->id : (int)Configuration::get('PS_CURRENCY_DEFAULT');
|
|
|
|
// retrieve address informations
|
|
$id_country = (int)$context->country->id;
|
|
$id_state = 0;
|
|
$zipcode = 0;
|
|
|
|
if (!$id_address && Validate::isLoadedObject($cur_cart)) {
|
|
$id_address = $cur_cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
|
|
}
|
|
|
|
if ($id_address) {
|
|
$address_infos = Address::getCountryAndState($id_address);
|
|
if ($address_infos['id_country']) {
|
|
$id_country = (int)$address_infos['id_country'];
|
|
$id_state = (int)$address_infos['id_state'];
|
|
$zipcode = $address_infos['postcode'];
|
|
}
|
|
} elseif (isset($context->customer->geoloc_id_country)) {
|
|
$id_country = (int)$context->customer->geoloc_id_country;
|
|
$id_state = (int)$context->customer->id_state;
|
|
$zipcode = $context->customer->postcode;
|
|
}
|
|
|
|
if (Tax::excludeTaxeOption()) {
|
|
$usetax = false;
|
|
}
|
|
|
|
if ($usetax != false
|
|
&& !empty($address_infos['vat_number'])
|
|
&& $address_infos['id_country'] != Configuration::get('VATNUMBER_COUNTRY')
|
|
&& Configuration::get('VATNUMBER_MANAGEMENT')) {
|
|
$usetax = false;
|
|
}
|
|
|
|
|
|
$return = array();
|
|
if (isset(Context::getContext()->customer)) {
|
|
$customer = new Customer(Context::getContext()->customer->id);
|
|
|
|
$group_categories = $customer->getGroupsCategoriesReduction();
|
|
if(!isset(self::$categories_product[$id_product])) {
|
|
$categories = Db::getInstance()->executeS(
|
|
'SELECT `id_category`
|
|
FROM `'._DB_PREFIX_.'category_product`
|
|
WHERE `id_product` = '.(int)$id_product
|
|
);
|
|
$categories = array_column($categories, 'id_category');
|
|
self::$categories_product[$id_product] = $categories;
|
|
} else {
|
|
$categories = self::$categories_product[$id_product];
|
|
}
|
|
|
|
foreach ($group_categories as $id_group => $list_categories) {
|
|
if (array_intersect($categories, $list_categories) || $id_group == Configuration::get('PS_CUSTOMER_GROUP')) {
|
|
$return[] = Product::priceCalculation(
|
|
$context->shop->id,
|
|
$id_product,
|
|
$id_product_attribute,
|
|
$id_country,
|
|
$id_state,
|
|
$zipcode,
|
|
$id_currency,
|
|
$id_group,
|
|
$quantity,
|
|
$usetax,
|
|
$decimals,
|
|
$only_reduc,
|
|
$usereduc,
|
|
$with_ecotax,
|
|
$specific_price_output,
|
|
$use_group_reduction,
|
|
$id_customer,
|
|
$use_customer_price,
|
|
$id_cart,
|
|
$cart_quantity
|
|
);
|
|
}
|
|
}
|
|
return min($return);
|
|
} else {
|
|
return Product::priceCalculation(
|
|
$context->shop->id,
|
|
$id_product,
|
|
$id_product_attribute,
|
|
$id_country,
|
|
$id_state,
|
|
$zipcode,
|
|
$id_currency,
|
|
null,
|
|
$quantity,
|
|
$usetax,
|
|
$decimals,
|
|
$only_reduc,
|
|
$usereduc,
|
|
$with_ecotax,
|
|
$specific_price_output,
|
|
$use_group_reduction,
|
|
$id_customer,
|
|
$use_customer_price,
|
|
$id_cart,
|
|
$cart_quantity
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function priceCalculation($id_shop, $id_product, $id_product_attribute, $id_country, $id_state, $zipcode, $id_currency,
|
|
$id_group, $quantity, $use_tax, $decimals, $only_reduc, $use_reduc, $with_ecotax, &$specific_price, $use_group_reduction,
|
|
$id_customer = 0, $use_customer_price = true, $id_cart = 0, $real_quantity = 0)
|
|
{
|
|
static $address = null;
|
|
static $context = null;
|
|
|
|
if ($address === null) {
|
|
$address = new Address();
|
|
}
|
|
|
|
if ($context == null) {
|
|
$context = Context::getContext()->cloneContext();
|
|
}
|
|
|
|
if ($id_shop !== null && $context->shop->id != (int)$id_shop) {
|
|
$context->shop = new Shop((int)$id_shop);
|
|
}
|
|
|
|
if (!$use_customer_price) {
|
|
$id_customer = 0;
|
|
}
|
|
|
|
if ($id_product_attribute === null) {
|
|
$id_product_attribute = Product::getDefaultAttribute($id_product);
|
|
}
|
|
|
|
$cache_id = (int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.$id_state.'-'.$zipcode.'-'.(int)$id_group.
|
|
'-'.(int)$quantity.'-'.(int)$id_product_attribute.
|
|
'-'.(int)$with_ecotax.'-'.(int)$id_customer.'-'.(int)$use_group_reduction.'-'.(int)$id_cart.'-'.(int)$real_quantity.
|
|
'-'.($only_reduc?'1':'0').'-'.($use_reduc?'1':'0').'-'.($use_tax?'1':'0').'-'.(int)$decimals;
|
|
|
|
// reference parameter is filled before any returns
|
|
$specific_price = SpecificPrice::getSpecificPrice(
|
|
(int)$id_product,
|
|
$id_shop,
|
|
$id_currency,
|
|
$id_country,
|
|
$id_group,
|
|
$quantity,
|
|
$id_product_attribute,
|
|
$id_customer,
|
|
$id_cart,
|
|
$real_quantity
|
|
);
|
|
|
|
if (isset(self::$_prices[$cache_id])) {
|
|
/* Affect reference before returning cache */
|
|
if (isset($specific_price['price']) && $specific_price['price'] > 0) {
|
|
$specific_price['price'] = self::$_prices[$cache_id];
|
|
}
|
|
return self::$_prices[$cache_id];
|
|
}
|
|
|
|
// fetch price & attribute price
|
|
$cache_id_2 = $id_product.'-'.$id_shop;
|
|
if (!isset(self::$_pricesLevel2[$cache_id_2])) {
|
|
$sql = new DbQuery();
|
|
$sql->select('product_shop.`price`, product_shop.`ecotax`');
|
|
$sql->from('product', 'p');
|
|
$sql->innerJoin('product_shop', 'product_shop', '(product_shop.id_product=p.id_product AND product_shop.id_shop = '.(int)$id_shop.')');
|
|
$sql->where('p.`id_product` = '.(int)$id_product);
|
|
if (Combination::isFeatureActive()) {
|
|
$sql->select('IFNULL(product_attribute_shop.id_product_attribute,0) id_product_attribute, product_attribute_shop.`price` AS attribute_price, product_attribute_shop.default_on');
|
|
$sql->leftJoin('product_attribute_shop', 'product_attribute_shop', '(product_attribute_shop.id_product = p.id_product AND product_attribute_shop.id_shop = '.(int)$id_shop.')');
|
|
} else {
|
|
$sql->select('0 as id_product_attribute');
|
|
}
|
|
|
|
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
|
|
|
if (is_array($res) && count($res)) {
|
|
foreach ($res as $row) {
|
|
$array_tmp = array(
|
|
'price' => $row['price'],
|
|
'ecotax' => $row['ecotax'],
|
|
'attribute_price' => (isset($row['attribute_price']) ? $row['attribute_price'] : null)
|
|
);
|
|
self::$_pricesLevel2[$cache_id_2][(int)$row['id_product_attribute']] = $array_tmp;
|
|
|
|
if (isset($row['default_on']) && $row['default_on'] == 1) {
|
|
self::$_pricesLevel2[$cache_id_2][0] = $array_tmp;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (!isset(self::$_pricesLevel2[$cache_id_2][(int)$id_product_attribute])) {
|
|
return;
|
|
}
|
|
|
|
$result = self::$_pricesLevel2[$cache_id_2][(int)$id_product_attribute];
|
|
|
|
if (!$specific_price || $specific_price['price'] < 0) {
|
|
$price = (float)$result['price'];
|
|
} else {
|
|
$price = (float)$specific_price['price'];
|
|
}
|
|
|
|
|
|
// convert only if the specific price is in the default currency (id_currency = 0)
|
|
if (!$specific_price || !($specific_price['price'] >= 0 && $specific_price['id_currency'])) {
|
|
$price = Tools::convertPrice($price, $id_currency);
|
|
if (isset($specific_price['price'])) {
|
|
$specific_price['price'] = $price;
|
|
}
|
|
}
|
|
|
|
// Attribute price
|
|
if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute'] || $specific_price['price'] < 0)) {
|
|
$attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency);
|
|
// If you want the default combination, please use NULL value instead
|
|
if ($id_product_attribute !== false) {
|
|
$price += $attribute_price;
|
|
}
|
|
}
|
|
|
|
// Tax
|
|
$address->id_country = $id_country;
|
|
$address->id_state = $id_state;
|
|
$address->postcode = $zipcode;
|
|
|
|
$tax_manager = TaxManagerFactory::getManager($address, Product::getIdTaxRulesGroupByIdProduct((int)$id_product, $context));
|
|
$product_tax_calculator = $tax_manager->getTaxCalculator();
|
|
|
|
// Add Tax
|
|
if ($use_tax) {
|
|
$price = $product_tax_calculator->addTaxes($price);
|
|
}
|
|
|
|
// Eco Tax
|
|
if (($result['ecotax'] || isset($result['attribute_ecotax'])) && $with_ecotax) {
|
|
$ecotax = $result['ecotax'];
|
|
if (isset($result['attribute_ecotax']) && $result['attribute_ecotax'] > 0) {
|
|
$ecotax = $result['attribute_ecotax'];
|
|
}
|
|
|
|
if ($id_currency) {
|
|
$ecotax = Tools::convertPrice($ecotax, $id_currency);
|
|
}
|
|
if ($use_tax) {
|
|
// reinit the tax manager for ecotax handling
|
|
$tax_manager = TaxManagerFactory::getManager(
|
|
$address,
|
|
(int)Configuration::get('PS_ECOTAX_TAX_RULES_GROUP_ID')
|
|
);
|
|
$ecotax_tax_calculator = $tax_manager->getTaxCalculator();
|
|
$price += $ecotax_tax_calculator->addTaxes($ecotax);
|
|
} else {
|
|
$price += $ecotax;
|
|
}
|
|
}
|
|
|
|
// Reduction
|
|
$specific_price_reduction = 0;
|
|
if (($only_reduc || $use_reduc) && $specific_price) {
|
|
if ($specific_price['reduction_type'] == 'amount') {
|
|
$reduction_amount = $specific_price['reduction'];
|
|
|
|
if (!$specific_price['id_currency']) {
|
|
$reduction_amount = Tools::convertPrice($reduction_amount, $id_currency);
|
|
}
|
|
|
|
$specific_price_reduction = $reduction_amount;
|
|
|
|
// Adjust taxes if required
|
|
|
|
if (!$use_tax && $specific_price['reduction_tax']) {
|
|
$specific_price_reduction = $product_tax_calculator->removeTaxes($specific_price_reduction);
|
|
}
|
|
if ($use_tax && !$specific_price['reduction_tax']) {
|
|
$specific_price_reduction = $product_tax_calculator->addTaxes($specific_price_reduction);
|
|
}
|
|
} else {
|
|
$specific_price_reduction = $price * $specific_price['reduction'];
|
|
}
|
|
}
|
|
|
|
if ($use_reduc) {
|
|
$price -= $specific_price_reduction;
|
|
}
|
|
|
|
// Group reduction
|
|
if ($use_group_reduction) {
|
|
$reduction_from_category = GroupReduction::getValueForProduct($id_product, $id_group);
|
|
if ($reduction_from_category !== false) {
|
|
$group_reduction = $price * (float)$reduction_from_category;
|
|
} else { // apply group reduction if there is no group reduction for this category
|
|
$group_reduction = (($reduc = Group::getReductionByIdGroup($id_group)) != 0) ? ($price * $reduc / 100) : 0;
|
|
}
|
|
|
|
$price -= $group_reduction;
|
|
}
|
|
|
|
if ($only_reduc) {
|
|
return Tools::ps_round($specific_price_reduction, $decimals);
|
|
}
|
|
|
|
$price = Tools::ps_round($price, $decimals);
|
|
|
|
if ($price < 0) {
|
|
$price = 0;
|
|
}
|
|
|
|
self::$_prices[$cache_id] = $price;
|
|
return self::$_prices[$cache_id];
|
|
}
|
|
}
|