Zeme Posted April 17, 2005 Share Posted April 17, 2005 Hi,I need some help. I am getting this message 1136 - Column count doesn't match value count at row 1 insert into products_attributes values ('', '144', '28', '92', '0.0000', '+', '1') [TEP STOP] When I try to copy a product and it's attributes. Here are the rows for the products_attributes database. products_attributes_id products_id options_id options_values_id options_values_price price_prefix products_options_sort_order options_values_weight I do not know allot about php - so some directions (like replace this with this) would be great! I installed the 5.1b and the last fix. Thanks, Philip <{POST_SNAPBACK}> Phillip, as you can see, it is trying to do an "insert" with 7 different values, but your table has 8 columns, hense the mismatch. I don't recognize the options_values_weight column, and I'm pretty sure that you don't want/need it. Do you remember running any "ALTER" statements to add it? do you have any other contributions installed? (they probably added it). Assuming that you have no other contributions, we want to remove that extra colum. Running on this theory, here's what I suggest you do: 1) back up the database. Both the schema (table layouts), and the records (actual entries in the individual tables). I'm pretty sure that the oscommerce admin tool can do this. 2) check the backup file to ensure you have valid data (just look at it to make sure it doesn't look empty) 3) check the 'options values weight' column to see if there's any actual data in it. You could use the mysql interface, or custom sql: "select options_values_weight from products_attributes" 4) Once you've determined that the 'options_values_weight' column is extra, remove it, either using a mysql admin tool, or the custom sql: "alter table PRODUCTS_attributes drop column options_values_weight" 5) once this has succeeded, check all your admin pages again to see if any of them no longer work, if there are pages that don't work now, they were probably depending on the (now deleted) column, and you'll have to deal with that. Note: don't do any steps unless you understand that step, and are confident in the impact of it. Also, if you do have another contribution installed (which added the options_values_weight column), let me know, and I'll look into helping you merge the 2 contributions (the name of the other contribution /location would be useful). I hope this helps, and I look forward to hearing the results. Quote Link to comment Share on other sites More sharing options...
bluecivic21 Posted April 17, 2005 Share Posted April 17, 2005 how do I copy all attribute from one product to an entire category? Quote Link to comment Share on other sites More sharing options...
Zeme Posted April 17, 2005 Share Posted April 17, 2005 how do I copy all attribute from one product to an entire category? <{POST_SNAPBACK}> Once you've installed the contribution (version 5.1b?), you'll be able to do that. To copy all attributes from one product to an entire category: 1) Set all the attributes that you want, on that product. 2) Under "Catalog", click "Categories/Products". 3) Click on the name of the category that you want to Copy to 4) on the right hand side you should see a "Copy product attributes to ALL products in Category: X". Click on that. 5) Click on "Product ID lookup" to find out the product ID of the "source product" (the one from step 1). 6) the rest of the options here are pretty self-explanatory Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 8, 2005 Share Posted June 8, 2005 I get this when trying to copy attributes that are not there. Has this never been fixed ? I does it on my modded & a clean install. WarningWARNING: No Attributes to copy from Product ID #18 for: AF1 Satellite Locator ... No copy was made Warning: Cannot modify header information - headers already sent by (output started at d:\web_sites\test\test\catalog\admin\includes\functions\webmakers_added_functions.php:20) in d:\web_sites\test\test\catalog\admin\includes\functions\general.php on line 18 Thanks Jimmy Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
happydance Posted June 11, 2005 Share Posted June 11, 2005 Ok. I know this is something I did wrong when I was installing this contrib, but does anyone know what the warning might mean? I cannot even get into my ADMIN! Thanks. Carol Quote Link to comment Share on other sites More sharing options...
happydance Posted June 11, 2005 Share Posted June 11, 2005 Ok. I know this is something I did wrong when I was installing this contrib, but does anyone know what the warning might mean? I cannot even get into my ADMIN! Thanks. Carol <{POST_SNAPBACK}> Fatal error: Cannot redeclare tep_copy_products_attributes() (previously declared in /hsphere/local/home/happydan/myhappydance.com/admin/includes/functions/webmakers_added_functions.php:7) in /hsphere/local/home/happydan/myhappydance.com/admin/includes/functions/webmakers_added_functions.php on line 7 Quote Link to comment Share on other sites More sharing options...
happydance Posted June 11, 2005 Share Posted June 11, 2005 Fatal error: Cannot redeclare tep_copy_products_attributes() (previously declared in /hsphere/local/home/happydan/myhappydance.com/admin/includes/functions/webmakers_added_functions.php:7) in /hsphere/local/home/happydan/myhappydance.com/admin/includes/functions/webmakers_added_functions.php on line 7 <{POST_SNAPBACK}> Ok. I have found this tep_copy_products_attributes in two files. 1) It is twice in the admin/includes/functions/webmakers_added_functions.php but one of the times it is just in a comment field. Here is the live one: function tep_copy_products_attributes($products_id_from,$products_id_to) { global $copy_attributes_delete_first, $copy_attributes_duplicates_skipped, $copy_attributes_duplicates_overwrite, $copy_attributes_include_downloads, $copy_attributes_include_filename; 2) It is three times in the admin/categories.php file ------------------------------------------ // BOF: WebMakers.com Added: Copy Attributes Existing Product to another Existing Product case 'create_copy_product_attributes': // $products_id_to= $copy_to_products_id; // $products_id_from = $pID; tep_copy_products_attributes($pID,$copy_to_products_id); break; // EOF: WebMakers.com Added: Copy Attributes Existing Product to another Existing Product ----------------------------------------- // WebMakers.com Added: Copy Attributes Existing Product to All Existing Products in a Category case 'create_copy_product_attributes_categories': // $products_id_to= $categories_products_copying['products_id']; // $products_id_from = $make_copy_from_products_id; // echo 'Copy from products_id# ' . $make_copy_from_products_id . ' Copy to all products in category: ' . $cID . '<br>'; $categories_products_copying_query= tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id='" . $cID . "'"); while ( $categories_products_copying=tep_db_fetch_array($categories_products_copying_query) ) { // process all products in category tep_copy_products_attributes($make_copy_from_products_id,$categories_products_copying['products_id']); } break; // EOF: WebMakers.com Added: Copy Attributes Existing Product to All Existing Products in a Category ------------------------------------------------------------------------ // WebMakers.com Added: Copy attributes to duplicate product // $products_id_to= $copy_to_products_id; // $products_id_from = $pID; $copy_attributes_delete_first='1'; $copy_attributes_duplicates_skipped='1'; $copy_attributes_duplicates_overwrite='0'; if (DOWNLOAD_ENABLED == 'true') { $copy_attributes_include_downloads='1'; $copy_attributes_include_filename='1'; } else { $copy_attributes_include_downloads='0'; $copy_attributes_include_filename='0'; } tep_copy_products_attributes($products_id_from,$products_id_to); // EOF: WebMakers.com Added: Attributes Copy on non-linked ----------------------------------------------------------------------------- That's it. Please help. Quote Link to comment Share on other sites More sharing options...
happydance Posted June 11, 2005 Share Posted June 11, 2005 Hi,I need some help. I am getting this message 1136 - Column count doesn't match value count at row 1 insert into products_attributes values ('', '144', '28', '92', '0.0000', '+', '1') [TEP STOP] When I try to copy a product and it's attributes. Here are the rows for the products_attributes database. products_attributes_id products_id options_id options_values_id options_values_price price_prefix products_options_sort_order options_values_weight I do not know allot about php - so some directions (like replace this with this) would be great! I installed the 5.1b and the last fix. Thanks, Philip <{POST_SNAPBACK}> Hi, You have 7 items to put in columns and 8 columns. What is missing? I am thinking that is what it is telling you. Quote Link to comment Share on other sites More sharing options...
happydance Posted June 11, 2005 Share Posted June 11, 2005 Ok. I have found this tep_copy_products_attributes in two files. 1) It is twice in the admin/includes/functions/webmakers_added_functions.php but one of the times it is just in a comment field. Here is the live one: function tep_copy_products_attributes($products_id_from,$products_id_to) { global $copy_attributes_delete_first, $copy_attributes_duplicates_skipped, $copy_attributes_duplicates_overwrite, $copy_attributes_include_downloads, $copy_attributes_include_filename; 2) It is three times in the admin/categories.php file ------------------------------------------ // BOF: WebMakers.com Added: Copy Attributes Existing Product to another Existing Product case 'create_copy_product_attributes': // $products_id_to= $copy_to_products_id; // $products_id_from = $pID; tep_copy_products_attributes($pID,$copy_to_products_id); break; // EOF: WebMakers.com Added: Copy Attributes Existing Product to another Existing Product ----------------------------------------- // WebMakers.com Added: Copy Attributes Existing Product to All Existing Products in a Category case 'create_copy_product_attributes_categories': // $products_id_to= $categories_products_copying['products_id']; // $products_id_from = $make_copy_from_products_id; // echo 'Copy from products_id# ' . $make_copy_from_products_id . ' Copy to all products in category: ' . $cID . '<br>'; $categories_products_copying_query= tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id='" . $cID . "'"); while ( $categories_products_copying=tep_db_fetch_array($categories_products_copying_query) ) { // process all products in category tep_copy_products_attributes($make_copy_from_products_id,$categories_products_copying['products_id']); } break; // EOF: WebMakers.com Added: Copy Attributes Existing Product to All Existing Products in a Category ------------------------------------------------------------------------ // WebMakers.com Added: Copy attributes to duplicate product // $products_id_to= $copy_to_products_id; // $products_id_from = $pID; $copy_attributes_delete_first='1'; $copy_attributes_duplicates_skipped='1'; $copy_attributes_duplicates_overwrite='0'; if (DOWNLOAD_ENABLED == 'true') { $copy_attributes_include_downloads='1'; $copy_attributes_include_filename='1'; } else { $copy_attributes_include_downloads='0'; $copy_attributes_include_filename='0'; } tep_copy_products_attributes($products_id_from,$products_id_to); // EOF: WebMakers.com Added: Attributes Copy on non-linked ----------------------------------------------------------------------------- That's it. Please help. <{POST_SNAPBACK}> Ok. So I found it myself. Just for reference, I had line required for this in admin/includes/application_top.php written twice. Quote Link to comment Share on other sites More sharing options...
Bigredman74 Posted June 15, 2005 Share Posted June 15, 2005 I am having a problem deleting Product Options after installing this contrib. This line of code in catalog/admin/products_attributes.php /* BOF: Attributes Sort/copy */ $products = tep_db_query("select p.products_id, pd.products_name, pov.products_options_values_name, povt.products_options_values_sort_order from" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . "povt, " . 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 and povt.products_options_id='" . (int)$HTTP_GET_VARS['option_id'] . "' and povt.products_options_values_id = pov.products_options_values_id order by pd.products_name"); /* EOF: Attributes Sort/copy */ gives the following error when deleting a Product Option: 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 'p, products_options_values pov, products_options_values_to_produ select p.products_id, pd.products_name, pov.products_options_values_name, povt.products_options_values_sort_order fromproducts p, products_options_values pov, products_options_values_to_products_optionspovt, products_attributes pa, products_description pd where pd.products_id = p.products_id and pov.language_id = '1' and pd.language_id = '1' and pa.products_id = p.products_id and pa.options_id='7' and pov.products_options_values_id = pa.options_values_id and povt.products_options_id='7' and povt.products_options_values_id = pov.products_options_values_id order by pd.products_name [TEP STOP] If I comment out that line I get the following: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\documents and settings\tim\desktop\www\admin\includes\functions\database.php on line 107 This option has no products and values linked to it - it is safe to delete it. I also get buttons to delete and cancel, and from here I can delete the Product Option. I would really like to get this working properly without errors. Has anyone else experienced this or have any ideas on how to fix it? Also, I have "Product Attributes - Option Type Feature v1.71 (17 Nov 2004)" installed and it is working fine with "Attributes Copier", except for the TEXT field. I'm not sure if the contribs are conflicting or not. Any help or insight is greatly appreciated. Quote My Published & Modified Contributions Helpful Forum Topics: Basic Design Tips & Tricks | Simple Steps to Better Forum Searching | Speed / Performance Optimizations Link to comment Share on other sites More sharing options...
Guest Posted July 14, 2005 Share Posted July 14, 2005 I am having a problem deleting Product Options after installing this contrib. This line of code in catalog/admin/products_attributes.php /* BOF: Attributes Sort/copy */ ? ?$products = tep_db_query("select p.products_id, pd.products_name, pov.products_options_values_name, povt.products_options_values_sort_order from" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . "povt, " . 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 and povt.products_options_id='" . (int)$HTTP_GET_VARS['option_id'] . "' and povt.products_options_values_id = pov.products_options_values_id order by pd.products_name"); /* EOF: Attributes Sort/copy */ gives the following error when deleting a Product Option: If I comment out that line I get the following: I also get buttons to delete and cancel, and from here I can delete the Product Option. I would really like to get this working properly without errors. Has anyone else experienced this or have any ideas on how to fix it? Also, I have "Product Attributes - Option Type Feature v1.71 (17 Nov 2004)" installed and it is working fine with "Attributes Copier", except for the TEXT field. I'm not sure if the contribs are conflicting or not. Any help or insight is greatly appreciated. <{POST_SNAPBACK}> anyone found the line of code to fix the above issue....I have it too!!! there seems to be a space missing in the sql: products_options_values_to_products_optionspovt should be: products_options_values_to_products_options povt Regards, Siddall Quote Link to comment Share on other sites More sharing options...
Zeme Posted July 15, 2005 Share Posted July 15, 2005 (edited) I think it should be: /* BOF: Attributes Sort/copy */ $products = tep_db_query("select p.products_id, pd.products_name, pov.products_options_values_name, povt.products_options_values_sort_order from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " povt, " . 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 and povt.products_options_id='" . (int)$HTTP_GET_VARS['option_id'] . "' and povt.products_options_values_id = pov.products_options_values_id order by pd.products_name"); /* EOF: Attributes Sort/copy */ Note the space after "from", and, as tdogg mentioned, a space before povt Edited July 15, 2005 by Zeme Quote Link to comment Share on other sites More sharing options...
Bigredman74 Posted July 15, 2005 Share Posted July 15, 2005 Thanks Robin and Siddall. No more errors. Quote My Published & Modified Contributions Helpful Forum Topics: Basic Design Tips & Tricks | Simple Steps to Better Forum Searching | Speed / Performance Optimizations Link to comment Share on other sites More sharing options...
Guest Posted July 15, 2005 Share Posted July 15, 2005 I think it should be: lots of code was here! Note the space after "from", and, as tdogg mentioned, a space before povt <{POST_SNAPBACK}> Sorry Zeme! I just noticed your Fix to Chad's Fix (on the contribution page) which FIXED that delete issue... Regards, T-DOGG Quote Link to comment Share on other sites More sharing options...
rchilson Posted July 21, 2005 Share Posted July 21, 2005 I have installed this contribution properly (I think) as I can copy attributes from one product to a whole category. When I add or edit a product I get a nice menu of options at the bottom of the page that will allow me to add options quite easily. One thing I don't understand about this menu is the prefix box. I understand Price and sort order but what is the prefix box for? On my admin page I see three specific areas... Product Options - Upper Left of Screen Option Values - Upper Right of Screen Product Attributes - Bottom of Screen The Product Attributes area has a column for "Sort Order" that allows me to edit the order of the option value and any changes made on the product edit page (categories.php) are also reflected here. The proper order of the option value is displayed on the product page as expected. However, there is a "Sort Order" column in the "Option Values" section that I can edit, save, etc. but it does not seem to affect anything. Can somebody please explain what is supposed to happen here? And for my third question (am I allowed to ask three questions?) OK... it looks like I'll have to ask a fourth question. Is there any way that I can sort by option name? For example if I have two option names Color : Size:S M L XL Quote Roy Link to comment Share on other sites More sharing options...
rchilson Posted July 21, 2005 Share Posted July 21, 2005 Hello (I'm not sure what happened but my last post was unfinished and then I could not edit it so I am posting it again in it's entirety - sorry about that.) Regarding Attribute Sorter and Copier v5.1b - I have installed this contribution properly (I think) as I can copy attributes from one product to a whole category. When I add or edit a product I get a nice menu of options at the bottom of the page that will allow me to add options quite easily. One thing I don't understand about this menu is the prefix box. I understand Price and sort order but what is the prefix box for? On my admin page I see three specific areas... Product Options - Upper Left of Screen Option Values - Upper Right of Screen Product Attributes - Bottom of Screen The Product Attributes area has a column for "Sort Order" that allows me to edit the order of the option value and any changes made on the product edit page (categories.php) are also reflected here. The proper order of the option value is displayed on the product page as expected. However, there is a "Sort Order" column in the "Option Values" section that I can edit, save, etc. but it does not seem to affect anything. Can somebody please explain what is supposed to happen here? And for my third question (am I allowed to ask three questions?) OK... it looks like I'll have to ask a fourth question. Is there any way that I can sort by option name? I know that I can sort by Option Values but I can't figure out how to sort by Option Name. Right now it appears that the Option Names are sorted alphabetically. For example I have two option names such as Color and Size and I want to display Size first as in the example below. Size: S M L XL Color: Red White Blue When I first discovered this contribution, I expected to be able to sort by the Option Name. Your help would be greatly appreciated. :) Roy Quote Roy Link to comment Share on other sites More sharing options...
Guest Posted September 9, 2005 Share Posted September 9, 2005 Help please getting this error and I do have this table in my DB. 1146 - Table 'bares_osc1.products_options_values_to_products_optionspovt' doesn't exist select p.products_id, pd.products_name, pov.products_options_values_name, povt.products_options_values_sort_order from products p, products_options_values pov, products_options_values_to_products_optionspovt, products_attributes pa, products_description pd where pd.products_id = p.products_id and pov.language_id = '1' and pd.language_id = '1' and pa.products_id = p.products_id and pa.options_id='6' and pov.products_options_values_id = pa.options_values_id and povt.products_options_id='6' and povt.products_options_values_id = pov.products_options_values_id order by pd.products_name [TEP STOP] It shows up when I try to delete a product option Quote Link to comment Share on other sites More sharing options...
Zeme Posted September 9, 2005 Share Posted September 9, 2005 Help please getting this error and I do have this table in my DB.1146 - Table 'bares_osc1.products_options_values_to_products_optionspovt' doesn't exist select p.products_id, pd.products_name, pov.products_options_values_name, povt.products_options_values_sort_order from products p, products_options_values pov, products_options_values_to_products_optionspovt, products_attributes pa, products_description pd where pd.products_id = p.products_id and pov.language_id = '1' and pd.language_id = '1' and pa.products_id = p.products_id and pa.options_id='6' and pov.products_options_values_id = pa.options_values_id and povt.products_options_id='6' and povt.products_options_values_id = pov.products_options_values_id order by pd.products_name [TEP STOP] It shows up when I try to delete a product option <{POST_SNAPBACK}> you're missing a space between the table's long name and it's short name: change: products_options_values_to_products_optionspovt to products_options_values_to_products_options povt and it should work Quote Link to comment Share on other sites More sharing options...
Guest Posted September 10, 2005 Share Posted September 10, 2005 (edited) you're missing a space between the table's long name and it's short name:change: products_options_values_to_products_optionspovt to products_options_values_to_products_options povt and it should work <{POST_SNAPBACK}> Where do you change this? I do not have the povt in my DB anywhere and another error: when hitting upload I get this: Warning: unlink(/home/mystore/mystore/catalog/images/): Is a directory in /home/mystore/mystore/catalog/admin/categories.php on line 237 1136 - Column count doesn't match value count at row 1 insert into products_attributes values ('', '30', '1', '2', '', '', '0') Edited September 10, 2005 by baresinsations Quote Link to comment Share on other sites More sharing options...
Zeme Posted September 10, 2005 Share Posted September 10, 2005 Where do you change this? I do not have the povt in my DB anywhere and another error: when hitting upload I get this: Warning: unlink(/home/mystore/mystore/catalog/images/): Is a directory in /home/mystore/mystore/catalog/admin/categories.php on line 237 1136 - Column count doesn't match value count at row 1 insert into products_attributes values ('', '30', '1', '2', '', '', '0') <{POST_SNAPBACK}> In one of your php files, you have a typo, specifically, you're missing a space (as I mentioned before). It's not a problem with your database setup, it's just a little mistake in the php file itself. (the error that gives you the "TEP STOP" will probably easily tell you which php file this error is in). With respect to the "column count doesn't match count": Since the "insert" in specifying 7 peices of data, and you're getting this error, it means that your 'product_attributes' table has either more, or less than 7 columns. This problem is 95% of the time cause by missing this file when applying a contribution, or having a column on the table left over from a removed contribution. Good luck Quote Link to comment Share on other sites More sharing options...
enigma666 Posted December 6, 2005 Share Posted December 6, 2005 Any answer to rchilson second question??? Have the same problem ... I can add whatever I want, nothing changes! Thanx in advance Quote Link to comment Share on other sites More sharing options...
cybers Posted January 26, 2006 Share Posted January 26, 2006 I'm using Product Attributes - Option Type Featury 1.71 (Link) and Attribute Sorter and Copier 6.0 But the attributes aren't sorted in the product info. How can I merge these two contributions together? Can anybody help me or perhaps give me his merged files? Quote Link to comment Share on other sites More sharing options...
sciulli Posted March 9, 2006 Share Posted March 9, 2006 I was able to get the Option Type (for text options) to function by creating duplicates of these two sections in categories.php: Entire 1st section beginning with: (near line 280) ///////////////////////////////////////////////////////////////////// // BOF: WebMakers.com Added: Update Product Attributes and Sort Order // Update the changes to the attributes if any changes were made Entire 2nd section beginning with: (near line 750) <?php ///////////////////////////////////////////////////////////////////// // BOF: WebMakers.com Added: Draw Attribute Tables In the duplicate sections, I limited the options queries to option types (products_options_type = '1'), the values query to text id (pov.products_options_values_id = 0) and renamed all references to queries (renamed $options to $textoptions, $values to $textvalues, $attributes to $textattributes). Here's a sample of the changes made for the 2nd section: $textoptions_query = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_type = '1' and language_id = '" . $languages_id . "' order by products_options_name"); while ($textoptions = tep_db_fetch_array($textoptions_query)) { $textvalues_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pov.products_options_values_id = 0"); This might help if you need a reference point for where to start. I would post all of it but mine included other modifications which might conflict with different setups. There may be an easier way to incorporate it into the existing sections, but I wasn't able to figure it out. Quote Link to comment Share on other sites More sharing options...
kortshop Posted March 19, 2006 Share Posted March 19, 2006 I was able to get the Option Type (for text options) to function by creating duplicates of these two sections in categories.php: Entire 1st section beginning with: (near line 280) ///////////////////////////////////////////////////////////////////// // BOF: WebMakers.com Added: Update Product Attributes and Sort Order // Update the changes to the attributes if any changes were made Entire 2nd section beginning with: (near line 750) <?php ///////////////////////////////////////////////////////////////////// // BOF: WebMakers.com Added: Draw Attribute Tables In the duplicate sections, I limited the options queries to option types (products_options_type = '1'), the values query to text id (pov.products_options_values_id = 0) and renamed all references to queries (renamed $options to $textoptions, $values to $textvalues, $attributes to $textattributes). Here's a sample of the changes made for the 2nd section: $textoptions_query = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_type = '1' and language_id = '" . $languages_id . "' order by products_options_name"); while ($textoptions = tep_db_fetch_array($textoptions_query)) { $textvalues_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pov.products_options_values_id = 0"); This might help if you need a reference point for where to start. I would post all of it but mine included other modifications which might conflict with different setups. There may be an easier way to incorporate it into the existing sections, but I wasn't able to figure it out. I am trying to figure out how to get this working, it would be nice if you could post the entire file. Thanks Vidar Quote Link to comment Share on other sites More sharing options...
Mooney_10 Posted March 26, 2006 Share Posted March 26, 2006 Hello, I installed attributes copier & sorter v51c and everything looks alright in the admin section. I got all columns and fields there. I also can save the sort order, but in the catalog section nothing is sorted as it should be. I gave every attribute a sort order. The instruction says that already existing products will be listed as I sorted the attributes in the options value field, but it looks like I have never installed this contribution. If I try to sort it manually in the article section, now there are even attributes for that product listed that are not supposed to show up and I can't undo it. I double checked every change I have made, also in phpmyadmin. I just don't know what to do. I'm really thankful for every help I can get. Quote 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.