Try: if ($order->content_type != 'physical') { $this->enabled=false; }
Try: if ($order->content_type != 'physical') { $this->enabled=false; }
pgmarshall
_______________________________
Right! In cod.php the is a line that reads // disable the module if the order only contains virtual products - after this change the conditional to check for 'mixed' - ie. if ( ($order->content_type == 'virtual') || ($order->content_type == 'mixed') ) - otherwise I am drawing a blank on this ...
pgmarshall
_______________________________
That leads to disabled COD only if first product in cart is virtual.
After trying with all possible variants I found out that
1. COD is disabled when all products in cart are virtual, even if this code is deleted:
2. If I disable COD for cart-content that is non-physical, this works out only if a virtual item is first in cart.// disable the module if the order only contains virtual products
//if ($this->enabled == true) {
// if (($order->content_type == 'virtual')
// { $this->enabled=false; }
// }
}
3. The same with "mixed": It disables COD only if first product in cart is virtual.// disable the module if the order only contains virtual products
if ($this->enabled == true) {
if ( $order->content_type != 'physical' )
{ $this->enabled=false; }
}
This is like a mystery. Does anybody have a clue?// disable the module if the order only contains virtual products
if ($this->enabled == true) {
if ( $order->content_type == 'mixed' )
{ $this->enabled=false; }
}
Ruben
Makes perfect sense to me, that one. How can a virtual product be physically delivered? (rhetorical)1. COD is disabled when all products in cart are virtual
Hosting plans with installation, configuration, contributions, support and maintenance.
*** FREE osCmax hosting available ***
oscmaxtemplates.com
The point is, that I change "COD" into "Payable on receiving invoice" and want to have this module only enabled if there is no virtual item in the cart. In Germany it is still quite common that you get your orders delivered together with the invoice and only then you pay. But the willingness to pay probably will probably not be very high for virtual products. So this module should be offered only to carts filled with nothing but physical content.
Ruben
Bookmarks