Apr 12, 2016

How to get store id of an order in Magento?

How to get store id of an order in Magento?

$order = Mage::getModel('sales/order')->loadByIncrementId('10000001');
//use a real increment order id here

----- OR -----

$order = Mage::getModel('sales/order')->load(121); //use an entity id here

$storeId = $order->getStoreId(); // Here is your will get store id of that order

Feb 2, 2016

Magento How to take database and code backup using SSH command line excluding var and media folder

1. Backup Database 

Command::> mysqldump -uUsername -pPassword DBName > /var/www/projectFolderName/www/var/sqlfilename.sql

Hint:
Username - Your database user name
Password - Your database Password
DBName - Your database name
sqlfilename.sql - Database backup file name. It can be anything.
/var/www/projectFolderName/www/var/sqlfilename.sql - This is path of your server where it will be downloaded



2. Code Backup

Command::> First Go To The Root Of Your Project then execute below command
Command::> tar -czvf codebackupfilename.tar.gz www --exclude='www/media' --exclude='www/var'

Hint:
codebackupfilename.tar.gz - Code backup file name. It can be anything.
--exclude='www/media' - To exclude media folder from backup (If you want media folder then remove this line)
--exclude='www/var' - To exclude var folder from backup (If you want var folder then remove this line)

Jan 29, 2016

Magento Found a useful extension for Same Order Invoice Number


One of my client want us to do customization for the Order number, Invoice Number and Shipment Number should be same but I searched in Google and found a very useful Magento Fooman extension which fulfill the my requirement as what I want.

The URL is below check it out and try to install on local first before applying on live site at your risk.


https://www.magentocommerce.com/magento-connect/same-order-invoice-number-by-fooman.html

Jan 18, 2016

Magento How to directly download any compressed Magento modules or extensions without admin Magento Connect Manager.


If you want to install some module of Magento without admin Magento Connect Manager and upload it to your Magento store via FTP or control panel.

Please make the format of the URL as follows and execute this URL on any browser to download it.

URL Format:
http://connect20.magentocommerce.com/community/{PACKAGE NAME}/{VERSION}/{PACKAGE NAME}-{VERSION}.tgz

Example: http://connect20.magentocommerce.com/community/Raveinfosys_Deleteorder/1.0.9/Raveinfosys_Deleteorder-1.0.9.tgz

MAGENTO Reset forgotten password page blank or empty after installation of SECURITY PATCH SUPEE-6788

I would like to share my experience with the Reset forgotten password page blank after installation of SECURITY PATCH SUPEE-6788.

I investigated and found that the latest customer layout 'customer_account_resetpassword' handle is replaced with 'customer_account_changeforgotten'.

So, if you have replaced the old layout handle with new one in magentoRoot/app/design/frontend/ur_package/ur_custome_theme/layout/customer.xml file.


For Example:

    <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>

Replaced above code with code below...

<customer_account_changeforgotten 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_changeforgotten>


Your reset password page should work correctly now.


Please refer link below for more detail...

http://www.atwix.com/magento/security-patch-supee-6788-installation-issues/