Full service web hosting, great prices and support. Starts at $1.99/month!
Page 2 of 2 First 12
Results 11 to 16 of 16

Thread: Payment type COD to be changed to be disabled if virtual product is in cart - amongst others!

  1. #11
    osCMax Development Team

    Payment type COD to be changed to be disabled if virtual product  is in cart - amongst  others!

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    81


    Default Re: Payment type COD to be changed to be disabled if virtual product is in cart - amongst others!

    Try: if ($order->content_type != 'physical') { $this->enabled=false; }
    pgmarshall
    _______________________________

  2. #12
    New Member
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    27
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    sio     $ 0.00
    Rep Power
    0


    Default Re: Payment type COD to be changed to be disabled if virtual product is in cart - amongst others!

    Hello Pgmarshall,

    Quote Originally Posted by pgmarshall View Post
    Try: if ($order->content_type != 'physical') { $this->enabled=false; }
    I get the result that COD will be enabled if the first item in cart is physical no matter what follows and COD will be disabled if first item is virtual.

    Best
    Ruben

  3. #13
    osCMax Development Team

    Payment type COD to be changed to be disabled if virtual product  is in cart - amongst  others!

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    81


    Default Re: Payment type COD to be changed to be disabled if virtual product is in cart - amongst others!

    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
    _______________________________

  4. #14
    New Member
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    27
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    sio     $ 0.00
    Rep Power
    0


    Default Re: Payment type COD to be changed to be disabled if virtual product is in cart - amongst others!

    Quote Originally Posted by pgmarshall View Post
    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 ...
    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:
    // disable the module if the order only contains virtual products
    //if ($this->enabled == true) {
    // if (($order->content_type == 'virtual')
    // { $this->enabled=false; }
    // }
    }
    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 != 'physical' )
    { $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 == 'mixed' )
    { $this->enabled=false; }
    }
    This is like a mystery. Does anybody have a clue?

    Ruben

  5. #15
    osCMax Development Team

    Payment type COD to be changed to be disabled if virtual product  is in cart - amongst  others!

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,164
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    100


    Post Re: Payment type COD to be changed to be disabled if virtual product is in cart - amongst others!

    1. COD is disabled when all products in cart are virtual
    Makes perfect sense to me, that one. How can a virtual product be physically delivered? (rhetorical)

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  6. #16
    New Member
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    27
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    sio     $ 0.00
    Rep Power
    0


    Default Re: Payment type COD to be changed to be disabled if virtual product is in cart - amongst others!

    Quote Originally Posted by ridexbuilder View Post
    Makes perfect sense to me, that one. How can a virtual product be physically delivered? (rhetorical)

    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

Page 2 of 2 First 12

Similar Threads

  1. Can New Product Duration Be Changed?
    By m82492 in forum osCmax v1.7 Discussion
    Replies: 6
    Last Post: 06-05-2009, 12:30 AM
  2. Virtual Merchant - Elavon, ViaKlix, Nova Payment Module
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-21-2009, 06:10 PM
  3. Virtual Merchant - Elavon, ViaKlix, Nova Payment Module
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-07-2009, 06:12 PM
  4. Virtual Merchant - Elavon, ViaKlix, Nova Payment Module
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 12-15-2008, 01:00 PM
  5. Products default to content type virtual or 'downloadable'
    By cameroti in forum osCmax v2 Installation issues
    Replies: 2
    Last Post: 10-20-2005, 02:01 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •