Skip to content

Price-Indexer Will Not Re-Index in Magento

Interface: SSH
Engine: Magento 1.8
Plugin: Organic Internet’s Simple Configurable Products

Organic Internet’s Simple Configurable Products is a handy Plugin if you’re creating Configurable Products, and wish to only have to set the price of the Simple Product, and not on every Configurable Product. This way, you can change your what-cha-ma-call-it from 4$ for the small to 5$ by only changing it on the Simple Product, not on every single Configurable Product in your store. If you have 100 configurable items (or even 5 for that matter) in your store, trust me, this is a good thing.

So, what I had done is first create my Simple Products that I was going to be associating with my Configurable Product, then I created my Configurable Product. All was good.

Then I added this handy Plugin: “Simple Configurable Products”, and changed a few things around, and noticed that I had to re-index a few things in the Index Manager (this was a warning at the top of the page). When I went to the Index Manager, my Price-Indexer wasn’t re-indexing for me.

Obviously this isn’t acceptable since prices do change.

I dug around a while, and there is already a lot of information out there on this solution, but it was still kind of hard to find the right solution.

The Solution

There is a GitHub forum around this exact issue. It has the solution I’ll be relaying here.

To solve this issue, go into the file located at:

../app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php

and add the following code:

line 87 ->      'group_price'       => new Zend_Db_Expr('pi.group_price'),
line 88 ->      'base_group_price'  => new Zend_Db_Expr('pi.group_price'),

line 131 ->     'group_price',
line 132 ->     'base_group_price',

Note: I always try to make my code align with the way it’s done in the file. This one was a bit tricky!

The Tools

I ran into a problem though when I was trying to access this file my usual ftp way (I use Notepad++). So, I ended up having to use SSH directly and alter the file using the command:

sudo vi [path to magento folder]/app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php

The commands when using vi are fairly straight forward.

i = insert
esc = exit insert
:wq = save and quit

 

Hope this helps!

 

This article referenced:

22 thoughts on “Price-Indexer Will Not Re-Index in Magento”

  1. Hey ned,
    i used the fixed github file (http://bit.ly/19rK4yl) which contained your changes already. I am hanging for days on this problem, but there is now way to reindex with the aktiv scp extension… Maybe you have even another advice?!

    1. Dear Thomas, this is the solution that worked for me. As I mentioned, I did have some troubles with adding the code. Make sure it has all been added properly, as even a dot can make it not work, and saved.

  2. Ned thanks for posting this. Everything seems to work now, but when I try to reindex price data it goes to my host’s stock 404 page. Hitting the back button shows that the price data has been reindexed but the 404 error is still there any time I try to reindex. Have you had any luck getting this to work with community edition 1.8? I would appreciate any help with this as I am not a coder. Others seem to have this same issue but no website has pointed towards a fix yet.

    1. Aaron, this does sound like an issue I’ve seen before, but I can’t recall why it happened. A 404 error should produce some kind of input into the error log in your server, perhaps looking in there is a good start?

  3. I’m busy with testing a new webshop using Magento for the very first time. This one solved my problem! After installing the SCP Add on, Magento gave an error when I wanted to re-index the index product prices. I’ve looked around for ages and finally I found your solution. You are my hero!

    I did the same thing in Magento 1.9.1.

    1. So happy to hear it worked my man. If it’s still an option, I’d suggest migrating to a WordPress e-commerce store. So much easier and friendly and glitch free.

Leave a Reply

Your email address will not be published. Required fields are marked *

10 − three =