<?php declare(strict_types=1); namespace VendorModuleSetupPatchData; use MagentoEavModelConfig; use MagentoEavModelEntityAttributeSetFactory as AttributeSetFactory; use MagentoEavModelEntityAttributeSourceBoolean; use MagentoEavSetupEavSetupFactory; use MagentoFrameworkExceptionLocalizedException; use MagentoFrameworkSetupPatchDataPatchInterface; use Zend_Validate_Exception; /** * @class CustomerSync */ class CustomerSync implements DataPatchInterface { /** * @var Config */ private Config $eavConfig; /** * @var EavSetupFactory */ private EavSetupFactory $eavSetupFactory; /** * @var AttributeSetFactory […]
Magento2
How to wait till components exists in registry . I want to wait till global component “messages” initialize then I can add error/success message. // view/frontend/templates/messages.phtml <script type="text/x-magento-init"> { "*": { "Magento_Ui/js/core/app": { "components": { "messages": { "component": "Magento_Theme/js/view/messages" } } } } } </script> I have try ‘Magento_Ui/js/lib/view/utils/async’ but […]
How can I do that? this is my code. $quote = $this->checkoutSession->getQuote(); $grand_total = $quote->getGrandTotal(); $new_grand_total = $grand_total + $fee; $quote->setGrandTotal($new_grand_total); $quote->setBaseGrandTotal($new_grand_total); $quote->collectTotals(); $quote->save(); $this->checkoutSession->getQuote()->collectTotals()->save();
Is anyone know why sometime elastic server takes time to connect Here is the screenshot from New relic report This screenshot report generated when customer visiting product listing pages. Is this server issue where we are hosted? or is it need to increase a plan or specifically Magento issue?
After update magento (from 2.3.4 > 2.4.2) and migrated on a new hosting, Add to cart button stop working. After i select a product and then “Add to cart” button, website is reloading on same page, but no product added on mini cart. Even if i navigated on /checkout/cart, cart […]
I want to add new field while we create new order from the Magento admin. So, any one has any reference for this ?
1 exception(s): Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled. Exception #0 (Exception): Unable to proceed: the maintenance mode is enabled. <pre>#1 MagentoFrameworkAppBootstrap->run() called at [pub/index.php:31] </pre>
Magento 2.4.6 I copied a product like that: $childCopy = $objectManager->create('MagentoCatalogModelProductCopier'); $childCopy = $childCopy->copy($parent); This works, I can set the SKU, the URL key and so on on the $childCopy, but visibility and status do not work: $childCopy->setSku('whatsever'); // works $childCopy->setPrice(10); // works $childCopy->setStatus(1); // does NOT work $childCopy->setVisibility(1); // […]
Tow product attribute is not showing Display Actual Price => msrp_display_actual_price_type RRP => msrp not showing after magento1.9.2.1 to magento2.4.6 migration. the msrp_enabled was not migrated after migration, i added it manually from admin.