Page 8 of 8 FirstFirst ... 678
Results 71 to 76 of 76
  1. #71
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    453
    Plugin Contributions
    1

    Default Re: jQuery Scrolling Sideboxes [Support Thread]

    I managed to stop the above Error log generating by commenting out the following line in /includes/modules/sideboxes/reviews_scrolling.php.

    Code:
    //    if (isset($_GET['products_id'])) {  $scrolling_review .= " and p.products_id = '" . (int)$_GET['products_id'] . "'";  }
    The scrolling review box still seems to work fine, not sure if this was the correct way to stop that error log or if doing this will effect any other function on my website?!

    Hope someone can confirm
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  2. #72
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,633
    Plugin Contributions
    78

    Default Re: jQuery Scrolling Sideboxes [Support Thread]

    Quote Originally Posted by rlexyd View Post
    I managed to stop the above Error log generating by commenting out the following line in /includes/modules/sideboxes/reviews_scrolling.php.

    Code:
    //    if (isset($_GET['products_id'])) {  $scrolling_review .= " and p.products_id = '" . (int)$_GET['products_id'] . "'";  }
    The scrolling review box still seems to work fine, not sure if this was the correct way to stop that error log or if doing this will effect any other function on my website?!

    Hope someone can confirm
    You're appending that AND clause to the wrong variable:
    Code:
         if (isset($_GET['products_id'])) {  $scrolling_review_sql .= " and p.products_id = '" . (int)$_GET['products_id'] . "'";  }

  3. #73
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    453
    Plugin Contributions
    1

    Default Re: jQuery Scrolling Sideboxes [Support Thread]

    Thank you Cindy, that stopped the error log :)
    Can you Please have a peak at the final code changes below and if you can give them your thumbs up before I add them to my live site? Thanking you in advance!

    1) includes/templates/MYTEMPLATE/sideboxes/tpl_reviews_random_scrolling.php:

    Code:
    $content  = '<div id="scrolling_review" class="sideBoxContent centeredContent">';
    $count = 1;
    while (!$scrolling_review->EOF) {
        $rs_pid = $scrolling_review->fields['products_id'];
        $rs_pname = $scrolling_review->fields['products_name'];
        $content .= PHP_EOL . '  <div class="sideBoxContentItem hiddenField reviewsScroller">';
        $content .= "$rs_pname<br /><br /></a>";
        $content .= '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $scrolling_review->fields['products_id'] .	'&reviews_id=' . $scrolling_review->fields['reviews_id']) . '">' . zen_image(DIR_WS_IMAGES . $scrolling_review->fields['products_image'], $rs_pname, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)	. '<br />' . nl2br(zen_trunc_string(zen_output_string_protected(stripslashes($scrolling_review->fields['reviews_text'])), 60)) . '</a><br /><br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $scrolling_review->fields['reviews_rating'] . '.png' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $scrolling_review->fields['reviews_rating']));
        $content .= '</div>';
        $count++;
        $scrolling_review->MoveNextRandom();
    }
    $content .= '</div><script type="text/javascript">$("div.reviewsScroller").cycle(5000);</script>' . "\n";
    2) includes/modules/sideboxes/reviews_scrolling.php:
    Code:
      $review_status = " and r.status = 1 ";
    
    
      $scrolling_review_sql = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name,
                        substring(reviews_text, 1, 70) as reviews_text
                        from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, "
                               . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                        where p.products_status = '1'
                        and p.products_id = r.products_id
                        and r.reviews_id = rd.reviews_id
                        and rd.languages_id = '" . (int)$_SESSION['languages_id'] . "'
                        and p.products_id = pd.products_id
                        and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
                        $review_status;
    
    
       if (isset($_GET['products_id'])) {
        $scrolling_review_sql .= " and p.products_id = '" . (int)$_GET['products_id'] . "'";
      }
    
    
      $scrolling_review = $db->ExecuteRandomMulti($scrolling_review_sql, (int)MAX_RANDOM_SELECT_REVIEWS);  
      
      if (!$scrolling_review->EOF) {
        require($template->get_template_dir('tpl_reviews_random_scrolling.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_reviews_random_scrolling.php');
      } elseif (isset($_GET['products_id']) and zen_products_id_valid($_GET['products_id'])) {
    // display 'write a review' box
        require($template->get_template_dir('tpl_reviews_write.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_reviews_write.php');
      } else {
    // display 'no reviews' box
        require($template->get_template_dir('tpl_reviews_none.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_reviews_none.php');
      }
      $title =  BOX_HEADING_REVIEWS_SCROLLING;
      $title_link = FILENAME_REVIEWS;
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    ?>
    3) includes/languages/english/extra_definitions/scrolling_sideboxes.php:
    Code:
    define('BOX_HEADING_REVIEWS_SCROLLING', 'Reviews');
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  4. #74
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,633
    Plugin Contributions
    78

    Default Re: jQuery Scrolling Sideboxes [Support Thread]

    Looks similar to what I've got staged for release. The major differences are using HTML5 so I've changed all the <br /> to <br> and removed the type="text/javascript" from the <script> tag.

  5. #75
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    453
    Plugin Contributions
    1

    Default Re: jQuery Scrolling Sideboxes [Support Thread]

    Quote Originally Posted by lat9 View Post
    Looks similar to what I've got staged for release. The major differences are using HTML5 so I've changed all the <br /> to <br> and removed the type="text/javascript" from the <script> tag.
    Thanks for the confirmation Cindy.
    Just noticed the write review box on mobile view is not aligned well. https://i.imgur.com/qo45Xya.jpg
    It's displaying half way, which is weird as this seems to only display that way when there is NO reviews to display on that product page.
    If there is a product review for that product, than the scrolling review box appears correctly on the page.

    Any suggestions on how to center that write review box correctly?

    Thank you.
    *Zen Cart eCommerce Solution - Putting the Dream of Owning an Online Business within reach of anyone!

  6. #76
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    10,633
    Plugin Contributions
    78

    Default Re: jQuery Scrolling Sideboxes [Support Thread]

    Quote Originally Posted by rlexyd View Post
    Thanks for the confirmation Cindy.
    Just noticed the write review box on mobile view is not aligned well. https://i.imgur.com/qo45Xya.jpg
    It's displaying half way, which is weird as this seems to only display that way when there is NO reviews to display on that product page.
    If there is a product review for that product, than the scrolling review box appears correctly on the page.

    Any suggestions on how to center that write review box correctly?

    Thank you.
    No suggestions in this support-thread, since that's template-dependent. How about posting in the support-thread for the template you're using.

 

 
Page 8 of 8 FirstFirst ... 678

Similar Threads

  1. v152 jQuery Banners (Support Thread)
    By rbarbour in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 30 Sep 2015, 02:07 AM
  2. Best Seller's Scrolling Images - support thread
    By chaiavi in forum Addon Sideboxes
    Replies: 29
    Last Post: 9 Feb 2015, 05:02 PM
  3. Jquery Zoom [Support thread]
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 384
    Last Post: 11 Dec 2013, 02:41 AM
  4. Jquery Lightbox [Support thread]
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 257
    Last Post: 2 Aug 2012, 10:57 PM
  5. Scrolling Featured Sidebox support thread
    By misty in forum Addon Sideboxes
    Replies: 86
    Last Post: 28 May 2010, 05:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR