Within the main body of html/product.php you can refer to the main category using $mainProduct["category"] and any other custom fields using the exact name as the field exists in the products table, e.g. $mainProduct["merchant_category"], so to display both below the description, look for the following code around line 12:
If you're not quite sure what your custom fields are named in the database, you could add some temporary debug code at the above point to print out the contents of $mainProduct:
<?php print_r($mainProduct); ?>
That will output the full $mainProduct record array in a readable format of "fieldname" => "value" pairs, so it's the appropriate "fieldname" that you need to use...
Hi Jill,
Within the main body of html/product.php you can refer to the main category using $mainProduct["category"] and any other custom fields using the exact name as the field exists in the products table, e.g. $mainProduct["merchant_category"], so to display both below the description, look for the following code around line 12:
<?php if ($mainProduct["description"]): ?>
<p><?php print $mainProduct["description"]; ?></p>
<?php endif; ?>
...and use the same structure for the category and any custom fields, e.g.;
<?php if ($mainProduct["description"]): ?>
<p><?php print $mainProduct["description"]; ?></p>
<?php endif; ?>
<?php if ($mainProduct["category"]): ?>
<p>Category: <?php print $mainProduct["category"]; ?></p>
<?php endif; ?>
<?php if ($mainProduct["merchantcategory"]): ?>
<p>Category: <?php print $mainProduct["merchantcategory"]; ?></p>
<?php endif; ?>
If you're not quite sure what your custom fields are named in the database, you could add some temporary debug code at the above point to print out the contents of $mainProduct:
<?php
print_r($mainProduct);
?>
That will output the full $mainProduct record array in a readable format of "fieldname" => "value" pairs, so it's the appropriate "fieldname" that you need to use...
Cheers,
David.
--
PriceTapestry.com