I am trying to show custom attributes in the checkout/cart page. I have created a catalog_attributes.xml and put it in a custom module <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd"> <group name="quote_item"> <attribute name="delivery_due_date"/> <!-- add your custom attribute name --> </group> </config> and then in cart/info/default.phtml I have <span>due: <?php echo $_item->getProduct()->getData('delivery_due_date');?></span> This […]
Magento
I tried to integrate Klaro consent in Magento 2.4.2 using two phtml-files that are loaded in the right order. In a test html-file the cookie consent is shown properly. Both js-files are loaded in Magento and output a console.log. But the Cookie consent is not shown at all. All caches […]
In Magento 2.4.2, when i am going to update products programmatically, it’s removed customizable options automatically Below code for your reference: $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $productCollection = $objectManager->create('MagentoCatalogModelResourceModelProductCollection'); $collection = $productCollection->addAttributeToSelect('*')->load(); foreach ($collection as $product){ $product->save(); } It’s automatically removed existing customizable options Before executing above code After executing above code
Use Case From a product with quantity 0 and Out of stock status. I have an event <event name="catalog_product_save_after"> <observer name="stock_alert" instance="CpyStockAlertObserverSaveProduct" /> </event> Change the value adding quantity and setting in stock status When I check the product saleable value in the observer public function execute(Observer $observer) { $product […]
I need to know, Is there any side issues, if we increase the below path size more than max in config file. system/security/max_session_size generally as per magento max size is 256000 Can we increase more then 256000 until which limit can we extend the size. Anyone who know ever used […]
I’m using the module Amasty’s customer Attributes to create custom customer attributes, I like to get custom attribute displayed value but i got the option value. I like to get the value in data-title attribute I tried this if ($customAttribute = $customer->getCustomAttribute('custom_value')){ $regrouper = $customAttribute->getValue(); var_dump(regrouper);exit; //it returns 615 instead […]
How to setup bento survey in Magento 2 ? Need to add below in head tag. <bento-survey-form id="old-glade-12345" type="popup" delay="5"></bento-survey-form> I have tried using requirejs-config.js and also adding below script. <script src="https://unpkg.com/jquery"></script> <script src="https://unpkg.com/survey-jquery@1.9.13/survey.jquery.min.js"></script> requirejs-config.js var config = { paths: { Survey: 'V4U_BentoSurvey/js/survey.jquery.min' }, shim: { Survey: { deps: ['jquery'] […]
I need to sort a collection by an attribute, taking into account only the numbers and decimal places of this attribute, ignoring the letters. I don’t think there is anyway to use addAttributeToSort here. On version Magento 2.3. The collection is of catalog_product_entity. The attribute I need to sort by […]
We had 3 stores in Magento 1.9.4. I migrated 2 of them to Magento 2.4.2-p1 using the Magento Migration tool, installed the Smartwave Porto theme and the Amasty extensions and now we have many many problems! Here is what I would like to do: make a fresh install of Magento […]