Forums / Bug Reports / [Done v1.6.0] "Write Reviews" - Minor issue with model number display

[Done v1.6.0] "Write Reviews" - Minor issue with model number display

Locked

Views: 1,357

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
25 Aug 2013, 11:26 PM
#1
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

[Done v1.6.0] "Write Reviews" - Minor issue with model number display

Not sure if this is the right place to post this, but I wanted to share a very minor issue I discovered.. I noticed that for clients that I installed the Zen Lightbox and Colorbox add-ons that there was some weird/invalid HTML on the "read reviews" pages. The model number displays in what appears to be some weird link to the left of the product image. You can see what I mean here: http://www.zen-cart.com/attachment.php?attachmentid=12967&d=1377422852. The "write reviews" page displays correctly.

I came up with a number of bandaid solutions that work on the "read reviews" page, but then after doing some more testing and digging around, I realized that the includes/modules/pages/product_reviews/header_php.php file uses different code to display the product name and model number than the includes/modules/pages/product_reviews_write/header_php.php file. It would appear that the activation of the Zen Lightbox or Zen Colorbox add-ons simply made it easier to spot this difference.

I have tested the following fix:

in the includes/modules/pages/product_reviews/header_php.php file replace this:

  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:

$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 = '';
}

It appears to solve the issue. I tested this on both a test vanilla store as well as a test store with just Zen Lightbox installed..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

29 Aug 2013, 4:57 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: [Done v1.6.0] "Write Reviews" - Minor issue with model number display

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Aug 2013, 1:00 PM
#3
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: [Done v1.6.0] "Write Reviews" - Minor issue with model number display

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.