Zen Cart Logo
Forums / Addon Sideboxes / jQuery Scrolling Sideboxes [Support Thread]

jQuery Scrolling Sideboxes [Support Thread]

Views: 79,927

Results 21 to 40 of 80
29 Dec 2015, 8:20 PM
#21
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

jQuery Scrolling Sideboxes [Support Thread]

I've checked this plugin; it's compatible with Zen Cart v1.5.4 and v1.5.5 (no core-file changes).

25 Jan 2016, 6:17 PM
#22
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

Hi.

Is there a simple way to change one of these side boxes into displaying Expected Products? I'm still getting my head around the MySQL queries that would be needed to do so.

Thanks in advance :)

25 Jan 2016, 7:09 PM
#23
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: jQuery Scrolling Sideboxes [Support Thread]

You could re-use the SQL queries from /includes/modules/upcoming.php (that's the centerbox implementation).

25 Jan 2016, 10:32 PM
#24
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

OK thanks .. I am looking at it .. just as a trial though I installed the Best Sellers scroller but ti doesn't scroll it just produces a list of the top 10 books??

13 Jul 2016, 2:04 PM
#25
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

Great Add-on!!

For the what's new scroller, what changes would have to be made to "tpl_whats_new_scrolling.php" to display the product description under the product name?

Thanks,

13 Jul 2016, 2:23 PM
#26
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: jQuery Scrolling Sideboxes [Support Thread]

allmart:

Great Add-on!!

For the what's new scroller, what changes would have to be made to "tpl_whats_new_scrolling.php" to display the product description under the product name?

Thanks,
To make the change you're requesting, you'll need to change (at least) two files, adding the portions identified like this:

/includes/modules/sideboxes/YOUR_TEMPLATE/whats_new_scrolling.php:

// -----
// Scrolling "what's new" sidebox, based on the whats_new.php sidebox that's built into Zen Cart!
//
// Copyright (c) 2014, Vinos de Frutas Tropicales (lat9)
// Copyright 2003-2010 Zen Cart Development Team
// Copyright 2003 osCommerce
// License: http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
//
$display_limit = zen_get_new_date_range();
$whats_new_scrolling_sql = "SELECT p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name, p.master_categories_id[B], pd.products_description[/B]
                              FROM (" . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                             WHERE p.products_id = pd.products_id
                               AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                               AND p.products_status = 1 " . $display_limit;

$whats_new_scrolling = $db->ExecuteRandomMulti ($whats_new_scrolling_sql, MAX_RANDOM_SELECT_NEW);

if (!$whats_new_scrolling->EOF) {
  require ($template->get_template_dir('tpl_whats_new_scrolling.php', DIR_WS_TEMPLATE, $current_page_base, 'sideboxes') . '/tpl_whats_new_scrolling.php');
  $title =  BOX_HEADING_WHATS_NEW_SCROLLING;
  $title_link = FILENAME_PRODUCTS_NEW;
  require ($template->get_template_dir ($column_box_default, DIR_WS_TEMPLATE, $current_page_base, 'common') . '/' . $column_box_default);
  
}

and then change the /includes/templates/YOUR_TEMPLATE/sideboxes/tpl_whats_new_scrolling.php to display that information:

// -----
// Scrolling "what's new" sidebox, based on the whats_new.php sidebox that's built into Zen Cart!
//
// Copyright (c) 2014, Vinos de Frutas Tropicales (lat9)
// Copyright 2003-2011 Zen Cart Development Team
// Copyright 2003 osCommerce
// License: http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
//
$content = '<div class="sideBoxContent centeredContent">';
while (!$whats_new_scrolling->EOF) {
  $whats_new_price = zen_get_products_display_price ($whats_new_scrolling->fields['products_id']);
  $content .= "\n" . '  <div class="sideBoxContentItem hiddenField whatsNewScroller">';
  $content .= '<a href="' . zen_href_link (zen_get_info_page ($whats_new_scrolling->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev ($whats_new_scrolling->fields['master_categories_id']) . '&products_id=' . $whats_new_scrolling->fields['products_id']) . '">' . zen_image (DIR_WS_IMAGES . $whats_new_scrolling->fields['products_image'], $whats_new_scrolling->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
  $content .= '<br />' . $whats_new_scrolling->fields['products_name'] . '</a>';
  [B]$content .= '<div>' . zen_trunc_string (zen_clean_html ($whats_new_scrolling->fields['products_description'])) . '</div>';[/B]
  $content .= '<div>' . $whats_new_price . '</div>';
  $content .= '</div>';
  $whats_new_scrolling->MoveNextRandom();
}
$content .= '</div><script type="text/javascript">$("div.whatsNewScroller").cycle(10000);</script>' . "\n";
13 Jul 2016, 6:20 PM
#27
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

Thank you very much... worked like a charm. I am hoping you can give me guidance to where I can change the css to address the following minor issue I have. in responsive mode/mobile the scrolling box is not centered on the screen I would guess because it is designed for the sidebox. Is it possible to centre the scrolling box and have the heading box full width.

Attachment 16488

Thanks,

13 Jul 2016, 6:30 PM
#28
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: jQuery Scrolling Sideboxes [Support Thread]

You're very welcome. If you'd post a link to the site, perhaps I can help further.

13 Jul 2016, 6:35 PM
#29
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

Here's the link http://www.allmart.ca/store/ it's work in progress, learning slowly.

13 Jul 2016, 7:11 PM
#30
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: jQuery Scrolling Sideboxes [Support Thread]

It's looking good! Unfortunately, there's more change required that just a CSS centering for the mobile display, since the scrolling somehow sets the page at the top after every image-update.

It's going to be easier to simply hide that display for mobile devices by editing your /includes/templates/responsive_classic/jscript/jscript_responsive_framework.php, adding the following to the mobile-device clause:

$('#whatsnewscrolling).css({ 'display': 'none', 'visibility': 'hidden' });

P.S. You're letting yourself in for a "world of hurt" by directly modifying the responsive_classic files, since you'll need to merge any updates in with your changes from the get-go on the next Zen Cart update. Better to use the Clone a Template plugin, clone what you've currently got for the responsive_classic and then make further edits on your cloned version.

13 Jul 2016, 7:28 PM
#31
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

Thanks again for your prompt response and solution that worked like a charm. Your advice for using the Clone a Template plugin is also appreciated. I have made detailed notes pertaining to my changes but since I am a NEWB I was always worried I wouldn't remember what I did when the next update came along. I am going to start from scratch while my memory is fresh and take your advice it might be a little work now but will save me a lot in the future. I still have a lot of work before I go live.

Thanks again... you truly are "Totally Zenned"

13 Jul 2016, 8:04 PM
#32
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: jQuery Scrolling Sideboxes [Support Thread]

Just a note, when you "clone" the responsive_classic template, you'll be pulling in/cloning that template with all your current changes.

14 Jul 2016, 12:42 PM
#33
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

Sorry but I am a little unclear on the procedure of cloning the template. After I clone my template, through admin, do I then select the cloned template as the master where I do my mods and re-clone that template after changes have been made or do I after cloning the original template, select the original template as the master and clone that one after after changes.

Thanks again.

14 Jul 2016, 1:02 PM
#34
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: jQuery Scrolling Sideboxes [Support Thread]

@allmart, rather than cluttering this support thread, let's take your questions to the Clone a Template support thread.

14 Jul 2016, 1:03 PM
#35
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

will do

14 Jul 2016, 5:10 PM
#36
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: jQuery Scrolling Sideboxes [Support Thread]

lat9,

You have been so helpful and was hoping you could provide a solution to this minor problem. Is it possible to have a fixed box height for the scrolling box. If the product name is wider than the column/box width, the text wraps which shifts everything below the box down because of the extra line and back up if the name is less than the box width.

14 Jul 2016, 7:06 PM
#37
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: jQuery Scrolling Sideboxes [Support Thread]

allmart, I've used a couple of the "equal heights" jQuery scripts for other purposes. Let me investigate and I'll get back with you, since your request is one that I've had on my list for this plugin for a while now.

22 Jul 2017, 2:21 AM
#38
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: jQuery Scrolling Sideboxes [Support Thread]

Was not able to get this to work with 1.5.5e without adding files to the newer overides directories.Copy the plugin's files to your store's file system. [LIST=1] [*]/includes/languages/english/extra_definitions/scrolling_sideboxes.php [*]/includes/modules/sideboxes/best_sellers_scrolling.php [*]/includes/modules/sideboxes/featured_scrolling.php [*]/includes/modules/sideboxes/specials_scrolling.php [*]/includes/modules/sideboxes/whats_new_scrolling.php [*]/includes/templates/template_default/jscript/jscript_jquery_cdn.js [*]/includes/templates/template_default/jscript/jscript_sidebox_slider.js [*]/includes/templates/template_default/sideboxes/tpl_best_sellers_scrolling.php [*]/includes/templates/template_default/sideboxes/tpl_featured_scrolling.php [*]/includes/templates/template_default/sideboxes/tpl_specials_scrolling.php [*]/includes/templates/template_default/sideboxes/tpl_whats_new_scrolling.php [/LIST]works just fine as```
Copy the plugin's files to your store's file system.
[LIST=1]
[]/includes/languages/english/extra_definitions/YOUR_TEMPLATE/scrolling_sideboxes.php
[
]/includes/modules/sideboxes/YOUR_TEMPLATE/best_sellers_scrolling.php
[]/includes/modules/sideboxes/YOUR_TEMPLATE/featured_scrolling.php
[
]/includes/modules/sideboxes/YOUR_TEMPLATE/specials_scrolling.php
[]/includes/modules/sideboxes/YOUR_TEMPLATE/whats_new_scrolling.php
[
]/includes/templates/YOUR_TEMPLATE/jscript/jscript_jquery_cdn.js
[]/includes/templates/YOUR_TEMPLATE/jscript/jscript_sidebox_slider.js
[
]/includes/templates/YOUR_TEMPLATE/sideboxes/tpl_best_sellers_scrolling.php
[]/includes/templates/YOUR_TEMPLATE/sideboxes/tpl_featured_scrolling.php
[
]/includes/templates/YOUR_TEMPLATE/sideboxes/tpl_specials_scrolling.php
[*]/includes/templates/YOUR_TEMPLATE/sideboxes/tpl_whats_new_scrolling.php
[/LIST]

Note: with the responsive_classic, the boxes are properly centered in the mobile phone testing I've done.
22 Jul 2017, 12:20 PM
#39
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: jQuery Scrolling Sideboxes [Support Thread]

@dbltoe, that's weird; I've been using those sideboxes on my site since 1.5.5a with a clone of the responsive_classic template.

In what way did it "not work" out-of-the-box?

22 Jul 2017, 10:16 PM
#40
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: jQuery Scrolling Sideboxes [Support Thread]

Until i moved the files to the YOUR_TEMPLATE override folders, it was as if nothing had been loaded. Got all listings with no scroll.

Went back thru twice to verify files loaded, correct boxes turned on, etc.

Pulled out the old zc_overrides and said "hmmm, let me throw them all in the overrides." Worked first shot.