Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Altering the product table with more columns


Recommended Posts



I needed to add some extra columns to the product table. I did this with

'alter table products myColumnName varchar(25)'


Now, I need these extra columns to show up in 2 places:

- The admin section when adding/editing a product (admin/categories.php)

- When a user click on the product to see a more detailed description (product_info.php)


The trouble is that I don't know how to 'import' the extra columns into those files. I don't know what dependencies those files may have in relation to the database. Also, this is my first time using PHP (although coding for many years), so I don't wanna think I have it correct, when it may not be.


Can anyone provide some help/insight?



Link to comment
Share on other sites

Nevermind, I was able to get it


For the admin section


I just made a copy of anything with products_weight, and renamed it with my new column.(admin/categories.php)


Then I added a change in the english/categories.php file


I checked in the database and the data is in there as expected.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...