I have made some more progress.
I have successfully set up the children to display the Parent's Title. It involves creating a custom field type string, Custom field type parent,
1. Change the code in /templates/yourtemplate/html/com_virtuemart/productdetails/default.php to this below:
You are looking for <h1 id="product_name"><?php echo $this->product->product_name ?></h1>
<h1 id="product_name">
<?php
if (!empty($this->product->customfieldsSorted['Product'])) {
$custom_title = null;
foreach ($this->product->customfieldsSorted['Product'] as $field) {
if ($field->display) {
if ($field->custom_title != $custom_title) {
echo $field->display;
}
}
else {
echo $this->product->product_name;
}
}
}
else {
echo $this->product->product_name;
}?>
</h1>
2. Once that is done, check your product details page in your browser to make sure the page loads correctly. Choose a page with no custom fields.
3. Once that is done, create a custom field type Parent with these settings:
Type=Parent
Title="Parent"
Published="yes"
Cart Attribute="No"
Layout Position="ontop"
4. Next step, Create a custom field type String with these settings:
Type="String"
Title="anything you want" (it wont be displayed)
Published="yes"
Parent="Parent"
Cart Attribute="No"
Layout Position="Product" Case sensitive if you copied my script
5. Now.. whatever attributes you made to show in the add to cart area (ie. the dropdown), you must set the custom fields to have the same parent as the custom string we just created.
6. Once that is done, go to your parent product, remove all custom fields and add the custom field parent we just created.
7. Type in the name of the parent product and save. All children of this product will get the custom string to show up as the product title.
This script/setup will inject That product name as the title of all children product pages and if there are no custom fields for this product, the original product title will show.
I hope this was easy to understand. if you follow precicely, it will work as you can see here ->
http://test2.firenl.com/store/eliquid/tobacco-flavors/flue-cured-tobacco-detailAny questions you can contact me, but just to let you know, I am very busy and it may be a while for me to get back to you during a work week. My day job actually is designing fire protection sprinkler systems. web design is just a weekend hobby for me....
