My first ZenCart tip

phpMyAdmin

First, we must begin with your database. Most people aren’t aware of a neat little tool that comes with most databases called “phpMyAdmin” - or if they are, they have no clue what it’s for. I’m not going to explain what each section is for, but I will show you what you need to do to accomplish this.

So, first, you need to log into your control panel under your hosting account. Look for anything that says “MySQL” (hopefully, you’ll also see a link for “phpMyAdmin” - but some hosts have the phpMyAdmin under the MySQL administration - so it depends on your host.). Once you find phpMyAdmin, get in there. Some places will automatically log you in - others will want you to log in again - usually you only have to use the username and password that you use to log into your hosting control panel.

Once you’re in there, you’ll see something like this:
phpMyAdmin login screen

You need to look to the left, in the dropdown box that says “Databases”. Click the dropdown and look for your zencart database - whatever it’s named. Once you click that, you will see a list of tables in your zencart database. It should look similar to this:
phpMyAdmin - ZenCart database tables

You need to scroll down - you can use the frame on the left or right, it doesn’t really matter - and look for the “zencart_products_description” table. (Your prefix could be different - “zencart_” is whatever you named your tables - but the “product_description” part will be the same - that’s the table you want.) Click on it, and a new screen will open in the right frame that lists the fields for your products description.

phpMyAdmin - ZenCart products_description table

At the bottom of the short list of fields, you’ll see a little section that says “Print View”, “Relation View” - stuff like that. You want to find the “Add [input box] fields”. You need to enter in as many new fields as you want to appear in your products description area. For this example, we’re only gonna add one - but you can add more if you like.

So type in “1″, and at the end of that row, click the radio button next to “after”, and in the dropdown box, select “products_description”. Click “Go”, and you’ll be taken to a new screen, where you want to name the field and edit its values.

  1. Name the field “products_description2″.
  2. Type should be “TEXT”
  3. Collation should be “latin1_swedish_ci” (unless you’re using another language - check the other fields to see what *your* default language is for your tables, but this setting is for English.)
  4. Under “null”, select “null”.
  5. Under “Default2″, type in “null”.
  6. all other fields should be blank.

Click “Save”, and look at your new field. Be sure the little icons at the end (”Browse”, “Edit”, etc.) are all the same. Some of the icons will be grayed out - so you want to be sure the same grayed-out icons are the same for your new field as they are for “products_description”.

And thus, you are finished with phpMyAdmin, and you may exit, stage left.


Page 1 2 3 4 5 6 7 8 9 10

Comments

Melvin says...
1

I can’t begin to tell you how wonderful this is. I’ve searched the Zen site over and over and nothing could touch what I needed. THANKS…. BUT…. The admin collect_info works, the preview_info works, but it’s not writing the input to the database. I opend php MyAdmin and verified the fields are correct. Also I verified the new records are writing to the database but the new fileds are blank. Additionally Both New records and Updated records are not writing to the new fields, AND I’m not getting any error messages. If I could beg your help, Can you point me to areas to look for possible mistakes or errors? I’m so close I can smell it…

Thanks a MILLION…

AdamN says...
2

You are a god(dess)! this has saved me so much hassle writing html code for mulitple descriptions in product listings/pages, the only change is Ive removed the original products description from the product page, so now my listings show a short info piece - the original product description section, and my product page just shows the secondary description - so much easier than writing class code into each description.

Many many thanks for the contrib.
Adam.

Trackbacks & Pingbacks

Leave a Reply