Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Products with required addons


sgaggerj

Recommended Posts

Hello all!

 

I'm just starting out getting my site up and configured the way I want.

I want to first thank everyone that's put the time and effort into this project! Outstanding job!

 

I have two different types of products on my site, frozen and shelf stable.

 

The shelf stable are all set.

 

The frozen, I'm having trouble with getting configured properly (well, more where to start)

 

The frozen products need to have a mandatory additional charge/item added to them, based on the number of items ordered (preferably at checkout).

 

 

 

Item Qty | Cooler | Cooler Qty | Charge

1-2 | A | 1 | $25

3-6 | B | 1 | $35

12-24 | C | 1 | $75

 

So if the customer orders 2 units of FROZEN product (doesn't matter if it's 1 of Product X and 1 of Product Y, or 2 of Product X), it will ned Cooler A added.

 

If the customer orders 4 units total of FROZEN product (again, doesn't matter which product), it will need cooler B

 

if the customer orders 8 units, 1 cooler A and 1 Cooler B

 

etc.

 

Does anyone know of a package that does this already - OR - a way to do it with the stock install?

 

Thanks for your help in advance!

Link to comment
Share on other sites

Thanks! I'll have to check that out and see what I can do.

 

In the meantime....

 

I'm toying with an idea of modifying /shopping_cart.php....

 

i'll post back with my results.

 

thanks for the link DunWeb!

Link to comment
Share on other sites

I was just adding that one in manually as it's for 2.2 and I'm running 2.3

 

Everything lines up (for the most part) except when I get to /catalog/admin/categories.php

 

NEAR LINE 754: ADD AFTER.....

while (list($key, $value) = each($HTTP_POST_VARS)) {
 if (!is_array($HTTP_POST_VARS[$key])) {
   echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
 }

......THE FOLLOWING CODE:

//START SHP
 else {				   
         while (list($k, $v) = each($value)) {
           echo tep_draw_hidden_field($key . '[' . $k . ']', htmlspecialchars(stripslashes($v)));
       }
   }
//END SHP

 

I can't find any of the lines he's referring to......

 

The only addons i have installed are ThemeSwitcher and FedEx

Link to comment
Share on other sites

Same for

 

NEAR LINE 944: ADD AFTER.....

$contents[] = array('text' => '<br>' . TEXT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image'));
$contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', '', 'size="2"'));

......THE FOLLOWING CODE:

//START SHP
$contents[] = array('text' => tep_print_shp_menu('category'));
//END SHP	

 

and

 

NEAR LINE 965: ADD AFTER.....

$contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image'));
$contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort

......THE FOLLOWING CODE:

//START SHP
$contents[] = array('text' => tep_print_shp_menu('category'));
//END SHP

Link to comment
Share on other sites

Well, it looks like (at least from reading post #66 from here

I wouldn't be able to do what I wanted anyhow ("...except that hidden product cant be added to cart.")

 

I have modified the catalog/shopping_cart.php so that it counts the number of articles and determines how many coolers will be needed.

 

I have also modified it to display the additional cost and description when in the cart.

 

What I can't figure out how to do is to add that total to the cart so that at checkout it's the new 'total'

Link to comment
Share on other sites

Ok i think I got a 'workaround' to hiding products. Assuming you have a large enough group of products so that it's not shown on the 'What's new' page, set the 'date added' to earlier than all the other products, and don't add it to a category.

 

now to try and figure out how to remove the ' Update / remove' functionality for those products.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...