captainbohica Posted August 26, 2008 Posted August 26, 2008 Hi everyone. I'm a complete newbie to oscommerce and toying with code/database all together but have been working my way around... Hopefully someone can point me in the right direction or give me some guidance, but this is in regards to products in the catalog. Currently when i go to add a new product, there are fields such as "Products Model", and "Products weight"... If i wanted to replace those fields with something like, "Product Year" and "Card number" [the site I am trying to create is selling sports cards], It is my understanding that I would need to add those fields in the database in phpmyadmin, correct? I tried to just renaming "products_model" to "Products_year" and received the 1054 error so i changed it back. so how can I customize the fields for the new product page on the admin side? Thank you in advance for the help!
captainbohica Posted August 26, 2008 Author Posted August 26, 2008 Just to give you an idea...What I would like to ultimately do is take this page on my site.. http://chargercards.com/index.php?manufacturers_id=10 and reflect the following columns Year Product Name Player Name Card Number Qty Price Buy it Now all so the user could sort by each column and I would like to eventually add additional boxes on the left hand column similar to the "manufacturers" drop down menu ...
ktshannon Posted August 26, 2008 Posted August 26, 2008 This can be done, by modifying the database as well as the coding. Think of it as just "adding on" to the existing. There may be a contribution for more fields, try searching there.
captainbohica Posted August 26, 2008 Author Posted August 26, 2008 This can be done, by modifying the database as well as the coding. Think of it as just "adding on" to the existing. There may be a contribution for more fields, try searching there. Yikes. Ok thanks for heads up. I'll try the contributions
captainbohica Posted August 26, 2008 Author Posted August 26, 2008 anyone have any experience with the following contributions? i think one of these will help me achieve what I want to do product extra fields http://addons.oscommerce.com/info/2202 new field everywhere http://addons.oscommerce.com/info/3164
♥geoffreywalton Posted August 26, 2008 Posted August 26, 2008 PEF worked fine for me. But try them both 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 ======>>>>>.
onlinepartyplace Posted August 27, 2008 Posted August 27, 2008 Hi everyone. I'm a complete newbie to oscommerce and toying with code/database all together but have been working my way around... Hopefully someone can point me in the right direction or give me some guidance, but this is in regards to products in the catalog. Currently when i go to add a new product, there are fields such as "Products Model", and "Products weight"... If i wanted to replace those fields with something like, "Product Year" and "Card number" [the site I am trying to create is selling sports cards], It is my understanding that I would need to add those fields in the database in phpmyadmin, correct? I tried to just renaming "products_model" to "Products_year" and received the 1054 error so i changed it back. so how can I customize the fields for the new product page on the admin side? Thank you in advance for the help! I am a newbie as well. Can you tell me how you add a product??? I am so lost. Thanks so much.
captainbohica Posted August 27, 2008 Author Posted August 27, 2008 once you are in the admin area.. catalog>>then click on the "new product" button. you should be able to go from there
captainbohica Posted August 27, 2008 Author Posted August 27, 2008 ok. i took a look at the instructions for the contributions.......and well.......im now cross eyed. lol. i'd like to try to figure another workaround before trying to contribution.... can anyone else give me a little direction on editing the names of the product fields?
ktshannon Posted August 27, 2008 Posted August 27, 2008 Changing the names can be accomplished via-database. But to add/remove is when it becomes difficult.
captainbohica Posted August 27, 2008 Author Posted August 27, 2008 Changing the names can be accomplished via-database. But to add/remove is when it becomes difficult. i tried that.. changing the database... i edited PRODUCT_MODEL to PRODUCT_YEAR, and changed the other things (VARCHAR) and string length, but received the unknown column error... but probably because I didn't change the coding.... which brings me to my next question... what specific files do I need to go and change the coding from PRODUCT_MODEL to PRODUCT_YEAR? and once im in those files, is it as simple as replacing all instances of PRODUCT_MODEL to PRODUCT_YEAR????
♥geoffreywalton Posted August 27, 2008 Posted August 27, 2008 Product model is a key field, so it is hardly surprising you start to get errors. It would be a nightmare to change the name of one field because you would then have to change it through out the code on the site. If you don't know about key fields you are on a hiding to nothing trying to do this. I really, really, really, ......... recommend that you don't just change a name. It wont work without a lot of editing. People will support you installing and using contributions doing something st**id will put them off. So install a contribution and adapt that. Good luck 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 ======>>>>>.
tafu Posted August 28, 2008 Posted August 28, 2008 Please note, that the field "products_model" has to be unique and the field "weight" is used to calculate the shipping costs. I am using a lot of extra fields in my shop (www.discorder.de). I have used "product extra field" and it works well for me. However, adding some fields means to add them in database tables and in php codeof several files. It will take a lot of time if you don't know how to write php code, but it is a "mission possible". When I started, I had no idea concernig php and sql, but it is very satisfying to win the battle at the end :D:-) Good luck Thomas
captainbohica Posted August 28, 2008 Author Posted August 28, 2008 Hi everyone.. i decided to try to add the PEF contribution and i've added all the files.. now im at this step.. Run the following SQL file on the database (usually through PHPMyAdmin): product_extra_fields.sql how do i RUN the file? I'm in my phpmyadmin for the database.. so what do I do now? click on the SQL tab and now I see where I can run a SQL query... what do I do now? Thanks again for the continued help
captainbohica Posted August 28, 2008 Author Posted August 28, 2008 hmm wait.. do i put the following (from the SQL file included in the PEF contribution) into the SQL field from phpmyadmin? DROP TABLE IF EXISTS products_extra_fields; CREATE TABLE products_extra_fields ( products_extra_fields_id int NOT NULL auto_increment, products_extra_fields_name varchar(64) NOT NULL default '', products_extra_fields_order int(3) NOT NULL default '0', products_extra_fields_status tinyint(1) NOT NULL default '1', languages_id INT( 11 ) DEFAULT '0' NOT NULL, PRIMARY KEY (products_extra_fields_id) ); DROP TABLE IF EXISTS products_to_products_extra_fields; CREATE TABLE products_to_products_extra_fields ( products_id int NOT NULL, products_extra_fields_id int NOT NULL, products_extra_fields_value varchar(64), PRIMARY KEY (products_id,products_extra_fields_id) );
Recommended Posts
Archived
This topic is now archived and is closed to further replies.