Skip to content

magento2.3.5

Auto Added by WPeMatico

Magento 2.x.x extension attributes API add object array

Have added custom attribute to order API with following info here: https://www.atwix.com/magento-2/adding-custom-attribute-to-api-response-in-magento-2/ It adds the “customer_feedback”: “this is my feedback” fine to api. How to add an Json object array ? E.G: “my_custom_object”: { “Key1”: “value!”, “Key2”: “value2” } Thanks

Magento 2 Uncaught TypeError Cannot read property ‘done’ of undefined

Uncaught TypeError: Cannot read property ‘done’ of undefined at UiClass.continueToPayPal (paypal-express-abstract.js:80) at HTMLButtonElement.<anonymous> (knockout.js:4245) at HTMLButtonElement.dispatch (jquery.js:5232) at HTMLButtonElement.elemData.handle (jquery.js:4884) when I have click on the PayPal Express Checkout button page is not redirect and show me the error in… Read More »Magento 2 Uncaught TypeError Cannot read property ‘done’ of undefined

Use Custom Module collection in other custom Module magento 2

I want collection of one module in other module. I am doing it like use TestCompanyAddressesModelCompanyAddressFactory; class ReformatTelephoneField implements DataPatchInterface { protected $companyAddressFactory; /** * @param CompanyAddressFactory $companyAddressFactory */ public function __construct( CompanyAddressFactory $companyAddressFactory ) { $this->companyAddressFactory = $companyAddressFactory; }… Read More »Use Custom Module collection in other custom Module magento 2

Magento 2.3.5 order email observer custom block enable to pass array

I have tried the following: Observer … $transport = $observer->getTransport(); $transport->setTemplateVars([ ‘products’ => [ [‘name’ => ‘Product1’], [‘name’ => ‘Product2′] ] ]); … order_new_guest.html {{block class=’Magento\Framework\View\Element\Template’ area=’frontend’ template=’Vendor_Module::email/template.phtml’ products=$products}} email/template.phtml <p>HELLO!</p> <?php //print_r(count($this->getProducts())); ?> <?php foreach ($this->getProducts() as $_item): ?>… Read More »Magento 2.3.5 order email observer custom block enable to pass array