Jump to content
Sign in to follow this  
davecohen

content_type and downloads

Recommended Posts

I have a store with both physical and downloadable products. Downloadable products have 0 weight, and download attribute.

I ran into a problem where if the first item in the cart was downloadable, then the entire cart was treated as content_type=virtual, even when there were items with weights. This did not happen if the first item in cart had a weight. This got me swimming thru code - been a long day. I already had the little 0 weight addition to checkout_shipping, so figured what the heck and modified classes/shopping_cart.php so get_content_type() always returned 'mixed'. Seems to work great now, but anyone want to tell me why I shouldn't do this, or what else I broke?

 

- Dave

Share this post


Link to post
Share on other sites
I have a store with both physical and downloadable products. Downloadable products have 0 weight, and download attribute.

I ran into a problem where if the first item in the cart was downloadable, then the entire cart was treated as content_type=virtual, even when there were items with weights. This did not happen if the first item in cart had a weight. This got me swimming thru code - been a long day. I already had the little 0 weight addition to checkout_shipping, so figured what the heck and modified classes/shopping_cart.php so get_content_type() always returned 'mixed'. Seems to work great now, but anyone want to tell me why I shouldn't do this, or what else I broke?

 

- Dave

 

obviously, your cart has a logic error...it should be mixed...you can fix this in the file below:

includes/modules/pages/checkout_shipping/header_php.php

 

it depends on you how to treat the order...but customization is inevitable...

 

enjoy...!


Have a problems in osCommerce shipping, payment, addons installation, customization or SEO?

 

Ready to give a hand at once... check my profile for help

Share this post


Link to post
Share on other sites
obviously, your cart has a logic error...it should be mixed...you can fix this in the file below:

includes/modules/pages/checkout_shipping/header_php.php

 

it depends on you how to treat the order...but customization is inevitable...

 

enjoy...!

 

Ok...thanks for the response, but what is includes/modules/pages/checkout_shipping/header_php.php? I don't even have includes/modules/pages dir.

 

- dave

Share this post


Link to post
Share on other sites
Ok...thanks for the response, but what is includes/modules/pages/checkout_shipping/header_php.php? I don't even have includes/modules/pages dir.

 

- dave

 

oh, sorry...

 

it's of zencart system...

 

in osc, you can find it from

site_root/catalog/checkout_shipping.php

 

in the header section, you can find out what you need...if you still have questions, please leave me PM...I can help you on this anyway...


Have a problems in osCommerce shipping, payment, addons installation, customization or SEO?

 

Ready to give a hand at once... check my profile for help

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
Sign in to follow this  

×