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): ?> <p><?php echo $_item['name'] ?></p> <?php endforeach; ?> The issue: In […]
Magento
First product list A1, A2,A3 Product Family A Second product list B1,B2,B3 Product Family B It shows on PLP such as in this way; Family A Title Family A description A1 A2 A3 Family B Title Family B description B1 B2 B3 How can I change the order of Families? […]
I am using this mixin for the custom validation rules in the below template for the first and last name Template: /vendor/magento/module-customer/view/frontend/templates/widget/name.phtml require js : var config = { config: { mixins: { 'mage/validation': { 'Magento_Customer/js/name-validation': true } } } } Js file : require( [ ‘Magento_Ui/js/lib/validation/validator’, ‘jquery’, ‘mage/translate’ ], […]
I’m working on a Magento Cloud project after a other developers left it and I’m having a hard time figuring out the development cycle. I can change files on a branch and commit the changes, causing a build/deploy on the cloud environment, but every branch is on production mode with […]
I got this messagein console: Uncaught TypeError: Unable to process binding “if: function(){return cookieMessages && cookieMessages.length > 0 }” Message: Unable to process binding “foreach: function(){return { data:cookieMessages,as:’message’} }” Message: Unable to process binding “html: function(){return $parent.prepareMessageForHtml(message.text) }” Message: $parent.prepareMessageForHtml is not a function at html (eval at createBindingsStringEvaluator (knockout.js:3221:28), […]
I am trying to access my project locally and I keep getting 502 bad gateway nginx error. Funny thing is that the admin side works but, the customer view gives me this bad gateway error. I am using nginx and the error logs from nginx are 2022/10/02 12:04:58 [alert] 1353#1353: […]
Is there a way in Magento 2 to check/know if a customer and a customer addres is created/edited from admin panel ? I was thinking using a oberver on customer_address_save_before and adminhtml_customer_save_before but I’m not sure it concern only creation/edition made in admin panel
I need some help for what I’m trying to do: remove or disable the state/province field in new/edit address form in backoffice unless the admin choose some specific countries. Is there anyway fo remove/disable it from xml or php code ? please help me on this. Thanks