GidgetGein Posted November 2, 2005 Posted November 2, 2005 I am redoing a site for a computer company. Who ever was in charge before really did some damage to the products attributes section. When ever I try to edit or insert something new It does not work. I have another site that I maintain where I use this option So I am pretty sure I know what I am doing. My question is, Can I restore or clean the product attributes in order to start over from scratch? Thanx
Jeremy at oddly enough Posted November 3, 2005 Posted November 3, 2005 You could, if you were in a scorched earth kind of mood, empty the tables related to attributes and options and start over from scratch. The tables are products_attributes, products_options, products_options_values, and products_options_values_to_products_options. You can do this with phpmyadmin, or if you have mysql access you can drop the tables and recreate new ones with these commands: DROP TABLE IF EXISTS products_attributes; CREATE TABLE products_attributes ( products_attributes_id int NOT NULL auto_increment, products_id int NOT NULL, options_id int NOT NULL, options_values_id int NOT NULL, options_values_price decimal(15,4) NOT NULL, price_prefix char(1) NOT NULL, PRIMARY KEY (products_attributes_id) ); DROP TABLE IF EXISTS products_attributes_download; CREATE TABLE products_attributes_download ( products_attributes_id int NOT NULL, products_attributes_filename varchar(255) NOT NULL default '', products_attributes_maxdays int(2) default '0', products_attributes_maxcount int(2) default '0', PRIMARY KEY (products_attributes_id) ); DROP TABLE IF EXISTS products_options; CREATE TABLE products_options ( products_options_id int NOT NULL default '0', language_id int NOT NULL default '1', products_options_name varchar(32) NOT NULL default '', PRIMARY KEY (products_options_id,language_id) ); DROP TABLE IF EXISTS products_options_values; CREATE TABLE products_options_values ( products_options_values_id int NOT NULL default '0', language_id int NOT NULL default '1', products_options_values_name varchar(64) NOT NULL default '', PRIMARY KEY (products_options_values_id,language_id) ); DROP TABLE IF EXISTS products_options_values_to_products_options; CREATE TABLE products_options_values_to_products_options ( products_options_values_to_products_options_id int NOT NULL auto_increment, products_options_id int NOT NULL, products_options_values_id int NOT NULL, PRIMARY KEY (products_options_values_to_products_options_id) ); I forgot to list Products_attributes_download above, but it's in the code. If you do scorched earth, maybe make a backup of your db first, just in case you change your mind! Jeremy
GidgetGein Posted November 3, 2005 Author Posted November 3, 2005 cool thank so if and when i get rid of this it will only affect the product attributes? i.e. the drop down options below a product
GidgetGein Posted November 3, 2005 Author Posted November 3, 2005 Before I go and delete everything maybe someone can tell me why my product attributes in my admin section is not working when i try to add product options or edit existing options it does not work it would be a HUGE help if someone could answer me thanx
Jeremy at oddly enough Posted November 7, 2005 Posted November 7, 2005 What does it do? Do you get any error messages? Jeremy
GidgetGein Posted November 7, 2005 Author Posted November 7, 2005 What does it do? Do you get any error messages? Jeremy It does not update. I do not get an error message. It just does not register the change. For instance. I add a version ,size, etc... option to a product in the" product attributes" in the admin section I hit INSERT. Nothing changes on the site It is the same as it was before the edit/add. Like I said before. I have another site that works fine and registers the product attributes just fine. Whoever worked on this site first must have done some kind of mumbo jumbo. any ideas???
Jeremy at oddly enough Posted November 8, 2005 Posted November 8, 2005 Try loading an unmolested copy of catalog/admin/products_attributes.php and see if that makes a difference. Personally I don't use that page to enter my opions and attributes. I had way too many to enter, so I spent some time working out how the tables in the db are laid out, the information that's required, and then learned the necessary mysql to cobble together scripts of commands, using a spreadsheet, to load products, options, and attributes directly into the db. There are contribs that deal with attribute entry too, but you need to get your first problem sorted out first of all I suppose! Let me know if reloading that file changes anything. Jeremy
GidgetGein Posted November 8, 2005 Author Posted November 8, 2005 Man o Man I fixed it. I uploaded a new " products_attributes.php " from one of my sites that works. thanx so much. Now all I have to do is figure out how to change the attributes with the spread sheet thingy.
Jeremy at oddly enough Posted November 9, 2005 Posted November 9, 2005 This is a link to a brief description of how I do it: http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=617991 Jeremy
Recommended Posts
Archived
This topic is now archived and is closed to further replies.