Thursday, September 8

How to change value and fetch value of Minimum Order Amounts of free shipping in magento

First of all to make Minimum Order Amounts of Free Shipping to [STORE VIEW] instead of [WEBSITE] then Go to app->code->core->Mage->Shipping->etc->System.xml
then change the value of to 1 under carriers -> groups -> freeshipping ->free_shipping_subtotal.

Now to fetch the value of the Minimum Order Amount according to store view write the below code

 

Hope it Helps.. Thanks...

How to get contact us email address in magento

Here’s the script to get Contacts email:

 

Or you can change it from admin -> System-> Configuration. From the left tab select Contacts then On the right side you will see Email Options Tab. From that tab you can see there is a field for send Emails To.Change th evalue to your require email address


Hope it Helps.. Thanks....

Wednesday, September 7

How to Remove the Coupon Code on the Shopping Cart in Magento

On Magento, on the Shopping Cart page, just before the checkout, by default, you have an area where customers can enter a coupon code. Obviously, if you’re running some kind of discount scheme, this is a vital area – however, if you’re not, it can actually take up a lot of much needed room during the checkout! For this reason, you might want to simply get rid!

Well, here’s how… just navigation through your FTP folders to: app/design/frontend/default/default/layout and in there you should see a file called checkout.xml.

Simply open it up and comment or delete the following line:



Problem solved!

Hope it Helps... Thanks....

How to Show Product Description on Magento Shopping Cart Page

Last week I was speaking to a Magento user, and he said he wanted to not only have the Product Title listed in the Magento Checkout, but also the short Product Description there. Most people would perhaps not have the neccessity to do so, however, for those that do want it done, there is a solution about.

If you go into FTP and navigate to /app/design/frontend/default/default/template/checkout/cart/item/default.phtml, you simply need to add the following around Line 27…

load($_item->getProductId());
            echo $custom->getShortDescription(); 
?>
this will successfully echo the short description for each product purchased.

Hope it Helps.. Thanks....

How to Use a Coupon Code for Specific Products or Categories in Magento

So, your web-site sells all sorts of home furniture, and you have a Christmas section. It is two weeks until Christmas Day, and you realise you’ve got quite a lot of seasonal stock that you need to shift – as you don’t want to be left with a warehouse full of Christmas Trees, Christmas Wreaths and Garlands do you?

Well, offering discounts on those products is probably an idea, and why not do it via a coupon code – that way, you can send a lovely email out to all your customers informing them that if they type in XMAS15 on your checkout, they’ll get a whopping 15% off their order.

With some E-Commerce platforms you might have a few problems with trying to offer money off for specific products or categories – however, with Magento, thankfully this is childs play – and it only takes a couple of seconds to set up.

In your Magento Admin system, simply click on Promotions, and then click on Shopping Cart Price Rules – and then click Add New Rule.

On the left you’ll see three tabs, in the uppermost one you’ll have to name your Price Rule, choose which website it will be activated on and what customers will see it, and also name the actual coupon code itself.

It is then the followed tab (entitled “Conditions”) which is the important one, as this area specifies which products/categories will be available for the promotion. So, click the little green plus, and then select “Product Attribute Combination” – this will create a rule which says “[Do this] If an item is found in the cart with all of these conditions true”…

On this occasion we want to select products from certain categories, so click the green plus again and select “Categories”. Then you can select which of the categories that you’ll like to be enabled – simply click the drop down box and save it.

At this point your rule will say “Category IS 167, 168, 171, 174, etc”. You’ll need to click on the “IS” and change it to “IS ONE OF”.

Subsequently, as long as you save it all and apply the rules, you have now successfully made sure that certain products within your store are now available at 15% off. Furthermore, you can do these reductions based on a plethora of rules including SKU, Colour, Price, nearly any attribute you can think of. You could have a “Blue Monday” if you wanted, offering money off on every product that is blue – that is how random and deep you can go with this amazing piece of E-Commerce software!

Hope it Helps.. Thanks....

how to Change Default Quantity on Magento Product Page

I find it a tad annoying how on Magento, you’ve got this empty quantity box next to the Buy Now/Add to Basket button. Although clicking the button alone will add an item to the cart, some users may experience doubt in this motion, and enter the quantity required AS WELL as press the button.

But why even have any doubt? Why not just make the default quantity set to 1 – well this something that a lot of people have required, and fortunately, I have got the answer!

In app\design\frontend\default\default\template\catalog\product\view\type\Simple.phtml

Just change..



to



Hope it Helps.. Thanks..

Tuesday, September 6

How to get current currency and currency symbol in Magento

here is the script to get current currency & Currency symbol in Magento

for current currency
$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); 

for currency symbol
Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();

Hope it helps... Thanks....

How to get Order Increment ID in Magento

Here is the script to increment the order id in magento

$order = Mage::getModel('sales/order');
$order->load(Mage::getSingleton('sales/order')->getLastOrderId());
$lastOrderId = $order->getIncrementId();

Last real order id

Mage::getSingleton('checkout/session')->getLastRealOrderId();

Hope it helps.. Thanks...

How to Re-Index manually using SQL query in Magento

Here is the script to reindex the data in magento

getConnection('core_write');
    $mysqli->query($sql);
    /*
    Process_id     Indexer_code
        1     catalog_product_attribute
        2     catalog_product_price
        3     catalog_url
        4     catalog_product_flat
        5     catalog_category_flat
        6     catalog_category_product
        7     catalogsearch_fulltext
        8     cataloginventory_stock
        9     tag_summary
    */
    $process = Mage::getModel('index/process')->load(7);
    $process->reindexAll();
    echo "Finished Rebuilding Search Index At: " . date("d/m/y h:i:s");
?>

Hope it helps... Thanks...

How to get Product Image path in Magento

Here is the script to get product image path in magento

$productId = 1;
$product = Mage::getModel('catalog/product')->load($productId);
$path = Mage::helper('catalog/image')->init($product, 'image')->resize(75, 75);


Hope it Helps... Thanks