Via backend, I added a dropdown custom attribute on my products. Now I need to filter the product collection based on the value of this dropdown. If I add the option id in the filter, everything works, but if I use the option value, then the filter doesn’t work: $attributeCode […]
Daily Archives: January 1, 2026
In Magento 2.4.3 I have created a page builder product attribute labeled “Before Content” which the admin will populate with html and I want to show in product page. Under child theme I have created Magento_Catalog/templates/product/view/before-content.phtml <?php $_helper = $this->helper('MagentoCatalogHelperOutput'); $_product = $block->getProduct(); $_code = $block->getAtCode(); $_className = $block->getCssClass(); $_attributeLabel […]
I am trying to join two tables like below $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $collection = $objectManager->get('AdvanceModuleModelMethod') ->getCollection()->addFieldToFilter('stores', ['finset' => $store_id]); $collection->getSelect()->joinLeft( ['shippingrate'=> 'shippingrate'], 'shippingrate.method_id = main_table.method_id', ['main_table.method_id']); This is returning all data from two tables. I could not get specific columns from the end result.
I am trying to exclude the file “core” from backups. I am using –delete and –delete-excluded. There are subdirectories foo/bar/core/baz.txt that ought to be backed up. However, rsync is deleting everyting under “foo/bar/core/” because I’ve excluded “core”. I have tried “**/core”, “core/”(which is wrong), “core”. It should, however delete “foo/bar/core”(file) […]
The APC UPS that my wife’s desktop is connected to has something odd in the input sockets at both ends. Here’s a photo I took of one end: I’ve never noticed that until now. What is that?
I have a router running FreshTomato using DDNS addresses for the allow list on my port forwards. This works well except that when save is pressed on the port forwards screen the DNS address is resolved to an IP address and cached. Is there a command I can run on […]
I have a polling script that will occasionally pop out the name of a file to delete. The file to delete will always be located on an NFS-mounted filesystem. So I wrote this Bash script: #!/bin/bash /usr/local/bin/polling.sh | while read FILE_TO_DELETE; do rm "${FILE_TO_DELETE}" done When this script is run, […]
Problem: I want my Heading 1 style to be numbered 1, 2, 3… and I want my Heading 2 style to be numbered a, b, c… with sublevels 2, so that I get my headings like this: 1 Heading 1 1a Heading 2 1b Heading 2 2 Heading 1 2a […]