0

i am creating a webservice . so i want to set payment method for magento v1.9 based on country details and cash on delivery(cod) for particular products and particular country in magento . how to set programmatically?

  • do you have tried so far – Amit Bera Feb 25 '16 at 8:13
0

First checkout this link Payment methods based on billing region?

For your your case, at Devamitbera_Statewisecod_Model_Observer class on function EnableCod function,you can your logic basic of ur require.

At this function you can current quote item from $quote->getAllItems().

$Items=$quote->getAllItems();
foreach ($Items as $item) {
    $productName = $item->getProduct()->getName();
    $productPrice = $item->getProduct()->getPrice();
}

Now this code,you can do whatever,what u want.

Please let me know if any help u need from me

  • Hi what method(POST or GET) is this webservice? – lokesh1212 Feb 25 '16 at 10:42

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.