New Zenner
- Join Date:
- Mar 2007
- Location:
- Cambridge, MA
- Posts:
- 59
- Plugin Contributions:
- 0
Problems adding new Product Detail field
Hi All-
I've successfully added a new field ("Record Producer") to the PRODUCTS_MUSIC_EXTRA table in the database (it's generally non-repeating information so I have not created an addition separate table for this info).
I've successfully added a blank text field to the Product Admin page, and I can see that the new data is indeed being added to the database correctly from the Admin product page.
I also tried to add to the correct fields in the PRODUCT_TYPE_LAYOUT table, so that the "Record Producer" would appear as an Admin option. So far, I cannot get it to appear however.
(I used the following SQL command:)
INSERT INTO zen_product_type_layout (configuration_title, configuration_key, configuration_value, configuration_description, product_type_id, sort_order, set_function, date_added) VALUES ('Show Music Producer', 'SHOW_PRODUCT_MUSIC_INFO_PRODUCER', '1', 'Display Music Producer on Product Info 0= off 1= on', '7', '4', 'zen_cfg_select_drop_down(array(array(\'id\'=>\'1\', \'text\'=>\'True\'), array(\'id\'=>\'0\', \'text\'=>\'False\')), ', now());
I also cannot get the data to appear in the Product Detail list on [my template] / tpl_product_music_info_display.php.
Should I assume that the reason I'm not able to is that the Record Producer option is not appearing in the Product Layout Admin page? Or have I screwed up my code in tpl_product_music_info_display.php?
(That code is:)
<!--bof Product details list -->
<?php if ( (
($flag_show_product_info_model == 1 and $products_model != '')
or ($flag_show_product_info_weight == 1 and $products_weight !=0)
or ($flag_show_product_info_quantity == 1)
or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))
or ($flag_show_product_music_info_artist == 1)
or ($flag_show_product_music_info_record_company == 1)
or ($flag_show_product_music_info_producer == 1)
) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . '<span class="aa">' . TEXT_PRODUCT_MODEL . '</span>' . $products_model . '</li>' . "\n" : ''); ?>
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . '<span class="aa">' . TEXT_PRODUCT_WEIGHT . '</span>' . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' . "\n" : ''); ?>
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . '<span class="aa">' . $products_quantity . '</span>' . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . '<span class="aa">' . TEXT_PRODUCT_MANUFACTURER . '</span>' . $manufacturers_name . '</li>' . "\n" : ''); ?>
<?php echo (($flag_show_product_music_info_artist == 1 and !empty($products_artist_name)) ? '<li>' . '<span class="aa">' . TEXT_PRODUCT_ARTIST . '</span>' . $products_artist_name . '</li>' . "\n" : ''); ?>
<?php echo (($flag_show_product_music_info_genre == 1 and !empty($products_music_genre_name)) ? '<li>' . '<span class="aa">' . TEXT_PRODUCT_MUSIC_GENRE . '</span>' . $products_music_genre_name . '</li>' . "\n" : ''); ?>
<?php echo (($flag_show_product_music_info_record_company == 1 and !empty($products_record_company_name)) ? '<li>' . '<span class="aa">' . TEXT_PRODUCT_RECORD_COMPANY . '</span>' . $products_record_company_name . '</li>' . "\n" : ''); ?>
<?php echo (($flag_show_product_music_info_producer == 1 and !empty($products_producer_name)) ? '<li>' . '<span class="aa">' . TEXT_PRODUCT_PRODUCER . '</span>' . $products_producer_name . '</li>' . "\n" : ''); ?>
</ul>
<?php
}
?>
<!--eof Product details list -->
Thanks in advance for your help!