Saturday, July 30, 2011

Magento Can’t create Sales Orders in Admin—No Payment Method Available

It basically involves 2 simple changes to 2 files. As well as uploading the template files from the /frontend/ for your payment processor to /adminhtml/.

My payment processors are PayPal Standard and Worldpay (I guess this hack can be applied for other payment processors too)

The 2 files that need changing…

1. app/code/core/Mage/Payment/Block/Form/Container.php

 public function getMethods()
        $methods = $this->getData('methods');
        if (is_null($methods))
            $store = $this->getQuote() ? $this->getQuote()->getStoreId() : null;
            $methods = $this->helper('payment')->getStoreMethods($store, $this->getQuote());
            foreach ($methods as $key => $method)
                if ($this->_canUseMethod($method)) 
                // HACK
                // commented this out to force Paypal and Worldpay to show when create order in admin
                /* else  {
            $this->setData('methods', $methods);
       return $methods;

2. app/code/core/Mage/Paypal/Model/Standard.php

/*validate the currency code is avaialable to use for paypal or not*/
    public function validate()
         // HACK...
        // commented out line below and set $currency_code = "GBP", to fix error currency not supported by PayPal
        // we only use GBP so this should not cause a problem
        // $currency_code = $this->getQuote()->getBaseCurrencyCode();
        $currency_code = "GBP";
        if (!in_array($currency_code,$this->_allowCurrencyCode)) {
            Mage::throwException(Mage::helper('paypal')->__('Selected currency code ('.$currency_code.') is not compatible with PayPal'));
        return $this;

The files that I needed to copy from /frontend/ to /adminhtml/

1. app/design/adminhtml/default/default/template/paypal/standard/form.phtml
2. app/design/adminhtml/default/default/template/worldpay/failure.phtml
3. app/design/adminhtml/default/default/template/worldpay/form.phtml

If you choose to follow these notes you do so at your own risk. Maybe somebody else in these article that know far more than me could comment or improve it!

Tags : Payment method is not available message when taking orders in magento,MagentoAdmin side Payment Method not dispaly, Magento Admin side No Payment Method Available

Friday, July 1, 2011

Gmail’s new look

We get a lot of great feedback about how Gmail helps you be more efficient, keep in touch with family and friends, and get work done. We’ve saved you from forgetting attachments and made sure that you got the right Bob. Over the years, adding countless features to Gmail has made it an increasingly powerful communication hub, but along the way the interface has also become more cluttered and complex.

That’s one of the reasons we’re embarking on a series of interface updates to help strip out unnecessary clutter and make Gmail as beautiful as it is powerful. This is part of a Google-wide effort to bring you an experience that’s more focused, elastic, and effortless across all of our products. The changes are not going to happen all at once. We know that you love and care about Gmail as much as we do, and we’ll be working on these upgrades gradually over the next few months to allow plenty of time to understand and incorporate your feedback into the evolving design.

We’re kicking things off with two new themes for you to try out as a sort of sneak peek at what we’re up to. Starting today, you’ll see the “Preview” and “Preview (Dense)” themes in the Themes tab in Gmail Settings. Why two themes? Our new interface will eventually expand dynamically to accommodate different screen sizes and user preferences, but until then you can pick the information density that you prefer.

Here’s what one of the new themes currently looks like:

And in conversation view:

If you poke around you’ll hopefully find a lot to like and a much cleaner, modern look but also few rough edges. In particular, some Labs features may look a little strange in the new themes. We plan to fix these issues as we roll out changes in the coming months. You can also expect some updated themes that embody the same design principles but are better suited to working in a dark environment, use a different color palette, or include the illustrations that we know many of you love to see around your inbox.

Look out for these and other new features over the next few months. In the meantime, try out the new themes as a preview of the future of Gmail and let us know what you think.