New answers tagged

0

Maybe this can be explained by the fact that there are two different places where customer can add an VAT number. Customer address has a VAT ID field that is stored to the vat_id field in customer_address_entity table. Customer entity on the other hand has a different Tax/Vat field that is used for example when customer is registering and he is put to ...


0

There are many different ways to do this. One way is to make an after plugin for place order like this: app/code/StackExchange/BankTransferNotify/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config....


0

I have been chasing my tail for hours on this ... :/ lm713: "Try changing the PHP handler used by Apache on the Magento server" this did the trick, i am running magento 2 in cpanel environment and the php version was configured to use CGI as the PHP Handler. I changed it to suphp and all my api queries are now working!


1

Most effective is probably to use a SQL query with joins. E.g. like this public function execute() { $customerId = 1; $salesTable = $this->resource->getTableName('sales_order'); $salesItemTable = $this->resource->getTableName('sales_order_item'); $connection = $this->resource->getConnection(); $select = $connection-&...


0

I have used ViewModel instead of block class - Magento 2.3 onwards ViewModel class <?php namespace BA\BasysOrders\ViewModel; use Psr\Log\LoggerInterface; use Magento\Framework\App\Request\Http; class BasysInfo implements \Magento\Framework\View\Element\Block\ArgumentInterface { protected $logger; protected $request; protected $order; ...


0

You could do this with a layout XML file inside of your module. You need to have a section in your module's config.xml like this to let Magento load your module's layout XML (path: app/design/frontend/base/default/layout/mymodulename.xml): <config> [...] <frontend> [...] <layout> <updates> ...


0

Please prefer following link to fulfil your issue. Override phtml file in custom module If this answer helps you then hit like. Thank you, Hiren Patel


0

Try this in your Observer file: //Your code ........ protected $registry; //Your code ........ public function __construct( ......... \Magento\Framework\Registry $registry, ......... ) { ........ $this->registry = $registry; ........ } public function execute( \Magento\Framework\Event\Observer $observer ) { $...


1

in \app\design\adminhtml\default\default\template\sales\order\view\tab\info.phtml you have <div class="order-totals">. This is the place where order_totals block is rendered. EDIT to add row under subtotal: override : app\design\adminhtml\default\default\template\sales\order\create\totals\subtotal.phtml.


1

The best approach is that, you can override this into the Magento extension. So when you enable/disable that things, that will work with this extension.


1

Please follow the below steps to get the shipping method and its details in phtml file. app/code/Test/RoomDelivery/view/adminhtml/layout/sales_order_view.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/...


2

We need to create a plugin for the retrieve custom option from the cart to order. First We need to create di.xml. <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\...


Top 50 recent answers are included