Skip to main content

Posts

Showing posts from August, 2012

How to Set Up Multiple Currency in Magento shop ?

1:Go to Admin ->System -> currency set                     add select currency  2: Go to Admin->System->Manage Currency                          and Import and Don't forget to save currency rate 3: Add this line to you layout file: <block type="directory/currency" name="store_currency_selector" as="store_currency_selector" template="directory/currency.phtml"/> 4: And go to directory ->currency. phtml   and replace all   with this code or make change  <?php if($this->getCurrencyCount() > 1): ?> <span>Select Currency:</span> <select name="custom-currency-selector" id="custom-currency-selector"> <?php foreach ($this->getCurrencies() as $_code => $_name): ?>     <option value="<?php echo $this->getSwitchCurrencyUrl($_code)?>"         <?php if($_code == $this->getCurrentCurrencyCode()): ?>             selected="

MIGS PAYMENT GATWAY FOR MAGENTO

   $order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());  $data=Mage::getSingleton( 'customer/session' )->getData('data');                                                 if ($order->getPayment()->getMethod() ==="ccsave") :       $order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());   $order->setState('pending_payment', true)->save();                            $cc_type=NULL;                          $cc_number=NULL;                          $cc_exp_month=NULL;                          $cc_exp_year=NULL;                          $cc_cid=NULL;                          $vpc_AccessCode=NULL;                          $vpc_Version=NULL;                          $vpc_Command=NULL;                          $vpc_MerchTxnRef=NULL;                          $vpc_Merchant=NULL;                          $vpc_OrderInfo=NULL;

How to Change Order Status by Code in Magneto

First Way: $order = Mage::getModel(‘sales/order’) ->load(0928444); If you have order increment id, you can load order in the following way:- $orderIncrementId = YOUR_ORDER_INCREMENT_ID; $order = Mage::getModel(‘sales/order’) ->loadByIncrementId($orderIncrementId); Now, here is the code to change order status:- /** * change order status to ‘Completed’ */ $order->setState(Mage_Sales_Model_Order::STATE_COMPLETE, true)->save(); Similarly, you can change the order status to pending, processing, canceled, closed, holded, etc. /** * change order status to ‘Pending’ */ $order->setState(Mage_Sales_Model_Order::STATE_NEW, true)->save(); /** * change order status to ‘Pending Paypal’ */ $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true)->save(); /** * change order status to ‘Processing’ */ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->save(); /** * change order status to ‘Completed’ */ $order->setState(Mage_

Delete Order ,You can found this code every where ....

require 'app/Mage.php'; Mage::app('admin')->setUseSessionInUrl(false);                                                                                                                  //replace your own orders numbers here: $test_order_ids=array(   '400000032',   '400000031'    ); foreach($test_order_ids as $id){     try{         Mage::getModel('sales/order')->loadByIncrementId($id)->delete();         echo "order #".$id." is removed".PHP_EOL;     }catch(Exception $e){         echo "order #".$id." could not be remvoved: ".$e->getMessage().PHP_EOL;     } } echo "done"; but some time you got an error.:)

Variables that can be used in any transactional email

Variable Description {{store url=""}} Store website address. {{var logo_url}} URL of store logo {{var logo_alt}} Alternative text for store logo if image is unavailable. {{var store.getFrontendName()}} Store name (as defined in system configurations) {{var store url="customer/account/"}} Web address of customer accounts page. {{config path='trans_email/ident_support/email'}} Support email address (as defined in store configuration) {{config path='general/store_information/phone'}} Store phone number (as defined in store configuration) {{config path="general/store_information/address"}} Store address (as defined in store configuration) {{store url="adminhtml/system_account"}} Link address for admin login page. New Order (and New Order for Guest) Variable Description {{htmlescape var=$order.getCustomerName()}} * For New Order only, Name of customer as defined in Customer Information for order {{var order.increment