I removed the condition !Mage::getStoreConfig('product_use_categories')) and unified the two if s into one. Why can we remove the condition?
The condition is currently useless, because it checks the wrong path. It would have to check catalog/seo/product_use_categories, so that it works. Currently, it always returns null, so that the condition is always evaluated to true.
The condition is counter-intuitive. If I enable the option catalog/seo/product_canonical_tag (which is disabled by default!) then I want the redirect to happen. No matter which other settings I made.
I removed the condition
!Mage::getStoreConfig('product_use_categories'))
and unified the twoif
s into one. Why can we remove the condition?catalog/seo/product_use_categories
, so that it works. Currently, it always returnsnull
, so that the condition is always evaluated totrue
.catalog/seo/product_canonical_tag
(which is disabled by default!) then I want the redirect to happen. No matter which other settings I made.