hide the cash on delivery option when weight based shipping is selected.
thank you version 1495
Qphoria wrote:There are easy code hacks you can add to certain shipping modules that will basically "force" the payment module.
Example:
If you want to force "COD" when someone chooses the "free shipping" shipping method you can add this to the payment file
1. EDIT: catalog/model/payment/cod.php
2. FIND:3. AFTER, ADD:Code: Select all
$method_data = array( 'id' => 'cod', 'title' => $this->language->get('text_title'), 'sort_order' => $this->config->get('cod_sort_order') );
Code: Select all
//Q: If free shipping is selected, override all other payment modules and force this one. if ($this->session->data['shipping_method']['id'] == 'free.free') { $this->session->data['payment_method'] = $method_data; $this->session->data['comment'] = ''; $this->response->redirect($this->url->https('checkout/confirm')); }