Closed thomas-kl1 closed 2 weeks ago
Hi @thomas-kl1. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
@magento I am working on this
Can you confirm if this code does work for you? I'm trying it out but the productAttribute function in Vendor\Module\Model\Handler\Output never gets fired. I can see the constructor in Vendor\Module\Model\Handler\Output firing, though, but when I trace through Magento\Catalog\Helper\Output I can't see this new handler being added anywhere. Thanks.
@nahall sorry there was a typo in the xml, please try again, but set the key in lowercase in the di (I have updated the description)
Ah, I had found the first typo but didn't realize that productattribute was case sensitive. It seems to be working now. Thanks much!
Hi @thomas-kl1 do you think we could close this issue?, was it just a typo then?. Thanks!
Hi @danidelcar it doesn't seems that the feature has been documented in the Magento Devdoc, so the issue should remain open.
The Magento developer documentation was migrated to Adobe Commerce Developer Documentation. If the issue is still relevant, please feel free to reopen the issue in the corresponding project.
New feature request
Description
Register new attribute output handlers via the di.
Issue: https://github.com/magento/magento2/issues/12371 Pull Request: https://github.com/magento/magento2/pull/24405
Expected result
The developer can add new attribute output handlers via the dia without having to edit the templates/theme which reduce maintenance and cost and is great for extensibility.
Benefits
This feature allows to add output handler without modifying the templates/themes for specific attribtues
Possible solutions
Developer guide:
Where
Vendor\Module\Model\Handler\Output
is: