Hi I need to change this php code from my tpl_product_info_display.php, can any one help me? please?
I have two different categories "Contact Lenses" and Prescription Lenses" that need to display different attribute layouts.PHP Code:<!--bof Attributes Module -->
<?php
if ($pr_attr->fields['total'] > 0) {
?>
<?php
/**
* display the product atributes
*/
require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
<?php
}
?>
<!--eof Attributes Module -->
So, I'm wondering if something like this is possible, but I'm not a PHP master,
Can any one help?PHP Code:
<!--bof Attributes Module -->
<?php
if ($pr_attr->fields['total'] > 0) {
?>
<?php
if($_GET['cPath']) {
switch($_GET['cPath']) {
case $template_dir = "1"; // directory of your custom cPath template (/tpl_modules_attributes_1.php)
break;
case $template_dir = "2"; // directory your custom cPath template (/tpl_modules_attributes_2.php)
break;
case $template_dir = "2_7"; // directory your custom cPath template (/tpl_modules_attributes_2.php)
default: // If none of the above
$template_dir = ""; // directory name of custom template (/tpl_modules_attributes.php)
}
}
?>



