Archive for the ‘Magento’ Category

Hello Everyone,

 

After a long search i found solution to validate php tags using javascript from input values in magento.

 

I have modified magento/js/prototype/validation.js file and added new class to validate php tags:

You can review below code inside ‘Validation.addAllThese’ array  to add new class to validate php tags.


['validate-no-php-tags', 'PHP tags are not allowed', function(v) {

return  !/<\?[=|?php]?[\s\S]*?\?>/.test(v) && !/<\?[=|php]?[\s\S]*?/.test(v) && !/\?[\s\S]*?/.test(v) ;

}],

you can use ‘validate-no-php-tags’  css class in input tag in magento.

Above validation will validate tags like ‘<?php’, ‘<?’, ‘?>’, ‘<?php ?>’, ‘<? ?>’.

I hope above solution works like  charm.

 

Thanks,

Bijal Bhavsar

Hello Guys,

Today i m going to show you the ways to resolve error “SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘main_table.custom_desiwegn_apply’ in ‘field list’”

How this error occurs?

The above error occurs when we enable Flat catalog category settings from admin  >> System  >> Configuration >> Catalog  >> Frontend >> “Use Flat Catalog Category” set to “Yes”

How to resolve above error?

There are two ways to resolve above error specified below:

First Solution: 

Rewrite file  “YourProject\app\code\core\Mage\Catalog\Model\Resource\Category\Flat.php ” to do change in function getDesignUpdateData we need to comment code ”  ‘main_table.custom_design_apply’,” from function.

Second Solution:

To resolve above error we will create category attribute , create one file in root and paste below code and than execute that file once:

<?php
error_reporting(E_ALL | E_STRICT);
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
// below code will add text attribute
$setup->addAttribute('catalog_category','custom_design_apply',
	 array(
            'type'              => 'int',
            'label'             => 'Apply To',
            'frontend'          => '',
            'table'             => '',
            'input'             => 'select',
            'class'             => '',
            'source'            => 'core/design_source_apply',
            'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
            'visible'           => true,
            'required'          => false,
            'user_defined'      => false,
            'default'           => '',
            'searchable'        => false,
            'filterable'        => false,
            'comparable'        => false,
            'visible_on_front'  => false,
            'unique'            => false,
            'group' => 'design',
	    'sort'  => 20
        )
);

Don’t forget to do re-index from Admin panel, System >> Index Management

I hope above solution works like  charm.

Thanks,

Bijal Bhavsar 🙂

Hello Guys,

Today i’ll show you how to add affiliate code in checkout success page.

Below is the code for Product Specific Campaign setup for magento.

Open success.phtml from PATH:  Yourproject/app/design/frontend/package/theme/template/checkout/success.phtml.

Add Below code at the end of file.

We need to display below image code at checkout success page.

<img src="http://yourdomain.directtrack.com/i_prod/yourdomainname/PRODUCT_STRING/TRANSACTION_ID/OPTIONAL_INFO">  
<?php /****** START::  Affiliate  *******/?>
<?php  if($_orderID = $this->getOrderId()) {
$url = 'https://yourdomain.directtrack.com/i_prod/yourdomainname/';
$_order =  Mage::getModel('sales/order')->loadByIncrementId($_orderID);?>
<?php  $_items = $_order->getItemsCollection(); ?>
<?php $querystring='';
foreach ($_items as $_item):  ?>
<?php $querystring .='prod:'.$_item->getSku().':qty:'.$_item->getQtyOrdered();?>
<?php endforeach; ?>
<?php $querystring.= '/'.$_orderID;?>
<?php $url = $url.$querystring;?>
<img src="<?php echo $url?>" />
<?php }?>
<?php /****** END *********/?>

Thanks,
Bijal Bhavsar 🙂

Hello,

Today i’ll show you how to resolve issue of custom module frontend url is forced to https. instead of http. If you have used module creator to create module. Than you will definetly find below code in config.xml


<admin>
       <routers>
         <[ModuleName]>
            <use>admin</use>
            <args>
                <module>[NameSpace_ModuleName]</module>
                <frontName>[frontName]</frontName>
            </args>
        </[ModuleName]>
    </routers>
