you could try something like this in your product controller:
Code: Select all
preg_match_all('/<replace [^>]+>/i', $data['description'], $result);
foreach($result[0] as $replacement) {
$file = str_replace(array('<replace file="','">'),'',$replacement);
ob_start();
include_once(DIR_INCLUDES . $file);
$include_data = ob_get_clean();
$data['description'] = str_replace('<replace file="'.$file.'"></replace>',$include_data,$data['description']);
}
add in your product description <replace file="your_replace_file1"></replace> and <replace file="your_replace_file2"></replace>, etc.
and put the your_replace_file1 and your_replace_file2 in your DIR_INCLUDES directory