rgplanet Posted January 29, 2009 Share Posted January 29, 2009 Hello, i tried to install Product Attributes Sort Order but: 1136 - Column count doesn't match value count at row 1 insert into products_attributes values ('', '613', '2', '12', '', '+') [TEP STOP] I have read and read and read. I think my problem is in product_attributes.ph but I cant fix it. This is the code of the file: <?php <?php /* $Id: products_attributes.php,v 1.52 2003/07/10 20:46:01 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $languages = tep_get_languages(); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { $page_info = ''; if (isset($HTTP_GET_VARS['option_page'])) $page_info .= 'option_page=' . $HTTP_GET_VARS['option_page'] . '&'; if (isset($HTTP_GET_VARS['value_page'])) $page_info .= 'value_page=' . $HTTP_GET_VARS['value_page'] . '&'; if (isset($HTTP_GET_VARS['attribute_page'])) $page_info .= 'attribute_page=' . $HTTP_GET_VARS['attribute_page'] . '&'; if (tep_not_null($page_info)) { $page_info = substr($page_info, 0, -1); } switch ($action) { case 'clone_attributes': $clone_product_id_from = $HTTP_POST_VARS['clone_products_id_from']; $clone_product_id_to = $HTTP_POST_VARS['clone_products_id_to']; tep_db_query("delete from ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id='".$clone_product_id_to."'"); $attributes = tep_db_query("select products_id, options_id, options_values_id, options_values_price, price_prefix, attribute_sort from " . TABLE_PRODUCTS_ATTRIBUTES ." where products_id='".$clone_product_id_from."'"); while($attributes_values = tep_db_fetch_array($attributes)) { tep_db_query("INSERT INTO " . TABLE_PRODUCTS_ATTRIBUTES . " ( products_id, options_id, options_values_id, options_values_price, price_prefix, attribute_sort) VALUES (".$clone_product_id_to.", ".$attributes_values['options_id'].", ".$attributes_values['options_values_id'].", ".$attributes_values['options_values_price'].", '".$attributes_values['price_prefix']."' , ".$attributes_values['attribute_sort'].")"); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'add_product_options': $products_options_id = tep_db_prepare_input($HTTP_POST_VARS['products_options_id']); $option_name_array = $HTTP_POST_VARS['option_name']; for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { $option_name = tep_db_prepare_input($option_name_array[$languages[$i]['id']]); tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS . " (products_options_id, products_options_name, language_id) values ('" . (int)$products_options_id . "', '" . tep_db_input($option_name) . "', '" . (int)$languages[$i]['id'] . "')"); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'add_product_option_values': $value_name_array = $HTTP_POST_VARS['value_name']; $value_id = tep_db_prepare_input($HTTP_POST_VARS['value_id']); $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']); for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { $value_name = tep_db_prepare_input($value_name_array[$languages[$i]['id']]); tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) values ('" . (int)$value_id . "', '" . (int)$languages[$i]['id'] . "', '" . tep_db_input($value_name) . "')"); } tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " (products_options_id, products_options_values_id) values ('" . (int)$option_id . "', '" . (int)$value_id . "')"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'add_product_attributes': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']); $values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']); $value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']); $price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']); $attributes_sort = tep_db_prepare_input($HTTP_POST_VARS['attributes_sort']); tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')"); tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_id, options_id, options_values_id, options_values_price, price_prefix) values ('" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')"); if (DOWNLOAD_ENABLED == 'true') { $products_attributes_id = tep_db_insert_id(); $products_attributes_filename = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_filename']); $products_attributes_maxdays = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxdays']); $products_attributes_maxcount = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxcount']); if (tep_not_null($products_attributes_filename)) { tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " values (" . (int)$products_attributes_id . ", '" . tep_db_input($products_attributes_filename) . "', '" . tep_db_input($products_attributes_maxdays) . "', '" . tep_db_input($products_attributes_maxcount) . "')"); } } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'update_option_name': $option_name_array = $HTTP_POST_VARS['option_name']; $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']); for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { $option_name = tep_db_prepare_input($option_name_array[$languages[$i]['id']]); tep_db_query("update " . TABLE_PRODUCTS_OPTIONS . " set products_options_name = '" . tep_db_input($option_name) . "' where products_options_id = '" . (int)$option_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'update_value': $value_name_array = $HTTP_POST_VARS['value_name']; $value_id = tep_db_prepare_input($HTTP_POST_VARS['value_id']); $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']); for ($i=0, $n=sizeof($languages); $i<$n; $i ++) { $value_name = tep_db_prepare_input($value_name_array[$languages[$i]['id']]); tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES . " set products_options_values_name = '" . tep_db_input($value_name) . "' where products_options_values_id = '" . tep_db_input($value_id) . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); } tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " set products_options_id = '" . (int)$option_id . "' where products_options_values_id = '" . (int)$value_id . "'"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'update_product_attribute': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']); $values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']); $value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']); $price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']); $attribute_id = tep_db_prepare_input($HTTP_POST_VARS['attribute_id']); $attributes_sort = tep_db_prepare_input($HTTP_POST_VARS['attributes_sort']); tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set products_id = '" . (int)$products_id . "', options_id = '" . (int)$options_id . "', options_values_id = '" . (int)$values_id . "', options_values_price = '" . (float)tep_db_input($value_price) . "', price_prefix = '" . tep_db_input($price_prefix) . "', attribute_sort = '" . (int)$attributes_sort . "' where products_attributes_id = '" . (int)$attribute_id . "'"); if (DOWNLOAD_ENABLED == 'true') { $products_attributes_filename = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_filename']); $products_attributes_maxdays = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxdays']); $products_attributes_maxcount = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxcount']); if (tep_not_null($products_attributes_filename)) { tep_db_query("replace into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " set products_attributes_id = '" . (int)$attribute_id . "', products_attributes_filename = '" . tep_db_input($products_attributes_filename) . "', products_attributes_maxdays = '" . tep_db_input($products_attributes_maxdays) . "', products_attributes_maxcount = '" . tep_db_input($products_attributes_maxcount) . "'"); } } tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'delete_option': $option_id = tep_db_prepare_input($HTTP_GET_VARS['option_id']); tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$option_id . "'"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'delete_value': $value_id = tep_db_prepare_input($HTTP_GET_VARS['value_id']); tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$value_id . "'"); tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$value_id . "'"); tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " where products_options_values_id = '" . (int)$value_id . "'"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; case 'delete_attribute': $attribute_id = tep_db_prepare_input($HTTP_GET_VARS['attribute_id']); tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_attributes_id = '" . (int)$attribute_id . "'"); // added for DOWNLOAD_ENABLED. Always try to remove attributes, even if downloads are no longer enabled tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " where products_attributes_id = '" . (int)$attribute_id . "'"); tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info)); break; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script type="text/javascript"><!-- function go_option() { if (document.option_order_by.selected.options[document.option_order_by.selected.sel ectedIndex].value != "none") { location = "<?php echo tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . ($HTTP_GET_VARS['option_page'] ? $HTTP_GET_VARS['option_page'] : 1)); ?>&option_order_by="+document.option_order_by.selected.options[document.option_order_by.selecte d.selectedIndex].value; } } //--></script> </head> <body> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" summary="" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" summary="" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0"> <!-- options and values//--> <tr> <td width="100%"><table summary="" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" width="50%"><table summary="" width="100%" border="0" cellspacing="0" cellpadding="2"> <!-- options //--> <?php // if ($action == 'delete_product_option') { // delete product option if ($action == 'delete_option_value') { // delete product option value $options = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$HTTP_GET_VARS['option_id'] . "' and language_id = '" . (int)$languages_id . "'"); $options_values = tep_db_fetch_array($options); ?> <tr> <td class="pageHeading">&<?php echo $options_values['products_options_name']; ?>&</td> <td>&<?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '53'); ?>&</td> </tr> <tr> <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php $products = tep_db_query("select p.products_id, pd.products_name, pov.products_options_values_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pov.language_id = '" . (int)$languages_id . "' and pd.language_id = '" . (int)$languages_id . "' and pa.products_id = p.products_id and pa.options_id='" . (int)$HTTP_GET_VARS['option_id'] . "' and pov.products_options_values_id = pa.options_values_id order by pd.products_name"); if (tep_db_num_rows($products)) { ?> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center">&<?php echo TABLE_HEADING_ID; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_PRODUCT; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_OPT_VALUE; ?>&</td> </tr> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php $rows = 0; while ($products_values = tep_db_fetch_array($products)) { $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <td align="center" class="smallText">&<?php echo $products_values['products_id']; ?>&</td> <td class="smallText">&<?php echo $products_values['products_name']; ?>&</td> <td class="smallText">&<?php echo $products_values['products_options_values_name']; ?>&</td> </tr> <?php } ?> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <tr> <td colspan="3" class="main"><br><?php echo TEXT_WARNING_OF_DELETE; ?></td> </tr> <tr> <td align="right" colspan="3" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($HTTP_GET_VARS['value_page']) ? 'value_page=' . $HTTP_GET_VARS['value_page'] . '&' : '') . (isset($HTTP_GET_VARS['attribute_page']) ? 'attribute_page=' . $HTTP_GET_VARS['attribute_page'] : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a>&</td> </tr> <?php } else { ?> <tr> <td class="main" colspan="3"><br><?php echo TEXT_OK_TO_DELETE; ?></td> </tr> <tr> <td class="main" align="right" colspan="3"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_option&option_id=' . $HTTP_GET_VARS['option_id'], 'NONSSL') . '">'; ?><?php echo tep_image_button('button_delete.gif', ' delete '); ?></a>&&&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($HTTP_GET_VARS['order_by']) ? 'order_by=' . $HTTP_GET_VARS['order_by'] . '&' : '') . (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a>&</td> </tr> <?php } ?> </table></td> </tr> <?php } else { if (isset($HTTP_GET_VARS['option_order_by'])) { $option_order_by = $HTTP_GET_VARS['option_order_by']; } else { $option_order_by = 'products_options_id'; } ?> <tr> <td colspan="2" class="pageHeading">&<?php echo HEADING_TITLE_OPT; ?>&</td> <td align="right"><br><form name="option_order_by" action="<?php echo FILENAME_PRODUCTS_ATTRIBUTES; ?>"><select name="selected" onChange="go_option()"><option value="products_options_id"<?php if ($option_order_by == 'products_options_id') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_ID; ?></option><option value="products_options_name"<?php if ($option_order_by == 'products_options_name') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_NAME; ?></option></select></form></td> </tr> <tr> <td colspan="3" class="smallText"> <?php $per_page = MAX_ROW_LISTS_OPTIONS; $options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by " . $option_order_by; if (!isset($option_page)) { $option_page = 1; } $prev_option_page = $option_page - 1; $next_option_page = $option_page + 1; $option_query = tep_db_query($options); $option_page_start = ($per_page * $option_page) - $per_page; $num_rows = tep_db_num_rows($option_query); if ($num_rows <= $per_page) { $num_pages = 1; } else if (($num_rows % $per_page) == 0) { $num_pages = ($num_rows / $per_page); } else { $num_pages = ($num_rows / $per_page) + 1; } $num_pages = (int) $num_pages; $options = $options . " LIMIT $option_page_start, $per_page"; // Previous if ($prev_option_page) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $prev_option_page) . '"> && </a> | '; } for ($i = 1; $i <= $num_pages; $i++) { if ($i != $option_page) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $i) . '">' . $i . '</a> | '; } else { echo '<b><font color=red>' . $i . '</font></b> | '; } } // Next if ($option_page != $num_pages) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $next_option_page) . '"> && </a>'; } ?> </td> </tr> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_ID; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_OPT_NAME; ?>&</td> <td class="dataTableHeadingContent" align="center">&<?php echo TABLE_HEADING_ACTION; ?>&</td> </tr> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php $next_id = 1; $rows = 0; $options = tep_db_query($options); while ($options_values = tep_db_fetch_array($options)) { $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php if (($action == 'update_option') && ($HTTP_GET_VARS['option_id'] == $options_values['products_options_id'])) { echo '<td colspan="3">'; echo '<form name="option" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option_name', 'NONSSL') . '" method="post">'; echo '<table summary="" width="100%" border="0" cellspacing="0" cellpadding="2"><tr>'; $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $option_name = tep_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . $options_values['products_options_id'] . "' and language_id = '" . $languages[$i]['id'] . "'"); $option_name = tep_db_fetch_array($option_name); $inputs .= $languages[$i]['code'] . ':&<input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20" value="' . $option_name['products_options_name'] . '">&<br>'; } ?> <td align="center" class="smallText">&<?php echo $options_values['products_options_id']; ?><input type="hidden" name="option_id" value="<?php echo $options_values['products_options_id']; ?>">&</td> <td class="smallText"><?php echo $inputs; ?></td> <td align="center" class="smallText">&<?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>&</td> <?php echo '</tr></table></form></td>' . "\n"; } else { ?> <td align="center" class="smallText">&<?php echo $options_values["products_options_id"]; ?>&</td> <td class="smallText">&<?php echo $options_values["products_options_name"]; ?>&</td> <td align="center" class="smallText">&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option&option_id=' . $options_values['products_options_id'] . '&option_order_by=' . $option_order_by . '&option_page=' . $option_page, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_edit.gif', IMAGE_UPDATE); ?></a>&&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_product_option&option_id=' . $options_values['products_options_id'], 'NONSSL') , '">'; ?><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE); ?></a>&</td> <?php } ?> </tr> <?php $max_options_id_query = tep_db_query("select max(products_options_id) + 1 as next_id from " . TABLE_PRODUCTS_OPTIONS); $max_options_id_values = tep_db_fetch_array($max_options_id_query); $next_id = $max_options_id_values['next_id']; } ?> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php if ($action != 'update_option') { ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php echo '<td colspan="3">'; echo '<form name="options" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=add_product_options&option_page=' . $option_page, 'NONSSL') . '" method="post"><input type="hidden" name="products_options_id" value="' . $next_id . '">'; echo '<table summary="" width="100%" border="0" cellspacing="0" cellpadding="2"><tr>'; $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $inputs .= $languages[$i]['code'] . ':&<input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20">&<br>'; } ?> <td align="center" class="smallText">&<?php echo $next_id; ?>&</td> <td class="smallText"><?php echo $inputs; ?></td> <td align="center" class="smallText">&<?php echo tep_image_submit('button_insert.gif', IMAGE_INSERT); ?>&</td> <?php echo '</tr></table></form></td>' . "\n"; ?> </tr> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php } } ?> </table></td> <!-- options eof //--> <td valign="top" width="50%"><table summary="" width="100%" border="0" cellspacing="0" cellpadding="2"> <!-- value //--> <?php if ($action == 'delete_option_value') { // delete product option value $values = tep_db_query("select products_options_values_id, products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$HTTP_GET_VARS['value_id'] . "' and language_id = '" . (int)$languages_id . "'"); $values_values = tep_db_fetch_array($values); ?> <tr> <td colspan="3" class="pageHeading">&<?php echo $values_values['products_options_values_name']; ?>&</td> <td>&<?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '53'); ?>&</td> </tr> <tr> <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php $products = tep_db_query("select p.products_id, pd.products_name, po.products_options_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS . " po, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and po.language_id = '" . (int)$languages_id . "' and pa.products_id = p.products_id and pa.options_values_id='" . (int)$HTTP_GET_VARS['value_id'] . "' and po.products_options_id = pa.options_id order by pd.products_name"); if (tep_db_num_rows($products)) { ?> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="center">&<?php echo TABLE_HEADING_ID; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_PRODUCT; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_OPT_NAME; ?>&</td> </tr> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <?php while ($products_values = tep_db_fetch_array($products)) { $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <td align="center" class="smallText">&<?php echo $products_values['products_id']; ?>&</td> <td class="smallText">&<?php echo $products_values['products_name']; ?>&</td> <td class="smallText">&<?php echo $products_values['products_options_name']; ?>&</td> </tr> <?php } ?> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <tr> <td class="main" colspan="3"><br><?php echo TEXT_WARNING_OF_DELETE; ?></td> </tr> <tr> <td class="main" align="right" colspan="3"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($HTTP_GET_VARS['value_page']) ? 'value_page=' . $HTTP_GET_VARS['value_page'] . '&' : '') . (isset($HTTP_GET_VARS['attribute_page']) ? 'attribute_page=' . $attribute_page : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a>&</td> </tr> <?php } else { ?> <tr> <td class="main" colspan="3"><br><?php echo TEXT_OK_TO_DELETE; ?></td> </tr> <tr> <td class="main" align="right" colspan="3"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_value&value_id=' . $HTTP_GET_VARS['value_id'], 'NONSSL') . '">'; ?><?php echo tep_image_button('button_delete.gif', ' delete '); ?></a>&&&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '&option_page=' . $option_page . (isset($HTTP_GET_VARS['value_page']) ? '&value_page=' . $value_page : '') . (isset($HTTP_GET_VARS['attribute_page']) ? '&attribute_page=' . $attribute_page : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a>&</td> </tr> <?php } ?> </table></td> </tr> <?php } else { ?> <tr> <td colspan="3" class="pageHeading">&<?php echo HEADING_TITLE_VAL; ?>&</td> <td>&<?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '53'); ?>&</td> </tr> <tr> <td colspan="4" class="smallText"> <?php $per_page = MAX_ROW_LISTS_OPTIONS; $values = "select pov.products_options_values_id, pov.products_options_values_name, pov2po.products_options_id from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov left join " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po on pov.products_options_values_id = pov2po.products_options_values_id where pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_id"; if (!isset($value_page)) { $value_page = 1; } $prev_value_page = $value_page - 1; $next_value_page = $value_page + 1; $value_query = tep_db_query($values); $value_page_start = ($per_page * $value_page) - $per_page; $num_rows = tep_db_num_rows($value_query); if ($num_rows <= $per_page) { $num_pages = 1; } else if (($num_rows % $per_page) == 0) { $num_pages = ($num_rows / $per_page); } else { $num_pages = ($num_rows / $per_page) + 1; } $num_pages = (int) $num_pages; $values = $values . " LIMIT $value_page_start, $per_page"; // Previous if ($prev_value_page) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_order_by=' . $option_order_by . '&value_page=' . $prev_value_page) . '"> && </a> | '; } for ($i = 1; $i <= $num_pages; $i++) { if ($i != $value_page) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($option_order_by) ? 'option_order_by=' . $option_order_by . '&' : '') . 'value_page=' . $i) . '">' . $i . '</a> | '; } else { echo '<b><font color=red>' . $i . '</font></b> | '; } } // Next if ($value_page != $num_pages) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($option_order_by) ? 'option_order_by=' . $option_order_by . '&' : '') . 'value_page=' . $next_value_page) . '"> &&</a> '; } ?> </td> </tr> <tr> <td colspan="4"><?php echo tep_black_line(); ?></td> </tr> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_ID; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_OPT_NAME; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_OPT_VALUE; ?>&</td> <td class="dataTableHeadingContent" align="center">&<?php echo TABLE_HEADING_ACTION; ?>&</td> </tr> <tr> <td colspan="4"><?php echo tep_black_line(); ?></td> </tr> <?php $next_id = 1; $rows = 0; $values = tep_db_query($values); while ($values_values = tep_db_fetch_array($values)) { $options_name = tep_options_name($values_values['products_options_id']); $values_name = $values_values['products_options_values_name']; $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php if (($action == 'update_option_value') && ($HTTP_GET_VARS['value_id'] == $values_values['products_options_values_id'])) { echo '<td colspan="3">'; echo '<form name="values" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_value', 'NONSSL') . '" method="post">'; echo '<table summary="" width="100%" border="0" cellspacing="0" cellpadding="2"><tr>'; $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $value_name = tep_db_query("select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$values_values['products_options_values_id'] . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); $value_name = tep_db_fetch_array($value_name); $inputs .= $languages[$i]['code'] . ':&<input type="text" name="value_name[' . $languages[$i]['id'] . ']" size="15" value="' . $value_name['products_options_values_name'] . '">&<br>'; } ?> <td align="center" class="smallText">&<?php echo $values_values['products_options_values_id']; ?><input type="hidden" name="value_id" value="<?php echo $values_values['products_options_values_id']; ?>">&</td> <td align="center" class="smallText">&<?php echo "\n"; ?><select name="option_id"> <?php $options = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by products_options_name"); while ($options_values = tep_db_fetch_array($options)) { echo "\n" . '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '"'; if ($values_values['products_options_id'] == $options_values['products_options_id']) { echo ' selected'; } echo '>' . $options_values['products_options_name'] . '</option>'; } ?> </select>&</td> <td class="smallText"><?php echo $inputs; ?></td> <td align="center" class="smallText">&<?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>&</td> <?php echo '</tr></table></form></td>' . "\n"; } else { ?> <td align="center" class="smallText">&<?php echo $values_values["products_options_values_id"]; ?>&</td> <td align="center" class="smallText">&<?php echo $options_name; ?>&</td> <td class="smallText">&<?php echo $values_name; ?>&</td> <td align="center" class="smallText">&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option_value&value_id=' . $values_values['products_options_values_id'] . (isset($HTTP_GET_VARS['value_page']) ? '&value_page=' . $HTTP_GET_VARS['value_page'] : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_edit.gif', IMAGE_UPDATE); ?></a>&&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_option_value&value_id=' . $values_values['products_options_values_id'], 'NONSSL') , '">'; ?><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE); ?></a>&</td> <?php } $max_values_id_query = tep_db_query("select max(products_options_values_id) + 1 as next_id from " . TABLE_PRODUCTS_OPTIONS_VALUES); $max_values_id_values = tep_db_fetch_array($max_values_id_query); $next_id = $max_values_id_values['next_id']; } ?> </tr> <tr> <td colspan="4"><?php echo tep_black_line(); ?></td> </tr> <?php if ($action != 'update_option_value') { ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php echo '<td colspan="3">'; echo '<form name="values" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=add_product_option_values&value_page=' . $value_page, 'NONSSL') . '" method="post">'; echo '<table summary="" width="100%" border="0" cellspacing="0" cellpadding="2"><tr>'; ?> <td align="center" class="smallText">&<?php echo $next_id; ?>&</td> <td align="center" class="smallText">&<select name="option_id"> <?php $options = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_name"); while ($options_values = tep_db_fetch_array($options)) { echo '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>'; } $inputs = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { $inputs .= $languages[$i]['code'] . ':&<input type="text" name="value_name[' . $languages[$i]['id'] . ']" size="15">&<br>'; } ?> </select>&</td> <td class="smallText"><input type="hidden" name="value_id" value="<?php echo $next_id; ?>"><?php echo $inputs; ?></td> <td align="center" class="smallText">&<?php echo tep_image_submit('button_insert.gif', IMAGE_INSERT); ?>&</td> <?php echo '</tr></table></form></td>' . "\n"; ?> </tr> <tr> <td colspan="4"><?php echo tep_black_line(); ?></td> </tr> <?php } } ?> </table></td> </tr> </table></td> <!-- option value eof //--> </tr> <!-- products_attributes //--> <tr> <td width="100%"><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading">&<?php echo HEADING_TITLE_ATRIB; ?>&</td> <td>&<?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '53'); ?>&</td> </tr> </table></td> </tr> <tr> <?php if ($action == 'update_attribute') { $form_action = 'update_product_attribute'; } else { $form_action = 'add_product_attributes'; } if (!isset($attribute_page)) { $attribute_page = 1; } $prev_attribute_page = $attribute_page - 1; $next_attribute_page = $attribute_page + 1; ?> <td><form name="attributes" action="<?php echo tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=' . $form_action . '&option_page=' . $option_page . '&value_page=' . $value_page . '&attribute_page=' . $attribute_page); ?>" method="post"><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="7" class="smallText"> <?php $per_page = MAX_ROW_LISTS_OPTIONS; $attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name"; $attribute_query = tep_db_query($attributes); $attribute_page_start = ($per_page * $attribute_page) - $per_page; $num_rows = tep_db_num_rows($attribute_query); if ($num_rows <= $per_page) { $num_pages = 1; } else if (($num_rows % $per_page) == 0) { $num_pages = ($num_rows / $per_page); } else { $num_pages = ($num_rows / $per_page) + 1; } $num_pages = (int) $num_pages; $attributes = $attributes . " LIMIT $attribute_page_start, $per_page"; // Previous if ($prev_attribute_page) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $prev_attribute_page) . '"> && </a> | '; } for ($i = 1; $i <= $num_pages; $i++) { if ($i != $attribute_page) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $i) . '">' . $i . '</a> | '; } else { echo '<b><font color="red">' . $i . '</font></b> | '; } } // Next if ($attribute_page != $num_pages) { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $next_attribute_page) . '"> && </a>'; } ?> </td> </tr> <tr> <td colspan="8"><?php echo tep_black_line(); ?></td> </tr> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_ID; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_PRODUCT; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_OPT_NAME; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_OPT_VALUE; ?>&</td> <td class="dataTableHeadingContent">&<?php echo TABLE_HEADING_OPT_SORT_ORDER; ?>&</td> <td class="dataTableHeadingContent" align="right">&<?php echo TABLE_HEADING_OPT_PRICE; ?>&</td> <td class="dataTableHeadingContent" align="center">&<?php echo TABLE_HEADING_OPT_PRICE_PREFIX; ?>&</td> <td class="dataTableHeadingContent" align="center">&<?php echo TABLE_HEADING_ACTION; ?>&</td> </tr> <tr> <td colspan="8"><?php echo tep_black_line(); ?></td> </tr> <?php $next_id = 1; $attributes = tep_db_query($attributes); while ($attributes_values = tep_db_fetch_array($attributes)) { $products_name_only = tep_get_products_name($attributes_values['products_id']); $options_name = tep_options_name($attributes_values['options_id']); $values_name = tep_values_name($attributes_values['options_values_id']); $attributes_sort = tep_attributes_sort($attributes_values['products_attributes_id']); $rows++; ?> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <?php if (($action == 'update_attribute') && ($HTTP_GET_VARS['attribute_id'] == $attributes_values['products_attributes_id'])) { ?> <td class="smallText">&<?php echo $attributes_values['products_attributes_id']; ?><input type="hidden" name="attribute_id" value="<?php echo $attributes_values['products_attributes_id']; ?>">&</td> <td class="smallText">&<select name="products_id"> <?php $products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name"); while($products_values = tep_db_fetch_array($products)) { if ($attributes_values['products_id'] == $products_values['products_id']) { echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '" SELECTED>' . $products_values['products_name'] . '</option>'; } else { echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>'; } } ?> </select>&</td> <td class="smallText">&<select name="options_id"> <?php $options = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_name"); while($options_values = tep_db_fetch_array($options)) { if ($attributes_values['options_id'] == $options_values['products_options_id']) { echo "\n" . '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '" SELECTED>' . $options_values['products_options_name'] . '</option>'; } else { echo "\n" . '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>'; } } ?> </select>&</td> <td class="smallText">&<select name="values_id"> <?php $values = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where language_id ='" . $languages_id . "' order by products_options_values_name"); while($values_values = tep_db_fetch_array($values)) { if ($attributes_values['options_values_id'] == $values_values['products_options_values_id']) { echo "\n" . '<option name="' . $values_values['products_options_values_name'] . '" value="' . $values_values['products_options_values_id'] . '" SELECTED>' . $values_values['products_options_values_name'] . '</option>'; } else { echo "\n" . '<option name="' . $values_values['products_options_values_name'] . '" value="' . $values_values['products_options_values_id'] . '">' . $values_values['products_options_values_name'] . '</option>'; } } ?> </select>&</td> <td align"right" class="smallText">&<input type="text" name="attributes_sort" value="<?php echo $attributes_sort; ?>" size="3">&</td> <td align="right" class="smallText">&<input type="text" name="value_price" value="<?php echo $attributes_values['options_values_price']; ?>" size="6">&</td> <td align="center" class="smallText">&<input type="text" name="price_prefix" value="<?php echo $attributes_values['price_prefix']; ?>" size="2">&</td> <td align="center" class="smallText">&<?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '&attribute_page=' . $attribute_page, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>&</td> <?php if (DOWNLOAD_ENABLED == 'true') { $download_query_raw ="select products_attributes_filename, products_attributes_maxdays, products_attributes_maxcount from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " where products_attributes_id='" . $attributes_values['products_attributes_id'] . "'"; $download_query = tep_db_query($download_query_raw); if (tep_db_num_rows($download_query) > 0) { $download = tep_db_fetch_array($download_query); $products_attributes_filename = $download['products_attributes_filename']; $products_attributes_maxdays = $download['products_attributes_maxdays']; $products_attributes_maxcount = $download['products_attributes_maxcount']; } ?> <tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>"> <td>&</td> <td colspan="5"> <table> <tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_DOWNLOAD; ?>&</td> <td class="smallText"><?php echo TABLE_TEXT_FILENAME; ?></td> <td class="smallText"><?php echo tep_draw_input_field('products_attributes_filename', $products_attributes_filename, 'size="15"'); ?>&</td> <td class="smallText"><?php echo TABLE_TEXT_MAX_DAYS; ?></td> <td class="smallText"><?php echo tep_draw_input_field('products_attributes_maxdays', $products_attributes_maxdays, 'size="5"'); ?>&</td> <td class="smallText"><?php echo TABLE_TEXT_MAX_COUNT; ?></td> <td class="smallText"><?php echo tep_draw_input_field('products_attributes_maxcount', $products_attributes_maxcount, 'size="5"'); ?>&</td> </tr> </table> </td> <td>&</td> </tr> <?php } ?> <?php } elseif (($action == 'delete_product_attribute') && ($HTTP_GET_VARS['attribute_id'] == $attributes_values['products_attributes_id'])) { ?> <td class="smallText">&<b><?php echo $attributes_values["products_attributes_id"]; ?></b>&</td> <td class="smallText">&<b><?php echo $products_name_only; ?></b>&</td> <td class="smallText">&<b><?php echo $options_name; ?></b>&</td> <td class="smallText">&<b><?php echo $values_name; ?></b>&</td> <td class="smallText">&<b><?php echo $attributes_sort; ?></b>&</td> <td align="right" class="smallText">&<b><?php echo $attributes_values["options_values_price"]; ?></b>&</td> <td align="center" class="smallText">&<b><?php echo $attributes_values["price_prefix"]; ?></b>&</td> <td align="center" class="smallText">&<b><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_attribute&attribute_id=' . $HTTP_GET_VARS['attribute_id']) . '">'; ?><?php echo tep_image_button('button_confirm.gif', IMAGE_CONFIRM); ?></a>&&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '&option_page=' . $option_page . '&value_page=' . $value_page . '&attribute_page=' . $attribute_page, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>&</b></td> <?php } else { ?> <td class="smallText">&<?php echo $attributes_values["products_attributes_id"]; ?>&</td> <td class="smallText">&<?php echo $products_name_only; ?>&</td> <td class="smallText">&<?php echo $options_name; ?>&</td> <td class="smallText">&<?php echo $values_name; ?>&</td> <td class="smallText">&<?php echo $attributes_sort; ?>&</td> <td align="right" class="smallText">&<?php echo $attributes_values["options_values_price"]; ?>&</td> <td align="center" class="smallText">&<?php echo $attributes_values["price_prefix"]; ?>&</td> <td align="center" class="smallText">&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_attribute&attribute_id=' . $attributes_values['products_attributes_id'] . '&attribute_page=' . $attribute_page, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_edit.gif', IMAGE_UPDATE); ?></a>&&<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_product_attribute&attribute_id=' . $attributes_values['products_attributes_id'] . '&attribute_page=' . $attribute_page, 'NONSSL') , '">'; ?><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE); ?></a>&</td> <?php } $max_attributes_id_query = tep_db_query("select max(products_attributes_id) + 1 as next_id from " . TABLE_PRODUCTS_ATTRIBUTES); $max_attributes_id_values = tep_db_fetch_array($max_attributes_id_query); $next_id = $max_attributes_id_values['next_id']; ?> </tr> <?php } if ($action != 'update_attribute') { ?> <tr> <td colspan="8"><?php echo tep_black_line(); ?></td> </tr> <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>"> <td class="smallText">&<?php echo $next_id; ?>&</td> <td class="smallText">&<select name="products_id"> <?php $products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name"); while ($products_values = tep_db_fetch_array($products)) { echo '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>'; } ?> </select>&</td> <td class="smallText">&<select name="options_id"> <?php $options = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_name"); while ($options_values = tep_db_fetch_array($options)) { echo '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>'; } ?> </select>&</td> <td class="smallText">&<select name="values_id"> <?php $values = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where language_id = '" . $languages_id . "' order by products_options_values_name"); while ($values_values = tep_db_fetch_array($values)) { echo '<option name="' . $values_values['products_options_values_name'] . '" value="' . $values_values['products_options_values_id'] . '">' . $values_values['products_options_values_name'] . '</option>'; } ?> </select>&</td> <td align="right" class="smallText">&<input type="text" name="attributes_sort" size="3">&</td> <td align="right" class="smallText">&<input type="text" name="value_price" size="6">&</td> <td align="right" class="smallText">&<input type="text" name="price_prefix" size="2" value="+">&</td> <td align="center" class="smallText">&<?php echo tep_image_submit('button_insert.gif', IMAGE_INSERT); ?>&</td> </tr> <?php if (DOWNLOAD_ENABLED == 'true') { $products_attributes_maxdays = DOWNLOAD_MAX_DAYS; $products_attributes_maxcount = DOWNLOAD_MAX_COUNT; ?> <tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>"> <td>&</td> <td colspan="5"> <table> <tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_DOWNLOAD; ?>&</td> <td class="smallText"><?php echo TABLE_TEXT_FILENAME; ?></td> <td class="smallText"><?php echo tep_draw_input_field('products_attributes_filename', $products_attributes_filename, 'size="15"'); ?>&</td> <td class="smallText"><?php echo TABLE_TEXT_MAX_DAYS; ?></td> <td class="smallText"><?php echo tep_draw_input_field('products_attributes_maxdays', $products_attributes_maxdays, 'size="5"'); ?>&</td> <td class="smallText"><?php echo TABLE_TEXT_MAX_COUNT; ?></td> <td class="smallText"><?php echo tep_draw_input_field('products_attributes_maxcount', $products_attributes_maxcount, 'size="5"'); ?>&</td> </tr> </table> </td> <td>&</td> </tr> <?php } // end of DOWNLOAD_ENABLED section ?> <?php } ?> <tr> <td colspan="8"><?php echo tep_black_line(); ?></td> </tr> </table></form></td></tr> <!-- Start Clone --> <tr><td> <?php echo '<form name="clone" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=clone_attributes', 'NONSSL') . '" method="post">'; ?> <Table> <!-- Data Start --> <tr><td class="pageHeading"><?php echo HEADING_TITLE_CLONE; ?></td></tr> <tr> <td class="smallText"><?php echo TABLE_TEXT_FROM; ?> <select name="clone_products_id_from"> <?php $products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name"); while ($products_values = tep_db_fetch_array($products)) { echo '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>'; } ?> </select></td> <td class="smallText"><?php echo TABLE_TEXT_TO; ?> <select name="clone_products_id_to"> <?php $products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name"); while ($products_values = tep_db_fetch_array($products)) { echo '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>'; } ?> </select> </td><td><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></td></tr> <tr><td> </td></tr> <!-- Data End --> </table></td> <!-- products_attributes_eof //--> </tr> </table> <!-- body_text_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> ?> Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 29, 2009 Share Posted January 29, 2009 You seem to have 2 x <?php at the start of the file and 2 x ?> at the end. You only need 1 of each. Think this might help you tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '50', '" . $attributes_sort . "')"); Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
rgplanet Posted January 30, 2009 Author Share Posted January 30, 2009 Thank you very much geoffreywalton. Thanks. I cant do it. I downloaded differents versions of Product attributes sort order but I can do it. In each one say differents things and different steps. I go back to the version I had before. I am desperate because I need to order the attibutes but I dont know what to do. What do you think I have to do? Thanks, Roger Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted January 30, 2009 Share Posted January 30, 2009 I think you need to change the insert instructions to insert an extra field as your current inserts do not have enough in them. Quote Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
olsonsp4c Posted January 31, 2009 Share Posted January 31, 2009 (edited) I have this same problem... I think this is the solution: case 'add_product_attributes': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']); $values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']); $value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']); $price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']); $attributes_sort = tep_db_prepare_input($HTTP_POST_VARS['attributes_sort']); tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . (int)$attributes_sort . "')"); The last line was not correct in the fileset... I think this one in correct. catalog/admin/product_attributes.php ALSO, I think the Database SQL in incorrect - you only need the following line: NOT this: ALTER TABLE products_attributes ADD sort_order INT DEFAULT '50' NOT NULL; ALTER TABLE products_attributes ADD COLUMN attribute_sort INT UNSIGNED NOT NULL DEFAULT '0'; BUT this: ALTER TABLE products_attributes ADD COLUMN attribute_sort INT UNSIGNED NOT NULL DEFAULT '0'; Scott Edited January 31, 2009 by olsonsp4c Quote 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 Link to comment Share on other sites More sharing options...
rgplanet Posted February 1, 2009 Author Share Posted February 1, 2009 I have this same problem... I think this is the solution: case 'add_product_attributes': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']); $values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']); $value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']); $price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']); $attributes_sort = tep_db_prepare_input($HTTP_POST_VARS['attributes_sort']); tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . (int)$attributes_sort . "')"); The last line was not correct in the fileset... I think this one in correct. catalog/admin/product_attributes.php ALSO, I think the Database SQL in incorrect - you only need the following line: NOT this: ALTER TABLE products_attributes ADD sort_order INT DEFAULT '50' NOT NULL; ALTER TABLE products_attributes ADD COLUMN attribute_sort INT UNSIGNED NOT NULL DEFAULT '0'; BUT this: ALTER TABLE products_attributes ADD COLUMN attribute_sort INT UNSIGNED NOT NULL DEFAULT '0'; Scott Thanks Scott. Sorry for the question, you must think I am idiot but I only have to change one file to install the attributes module? Is there one step by step instructions that works? The change you tell me, is in the file with the code I wrote in the first post? Thank you very very much for your help. I am 4 days with this and I need help. Thanks. If you are in New York, I would like to invite you to one beer. Or two... Thanks and sorry for my bad english. Thanks. Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted February 1, 2009 Share Posted February 1, 2009 Thanks Scott. Sorry for the question, you must think I am idiot but I only have to change one file to install the attributes module? Is there one step by step instructions that works? The change you tell me, is in the file with the code I wrote in the first post? Thank you very very much for your help. I am 4 days with this and I need help. Thanks. If you are in New York, I would like to invite you to one beer. Or two... Thanks and sorry for my bad english. Thanks. The changes I wrote are in admin/product_attributes.php Fortunately, v1.6 has step by step instruction; however, what I wrote above must replace one of those steps. Thanks for the kind offer - if I wasn't in Portland, OR, I'd take you up on it. Also, the instructions for 1.6 make the file changes more clear. Also, the database insert is correct in 1.6; however, 1.6 does not include the attribute cloner. Scott Quote 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 Link to comment Share on other sites More sharing options...
rgplanet Posted February 3, 2009 Author Share Posted February 3, 2009 The changes I wrote are in admin/product_attributes.php Fortunately, v1.6 has step by step instruction; however, what I wrote above must replace one of those steps. Thanks for the kind offer - if I wasn't in Portland, OR, I'd take you up on it. Also, the instructions for 1.6 make the file changes more clear. Also, the database insert is correct in 1.6; however, 1.6 does not include the attribute cloner. Scott Great!!! It works!!! Yuhuuuuuuuuu!!! After 4 ó 5 days, I can order my attributes!!! Yuhuuuuuu!!!! THANKS, THANKS, THANKS. The only extrange thing I see is: when I add one attibute, I add to it the order (the number...) but it doesnt get it. I have to search it in the list and change. And now it gets it and works. Why? Cant I do it in the first time? It is a little hard to do because the order in the list is a little caos... Also, the next step is: ¿what is the contribution to order the products? Is it easy to install? Thanks to all for the help. I primise I am going to help all I can. Thanks, Roger. Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted February 3, 2009 Share Posted February 3, 2009 Great!!! It works!!! Yuhuuuuuuuuu!!! After 4 ó 5 days, I can order my attributes!!! Yuhuuuuuu!!!! THANKS, THANKS, THANKS. The only extrange thing I see is: when I add one attibute, I add to it the order (the number...) but it doesnt get it. I have to search it in the list and change. And now it gets it and works. Why? Cant I do it in the first time? It is a little hard to do because the order in the list is a little caos...Also, the next step is: ¿what is the contribution to order the products? Is it easy to install? Thanks to all for the help. I primise I am going to help all I can. Thanks, Roger. there is an add-on called Product Sort - I've installed v1.6, but it has some problems in the product listing, changing all the buy now button links to the same product number when 1 product is added to the cart when the shop is set not to go directly to the cart when a product is added. I know where the problem is, but not how to fix it - for now, I working around it. It is a little challenging to install, but is helpful - i have not tried 1.7 yet. Scott Quote 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 Link to comment Share on other sites More sharing options...
jrthor2 Posted February 3, 2009 Share Posted February 3, 2009 I have installed this contribution, and now it seems that I can't delete any product options. When I'm on the product attributes screen, I can delete Option Values, but can't delete Product Options. I'm not sure if this contribution is what broke it, or maybe it's the Mindsparx Admin contribution I installed. Anyone else have this issue? Thanks!! Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted February 3, 2009 Share Posted February 3, 2009 I have installed this contribution, and now it seems that I can't delete any product options. When I'm on the product attributes screen, I can delete Option Values, but can't delete Product Options. I'm not sure if this contribution is what broke it, or maybe it's the Mindsparx Admin contribution I installed. Anyone else have this issue? Thanks!! You are correct - I have the same issue Scott Quote 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 Link to comment Share on other sites More sharing options...
olsonsp4c Posted February 3, 2009 Share Posted February 3, 2009 I have fixed the issue that was introduced with v1.7 by using code from 1.6 - I'll be coming out with 1.8 in the next hour. Scott Quote 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 Link to comment Share on other sites More sharing options...
jrthor2 Posted February 3, 2009 Share Posted February 3, 2009 I have fixed the issue that was introduced with v1.7 by using code from 1.6 - I'll be coming out with 1.8 in the next hour. Scott I see you posted your fix, but does this fix the issue of deleted product options? Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted February 3, 2009 Share Posted February 3, 2009 I see you posted your fix, but does this fix the issue of deleted product options? On my store it works now with 1.8 installed - if you have made no changes to your admin/product_attributes.php file since before installing the addon... you can drop in and overwrite the files and it should work. Scott Quote 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 Link to comment Share on other sites More sharing options...
jrthor2 Posted February 3, 2009 Share Posted February 3, 2009 I just fixed my issue with deleting product options. In catalog/admin/products_attributes.php, find if ($action == 'delete_option_value') { and change it to if ($action == 'delete_product_option') {. that fixed it for me. Quote Link to comment Share on other sites More sharing options...
rgplanet Posted February 4, 2009 Author Share Posted February 4, 2009 Hi again. After install correctly the product attibutes, it will be for me great to have the attribute cloner. Where can I found the instructions? is it easy? I have more that 500 products and differents sizes and colors for each one so I need it because, if not, I will go crazy. Thank you in advance, Roger. Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted February 4, 2009 Share Posted February 4, 2009 Hi again. After install correctly the product attibutes, it will be for me great to have the attribute cloner. Where can I found the instructions? is it easy? I have more that 500 products and differents sizes and colors for each one so I need it because, if not, I will go crazy. Thank you in advance, Roger. It is included in v1.8 of product attributes sort order that I submitted today: http://addons.oscommerce.com/info/1822 Scott Quote 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 Link to comment Share on other sites More sharing options...
berrywestra Posted February 17, 2009 Share Posted February 17, 2009 It is included in v1.8 of product attributes sort order that I submitted today: http://addons.oscommerce.com/info/1822 Scott Hello, I've installed the 1.8.1 version but I still get an error when trying to clone This is the error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''+)' at line 1 INSERT INTO products_attributes ( products_id, options_id, options_values_id, options_values_price, price_prefixt) VALUES (47, 1, 3, 12.0000, '+) [TEP STOP] Can anybody help me? Thanks in advance Quote Link to comment Share on other sites More sharing options...
3opkuu Posted February 18, 2009 Share Posted February 18, 2009 I too, am having a problem with this new code. On a fresh install of osCommerce I installed this contribution and now the 'product attributes' table is broken - only the headings of the table, the last column being "action", is visible. nothing below that. no error displayed as such, just no attributes shown. Quote Link to comment Share on other sites More sharing options...
3opkuu Posted February 18, 2009 Share Posted February 18, 2009 Here's where the outputted code ends: <form name="attributes" action="http://annocomputers.com/testbed/catalog/admin/products_attributes.php?action=add_product_attributes&option_page=1&value_page=1&attribute_page=1" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="7"><img src="images/pixel_black.gif" border="0" alt="" width="100%" height="1"></td> </tr> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"> ID </td> <td class="dataTableHeadingContent"> Product Name </td> <td class="dataTableHeadingContent"> Option Name </td> <td class="dataTableHeadingContent"> Option Value </td> <!-- BOE: Attribute Sort with Clone Tool //--> <td class="dataTableHeadingContent"> Sort Order </td> <!-- EOE: Attribute Sort with Clone Tool //--> <td class="dataTableHeadingContent" align="right"> Value Price </td> <td class="dataTableHeadingContent" align="center"> Prefix </td> <td class="dataTableHeadingContent" align="center"> Action </td> </tr> <tr> <td colspan="7"><img src="images/pixel_black.gif" border="0" alt="" width="100%" height="1"></td> </tr> Quote Link to comment Share on other sites More sharing options...
3opkuu Posted February 18, 2009 Share Posted February 18, 2009 My apologies - I made a mistake inserting code during step 1. Everything seems to be working fine. Thank you for providing the contribution. Quote Link to comment Share on other sites More sharing options...
netviper Posted February 19, 2009 Share Posted February 19, 2009 (edited) I tired this and followed steps one and two and got: Fatal error: Call to undefined function tep_attributes_sort() in /home/sportsti/public_html/admin/products_attributes.php on line 602 (from the product attribute tab in admin) line 602 is: // BOE: Attribute Sort with Clone Tool $attributes_sort = tep_attributes_sort($attributes_values['products_attributes_id']); // EOE: Attribute Sort with Clone Tool Can you help me? I dont know what I did wrong. Edited February 19, 2009 by netviper Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted February 19, 2009 Share Posted February 19, 2009 I tired this and followed steps one and two and got: Fatal error: Call to undefined function tep_attributes_sort() in /home/sportsti/public_html/admin/products_attributes.php on line 602 (from the product attribute tab in admin) line 602 is: // BOE: Attribute Sort with Clone Tool $attributes_sort = tep_attributes_sort($attributes_values['products_attributes_id']); // EOE: Attribute Sort with Clone Tool Can you help me? I dont know what I did wrong. the function in step 2 is not present. you probably put it in catalog/includes/functions/general.php instead of catalog/admin/includes/functions/general.php Scott Quote 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 Link to comment Share on other sites More sharing options...
jhande Posted February 24, 2009 Share Posted February 24, 2009 (edited) Hey Scott, Hopefully you can enlighten me a bit... :blush: Long ago I installed this contribution - Sort Product Attributes v1.2 and set it to "order by price". That worked for my needs. But I gave up on using the attributes because I have too many products. Let me explain... I have different categories of products that share different attributes. Let's say I have 100 products in category A that has 4 attribute settings. 50 products in category B has another 4 attribute settings, category C, category D, etc... All I would like to do is create the original set of attributes with associated pricing and be able to select which products use which attributes. As it is now, I have to add the pricing for each attribute per product which is a pain. I don't know why osC only saves the Option Name & Value. :huh: Would your clone addition accomplish this? Do I need a complete contribution install or just sort of edit for the clone function? Could you explain what the clone feature does? One more thought... What happens when there's a product price increase? Would all 500 individual entries need updating or just some sort of attribute original? I appreciate any guidance or info you could share. ;) Edited February 24, 2009 by jhande Quote - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
olsonsp4c Posted February 24, 2009 Share Posted February 24, 2009 Hey Scott, Hopefully you can enlighten me a bit... :blush: Long ago I installed this contribution - Sort Product Attributes v1.2 and set it to "order by price". That worked for my needs. But I gave up on using the attributes because I have too many products. Let me explain... I have different categories of products that share different attributes. Let's say I have 100 products in category A that has 4 attribute settings. 50 products in category B has another 4 attribute settings, category C, category D, etc... All I would like to do is create the original set of attributes with associated pricing and be able to select which products use which attributes. As it is now, I have to add the pricing for each attribute per product which is a pain. I don't know why osC only saves the Option Name & Value. :huh: Would your clone addition accomplish this? Do I need a complete contribution install or just sort of edit for the clone function? Could you explain what the clone feature does? One more thought... What happens when there's a product price increase? Would all 500 individual entries need updating or just some sort of attribute original? I appreciate any guidance or info you could share. ;) Yes, install the multiple cloner option. Scott Quote 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.