</admin>

To resolve issue of redirection to https instead of http, you need to comment above code from module config.xml file Path: app/code/(codepool)/(NameSpace)/(ModuleName)/etc/config.xml OR you can add different “frontName” for <admin> and <frontend> routers. Eg.:


<admin>
       <routers>
         <[ModuleName]>
            <use>admin</use>
            <args>
                <module>[NameSpace_ModuleName]</module>
                <frontName>[frontName]</frontName>
            </args>
        </[ModuleName]>
    </routers>
</admin>

<frontend>
       <routers>
         <[ModuleName]>
            <use>standard</use>
            <args>
                <module>[NameSpace_ModuleName]</module>
                <frontName>[frontName1]</frontName>
            </args>
        </[ModuleName]>
    </routers>
</frontend>

As per above code admin url will be http://yourdomain.com/index.php/frontName/adminhtml_moduleName/ and  frontend url will be like: http://yourdomain.com/index.php/frontName1

I hope above content is useful to you. Thanks for visiting my blog. Feel free to ask questions, if you have doubt.

Thanks,
Bijal Bhavsar 🙂

Hello,

Magento maintains several tables for logging. These tables log things such as customer accesses and which products have been compared. Magento has a mechanism for cleaning these logs regularly, but unfortunately this feature is disabled by default and most customers do not turn it on.

The following tables are managed by Magento’s Log Cleaning function:


