Jump to content
Latest News: (loading..)
GetSirius

Shipping Address for Digital Download Orders

Recommended Posts

Hi,

I am working on a site that sells printed paper patterns. We want to offer the ability to have patterns mailed, but all orders should have the ability to do a digital download.

Problem I find is if I set Products Attributes  to have a downloadable file, the shopping cart bypasses checkout_shipping.php and goes directly to checkout_payment.php   I do have a shipping weight set for the product.

Is there a way to stop this action and have Digital Download orders still display shipping page during checkout?

I would like the customer to have the option, during checkout, to have the patterns mailed to them. If done by Products Attributes the customer must select what they would like for each item ordered. Plus, there is no option of a Digital Download if the customer wants a pattern mailed to them. I would like to offer the customer the option of still being able to download, even if they are having the pattern shipped through the mail.

Recent install of V2.3.4.1 BS Edge, very little modification, mostly just language file and css changes.  PHP Version 7.0.30

Thank you, Chuck

Share this post


Link to post
Share on other sites

Solved, but left here for reference.

To stop osCommerce from bypassing checkout_shipping.php for orders that only contain download products:

Edit checkout_shipping.php

at line 56-63, comment (or remove):

// 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('checkout_payment.php', '', 'SSL'));
//  }

Share this post


Link to post
Share on other sites

Interesting. So if all the products in the cart are downloadable and physically shippable, you'd like the customer to have the option to choose one or the other in one place (rather than individually)? If they choose downloadable for all, skip the checkout_shipping step? From a customer viewpoint, I would think the best way would be to when I'm in the shipping module, to be asked "All your products [or, you have some products that] can be either physically shipped to you, or made available via download. Which would you like to do?" That way they would not have to make a selection for each product, and you would not have to be making odd changes to the code, which might come back to bite you some time in the future. If they choose download, the code would just go back and update all the applicable products to "download" (virtual), and if no physical products are left in the cart, exit checkout_shipping at that point. From your perspective, you might have to add some wording to product descriptions that both methods are available, or that could even be automatic if both "downloadable" and "shipping weight" are entered. Worth thinking about.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

Thanks for the reply Phil. That does sound like it would have been a very good way to go about it. Also sounds a bit beyond my coding ability, though a little study may have provided results. Anyway, the store has been deployed and the client seems to be satisfied. We did not allow both physical and download, the customer has to choose at each product page. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×