I was looking for a way to skip the shipping completely, and found a write up on how to do it. But when I made this change, I no longer got state tax added at the confirmation step of the checkout. Or a phone number in the email order. I put original code back in, and tax was back but so was shipping. Any better ways to pull of no shipping, or an edit to this code perhaps? Here is the code -
To lose all shipping verbage, make sure item weight is set to 0. Then,
In 'checkout_shipping.php' find the lines here: (Line 50)
// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight')) {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();
And replace with this:
// IFD MOD_SQUAD BEGIN: zero weight should skip shipping page
$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();
// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
if (($order->content_type == 'virtual') ||
($order->content_type == 'virtual_weight') ||
($total_weight == 0 )) {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
// IFD MOD_SQUAD BEGIN
;)