Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add to Cart Attribute Header


olsonsp4c

Recommended Posts

Posted

Hello everybody.

 

I have created a dummy attribute in my shop called "Please Select"; however, on some of my products, an attribute is not required to purchase the product. When I add it to the cart, it may list "Please Select" 2-3x depending on how many attributes the product has.

 

I'd like to add an if statement that checks the attribute name. If it is "Please Select" I'd like it not to show up in the cart. Otherwise, it should show the chosen attribute. I'm just not sure what code to change.

 

Any ideas?

 

Thanks!

 

Scott

Posted
Hello everybody.

 

I have created a dummy attribute in my shop called "Please Select"; however, on some of my products, an attribute is not required to purchase the product. When I add it to the cart, it may list "Please Select" 2-3x depending on how many attributes the product has.

 

I'd like to add an if statement that checks the attribute name. If it is "Please Select" I'd like it not to show up in the cart. Otherwise, it should show the chosen attribute. I'm just not sure what code to change.

 

Any ideas?

 

Thanks!

 

Scott

 

Here's the code that I think needs to be changed in catalog/product_info.php - any thoughts?

 

 

		}
	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
	  $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
	} else {
	  $selected_attribute = false;
	}

 

thanks! Scott

Archived

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

×
×
  • Create New...