Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing behavior of digital products


tapuahk

Recommended Posts

Posted

Several people have the same problem using a mod called Discount Coupon Codes

 

((This at present does not work with only digital products due to the fact that they cause OSC to skip the catalog/Checkout_Shipping.php file which loads the array which is passed to $delivery array in catalog/includes/classes/discount_coupon.php to handle zone exclusions. (No I Don't Want to sell outside the US, sorry)

 

DCC works fine as long as one physical item is in cart with digital item.

 

When digitals are only thing in cart, Checkout crashes with a SQL syntax error, due to nulls being passed for $delivery['zone_id'] so a query would see

 

where zone_id= and

 

and TEP_STOP in its tracks

 

 

 

So has anyone tackled this or is this a candidate for a new mod for OSC with DCC???

 

~~~Tapuahk

Posted
Give your digital products a virtual "weight".

Then set the cost for that weight to zero...

 

 

Will putting a weight on digital products cause the checkout_shipping.php not to be skipped?

 

And how do I set the cost of the virtual weight to zero. If they have real products in their cart it would increase their shipping?

 

I think it would be easier to change how downloads are treated at checkout by passing billing address as shipping address if no shipping address is already input.

 

How is your way simpler?

 

~~~Tapuahk

Posted

what type of problem are you having with DCC?

Posted

Would you say that a weight of 0.001 for each digital product

will increase the cost of a delivery IF the buyer also buys a

tangible product?

Posted
Would you say that a weight of 0.001 for each digital product

will increase the cost of a delivery IF the buyer also buys a

tangible product?

 

I got it working, The cart had been crashing on virtual only products with a 1064 SQL Syntax that many others were also getting change the following:

 

In checkout_shipping find:

 

// 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 = $customer_default_address_id;
// not $sendto=false to work with shop using Discount Coupon Codes
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }

 

Allows use of discount coupons with virtual products.

Archived

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

×
×
  • Create New...