
Originally Posted by
DivaVocals
Found a better solution to this issue than what I posted previously..
Issue:
If you have both Tabbed Products Pro, and Zen Lightbox installed AND your products have model numbers defined, the problem outlined above will manifest itself.
To fix this in the
includes/modules/pages/product_reviews/header_php.php file replace this:
Code:
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
with this:
Code:
if (TPP_GLOBAL_ENABLE_TABS == '1') {
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'];
}
} else {
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
}
What this change does:
If you have Tabbed Products Pro and Zen Lightbox installed, the model number field will NOT display on the product reviews page.
I realize this is pretty much a bandaid solution, but coming up with a solution that allows the product model field to display when both TPP and Zen Lightbox are installed and active is over my paygrade to execute. I don't know if the issue is in the TPP code, or the ZenLight box code or if a change needs to be made in both. Again, someone smarter than me will need to figure this out. So I am sharing a down and dirty solution that works.
Okay.. I think I found it.. the key to the answer was in the includes/modules/pages/product_reviews_write/header_php.php file..
The includes/modules/pages/product_reviews/header_php.php file was using different code to display the model number. And this code would display the model number incorrectly when Zen Lightbox (or Zen Colorbox) was installed and active..
Here's the correct fix:
To fix this in the includes/modules/pages/product_reviews/header_php.php file replace this:
Code:
if (zen_not_null($review->fields['products_model'])) {
$products_name = $review->fields['products_name'] . '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_name = $review->fields['products_name'];
}
with this:
Code:
$products_name = $review->fields['products_name'];
if ($review->fields['products_model'] != '') {
$products_model = '<br /><span class="smallText">[' . $review->fields['products_model'] . ']</span>';
} else {
$products_model = '';
}
Bookmarks