Results 1 to 4 of 4

Thread: Skip delivery options

  1. #1

    Default Skip delivery options

    Hello,
    Is it possible to skip the delivery information step , as i don't need to have delivery adresses (i sell only downloadable items) ?

    Thanks
    Utilisateur de Contao depuis 2008

  2. #2
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Skip delivery options

    Adding and removing checkout steps is not hard. However, it seems you ask to remove part of the first step?

    Removing any checkout step completely:
    1. Add a directory to your TL_ROOT/system/modules/. Call it something like isotope_remove_shipping[/*:m:d7rx2n02]
    2. Inside the new directory add a directory called config[/*:m:d7rx2n02]
    3. Inside the config dir add a file config.php with the following content:
      Code:
      <?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
      unset($GLOBALS['ISO_CHECKOUT_STEPS']['shipping']);
      Instead of "shipping" you can choose your checkoutstep; address, shipping, payment and review[/*:m:d7rx2n02]


    Removing part of any checkoutstep is also possible. The address step consists of two items; it is defined in the code as:
    Code:
    $GLOBALS['ISO_CHECKOUT_STEPS'] = array
    (
    	'address' => array
    	(
    		array('ModuleIsotopeCheckout', 'getBillingAddressInterface'),
    		array('ModuleIsotopeCheckout', 'getShippingAddressInterface'),
    	)
    ...
    So by adding the following lines to the config.php file you can remove the shipping address.
    Code:
    foreach ($GLOBALS['ISO_CHECKOUT_STEPS']['address'] as $key => $address)
    {
    	if ($address[1] == 'getShippingAddressInterface')
    	{
    		unset($GLOBALS['ISO_CHECKOUT_STEPS']['address'][$key]);
    	}
    }
    One final note; I have only tried to answer your question directly. I have not tried the code as I showed you here. It should work, but I cannot guarantee it will (without changes).

  3. #3

    Default Re: Skip delivery options

    I tried, and no problem : it works...many thanks once again
    Utilisateur de Contao depuis 2008

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Skip delivery options

    This isn't needed, because you can just add the "shipping_exempt" attribute to your product type. Then you flag the download products as exempt and they won't have a shipping section in the checkout process (e.g. it is skipped).

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
  •