New Product Type - issue with displaying new field
I'm in the process of finishing up a mirgration from an older version 1.2.4 to 1.3.7 - I have a custom product type that merely adds a field to the products_info_display page. All the coding and setup for the new product type went perfectly with no issues for the admin. New product type is displayed correctly - new field is listed in the product_info Layout setting and is turned on (set to "1") Data is being collected on the product in put screen in the admin and is correctly being listed and stored in the db. Field was merely added to the products table no new tables needed to be created - The product type is called candle ID#6 - new field added to the product table is burn_time.
Includes files all created to include the language file - no sideboxes needed.
Here is the code added to the product_candle_info_display -
Code:
<!--bof Product details list -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_candle_info_burn_time == 1 and $products_burn_time !=0) 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))) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_candle_info_burn_time == 1 and $products_burn_time !='') ? '<li>' . TEXT_PRODUCT_BURN_TIME . $products_burn_time . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
</ul>
<br class="clearBoth" />
<?php
}
?>
<!--eof Product details list -->
Problem - the "Burn Time" is not being displayed on the Product Details page. :blink:
Based on this information - can anyone see what I've missed here? To reach the site in question - click here
Any thoughts would be much appreciated.
Re: New Product Type - issue Solved but confused?
I solved my issue with my field not being displayed, but the solution was a bit confusing so I thought I would post it for comments -
I created a new product type info_display.php file and in "that" file I added the code to display the new field; however it would not display. But when I coded it into the standard product_info_display.php and placed it in my custom template folder, it displays the new field as it should, only on products belonging to the new product type. As this was an upgrade I had in an older version (1.2.4) created this product type and coded the new file and did not touch the core file. I'm just curious as to why it worked this way so I can make a note for the future. :blink: