Showing posts with label Magento. Show all posts
Showing posts with label Magento. Show all posts

Thursday, 4 May 2017

SQLSTATE [HY000]: General error: 145 Table catalogsearch_fulltext is marked as crashed in Magento

I was working on magento 1 project and when I tried to save product from admin, I faced one issue while save.

I got error:

SQLSTATE[HY000]: General error: 145 Table catalogsearch_fulltext is marked as crashed and should be repaired.


This error was because of database table crash and it can be solve by table repair.

Database table can be repair by 2 methods:
1. Repair table from phpmyadmin.
-> Log in to cpanel.
-> Select checkbox before table catalogsearch_fulltext.
-> Go to bottom of the page, there will be drop down. select "Repair Table".
-> You are done.

2. You can repair table by ssh command:
REPAIR TABLE catalogsearch_fulltext;


After table I have checked product save from admin. it works smoothly.

Sunday, 8 July 2012

How to set different layout in product page for specific category in Magento

In magento by default there is same layout in all product page for all category.

But if you want to give different layout to product view page for specific category then here is code for it.

But you have to create view.phtml with different layout design which you want in specific ategory.
Suppose i  created file with name viewbulkflowers.phtml

You have to write this code in admin side. So first open your admin.
First go to
Catalog / Manage Category
=>Select specefic category
=>Select Custom Design tab from right side
=>Make Yes to Apply to Products  
=>Add below xml code to Custom Layout Update.

=>XML Code

<reference name="product.info">
    <action method="setTemplate">
        <template>catalog/product/viewbulkflowers.phtml</template>
    </action>
    <block type="catalog/product_view" name="product.info" template="catalog/product/viewbulkflowers.phtml" />
</reference>

Now save category.