News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Disable payment method for particular shipping

Started by abhkum, September 11, 2013, 20:13:54 PM

Previous topic - Next topic

abhkum

Hi,

i wanted to apply COD for some cities only, so I did this:

I have two shipping methods, 1. normal shipping 2. COD shipping (added zip codes for desired cities)
I made two payment methods 2. Online payment 2. COD (cash on delivery)

Now I want that when user clicks on COD shipping, then only COD payment appears and When user clicks normal shipping, online payment only appears.

Can somebody provide me the code or hack for this. Thanks a lot

I am using VM 2.0.20b

WebStuff

#1
If your shipping charge is fixed then a simple way to do it would be:
Create one shipment method which is free.
Choose automatic Shipment in Configuration.
Then set a 'fee' for the payment option that equals what your shipping charge would have been.
E.G.
Shipping = 0.00 (automatic selection) for everyone.
Customer chooses COD payment they get charged or billed 5.00(whatever-your-currency-is) by the COD payment plugin.
Or
Customer chooses Normal payment they get charged or billed 20.00(whatever-your-currency-is) by the Normal payment plugin

You could try it the other way round as well. whatever works best for you.

Hope I've understood what your asking and that this helps.

abhkum

hey, thanks for the reply.

Actually the problem is that I want cash on delivery option for some selected zip codes only.
I want COD option to be seen by users only when they enter the zip code matching COD Zips, other wise they see only online payment option.

Hope you got my issue.

Thanks


Maxim Pishnyak

Quote from: abhkum on September 11, 2013, 20:13:54 PM
Now I want that when user clicks on COD shipping, then only COD payment appears and When user clicks normal shipping, online payment only appears.
Did you try forum search button for finding already posted here solution for this?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart