Problem with reindexing process for "Product flat data" indexes
Reindexing of Product flat data index gives unknown reindexing error or “Some problem with reindexing process” error message or reindexing of Product flat data index is never completed.
Attempt to reindex it via command line gives the following error message:
$ php -f shell/indexer.php -- --reindex catalog_product_flat
Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (<result 2 when explaining filename '#sql-'>, CONSTRAINT ´FK_CAT_PRD_FLAT_1_ENTT_ID_CAT_PRD_ENTT_ENTT_ID´ FOREIGN KEY (´entity_id´) REFERENCES ´catalog_product_entity´ (´entity_id)' in lib/Zend/Db/Statement/Pdo.php:228
How to get current currency in Magento?
We know Magento support multiple currency. I have found the solution to check current currency in the Magento site frontend
To get Current Currency
<?php echo $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>
If you looking for current currency symbol use :
Magento: Automated Bash Script Installer
The following SSH script will automate the process of installing Magento, with or without sample data. It will walk you through everything, and the only thing you need to setup first is the database and assign a user to the database.
You will need SSH access to use this. SSH is similar to FTP, in that it requires software that you’ll need to download in order to connect to your site. If you don’t have an SSH client, you can download PuTTY for free.
Magento: How To Setup Google Adwords Conversion Tracking
Setting up Google Adwords Conversion Tracking on your Magento Community store is relatively easy – but it’s not a built-in Magento feature, so you’ll have to edit a template file. Here are the 4 simple steps that need to be done: (more…)
The following error message is shown instead of your usual Magento page:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 1286489434787
Usually, it is caused by calling incompatible classes in themes, extensions or templates, database connectivity issues or resource shortage (i.e. insufficient diskspace or PHP memory_limit option).
Blank page is shown in Magento Frontend, Backend or Magento Connect Manager
If you see a blank page opening your Store in browser, it indicates that there is a PHP syntax error somewhere in the code of your site.
This usually happens when you modified files, templates or extensions manually, or installed a theme or extension with PHP syntax errors.
Before starting investigation please try to Disable Magento Compiler and Clear cached Magento data , in the most cases it should solve the issue.
To see the actual error message you need to login via FTP to your Store and use the following instructions:
Magento 1.6 Upgrade Errors with Solutions
After upgrading to Magento 1.6, You may face some problems like Integrity constraint violation: 1062 Duplicate entry or Error 404 after installation(while home page is OK).
I found a really simple solution:
– I made another store wiew
– I assigned a new theme to it
– I removed store view list from pages
now, I can easily switch between themes:
……/?___store=new_theme – new theme for developing purposes
……/?___store=default – current theme
and customers will still see and old theme
If you only want to change default sort order you can do it in catalog.xml just by adding the following action:
This action will work in any block of type “catalog/product_list_toolbar”, so the XML snippet would be:
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<!-- The following code shows how to set your own pager increments -->
<action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
This block is used twice in catalog.xml once for normal product lists and once for layered navigation product lists, so just make the same change in both places.
///////////// uncompleted //////////////
php /home/USERACCOUNT/public_html/shell/indexer.php reindexall