CRE Loaded Community



Board index » CRE Loaded 6.2 » Install & Config

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Error when viewing reviews
PostPosted: Mon Jul 13, 2009 2:22 pm 
Offline
CRE Newbie

Joined: Wed Jul 08, 2009 5:04 pm
Posts: 11
When I try to view reviews by clicking on them from the info box I get this error:
Fatal error: Only variables can be passed by reference in ....................../templates/content/product_reviews_info.tpl.php on line 98

This is line 98 from the code below:

Code:
echo '<p><a href="javascript:document.cart_quantity.action=\'' . str_replace('&amp;', '&', tep_href_link(basename(FILENAME_PRODUCT_INFO)), 'action=add_wishlist') . '\'; document.cart_quantity.submit();">' . tep_template_image_button('button_add_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST,'align="middle"') . '</a>' ;



I don't understand where the problem is. If I click on view review from the product pages it works fine. I've search but have not found anyone else with this problem.

Code:
<?php
// RCI code start
echo $cre_RCI->get('global', 'top');
echo $cre_RCI->get('productreviewsinfo', 'top');
// RCI code eof
echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
<table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB;?>">
<?php
// BOF: Lango Added for template MOD
if (SHOW_HEADING_TITLE_ORIGINAL == 'yes') {
$header_text = '&nbsp;'
//EOF: Lango Added for template MOD
?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
            <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
<?php
}else{
$header_text =  $products_name .'</td><td class="productlisting-headingPrice">' . $products_price;
}
?>

<?php
// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes'){
table_image_border_top(false, false, $header_text);
}
// EOF: Lango Added for template MOD
?>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="main"><?php echo '<b>' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews_info['customers_name'])) . '</b>'; ?></td>
                    <td class="smallText" align="right"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, tep_date_long($reviews_info['date_added'])); ?></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
                  <tr class="infoBoxContents">
                    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                      <tr>
                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                        <td valign="top" class="main"><?php echo tep_break_string(nl2br(tep_output_string_protected($reviews_info['reviews_text'])), 60, '-<br>') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $reviews_info['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews_info['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $reviews_info['reviews_rating'])) . '</i>'; ?></td>
                        <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
              </tr>
              <tr>
                <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
                  <tr class="infoBoxContents">
                    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                      <tr>
                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                        <td class="main"><?php echo '<a href="javascript:history.go(-1)">' . tep_template_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
                        <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params(array('reviews_id'))) . '">' . tep_template_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>
                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
            <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" align="right" valign="top"><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td align="center" class="smallText">
                <?php
                  if (tep_not_null($reviews_info['products_image'])) {
                  ?>
                    <script language="javascript"><!--
                      document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $reviews_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $reviews_info['products_image'], addslashes($reviews_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
                    //--></script>
                    <noscript>
                      <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $reviews_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $reviews_info['products_image'], $reviews_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
                    </noscript>
                  <?php
                  }
                  echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','cPath','products_id')) . 'action=buy_now&products_id=' . $reviews_info['products_id'] . '&cPath=' . tep_get_product_path($reviews_info['products_id'])) . '">' . tep_template_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>';
                  // Begin Wishlist Code
                  if (DESIGN_BUTTON_WISHLIST == 'true') {                   
                    echo '<p><a href="javascript:document.cart_quantity.action=\'' . str_replace('&amp;', '&', tep_href_link(basename(FILENAME_PRODUCT_INFO)), 'action=add_wishlist') . '\'; document.cart_quantity.submit();">' . tep_template_image_button('button_add_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST,'align="middle"') . '</a>' ;
                  }         
                  // End Wishlist Code
                  echo  '</form></p>';
                ?>
                </td>
              </tr>
            </table>
          </td>
        </table></td>
      </tr>
<?php
// RCI code start
echo $cre_RCI->get('productreviewsinfo', 'menu');
// RCI code eof
// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes'){
table_image_border_bottom();
}
// EOF: Lango Added for template MOD
?>
    </table>
<?php
// RCI code start
echo $cre_RCI->get('productreviewsinfo', 'bottom');
echo $cre_RCI->get('global', 'bottom');
// RCI code eof
?>


Top
 Profile  
 
 Post subject: Re: Error when viewing reviews
PostPosted: Thu Jul 30, 2009 2:58 pm 
Offline
CRE Freak
User avatar

Joined: Mon Jul 21, 2008 5:37 pm
Posts: 119
Location: Mexico
I do have this same problem.... did you find a solution?

_________________
Cheers
http://www.vagautopartes.com.mx/store/ | MEXICO


Top
 Profile  
 
 Post subject: Re: Error when viewing reviews
PostPosted: Tue Aug 04, 2009 12:02 pm 
Offline
CRE Newbie
User avatar

Joined: Tue Aug 04, 2009 11:58 am
Posts: 1
I also have this problem, no one have a solution yet for this?

Reading reviews directly from product page works fine, but clicking the review link from the infobox sidebar gives this error.


Top
 Profile  
 
 Post subject: Re: Error when viewing reviews: SOLVED!!
PostPosted: Thu Aug 06, 2009 2:15 pm 
Offline
CRE Freak
User avatar

Joined: Mon Jul 21, 2008 5:37 pm
Posts: 119
Location: Mexico
chrisvh wrote:
I also have this problem, no one have a solution yet for this?

Reading reviews directly from product page works fine, but clicking the review link from the infobox sidebar gives this error.


Well my solution was:
look for this on products_review_info.tpl.php (line 97):
Code:
echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','cPath','products_id')) . 'action=buy_now&products_id=' . $reviews_info['products_id'] . '&cPath=' . tep_get_product_path($reviews_info['products_id'])) . '">' . tep_template_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>';
                  // Begin Wishlist Code
                  if (DESIGN_BUTTON_WISHLIST == 'true') {                   
                    echo '<p><a href="javascript:document.cart_quantity.action=\'' . str_replace('&amp;', '&', tep_href_link(basename(FILENAME_PRODUCT_INFO)), 'action=add_wishlist') . '\'; document.cart_quantity.submit();">' . tep_template_image_button('button_add_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST,'align="middle"') . '</a>' ;
                  }         
                  // End Wishlist Code
                  echo  '</form></p>';


comment to let it like this:
Code:
echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','cPath','products_id')) . 'action=buy_now&products_id=' . $reviews_info['products_id'] . '&cPath=' . tep_get_product_path($reviews_info['products_id'])) . '">' . tep_template_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>';
                  // Begin Wishlist Code
                  //if (DESIGN_BUTTON_WISHLIST == 'true') {                   
                  //  echo '<p><a href="javascript:document.cart_quantity.action=\'' . str_replace('&amp;', '&', tep_href_link(basename(FILENAME_PRODUCT_INFO)), 'action=add_wishlist') . '\'; document.cart_quantity.submit();">' . tep_template_image_button('button_add_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST,'align="middle"') . '</a>' ;
                  //}         
                  // End Wishlist Code
                  echo  '</form></p>';


Hope this wors for u as it worked 4 me.

_________________
Cheers
http://www.vagautopartes.com.mx/store/ | MEXICO


Top
 Profile  
 
 Post subject: Re: Error when viewing reviews
PostPosted: Wed Feb 24, 2010 2:52 am 
Offline
CRE Newbie

Joined: Wed Feb 24, 2010 2:50 am
Posts: 1
This works perfect!! great job! :D :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

Board index » CRE Loaded 6.2 » Install & Config

All times are UTC - 5 hours


Who is online

Users browsing this forum: alexalex, greatpcs and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Fri Jul 30, 2010 11:58 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Top Listing

1. Credit Card with CCV
    Category: Payment Modules
    
2. CC7333_ATS
    Category: Templates
    
3. Points & Rewards PLUS!...
    Category: Add-Ons
    
4. One Page Checkout...
    Category: Fixes
    
5. Configuration Server...
    Category: Fixes
    
Show more...

Follow Us on Twitter

@likeOMGitsFEDAY we do offer a wiki and other resources at www.creloaded.org
@smellgoodslady 6.2 is old code, we are at 6.4 now. come and get the latest.
@smellgoodslady what version/release are you running?
CRE Secure in the news: Payment News Article about Hosted Payment Pages reducing PCI friction - http://is.gd/ba0CH
@smellgoodslady yes it should work for 6.2 as well. let me know of you have any issues.

CRE Loaded Community Chat hosted by CRE Loaded.

Join now


Chat about what's on your mind. More about public chats.


© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy