Is there just one file that you want to include in every product? Then your idea is sound and will work easily.
If you have various stock texts that you want to insert in different products, then the boilerplate concept may be better. I have developed a variant of swguy's method that can be used to insert as many stock text/HTML chunks as desired into whatever part of the product info page is wanted, triggered by an HTML comment in the description. All it requires is putting a function call into the file in the place desired. I haven't submitted it to Free Addons yet, but I will attach it here if you would like to try it.
What would be the correct link in the require(); statement to allow this information to display in the correct language.
$_SESSION['language'] will get the current language, and can be used in a file lookup.
Why are you planning to require a PHP file? Is it going to need PHP manipulation and processing to output the HTML you will want to display? If you are only going to want one piece of text/HTML in this location, you can define that as a constant in a language file (one for each language you are using)
PHP Code:
define('PRODUCT_GENERAL_INFO_TEXT', '<div class="boilerplate"><p class="generalSection">This is a bunch of general product information.</p><p>It is long and repetitious and the same on every product.</p></div>');
and echo the constant where you want it:
PHP Code:
<!--eof Product details list -->
<?php echo PRODUCT_GENERAL_INFO_TEXT;?>
Bookmarks