Thursday, 19 March 2015

There was a problem with reindexing process.

Reason

There are references to inexisting/deleted products in catalog_product_flat_% tables.


Solution

Rename ´catalog_product_flat_1´ tables

Monday, 16 March 2015

Register for newsletter automatically in magento with no confirmation email


Make some modification.
Modify  register.phtml

Path : app\design\frontend\base\default\template\persistent\customer\form\register.phtml
line no arount:69
search "Sign Up for Newsletter"


old code

 <li class="control">
                    <div class="input-box">
                        <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
                    </div>
                    <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
                </li>


replace code


 <li class="control" style="display: none;">
                    <div class="input-box">
                        <input type="checkbox" checked name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
                    </div>
                    <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
                </li>


and go admin panel:

select left bar "newsletter" - Need to Confirm = NO


NOTE: clear your cache.

Sunday, 15 March 2015

Magento Forgot password and Reset Password return Page Blank.

Modify your customer.xml
Path: app/design/frontend/default/[your_custom_theme_folder]/layout/customer.xml
add below code after

After:
</customer_account_forgotpassword>

add:

<customer_account_resetpassword translate="label">
        <label>Reset a Password</label>
        <remove name="right"/>
        <remove name="left"/>

        <reference name="head">
            <action method="setTitle" translate="title" module="customer">
                <title>Reset a Password</title>
            </action>
        </reference>
        <reference name="root">
            <action method="setTemplate">
                <template>page/1column.phtml</template>
            </action>
            <action method="setHeaderTitle" translate="title" module="customer">
                <title>Reset a Password</title>
            </action>
        </reference>
        <reference name="content">
            <block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
        </reference>
    </customer_account_resetpassword>

NOTE: Clear your magento cache.