本文整理汇总了PHP中Magento\Sales\Model\Order\Item::getRowTotal方法的典型用法代码示例。如果您正苦于以下问题:PHP Item::getRowTotal方法的具体用法?PHP Item::getRowTotal怎么用?PHP Item::getRowTotal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Sales\Model\Order\Item
的用法示例。
在下文中一共展示了Item::getRowTotal方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: assertOrderItem
/**
* @param \Magento\Sales\Model\Order\Item $orderItem
* @param array $response
* @return void
*/
protected function assertOrderItem(\Magento\Sales\Model\Order\Item $orderItem, array $response)
{
$this->assertEquals($orderItem->getId(), $response['item_id']);
$this->assertEquals($orderItem->getOrderId(), $response['order_id']);
$this->assertEquals($orderItem->getProductId(), $response['product_id']);
$this->assertEquals($orderItem->getProductType(), $response['product_type']);
$this->assertEquals($orderItem->getBasePrice(), $response['base_price']);
$this->assertEquals($orderItem->getRowTotal(), $response['row_total']);
}
示例2: getTotalAmount
/**
* Return the total amount minus discount
*
* @param OrderItem|InvoiceItem|CreditmemoItem $item
* @return mixed
*/
public function getTotalAmount($item)
{
$totalAmount = $item->getRowTotal() - $item->getDiscountAmount() + $item->getTaxAmount() + $item->getHiddenTaxAmount();
return $totalAmount;
}
示例3: getTotalAmount
/**
* Return the total amount minus discount
*
* @param OrderItem|InvoiceItem|CreditMemoItem $item
* @return mixed
*/
public function getTotalAmount($item)
{
$totalAmount = $item->getRowTotal() - $item->getDiscountAmount() + $item->getTaxAmount() + $item->getHiddenTaxAmount() + $this->weeeHelper->getRowWeeeTaxInclTax($item);
return $totalAmount;
}
示例4: getTotalAmount
/**
* Return the total amount minus discount
*
* @param OrderItem|InvoiceItem|CreditmemoItem $item
* @return mixed
*/
public function getTotalAmount($item)
{
$totalAmount = $item->getRowTotal() + $item->getTaxAmount() + $item->getDiscountTaxCompensationAmount() + $item->getWeeeTaxAppliedRowAmount() - $item->getDiscountAmount();
return $totalAmount;
}
示例5: getOrderItemVariables
/**
* Retrieve tracking variables for an order item
*
* @param \Magento\Sales\Model\Order\Item $item The order item
*
* @return array
*/
private function getOrderItemVariables($item)
{
$variables = [];
if (!$item->isDummy()) {
$itemId = $item->getId();
$prefix = "order.items.{$itemId}";
$variables[$prefix . '.sku'] = $item->getSku();
$variables[$prefix . '.product_id'] = $item->getProductId();
$variables[$prefix . '.qty'] = $item->getQtyOrdered();
$variables[$prefix . '.price'] = $item->getBasePrice();
$variables[$prefix . '.row_total'] = $item->getRowTotal();
$variables[$prefix . '.label'] = $item->getName();
$variables[$prefix . '.salesrules'] = $item->getAppliedRuleIds();
if ($product = $item->getProduct()) {
$categoriesId = $product->getCategoryIds();
if (count($categoriesId)) {
$variables[$prefix . '.category_ids'] = implode(",", $categoriesId);
}
}
}
return $variables;
}