TRUNCATE `dataflow_batch_export`;
TRUNCATE `dataflow_batch_import`;
TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_summary_type`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
TRUNCATE `log_visitor_online`;
TRUNCATE `report_viewed_product_index`;
TRUNCATE `report_compared_product_index`;
TRUNCATE `report_event`;
TRUNCATE `index_event`;

You can use below script file and use it by scheduling cronjob. Filename will be cleanup.php


<?php
$xml = simplexml_load_file('./app/etc/local.xml', NULL, LIBXML_NOCDATA);

$db['host'] = $xml->global->resources->default_setup->connection->host;
$db['name'] = $xml->global->resources->default_setup->connection->dbname;
$db['user'] = $xml->global->resources->default_setup->connection->username;
$db['pass'] = $xml->global->resources->default_setup->connection->password;
$db['pref'] = $xml->global->resources->db->table_prefix;

if($_GET['clean'] == 'log') clean_log_tables();
if($_GET['clean'] == 'var') clean_var_directory();

function clean_log_tables() {
	global $db;

	$tables = array(
		'dataflow_batch_export',
		'dataflow_batch_import',
		'log_customer',
		'log_quote',
		'log_summary',
		'log_summary_type',
		'log_url',
		'log_url_info',
		'log_visitor',
		'log_visitor_info',
		'log_visitor_online',
		'index_event',
		'report_event',
		'report_compared_product_index',
		'report_viewed_product_index',
		'catalog_compare_item',
		'catalogindex_aggregation',
		'catalogindex_aggregation_tag',
		'catalogindex_aggregation_to_tag'
	);

	mysql_connect($db['host'], $db['user'], $db['pass']) or die(mysql_error());
	mysql_select_db($db['name']) or die(mysql_error());

	foreach($tables as $v => $k) {
		@mysql_query('TRUNCATE `'.$db['pref'].$k.'`');
	}
}

function clean_var_directory() {
	$dirs = array(
		'downloader/.cache/*',
		'downloader/pearlib/cache/*',
		'downloader/pearlib/download/*',
		'var/cache/',
		'var/locks/',
		'var/log/',
		'var/report/',
		'var/session/',
		'var/tmp/'
	);

	foreach($dirs as $v => $k) {
		exec('rm -rf '.$k);
	}
}
?>

Save the file to the root directory of Magento code.

Next, open cPanel and click on the Cron Manager link.

In the Add Cron Job section, select Once a day from the Common Settings dropdown list. In the Command field, enter the following line of code, making sure to replace the yourdomain name with your own:


curl -s -o /dev/null http://www.yourdomain.com/cleanup.php?clean=log

Once you have this set at your preferred interval, click the Add Cron Job button.

Repeat the same steps as you did before, but change the Common Settings dropdown selection to 1st and 15th, and add the following line of code to the Command field:


curl -s -o /dev/null http://www.yourdomain.com/cleanup.php?clean=var

Now click the Add Cron Job button.

I hope above content is useful to you. Thanks for reading my blog.

Thanks,
Bijal Bhavsar 🙂

Hello,

Sometimes when we do re-index in magento, it shows error like “Can’t initialize indexer process”. And this error occurs while re-indexing “Product Prices”, than you can’t able to save product from admin too.

To resolve the above error you need to run below query. Probably it removes only 1 record.
This solution was taken from Magento forum. Here is the direct link:
http://www.magentocommerce.com/boards/viewthread/176845/



DELETE cpop.* FROM catalog_product_option_price AS cpop
INNER JOIN catalog_product_option AS cpo
ON cpo.option_id = cpop.option_id
WHERE
cpo.type = ‘checkbox’ OR
cpo.type = ‘radio’ OR
cpo.type = ‘drop_down’;DELETE cpotp.* FROM catalog_product_option_type_price AS cpotp
INNER JOIN catalog_product_option_type_value AS cpotv
ON cpotv.option_type_id = cpotp.option_type_id
INNER JOIN catalog_product_option AS cpo
ON cpotv.option_id = cpo.option_id
WHERE
cpo.type  ‘checkbox’ AND
cpo.type  ‘radio’ AND
cpo.type  ‘drop_down’; 


I hope above content is useful to you. Thanks for reading my blog.

Thanks,
Bijal Bhavsar

Hello,

Below is the script to reindex all process in magento.



// rebuild everything!!!
$processes = Mage::getSingleton('index/indexer')->getProcessesCollection();
$processes->walk('setMode', array(Mage_Index_Model_Process::MODE_REAL_TIME));
$processes->walk('save');

$processes->walk('reindexAll');
$processes->walk('reindexEverything');


I hope above content is useful to you. Thanks for reading my blog.

Thanks,
Bijal Bhavsar 🙂

Hello,

Magento Core, Admin Static Blocks, CMS Page, or Phtml edits are usually includes getting url path such images, javascript, base url, media and store url. There are different ways to retrieve mentioned URL paths depending on where section you’re editing.

For Eg: {{skin url=’images/sampleimage.jpg ‘}}, {{media url=’/sampleimage.jpg’}}, {{store url=’mypage.html’}}

We can also use the above ways in our custom modules Content/Textarea field values. I know one question arise in your mind that “How will it display in frontend?”.

I am here to show you how can we display its content in frontend. We will create One function in block file.



public function processHtml($content)
{

        /* @var $helper Mage_Cms_Helper_Data */
        $helper = Mage::helper('cms');
        $processor = $helper->getPageTemplateProcessor();
        $html = $processor->filter($content);
        return $html;
}


Lets say your textarea field name of your module is ‘content’ you can display content like:


<?php echo $object->getContent(); ?>

//Instead of above code, you need to use below code to display


<?php echo $this->processHtml($object->getContent());?>

I hope above content is useful to you. Thanks for reading my blog.

Thanks,
Bijal Bhavsar 🙂

The upgrade error is probably corrected by updating most tables to use the InnoDB engine (instead of MyISAM). The syntax to update tables to the InnoDB engine is as follows:

ALTER TABLE table_name ENGINE = InnoDB;

I noticed that a fresh install had no problem reindexing everything, but there were odd errors creating tables after an upgrade. The errors are found by turning on the exceptions log: Admin -> System -> Configuration -> Developer -> Log Settings -> Enabled = Yes.

This outputs to: /var/log/exception.log

Most errors had something to do with cryptic foreign key constraints. Changing most tables to InnoDB seems to solve this problem.

I’m including the code that I ran on sql.


ALTER TABLE admin_assert ENGINE = InnoDB;
ALTER TABLE admin_role ENGINE = InnoDB;
ALTER TABLE admin_rule ENGINE = InnoDB;
ALTER TABLE admin_user ENGINE = InnoDB;
ALTER TABLE api_assert ENGINE = InnoDB;
ALTER TABLE api_role ENGINE = InnoDB;
ALTER TABLE api_rule ENGINE = InnoDB;
ALTER TABLE api_user ENGINE = InnoDB;
ALTER TABLE catalogindex_eav ENGINE = InnoDB;
ALTER TABLE catalogindex_minimal_price ENGINE = InnoDB;
ALTER TABLE catalogindex_price ENGINE = InnoDB;
ALTER TABLE cataloginventory_stock_item ENGINE = InnoDB;
ALTER TABLE catalogrule ENGINE = InnoDB;
ALTER TABLE catalogrule_product ENGINE = InnoDB;
ALTER TABLE catalogrule_product_price ENGINE = InnoDB;
ALTER TABLE catalogsearch_query ENGINE = InnoDB;
ALTER TABLE catalog_category_entity ENGINE = InnoDB;
ALTER TABLE catalog_category_entity_datetime ENGINE = InnoDB;
ALTER TABLE catalog_category_entity_decimal ENGINE = InnoDB;
ALTER TABLE catalog_category_entity_int ENGINE = InnoDB;
ALTER TABLE catalog_category_entity_text ENGINE = InnoDB;
ALTER TABLE catalog_category_entity_varchar ENGINE = InnoDB;
ALTER TABLE catalog_category_product ENGINE = InnoDB;
ALTER TABLE catalog_category_product_index ENGINE = InnoDB;
ALTER TABLE catalog_compare_item ENGINE = InnoDB;
ALTER TABLE catalog_product_bundle_option ENGINE = InnoDB;
ALTER TABLE catalog_product_bundle_option_value ENGINE = InnoDB;
ALTER TABLE catalog_product_bundle_selection ENGINE = InnoDB;
ALTER TABLE catalog_product_enabled_index ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_datetime ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_decimal ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_gallery ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_int ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_media_gallery ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_media_gallery_value ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_text ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_tier_price ENGINE = InnoDB;
ALTER TABLE catalog_product_entity_varchar ENGINE = InnoDB;
ALTER TABLE catalog_product_link ENGINE = InnoDB;
ALTER TABLE catalog_product_link_attribute ENGINE = InnoDB;
ALTER TABLE catalog_product_link_attribute_decimal ENGINE = InnoDB;
ALTER TABLE catalog_product_link_attribute_int ENGINE = InnoDB;
ALTER TABLE catalog_product_link_attribute_varchar ENGINE = InnoDB;
ALTER TABLE catalog_product_link_type ENGINE = InnoDB;
ALTER TABLE catalog_product_option ENGINE = InnoDB;
ALTER TABLE catalog_product_option_price ENGINE = InnoDB;
ALTER TABLE catalog_product_option_title ENGINE = InnoDB;
ALTER TABLE catalog_product_option_type_price ENGINE = InnoDB;
ALTER TABLE catalog_product_option_type_title ENGINE = InnoDB;
ALTER TABLE catalog_product_option_type_value ENGINE = InnoDB;
ALTER TABLE catalog_product_super_attribute ENGINE = InnoDB;
ALTER TABLE catalog_product_super_attribute_label ENGINE = InnoDB;
ALTER TABLE catalog_product_super_attribute_pricing ENGINE = InnoDB;
ALTER TABLE catalog_product_super_link ENGINE = InnoDB;
ALTER TABLE catalog_product_website ENGINE = InnoDB;
ALTER TABLE checkout_agreement ENGINE = InnoDB;
ALTER TABLE checkout_agreement_store ENGINE = InnoDB;
ALTER TABLE cms_block ENGINE = InnoDB;
ALTER TABLE cms_block_store ENGINE = InnoDB;
ALTER TABLE cms_page ENGINE = InnoDB;
ALTER TABLE cms_page_store ENGINE = InnoDB;
ALTER TABLE core_config_data ENGINE = InnoDB;
ALTER TABLE core_email_template ENGINE = InnoDB;
ALTER TABLE core_flag ENGINE = InnoDB;
ALTER TABLE core_layout_link ENGINE = InnoDB;
ALTER TABLE core_layout_update ENGINE = InnoDB;
ALTER TABLE core_resource ENGINE = InnoDB;
ALTER TABLE core_session ENGINE = InnoDB;
ALTER TABLE core_store ENGINE = InnoDB;
ALTER TABLE core_store_group ENGINE = InnoDB;
ALTER TABLE core_translate ENGINE = InnoDB;
ALTER TABLE core_url_rewrite ENGINE = InnoDB;
ALTER TABLE cron_schedule ENGINE = InnoDB;
ALTER TABLE customer_address_entity ENGINE = InnoDB;
ALTER TABLE customer_address_entity_datetime ENGINE = InnoDB;
ALTER TABLE customer_address_entity_decimal ENGINE = InnoDB;
ALTER TABLE customer_address_entity_int ENGINE = InnoDB;
ALTER TABLE customer_address_entity_text ENGINE = InnoDB;
ALTER TABLE customer_address_entity_varchar ENGINE = InnoDB;
ALTER TABLE customer_entity ENGINE = InnoDB;
ALTER TABLE customer_entity_datetime ENGINE = InnoDB;
ALTER TABLE customer_entity_decimal ENGINE = InnoDB;
ALTER TABLE customer_entity_int ENGINE = InnoDB;
ALTER TABLE customer_entity_text ENGINE = InnoDB;
ALTER TABLE customer_entity_varchar ENGINE = InnoDB;
ALTER TABLE customer_group ENGINE = InnoDB;
ALTER TABLE dataflow_batch ENGINE = InnoDB;
ALTER TABLE dataflow_batch_export ENGINE = InnoDB;
ALTER TABLE dataflow_batch_import ENGINE = InnoDB;
ALTER TABLE dataflow_import_data ENGINE = InnoDB;
ALTER TABLE dataflow_profile ENGINE = InnoDB;
ALTER TABLE dataflow_profile_history ENGINE = InnoDB;
ALTER TABLE dataflow_session ENGINE = InnoDB;
ALTER TABLE design_change ENGINE = InnoDB;
ALTER TABLE directory_country ENGINE = InnoDB;
ALTER TABLE directory_country_region ENGINE = InnoDB;
ALTER TABLE directory_country_region_name ENGINE = InnoDB;
ALTER TABLE directory_currency_rate ENGINE = InnoDB;
ALTER TABLE eav_attribute_group ENGINE = InnoDB;
ALTER TABLE eav_attribute_option ENGINE = InnoDB;
ALTER TABLE eav_attribute_option_value ENGINE = InnoDB;
ALTER TABLE eav_attribute_set ENGINE = InnoDB;
ALTER TABLE eav_entity ENGINE = InnoDB;
ALTER TABLE eav_entity_attribute ENGINE = InnoDB;
ALTER TABLE eav_entity_datetime ENGINE = InnoDB;
ALTER TABLE eav_entity_decimal ENGINE = InnoDB;
ALTER TABLE eav_entity_int ENGINE = InnoDB;
ALTER TABLE eav_entity_text ENGINE = InnoDB;
ALTER TABLE eav_entity_type ENGINE = InnoDB;
ALTER TABLE eav_entity_varchar ENGINE = InnoDB;
ALTER TABLE gift_message ENGINE = InnoDB;
ALTER TABLE googlebase_attributes ENGINE = InnoDB;
ALTER TABLE googlebase_items ENGINE = InnoDB;
ALTER TABLE googlebase_types ENGINE = InnoDB;
ALTER TABLE googlecheckout_api_debug ENGINE = InnoDB;
ALTER TABLE googleoptimizer_code ENGINE = InnoDB;
ALTER TABLE newsletter_problem ENGINE = InnoDB;
ALTER TABLE newsletter_queue ENGINE = InnoDB;
ALTER TABLE newsletter_queue_link ENGINE = InnoDB;
ALTER TABLE newsletter_queue_store_link ENGINE = InnoDB;
ALTER TABLE newsletter_subscriber ENGINE = InnoDB;
ALTER TABLE newsletter_template ENGINE = InnoDB;
ALTER TABLE paygate_authorizenet_debug ENGINE = InnoDB;
ALTER TABLE paypaluk_api_debug ENGINE = InnoDB;
ALTER TABLE paypal_api_debug ENGINE = InnoDB;
ALTER TABLE poll ENGINE = InnoDB;
ALTER TABLE poll_answer ENGINE = InnoDB;
ALTER TABLE poll_store ENGINE = InnoDB;
ALTER TABLE poll_vote ENGINE = InnoDB;
ALTER TABLE product_alert_price ENGINE = InnoDB;
ALTER TABLE rating ENGINE = InnoDB;
ALTER TABLE rating_entity ENGINE = InnoDB;
ALTER TABLE rating_option ENGINE = InnoDB;
ALTER TABLE rating_option_vote ENGINE = InnoDB;
ALTER TABLE rating_option_vote_aggregated ENGINE = InnoDB;
ALTER TABLE rating_store ENGINE = InnoDB;
ALTER TABLE rating_title ENGINE = InnoDB;
ALTER TABLE report_event ENGINE = InnoDB;
ALTER TABLE report_event_types ENGINE = InnoDB;
ALTER TABLE review ENGINE = InnoDB;
ALTER TABLE review_detail ENGINE = InnoDB;
ALTER TABLE review_entity ENGINE = InnoDB;
ALTER TABLE review_entity_summary ENGINE = InnoDB;
ALTER TABLE review_status ENGINE = InnoDB;
ALTER TABLE review_store ENGINE = InnoDB;
ALTER TABLE salesrule ENGINE = InnoDB;
ALTER TABLE salesrule_customer ENGINE = InnoDB;
ALTER TABLE sales_flat_order_item ENGINE = InnoDB;
ALTER TABLE sales_flat_quote ENGINE = InnoDB;
ALTER TABLE sales_flat_quote_address ENGINE = InnoDB;
ALTER TABLE sales_flat_quote_address_item ENGINE = InnoDB;
ALTER TABLE sales_flat_quote_item ENGINE = InnoDB;
ALTER TABLE sales_flat_quote_item_option ENGINE = InnoDB;
ALTER TABLE sales_flat_quote_payment ENGINE = InnoDB;
ALTER TABLE sales_flat_quote_shipping_rate ENGINE = InnoDB;
ALTER TABLE sales_order ENGINE = InnoDB;
ALTER TABLE sales_order_datetime ENGINE = InnoDB;
ALTER TABLE sales_order_decimal ENGINE = InnoDB;
ALTER TABLE sales_order_entity ENGINE = InnoDB;
ALTER TABLE sales_order_entity_datetime ENGINE = InnoDB;
ALTER TABLE sales_order_entity_decimal ENGINE = InnoDB;
ALTER TABLE sales_order_entity_int ENGINE = InnoDB;
ALTER TABLE sales_order_entity_text ENGINE = InnoDB;
ALTER TABLE sales_order_entity_varchar ENGINE = InnoDB;
ALTER TABLE sales_order_int ENGINE = InnoDB;
ALTER TABLE sales_order_tax ENGINE = InnoDB;
ALTER TABLE sales_order_text ENGINE = InnoDB;
ALTER TABLE sales_order_varchar ENGINE = InnoDB;

In the end, the only tables that are using the MyISAM engine are as follows:

ALTER TABLE catalogsearch_fulltext ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_bndl_opt ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_bndl_sel ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_bundle ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_downloadable_idx ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_final_idx ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_idx_cfg_option ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_idx_cfg_opt_aggregate ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_idx_option ENGINE = MyISAM;
ALTER TABLE catalog_product_index_price_idx_option_aggregate ENGINE = MyISAM;
ALTER TABLE sendfriend_log ENGINE = MyISAM;

After updating to InnoDB I can able to reindex everything successfully and the store seems to be back up and running as it should. All products are back.

I hope this post will help to solve problem of reindexing.

If this post is helpful to you, don’t forget to comment.

Thanks,
Bijal Bhavsar 🙂

Usind that we can get currently logged in admin details.


$d = Mage::getSingleton('admin/session')->getData();
$dm = $d['user']->getData();

For getting currently logged in admin email id.

$adminEmail = $dm['email'];

Thanks,
Bijal Bhavsar 🙂