0

I have just re-index the data using custom script and its generate this error :

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 'abs', ( - i.price), IF( = 'fixed', , ROUND(i.price * ( / 100), 4)))), 0) AS `' at line 1

I have tried by making the catalog_product_flat_1 table but still the same issue

Xabby
  • 435
  • 6
  • 26
  • Did you try to clear store full cache, log out, login, reindex all? – elddenmedio Apr 20 '16 at 15:18
  • Yeah I did this but no luck at all. – Xabby Apr 20 '16 at 15:23
  • I'm voting to close this question as off-topic because Stack Overflow is a [programming-related](http://stackoverflow.com/help/on-topic) Q&A site. Your question is not about programming. Perhaps you should post it on http://magento.stackexchange.com instead? – Enigmativity Apr 21 '16 at 13:52

4 Answers4

0

Could be any of a host of potential reasons.

If you have SSH access, I'd encourage you to reindex via the command line - more robust:

cd pathtomagentoinstall/shell
php indexer.php --reindex

How many products did you add exactly? Could be a timeout issue, although I'd expect a different error message for this.

EDIT - Also make sure Root category is setcorrectly: Go to System -> Manage Stores and make sure the Root Category is set to the category you're using

David Wilkinson
  • 5,060
  • 1
  • 18
  • 32
  • I have just created one product and a category for this product @David Wilkinson – Xabby Apr 20 '16 at 16:11
  • @Xabby Have you ensured your Root category is set to be correct: Go to System -> Manage Stores and make sure the Root Category is set to the category your using. – David Wilkinson Apr 20 '16 at 16:15
  • yeah I have "Default Category " as root and its set as default in Manage Stores @David Wilkinson – Xabby Apr 20 '16 at 16:21
  • 0nly this "Index product prices not index" option is not indexing all the others are done@David Wilkinson – Xabby Apr 21 '16 at 10:08
0
        You could try truncating those catalog_product_flat_* tables. Backup your database and then via MySQL console, phpMyAdmin or other MySQL client run the following:

truncate table ´catalog_product_flat_1´;
truncate table ´catalog_product_flat_2´;
truncate table ´catalog_product_flat_3´;



Do this for all catalog_product_flat_* tables. Then re-index the Product flat data index to rebuild / repopulate those tables.
viken
  • 26
  • 3
0

Go to Admin Panel - > System -> Configuration and then click on Manage Stores on the left and under the Store Name click on Main Website Store.

Choose the Root Category to Default Category. (by Default you may see –Please Select a Category--)

Natalie Hedström
  • 2,607
  • 3
  • 25
  • 36
viken
  • 26
  • 3
-1

To fix this problem, Use an FTP or ssh and from your project root folder, go to the location var/locks and delete all files inside that folder. Then Log in to the Magento Admin side and try re-indexing.

If this doesn't fix the error, just go to the ssh , change the path to YourProjectRootFolder/shell and enter the command php indexer.php --reindex all

This will fix the problem.

Ans BM
  • 1
  • 4
  • Actually only this "Index product prices not index" option is not indexing all the others are done@Ans BM – Xabby Apr 21 '16 at 10:07