本文整理汇总了PHP中ProductSupplier::getProductPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP ProductSupplier::getProductPrice方法的具体用法?PHP ProductSupplier::getProductPrice怎么用?PHP ProductSupplier::getProductPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProductSupplier
的用法示例。
在下文中一共展示了ProductSupplier::getProductPrice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setDetailProductPrice
protected function setDetailProductPrice(Order $order, Cart $cart, $product)
{
$this->setContext((int) $product['id_shop']);
$specific_price = $null = null;
Product::getPriceStatic((int) $product['id_product'], true, (int) $product['id_product_attribute'], 6, null, false, true, array($product['cart_quantity'], $product['cart_quantity_fractional']), false, (int) $order->id_customer, (int) $order->id_cart, (int) $order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}, $specific_price, true, true, $this->context);
$this->specificPrice = $specific_price;
$this->original_product_price = Product::getPriceStatic($product['id_product'], false, (int) $product['id_product_attribute'], 6, null, false, false, 1, false, null, null, null, $null, true, true, $this->context);
$this->product_price = $this->original_product_price;
$this->unit_price_tax_incl = (double) $product['price_wt'];
$this->unit_price_tax_excl = (double) $product['price'];
$this->total_price_tax_incl = (double) $product['total_wt'];
$this->total_price_tax_excl = (double) $product['total'];
$this->purchase_supplier_price = (double) $product['wholesale_price'];
if ($product['id_supplier'] > 0 && ($supplier_price = ProductSupplier::getProductPrice((int) $product['id_supplier'], $product['id_product'], $product['id_product_attribute'], true)) > 0) {
$this->purchase_supplier_price = (double) $supplier_price;
}
$this->setSpecificPrice($order, $product);
$this->group_reduction = (double) Group::getReduction((int) $order->id_customer);
$shop_id = $this->context->shop->id;
$quantity_discount = SpecificPrice::getQuantityDiscount((int) $product['id_product'], $shop_id, (int) $cart->id_currency, (int) $this->vat_address->id_country, (int) $this->customer->id_default_group, (int) PP::resolveQty($product['cart_quantity'], $product['cart_quantity_fractional']), false, null, null, $null, true, true, $this->context);
$unit_price = Product::getPriceStatic((int) $product['id_product'], true, $product['id_product_attribute'] ? (int) $product['id_product_attribute'] : null, 2, null, false, true, 1, false, (int) $order->id_customer, null, (int) $order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}, $null, true, true, $this->context);
$this->product_quantity_discount = 0.0;
if ($quantity_discount) {
$this->product_quantity_discount = $unit_price;
if (Product::getTaxCalculationMethod((int) $order->id_customer) == PS_TAX_EXC) {
$this->product_quantity_discount = Tools::ps_round($unit_price, 2);
}
if (isset($this->tax_calculator)) {
$this->product_quantity_discount -= $this->tax_calculator->addTaxes($quantity_discount['price']);
}
}
$this->discount_quantity_applied = $this->specificPrice && $this->specificPrice['from_quantity'] > PP::getSpecificPriceFromQty((int) $product['id_product']) ? 1 : 0;
$this->id_cart_product = (int) $product['id_cart_product'];
$this->product_quantity_fractional = (double) $product['cart_quantity_fractional'];
$ppropertiessmartprice_hook3 = null;
}