Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexer does not respect catalog/seo/product_use_categories config flag #19

Open
drewgillson opened this issue Nov 25, 2014 · 0 comments

Comments

@drewgillson
Copy link

Hi Ivan, just wanted to let you know I've found and fixed a small issue with this extension. The problem is that even if an administrator has their product_use_categories flag set to No, the indexer will create URL rewrites that look like /some/category/product.html anyways.

I made the following change in EcomDev_UrlRewrite_Model_Mysql4_Indexer::_generateProductRequestPathIndex to correct the problem:

        // Initialize rewrite request path data
        $step = array(false);
        if (Mage::getStoreConfig(Mage_Catalog_Helper_Product::XML_PATH_PRODUCT_URL_USE_CATEGORY, Mage::app()->getStore()->getStoreId())) {
            $step[] = true;
        }

        foreach ($step as $categoryRewriteFlag) {

...instead of

        foreach (array(false,true) as $categoryRewriteFlag) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant