Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Ok, so this is what I am tying to do- I am trying to make it possible to have the product options show up on my product listing page. I am pretty much complete but just need to figure out a way to handle the passed form data from the product listing form. It is currently set to send the data to the add_multi function (see below)

 

It is adding the quantity to the cart but not the selected options/ attributes.. It s driving me nuts..

 

HELP!

 

Thanks

 

 

 

 

case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$quantity, $HTTP_POST_VARS['id']);

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

 

 

 

 

 

 

case 'add_multi':

 

for ($i=1; $i<=sizeof($HTTP_POST_VARS['products_id']);$i++) {

 

$cart->add_cart($HTTP_POST_VARS['products_id'][$i+1], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'][$i+1], $HTTP_POST_VARS['id'][$i+1]))+($HTTP_POST_VARS['add_id'][$i+1]), $HTTP_POST_VARS['id'][$i+1], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$quantity, $HTTP_POST_VARS['id']);

 

}

 

tep_redirect(tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params($parameters), 'NONSSL'));

 

while (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$quantity, $HTTP_POST_VARS['id']);

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

 

 

break;

Posted

Hi,

Thanks for the reply and assistance but still no-go. The add to cart button at the bottom of the page in that contribution doesnt work, I tried that a few months ago (and agan just now)

 

I have a list of 23 products on the page, 5 or 6 of them need to have drop downs with two options (this much is complete) Having a terribly difficult time trying to get the options for each to add to the cart though.

 

Each option has an id right? So if there are a total of 5 different options on the page there should be ids labled 1-5 to pass to the cart.

 

Thanks agian if anyone has insight to my problem, or better yet, a fix to the above contribution.

 

Thanks

Posted

So you need to create a form to add all products from a list and selected attiributes and quantities in the same form if I understand. So the contribution should build a list of products with the attributes (you need to add the quantities and the form submission code)

 

So there are 3 things

 

1. Create the attribute list associated with each product.

2. Create the form with a separate action switch for process in the application_top.php

3. Create the list of products, attributes and quantities. These are the form elements. So the products id and quantity arrays should be straight forward. The attributes is again a 4-D array that includes the attributes_id, products_id, options_id and selected value id.

 

This information should be included when the final form is submitted. For each item in application_top.php you first check against the quantity and then you examine the details.

Posted
So you need to create a form to add all products from a list and selected attiributes and quantities in the same form if I understand. So the contribution should build a list of products with the attributes (you need to add the quantities and the form submission code)

 

So there are 3 things

 

1. Create the attribute list associated with each product.

2. Create the form with a separate action switch for process in the application_top.php

3. Create the list of products, attributes and quantities. These are the form elements. So the products id and quantity arrays should be straight forward. The attributes is again a 4-D array that includes the attributes_id, products_id, options_id and selected value id.

 

This information should be included when the final form is submitted. For each item in application_top.php you first check against the quantity and then you examine the details.

 

 

How much would it cost to have you code it for me? I simply ran out of time and need to hire someone asap to finish this one little piece.

 

PM me if you want with a quote, I can pay though PayPal..

 

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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