init
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Stemcell\Sales\Block\Order\Email;
|
||||
|
||||
class Items extends \Magento\Sales\Block\Order\Email\Items
|
||||
{
|
||||
public function getPrice(\Magento\Sales\Model\Order\Item $item): string
|
||||
{
|
||||
// $discountPercent = $item->getData('customer_discount_percent')*1.0;
|
||||
$price = $item->getPrice();
|
||||
// $price = $discountPercent? $price*((100-$discountPercent)/100):$price;
|
||||
return number_format($price, 2);
|
||||
}
|
||||
|
||||
public function getRowTotal(\Magento\Sales\Model\Order\Item $item): string
|
||||
{
|
||||
$discountPercent = $item->getData('customer_discount_percent')*1.0;
|
||||
$rowTotal = $item->getRowTotal();
|
||||
$rowTotal = $discountPercent? $rowTotal*((100-$discountPercent)/100):$rowTotal;
|
||||
|
||||
return number_format($rowTotal, 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user