olsonsp4c Posted March 7, 2006 Posted March 7, 2006 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 Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox
olsonsp4c Posted March 10, 2006 Author Posted March 10, 2006 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 Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox
Recommended Posts
Archived
This topic is now archived and is closed to further replies.