mcmannehan Posted March 25, 2017 Share Posted March 25, 2017 A lot shop owners get problem with some customer, if the product have options. There is no requierd for that. So i change that. Note: This is only tested with osC 2.3.4 Bootstrap-Responsive, the code is used from this Version. First a new function in /includes/functions/html_output.php add at the end before ?>, if have // Output a form pull down menu for attributes function tep_draw_pull_down_menu_product_wdw_attributes($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if (empty($default) && ( (isset($_GET[$name]) && is_string($_GET[$name])) || (isset($_POST[$name]) && is_string($_POST[$name])) ) ) { if (isset($_GET[$name]) && is_string($_GET[$name])) { $default = stripslashes($_GET[$name]); } elseif (isset($_POST[$name]) && is_string($_POST[$name])) { $default = stripslashes($_POST[$name]); } } $field .= '<option value="0">' . TEXT_PLEASE_SELECT . '</option>'; for ($i=0, $n=sizeof($values); $i<$n; $i++) { if ( tep_output_string($values[$i]['id']) != 1384 && tep_output_string($values[$i]['id']) != 1411 ) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } } $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } Than change in /includes/application_top.php find: // customer adds a product from the products page case 'add_product' : if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) { $attributes = isset($_POST['id']) ? $_POST['id'] : ''; $cart->add_cart($_POST['products_id'], $cart->get_quantity(tep_get_uprid($_POST['products_id'], $attributes))+1, $attributes); } $messageStack->add_session('product_action', sprintf(PRODUCT_ADDED, tep_get_products_name((int)$_POST['products_id'])), 'success'); tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; and change to: // customer adds a product from the products page case 'add_product' : if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) { if (tep_session_is_registered('wdw_products_attributes')) { tep_session_unregister('wdw_products_attributes'); if (current($_POST['id']) == 0) { $messageStack->add_session('product_action', PRODUCT_ATTRIBUTES, 'warning'); tep_redirect(tep_href_link('product_info.php?products_id=' . $_POST['products_id'])); } } $attributes = isset($_POST['id']) ? $_POST['id'] : ''; $cart->add_cart($_POST['products_id'], $cart->get_quantity(tep_get_uprid($_POST['products_id'], $attributes))+1, $attributes); } $messageStack->add_session('product_action', sprintf(PRODUCT_ADDED, tep_get_products_name((int)$_POST['products_id'])), 'success'); tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; than in product_info.php find <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <h4><?php echo TEXT_PRODUCT_OPTIONS; ?></h4> <p> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $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)$_GET['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 . "'"); 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'])) .') '; } } if (is_string($_GET['products_id']) && isset($cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"', true); ?><br /> <?php } ?> </p> and change too: <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { tep_session_register('wdw_products_attributes'); ?> <h4><?php echo TEXT_PRODUCT_OPTIONS; ?></h4> <p> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $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)$_GET['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 . "'"); 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'])) .') '; } } if (is_string($_GET['products_id']) && isset($cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu_product_wdw_attributes('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"', true); ?><br /> <?php } ?> </p> <?php } else { tep_session_unregister('wdw_products_attributes'); } add in /includes/languages/english.php if you have more different languages than change there too. define('TEXT_PLEASE_SELECT', 'Please Select'); define('TEXT_FIELD_REQUIRED', ' <span class="fieldRequired">* Required</span>'); define('PRODUCT_ATTRIBUTES', 'You have not selected a product option'); Now the product option is Required. If someone like that, please click "like" thank you! The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
burt Posted March 25, 2017 Share Posted March 25, 2017 Or... http://www.oscommerce.com/forums/topic/398847-enforce-dropdown-selection/ Link to comment Share on other sites More sharing options...
mcmannehan Posted March 25, 2017 Author Share Posted March 25, 2017 Or... http://www.oscommerce.com/forums/topic/398847-enforce-dropdown-selection/ @@burt Thank you for the info, but this is not a good solution, there is no info for the customer about have to select the product option. Sorry to say that!!! The customer needs to be informed. I like solution that are more suitable. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
♥mattjt83 Posted March 26, 2017 Share Posted March 26, 2017 @@burt @@mcmannehan You could do a lot of this, probably all of it, via javascript in a header tag module instead of hacking apart these core files. Also what's up with this part: if ( tep_output_string($values[$i]['id']) != 1384 && tep_output_string($values[$i]['id']) != 1411 ) { Matt Link to comment Share on other sites More sharing options...
mcmannehan Posted March 26, 2017 Author Share Posted March 26, 2017 @mattjit83 Thanky for the answer @@burt @@mcmannehan You could do a lot of this, probably all of it, via javascript in a header tag module instead of hacking apart these core files. Also what's up with this part: if ( tep_output_string($values[$i]['id']) != 1384 && tep_output_string($values[$i]['id']) != 1411 ) { Javascript can be manipulated by the user it's also not a suitable solution. This core file hack should be in the core, like a lot orther things they are missing in osC. if ( tep_output_string($values[$i]['id']) != 1384 && tep_output_string($values[$i]['id']) != 1411 ) { Why hard coded numbers? What happens if the numbers change? The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
burt Posted March 26, 2017 Share Posted March 26, 2017 @@mattjt83 The solution I posted was a few years old, likely needs looking at again. It uses the HTML5 "required" stuff which is the preferred solution. IIRC the dropdowns in the product page have not yet been optimised into div based structure (has-feedback etc). I'll put that onto the to-do list lol Link to comment Share on other sites More sharing options...
burt Posted March 26, 2017 Share Posted March 26, 2017 this is not a good solution, there is no info for the customer about have to select the product option. Sorry to say that!!! The customer needs to be informed. I like solution that are more suitable. The customer is informed; Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted March 26, 2017 Share Posted March 26, 2017 i got a flashback to the Must Select atributes i did when RC2 was sexy KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥mattjt83 Posted March 26, 2017 Share Posted March 26, 2017 @mattjit83 Javascript can be manipulated by the user it's also not a suitable solution. It could be manipulated by the end user but I would say it's few and far between that a user knows how to do this and wants to take the time to do it. You could use javascript to manipulate the html and add in @@burt code to make the field required. Matt Link to comment Share on other sites More sharing options...
mcmannehan Posted March 27, 2017 Author Share Posted March 27, 2017 Error in my code. If product option have more than one option, like color and size my first solution didn't work. Here is the correction: find in in /includes/application_top.php // customer adds a product from the products page case 'add_product' : if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) { $attributes = isset($_POST['id']) ? $_POST['id'] : ''; $cart->add_cart($_POST['products_id'], $cart->get_quantity(tep_get_uprid($_POST['products_id'], $attributes))+1, $attributes); } $messageStack->add_session('product_action', sprintf(PRODUCT_ADDED, tep_get_products_name((int)$_POST['products_id'])), 'success'); tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; and change to: // customer adds a product from the products page case 'add_product' : if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) { if (tep_session_is_registered('wdw_products_attributes')) { tep_session_unregister('wdw_products_attributes'); for ($i=0; $i < $wdw_products_options_quantity; $i++) { if ($_POST['id'][$i+1] == 0 ) { $wdw_redirect = true; } } if ( $wdw_redirect == true ) { $wdw_redirect = false; tep_session_unregister('wdw_products_options_quantity'); $messageStack->add_session('product_action', PRODUCT_ATTRIBUTES, 'warning'); tep_redirect(tep_href_link('product_info.php?products_id=' . $_POST['products_id'])); } } $attributes = isset($_POST['id']) ? $_POST['id'] : ''; $cart->add_cart($_POST['products_id'], $cart->get_quantity(tep_get_uprid($_POST['products_id'], $attributes))+1, $attributes); } $messageStack->add_session('product_action', sprintf(PRODUCT_ADDED, tep_get_products_name((int)$_POST['products_id'])), 'success'); tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; find in product_info.php <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <h4><?php echo TEXT_PRODUCT_OPTIONS; ?></h4> <p> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $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)$_GET['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 . "'"); 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'])) .') '; } } if (is_string($_GET['products_id']) && isset($cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"', true); ?><br /> <?php } ?> </p> and change to: <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { tep_session_register('wdw_products_attributes'); ?> <h4><?php echo TEXT_PRODUCT_OPTIONS; ?></h4> <p> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $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)$_GET['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 . "'"); 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'])) .') '; } } if (is_string($_GET['products_id']) && isset($cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$_GET['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } $wdw_products_options_quantity = tep_db_num_rows($products_options_name_query); tep_session_register('wdw_products_options_quantity'); ?> <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu_product_wdw_attributes('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"', true); ?><br /> <?php } ?> </p> The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
mcmannehan Posted March 27, 2017 Author Share Posted March 27, 2017 @mattit83 It could be manipulated by the end user but I would say it's few and far between that a user knows how to do this and wants to take the time to do it. You could use javascript to manipulate the html and add in @@burt code to make the field required. the field can set to required by using to true option in the function: tep_draw_pull_down_menu_product_wdw_attributes('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"', true); The Javascript is really not a good solution. You have to controll the "add to cart" button too. You make it complicated. Now (after i fix the bug) my solution is efficient and works very well. If you think it's far between, than you think wrong. A lot people know how to do and if there like to do, than there will find answers in the web too.But anyway everybody can do is own solution, complicated or not! The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
mcmannehan Posted March 27, 2017 Author Share Posted March 27, 2017 @@burt The customer is informed; enforced.jpg by the browser... The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
mcmannehan Posted March 27, 2017 Author Share Posted March 27, 2017 @@burt @@mattjt83 The solution I posted was a few years old, likely needs looking at again. It uses the HTML5 "required" stuff which is the preferred solution. IIRC the dropdowns in the product page have not yet been optimised into div based structure (has-feedback etc). I'll put that onto the to-do list lol In my version for a customer i did the div based structure. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
♥14steve14 Posted March 27, 2017 Share Posted March 27, 2017 @@mcmannehan Why not package it up as a module and release it as an addon. Being a module would make it compatible with the current thinking that is to make no core code changes. I personally do not add anything that has too many core code changes as it will make it so much harder to update in the future. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
mcmannehan Posted March 27, 2017 Author Share Posted March 27, 2017 @@14steve14 @@mcmannehan Why not package it up as a module and release it as an addon. Being a module would make it compatible with the current thinking that is to make no core code changes. I personally do not add anything that has too many core code changes as it will make it so much harder to update in the future. Without core hack it's impossible. Or do you have an idea how to do? Than you welcome. Attributes should be in core for to be requierd. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
mcmannehan Posted March 27, 2017 Author Share Posted March 27, 2017 @@burt this is my customer information at my "P" Version. Running in a production shop included with my WDW EasyTabs. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
burt Posted March 27, 2017 Share Posted March 27, 2017 @@burt by the browser... Which is the more correct, and preferred option. Do it your way for your client if you wish, but it's not something I would do. Link to comment Share on other sites More sharing options...
burt Posted March 27, 2017 Share Posted March 27, 2017 In my version for a customer i did the div based structure. I don't see attributes div based structure in your Fork or in your customers live site. Assuming that we are talking about the same thing, please share that code changes...it will save me some time/effort and benefit the rest of the community. Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 27, 2017 Share Posted March 27, 2017 @@mcmannehan I think the Must Select addon does what you did. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mcmannehan Posted March 28, 2017 Author Share Posted March 28, 2017 @@Jack_mcs @@mcmannehan I think the Must Select addon does what you did. The add-on you recommand, is totally different code changes. The idea is the same, yes you right. But, please note, your recommand is for osC 2.2, the old one. May I talking about osC 2.3.4BS and osC 2.3.4BS-Responsive. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
mcmannehan Posted March 28, 2017 Author Share Posted March 28, 2017 @@burt I don't see attributes div based structure in your Fork or in your customers live site. Assuming that we are talking about the same thing, please share that code changes...it will save me some time/effort and benefit the rest of the community. My Fork at Github don't have this changes yet. And yes, thank you i saw, that the code (customer website) is missing. Funy stuff... 99.9% the people in front of the computer do wrong by them self. So me too.... Last update from the Server overwrite the local file by accident. The accident was? - me (w00t) So thank you for the information, attributes div based structure will be in the code soon. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
mcmannehan Posted March 28, 2017 Author Share Posted March 28, 2017 @@burt Which is the more correct, and preferred option. Do it your way for your client if you wish, but it's not something I would do. My code changes follow the "message system" of osC. That's my idea for that. The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 28, 2017 Share Posted March 28, 2017 @@Jack_mcs The add-on you recommand, is totally different code changes. The idea is the same, yes you right. But, please note, your recommand is for osC 2.2, the old one. May I talking about osC 2.3.4BS and osC 2.3.4BS-Responsive. The code involved has not changed much in all of the versions so that is not an issue. If you wanting a plug in in the BS style, then no, it won't help. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.