$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Model\Order')->load($block->getRequest()->getParam("order_id"));
$easyParcelData['shipping_address'] = array(
'id' => $order->getIncrementId(),
'status' => $order->getStatus(),
'name' => $order->getCustomerName(),
'email' => $order->getCustomerEmail(),
'telephone' => $order->getShippingAddress()->getTelephone(),
'street' => $order->getShippingAddress()->getStreet(),
'postcode' => $order->getShippingAddress()->getPostcode(),
'city' => $order->getShippingAddress()->getCity(),
'state' => $order->getShippingAddress()->getState(),
'country' => $order->getShippingAddress()->getCountryId(),
'weight' => $order->getWeight(),
);
foreach ($orderCollection as $order) {
$items=array();
foreach ($order->getAllItems() as $item) {
$items[] = array(
'id' => $order->getIncrementId(),
'name' => $item->getName(),
'sku' => $item->getSku(),
'Price' => $item->getPrice(),
'Ordered Qty' => $item->getQtyOrdered(),
);
}
$orders['orders'][] = array(
'id' => $order->getIncrementId(),
'store' => 'magento',
'status' => $order->getStatus(),
'name' => $order->getCustomerName(),
'email' => $order->getCustomerEmail(),
'telephone' => $order->getShippingAddress()->getTelephone(),
'street' => $order->getShippingAddress()->getStreet(),
'pincode' => $order->getShippingAddress()->getPostcode(),
'city' => $order->getShippingAddress()->getCity(),
'weight' => $order->getWeight(),
'items' => $items,
);
}
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento deploy:mode:set developer
DB username/password = magento_admin/magento-admin
?templatehints=magento
templatehints=magento
https://magento2tutorial.magestore.com/magento-2-theme-create-sample-custome-theme/
/vendor/magento/framework/View/Element/Template/File/Validator.php In
$realPath = $this->fileDriver->getRealPath($path);
$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
php bin/magento module:status
php bin/magento module:enable Namespace_ModuleName
block class="Webkul\HelloWorld\Block\HomePage" template="Webkul_HelloWorld::homepage.phtml"
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);
Comments
Post a Comment