Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Forking Add Multi Products to Cart


muskokee

Recommended Posts

Hi all,

 

I am trying REALLY hard to modify already existing contributions to do a very similar chore yet so, so different :D

 

I've studied Add Multi Products Checkbox v1.0

and

the add_multiples section of product listing in columns

and

Add Multiple Products to Cart, in columns, for SPPC

 

to use in conjuction with Product Attributes - Option Type Feature

 

Some people just want to purchase the same thing with different options! I bought the same t-shirt today in 5 different colours :blush: If I had to buy one...put my wallet away, then do it all over again 4 more times, I wouldn't have purchased any. What a pain in the behind.

 

I have modified the checkbox case of Product Attributes - Option Type Feature to show each attribute in a list with a checkbox.

 

$tmp_html = '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
		$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_sortorder, pov.products_options_values_id");


		while ($products_options_array = tep_db_fetch_array($products_options_query)) {
		  $tmp_html .= '<tr><td class="main" align="left" style="padding-bottom:4px;">';
		  $tmp_html .= tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id']);

		  $tmp_html .= $products_options_array['products_options_values_name'];
		  $tmp_html .=$products_options_name['products_options_comment'];
		  if ($products_options_array['options_values_price'] != '0') {
			$tmp_html .= '(' . $products_options_array['price_prefix'] . $currencies->display_price($products_options_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
		  }
		  $tmp_html .= '</td></tr>';
		}
		$tmp_html .= '</table>';

 

From going over the add multiple contribs (all for product listing pages) I know that another case must be added to the shopping cart switch to allow multiple items to be passed in one click and that the product_info form must point to this action.

 

Somehow, a hidden field must be tucked into the checkbox case above to snag the values.

 

Beyond this...my brain is sore.

 

Any assistance graciously accepted :wub:

 

Sheri

Link to comment
Share on other sites

  • 3 weeks later...

Hi Sheri,

I tried to do the same thing ! but I installed another contrib you've not listed :

http://www.oscommerce.com/community/contributions,3345/

It has all you want except the checkboxes? But for me when adding qty for each attribut option, and clicking on "add to cart" , I go to the shopping cart page, without any product added.

You should try it . perhaps my store is too heavily moded and I missed something or I need to add something I dont know as my skill is not enough...

Seb

Osc 2.2 MS2

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...