Redirect Simple Products to their Configurable Parent with Attributes Pre-selected

Hey guys I am trying to Redirect Simple Products to their Configurable Parent with Attributes Pre-selected and I followed Daan’s guide. The Observer is as follows:

https://github.com/fruit-ninja/magento/blob/master/observer.php

Unfortunately, I think a recent Magento update may have broken the code to actually pre-select the attributes. The redirect still works correctly. There were a few other folks have a similar issue on his site. Is there a simple fix we can use to patch this feature? Thanks so much.

This is on: Magento 2.3.5p running on CentOS

submitted by /u/qiyi
[link] [comments]