Skip to main content

Posts

Showing posts with the label magendo

magento not able to login in crome on localhost

Problem : Do you know why this problem occures ? The problem occurs because magneto could not store cookies. We run it as localhost and localhost is not true domain but to store cookies we need a domain. That’s why login stops without saying any word. Solution : 1:   http://127.0.0.1/magento/index.php/admin it will work. instead of  http://localhost/magento/index.php/admin it will work. then go to admin system ->web -> web_browser_capabilities and select no-no and then save its and you are doen.(during this you have to change url manual loCALHOST TO 127.0.0.1) 2: if you great coader then try this... Second Solution Go to  app/code/core/Mage/Core/Model/Session/Abstract/Varien.php  file within your magento directory. Find the code: session_set_cookie_params( $this->getCookie()->getLifetime(), $this->getCookie()->getPath(), $this->getCookie()->getDomain(), $this->getCookie()->isSecure(), $this->getCookie()->getHttponly() ); an

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.:)

smtp server (Gmail) in Magento

/app/code/core/Mage/Core/Model/Email.php /app/code/core/Mage/Core/Model/Email/Template.php  $config = array('ssl' => 'tls', 'port' => 587, 'auth' => 'login', 'username' => 'username@gmail.com', 'password' => 'password'); $transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config); $mail->send(); replace with: $mail->send($transport);

Answers to Common Questions

      Magento’s naming conventions are crazy! ·         How do I run a raw query against the database? ·         How do I turn off the price in the layerednavigation? ·         How do I move the admin panel to a new namefor security? ·         How do I use installation and upgrade files in my custommodules? ·         How do I runMagento code without building amodule? ·          How do I show the root catalog category onthe home page? ·         How do I hide the price of products before they go into the cart or if a person is not logged in? ·          How do I find out the proper table name? ·         How do I showMagento products on anon-Magento page? ·         Help, my product changes don’t show up on thefrontend! ·           How do I get the URL of a file in the skin directory? ·           How do I get the Magento Home Directory? ·          How do I format a price value? ·         How do I get the display value of a (multi-)select product attribu

Backend Integration

·        Starting a NewModule ·        The Controller ·        CRUD Controller ·        Read Action ·        Update Action ·        Delete Action ·        Create Action ·        Securing the Controller ·        Client Access

Points and RewardsModule

·        Plan of attack ·        Adding New Attributes to Products ·        Creating a ShellModule ·        Recording Points Ordered ·        Making aModel ·        Event Listeners ·        Dashboard Layout ·        Dynamic Coupons ·        CouponModels ·        Deducting Points

Made to Order Module

·        Example Scenario:  In Magento, everything you wish to sell must be defined as a Simple Product having i ts own SKU and price. But there are times when a merchant wishes to sell items that   do not have a unique identifying code, like a SKU. The reason that some products   might not have an identifying SKU depend largely on the type of item being sold and the organization of themerchant’s business.   These types of situations are especially common for manufacturers who take special  orders for items that they may only make one time. An example that most anybody can relate to would be purchasing produce or meat at a supermarket. Apples  are sold by the pound, purchasing one pound of apples costsmore than purchasing a  half pound of apples, or any fractional weight in between. But, each possible weight  of apples does not have its own predetermined and unique SKU number. The type  of apple probably has a unique PLU, or Price Look-Up code, but the final