dharrison:
Hi @davewest
Did you get any joy doing this. I opted to use Numinix product fields but even that has come with issues.
Yes... I had to read back through this post, but I use a different method. Instead of a separate table, I use a function to maintain template table add-ons..
I use a field for more info, when it has something in it, it displays, empty it does not display.
The best way to do this type of edits is to copy another field that matches what you are after. in this case, products_description works for my more details.
Steps I did..
- add the field to products description table.. by adding it to my install function, I have some 20 fields I use.
if (!$sniffer->field_exists(TABLE_PRODUCTS_DESCRIPTION,'products_details')) $db->Execute("ALTER TABLE " . TABLE_PRODUCTS_DESCRIPTION . " ADD COLUMN products_details TEXT NULL DEFAULT NULL");
- edit all three files and copy fields of products_description then paste rename to my new name (products_details)
Files: collect_info.php preview_info.php update_product.php all three if not already, should be in the product type folder.
- follow the sanitizer suggestion from Cindy.. Which works really grate.. Thanks Cindy for pointing that out..
4 ) on the catalog side. add the new database field to the page main_template_vars.php Again, look for any of the products_description fields, copy, paste and rename products_details
- add the display code to the template page.. this is how I did it..
<!-- bof product details -->
<?php if ($products_details != '') { ?>
<div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_details); ?></div>
<?php } ?>
<!-- eof product details -->
Hopefully this helps a bit.. the main thing to take away is that the correct code is already in existing files, all you need do is copy and paste, rename the field and add to the database. In keeping it short what sounds simple may not be.. Hopefully in the future this well become easier with CITTINS..
Dave
Always forward thinking... Lost my mind!