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 = "hidden"; } }); }); </script>
Magento
tried different solutions here which I found, but none of them is working for me. I want to add two custom options to a product with the code below. Problem is, that there is always only the second option added to the product and I do not know why. As […]
I want to implement BFCache into Magento but did not find the proper resources for implementing it using a custom module. BFCache: https://web.dev/articles/bfcache Can anyone guide me on how to do it?
I am using Mageworx advance custom option module. Right now everything working fine. Current Workflow: My custom options are basically have radio/checkbox options. If i select any option then product main price also updated based on selection. What i want: If any user click on the custom option, product price […]
How to validate coupon code is valid for old customer in magento 2.4. I used observer but unable to do
I want to use reOrderItems mutation. But the issue is that when i re order a specific product magento throws error that “The order number doesn’t belongs to the current customer”. even though the order is of the same customer and also the customer is authenticated by jwt. What can […]
I require an SQL query to retrieve information about the promotions applied to an order from the sales order table. The field “applied_rule_ids” is utilized to obtain all rule IDs. However, a challenge arises when a rule, such as “buy 2 get 1 free,” is stored in both the sales_order […]
How can I place a div or span class inside stock available with custom xml. Would like custom block next to INSTOCK. <body> <referenceBlock name="product.info.stock.sku"> <block class="StockQtyBlockLeftQty" name="catalog.product.view.stock" before="product.info.stock.sku" template="Dolphin_MyModule::leftqty.phtml" cacheable="false"/> </referenceBlock> </body>