Skip to content

custom-attributes

Auto Added by WPeMatico

Unable to add attribute to product by InstallData

I would like to add a custom attribute to the product and create an installData.php according to the guide. However, nothing changed after se:up. Please help. app/code/My/Module/Setup/InstallData.php <?php namespace MyModuleSetup; use MagentoEavSetupEavSetup; use MagentoEavSetupEavSetupFactory; use MagentoFrameworkSetupInstallDataInterface; use MagentoFrameworkSetupModuleContextInterface; use MagentoFrameworkSetupModuleDataSetupInterface;… Read More »Unable to add attribute to product by InstallData

Custom Attribute on order confirmation email in Magento 2.4.5

I’m trying to publish the custom attribute “flash_sale” (dropdown) on order confirmations. I’ve changed the file: vendor/magento/module-sales/view/frontend/templates/email/items/order/default.phtml and inserted the additional line: <p style=”color: #aaaaaa;”><?= /* @escapeNotVerified */ __(‘Flash Sale’) ?>: <?= $block>escapeHtml($block->getflash_sale()) ?></p> with the result: <td class=”item-info<?php if… Read More »Custom Attribute on order confirmation email in Magento 2.4.5