psr racing:
Hi, is there a way to relate the shipping methods available to the payment method?
Not easily on account of the fact that the shipping costs are calculated before the payment methods are considered.
To do what you require would involve significant changes to the code logic.
The payment method would need to be determined before the shipping methods are provided, and then the payment amount calculated based on the shipping method chosen and this amount then needs to be applied back to the payment method.
Normal logic dictates that the all costs be calculated first and the payment methods offered/supplied when these costs are known. On this basis your best solution would be to limit the payment options if COD is selected as a shipping method.
psr racing:
I want it so that when COD is chosen for payment then only COD is available to select as the delivery method,
It would need to work the 'other way'.. When COD is selected as a delivery method then only COD should be offered as a payment method.
psr racing:
but when any other payment method is used then all other shipping options are shown but not COD.
Again, the shipping methods/costs are needed to be 'known' before the payment methods can be offered. To alter this behavior will require a significant bit of code changing.
psr racing:
I keep getting customers choosing COD shipping when they have payed via CC
Not sure why they would want to do this.... COD is usually one of the more expensive shipping methods, and the act of paying by CC and being willing to pay COD as well is nothing short of an act of stupidity.
If these people really do wish to double their payments to you why not let them? <grin>
psr racing:
or choosing express post when they have chosen COD for payment
Now this is something that will make sense to a lot, perhaps even most people. After all, an express shipment paid COD is a very appealing method to many, and a number of these people won't even realise that it is an impossible ask.
Alas, there is no easy solution (that I know of) to circumvent the issue.
A part of the problem is that COD is both a shipping AND a payment method, but zencart handles shipping and payments as two independent entities/functions.
Sorry that I don't have the answer you would like, but perhaps you now have a better idea as to hiow/why the problem occurs.
Cheers
Rod
NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.
Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.