Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Virtual Products- would really appreciate some help!


Guest

Recommended Posts

Hi,

I need to be able to define my products as virtual so that the /checkout_shipping.php page is skipped in the checkout process. There is code below from /checkout_shipping.php that provides for this but i just can't figure out how to define the products as virtual.

 

// 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') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }

 

Any help is much appreciated

marshall.jon

AUS

Link to comment
Share on other sites

weird..i actually would like to know that also..mostly for knowledge though.

 

for my client, the said ' we can't ship posters outside the US', and 'If the cart only contains tickets...'

 

if you're only doing non shipping stuff just make that code look like this

 // 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') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
//}

 

then it doesn't even check wether it's 'virtual' or not. it just registers 'shipping' for the next few pages, and redirects to the payment page.

Link to comment
Share on other sites

weird..i actually would like to know that also..mostly for knowledge though.

 

for my client, the said ' we can't ship posters outside the US', and 'If the cart only contains tickets...'

 

if you're only doing non shipping stuff just make that code look like this

 // 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') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
//}

 

then it doesn't even check wether it's 'virtual' or not. it just registers 'shipping' for the next few pages, and redirects to the payment page.

 

Thanks Jefs,

That worked like a charm! I really appreciate it! :thumbsup:

 

Cheers Jon

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...