[Solved] Magento 2 : Issue with line item price in shipment email

devhs Asks: Magento 2 : Issue with line item price in shipment email

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Email Shipment Items List" design_abstraction="custom">
        <referenceBlock name="items">
            <action method="setTemplate" >
                <argument name="template" xsi:type="string">Vendor_Sales::email/shipment/items.phtml</argument>


/** @var $_item MagentoSalesModelOrderItem */
$_item         = $block->getItem();
$_order        = $_item->getOrder();
$helper        = $this->helper('VendorSalesHelperData');
$product_image = $helper->getProductImage($_item->getSku());
$productObj    = $helper->getProductBySku($_item->getSku());
$color         = $productObj->getAttributeText('color');
$size          = $productObj->getAttributeText('size');
$brand         = $productObj->getDisplayBrand();
$product_url = $helper->getProductFrontendUrl($productObj);
$itemDiscounted = false;
$itemFree = false;
$itemQty       = $_item->getQty();
$specialPrice = $helper->formatProductPrice($_order->getOrderCurrencyCode(),$productObj->getSpecialPrice());
$regular_price = $helper->formatProductPrice($_order->getOrderCurrencyCode(),$productObj->getPrice('regular_price'));
$originalPrice = $_item->getOriginalPrice() > 0 ? $_item->getOriginalPrice() : $regular_price;

$store = $block->getOrder()->getStore()->getCode();
$itemRowTotal = $store == 'us' ? $_item->getPrice() * $itemQty : $_item->getPriceInclTax() * $itemQty;

$itemRowTotal is set as product price in shipment email but it shows 0 instead of actual price

any thoughts what can be the issue ?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.