2

Is it possible to implement a payment method per currency level? The site in question needs to accept both USD and Indian Rupee. When a client pays with USD, it needs to be connected to a US bank/payment method, when paying with Indian Rupee, it needs to be connected to an Indian bank/payment method.

The site scope will be: one domain; one language; two currencies.

Is the above model feasible or it's better to stick to a multi-store or better alternative? e.g.

  • site.com/en
  • site.com/in
  • I think better you manage two store views for each country and two payment methods against each as well – Sukeshini Jun 19 '14 at 18:28
  • @Sukeshini That might hinder the user experience a little. Thoughts? – monocat Jun 19 '14 at 23:06
  • You can only checkout in base currency, you need two separate website views and enable Website Pricing instead of Global. – user2935 Jul 20 '14 at 13:47
2

You can do using Event observer. Create config.xml under app/code/local/Bh>ZeroSubtotalpaymentmethod>etc. code of this file is

<?xml version="1.0" ?>
<config>
    <modules>
        <Bh_ZeroSubtotalpaymentmethod>
            <version>1.0.1</version>
        </Bh_ZeroSubtotalpaymentmethod>
    </modules>
    <global>
        <models>
            <zerosubtotalpaymentmethod>
            <class>Bh_ZeroSubtotalpaymentmethod_Model</class>
            </zerosubtotalpaymentmethod>
        </models>
    </global>
    <frontend>
        <events>
            <payment_method_is_active>
                <observers>
                    <paymentfilter_payment_method_is_active>
                        <type>singleton</type>
                        <class>zerosubtotalpaymentmethod/observer</class>
                        <method>filterpaymentmethod</method>
                    </paymentfilter_payment_method_is_active>
                </observers>
            </payment_method_is_active>
        </events>
    </frontend>
</config>

Create Observer.php under app/code/local/Bh/ZeroSubtotalpaymentmethod/Model/ code is

<?php
class Bh_ZeroSubtotalpaymentmethod_Model_Observer {

    public function filterpaymentmethod(Varien_Event_Observer $observer) {


        /* call get payment method */
        $method = $observer->getEvent()->getMethodInstance();


        if($method->getCode()=='paypal_standard')
        {   $quote = $observer->getEvent()->getQuote();
            if(Mage::app()->getStore()->getCurrentCurrencyCode()=='INR'){
            $result = $observer->getEvent()->getResult();   
            $result->isAvailable = false;
            }
            return;
        }
        if($method->getCode()=='free'){
            $quote = $observer->getEvent()->getQuote();
            if(Mage::app()->getStore()->getCurrentCurrencyCode()=='USD'){
            $result = $observer->getEvent()->getResult();   
            $result->isAvailable = false;
            return;
            }
        }
        return;
    }
}
?>

In My example i have disabled paypal standard payment method when Current currency code is INR and ccavluenue for Current Currency code is USD

0

I would scope both language and currency at the store view level. So in your case you would have 2 store views, both with english language, each with different currency specs. You could make language be store level but I think you may find that you want to reserve store level for a different, more general grouping.

0

If you set your store in this format, you can achieve it easily

WEBSITE : YOUR WEBSITE

STORES(2)

  - AMERICA

       STOREVIEWS(1)

           - English


  - INDIA(1)

        STOREVIEWS(1)

           - English

Everything except payment method should set same for two stores and then set different payment methods for each store.

Hope it helps

  • That was one way I was thinking of approaching it but how can I utilize the currency. For example, it would be great when a shopper switches the currency, the page redirects to "currency" store. – monocat Jun 20 '14 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.