My first ZenCart tip

update_product.php

Again, search for “description”. Change the following sections as you find them:

$sql_data_array = array('products_name' => zen_db_prepare_input($_POST['products_name'][$language_id]),
‘products_description’ => zen_db_prepare_input($_POST['products_description'][$language_id]),
‘products_url’ => zen_db_prepare_input($_POST['products_url'][$language_id]));

gets changed to:

// YOUR NAME HERE
$sql_data_array = array('products_name' => zen_db_prepare_input($_POST['products_name'][$language_id]),
‘products_description’ => zen_db_prepare_input($_POST['products_description'][$language_id]),
‘products_description2′ => zen_db_prepare_input($_POST['products_description2'][$language_id]),
‘products_url’ => zen_db_prepare_input($_POST['products_url'][$language_id]));

Save the file as previously outlined.


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