Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

content_type and downloads


davecohen

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

Link to comment
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...!

Link to comment
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

Link to comment
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...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...