someoneatwork Posted February 23, 2013 Posted February 23, 2013 Hi, i'm new here. I'm hoping someone can help me with this. my boss wants me to modify our website, it uses osCommerce 2.2MS2. We are trying to display more info to our products. I was wondering if anyone can explain what needs to be done to add another textfield when Creating/Modifing a product in catagories.php. We want to add Description2 so we can use this for some extra info. Can someone show me step by step how to add this ? and how to add it to tha database Then show it on our site for the product. Attaching pic just to show where i'm at. I just used paint to copy n paste to show what we kind of want. Thanks.
Jack_mcs Posted February 23, 2013 Posted February 23, 2013 What you are wanting to do is not a simple change if you don't have experience in making such changes. Plus, there are a number of changes involved so I doubt anyone has the time to walk you through it. In general though, go through the code in categories.php and duplicate everything you see for products description. Add a new field for whatever name you choose and do the same on the products page. If you don't have a meta tags addon installed, then installing Header Tags SEO will add that for you, not to mention fixing a large hole in the sites design, i.e., no meta tags, so that is what I would recommend doing. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
someoneatwork Posted February 24, 2013 Author Posted February 24, 2013 Ah ok, i kinda knew it wouldn't be that simple by looking at the files. Thanks for the reply. I also wanted to ask, if i want to make a new table in the database, how would i do that ? I know a little bit about mysql, i see in the database.php it has all i need to connect to the database, but i just want to write my own/simple to read code to connect and make a new table and work there that way i dont mess anything up. thanks again.
someoneatwork Posted February 25, 2013 Author Posted February 25, 2013 Sorry for the double post, but we just decided to use a second database, Problem is i get an access denied message, i'm not sure why, its the same server and same password. Here is the code $cDB = mysql_connect("localhost","user","pass"); if (!$cDB) { die("Database Connection failed: " . mysql_error()); } if (mysql_query("CREATE DATABASE new_db",$cDB)) { echo "Database created"; } else { die("Database Creation: " . mysql_error()); } $thisDB = mysql_select_db("new_db"); I get this Error Database Creation: Access denied for user 'user'@'localhost' to database 'new_db' but if i select the old database, i dont get this error, which means i have access right ? what am i doing wrong ?.
Jack_mcs Posted February 25, 2013 Posted February 25, 2013 Oscommerce uses the includes/configure.php file to connect to the database. That's where you should enter the login details. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Recommended Posts
Archived
This topic is now archived and is closed to further replies.