Skip to content

magento2.4

Auto Added by WPeMatico

Setting default attribute_set_id via form modifier

I am currently able to hide, disable or set default values for fields on product creation form via the following: etc/adminhtml/di.xml: <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <virtualType name=”MagentoCatalogUiDataProviderProductFormModifierPool”> <arguments> <argument name=”modifiers” xsi:type=”array”> <item name=”testAttribute” xsi:type=”array”> <item name=”class” xsi:type=”string”>MypackageCustomUiDataProviderProductFormModifierAttributes</item> <item name=”sortOrder”… Read More »Setting default attribute_set_id via form modifier

Magento 2.4.6: Order confirmation email configurable product custom attribute returns parent value instead of child

I’m trying to add a custom product attribute ‘renewal’ to the order confirmation email. I have several configurable products and they are returning the parent product attribute value rather than the correct child product. The ‘renewal’ product attribute is a… Read More »Magento 2.4.6: Order confirmation email configurable product custom attribute returns parent value instead of child

Hide DIV if another DIV is active or visible with css/js

Trying to hide DIV if another DIV is active or visible with css/js. Basically if an item is out of stock I would like to hide my custom div. <script type=”text/javascript”> require([‘jquery’], function(jquery) { jquery(document).ready(function(){ if(document.getElementByClass(“stock.unavailable”).style.visibility == “visible”) { document.getElementByClass(“left-stock”).style.visibility… Read More »Hide DIV if another DIV is active or visible with css/js