Guest Posted June 30, 2006 Posted June 30, 2006 Hi. I saw that when we have more than 1 product option that it prints all and send them via mail. If i have for example 3 product options and each of them have different values i want that only the option selected and respective value could be sent via order confirmation mail. ----------------------------------------------------------------- An example for 1 produtc with these options: Color -> green (default value), red, blue Memory -> 4 mb (default value), 8mb, 16 mb I only want buy a product with color red. It sends color red and memory 4 mb in order confirmation mail when i only want that it sends color red. ----------------------------------------------------------------- If somebody knows a contribution that makes this work i appreciate that. Thanks. Best regards, Claudio
Guest Posted June 30, 2006 Posted June 30, 2006 are you sure that you're not adding the color option attributes to the memory product? If you don't want options to show up for a product, don't associate them... ? It sounds like you created some product and assigned the memory attribute to this product when all you want is the color attribute.
Guest Posted July 2, 2006 Posted July 2, 2006 are you sure that you're not adding the color option attributes to the memory product? If you don't want options to show up for a product, don't associate them... ? It sounds like you created some product and assigned the memory attribute to this product when all you want is the color attribute. You don?t understood my question. in database example of oscommerce you have a graphic card that has various options. You can choose memory and / or model. What i want is when a client buy something like this graphic card, if he only choose memory 8 mb, when he receive her confirmation order mail i want only this option selected to be showed. By default when you have a product with various options and if you only choose 1 of them, when you receive confirmation order mail you see all the options with a default value plus the one you selected. Claudio
Guest Posted July 3, 2006 Posted July 3, 2006 you have to do a couple of mods in the product_info.php page and in the shopping cart class. The product_info.php creates an array of attributes. For each attribute array you want to add an extra element which will be basically a "Please Select" while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } So after the while loop you could add $products_options_array[] = array('id' => '0', 'text' => 'Please Select'); Then in the shopping cart class you do not want to assign the attribute with id of '0' so the add_cart function has to change so if the $option is 0 to skip this code: $this->contents[$products_id_string]['attributes'][$option] = $value;
Recommended Posts
Archived
This topic is now archived and is closed to further replies.