Contributions
payment method depends on shipping method
With this contribution you can select which payment method should work with which shipping method!
eg. if the shipping is free, you don´t want to offer cod:
catalogincludesmodulespaymentcod.php
(it also works in any other payment module!)
look for:
// class methods
function update_status() {
global $order;
change to:
// class methods
function update_status() {
global $order, $shipping;
after:
if ($check_flag == false) {
$this->enabled = false;
}
}
insert:
// disable if shipping is free - start
if ($shipping['id']=="free_free") {
$this->enabled = false;
}
// disable if shipping is free - end
Shipping IDs:
free: free_free
table: table_table
pickup: pickup_pickup
etc.
just:
"shippingmodulname_shippingmodulname"
-------------------------------------------------
z.B Wenn der Versand versandkostenfrei ist, soll Nachnahme deaktiviert werden:
catalogincludesmodulespaymentcod.php
(geht aber auch in jedem anderen payment modul)
suche:
// class methods
function update_status() {
global $order;
ändern in:
// class methods
function update_status() {
global $order, $shipping;
nach:
if ($check_flag == false) {
$this->enabled = false;
}
}
folgendes einfügen:
// Deaktivieren wenn Versandkostenfrei - start
if ($shipping['id']=="free_free") {
$this->enabled = false;
}
// Deaktivieren wenn Versandkostenfrei - ende
Shipping IDs:
Versandkostenfrei: free_free
Tabellarisch: table_table
Selbstabholer: pickup_pickup
usw.
also "Versandmodulname_Versandmodulname"
| 25 Nov 2009 |
Great addons! I made a simply mod.
MOD for "payment method depends on shipping method" with the inverse solution.
With this contribution you can select which payment method should work only with specific one shipping method!
eg. if the payment is Cash on Delivery, you want to offer the shipment "pick at shop" or better the inverse.
(it also works in any other payment module!)
Why? To avoid problems with unwanted payments ways (eg. Cash on delivery with postal service ).
| 4 Jul 2009 |
| Werner Nöbauer | 26 Feb 2005 |
Note: Contributions are used at own risk.
