I've checked this plugin; it's compatible with Zen Cart v1.5.4 and v1.5.5 (no core-file changes).
Printable View
I've checked this plugin; it's compatible with Zen Cart v1.5.4 and v1.5.5 (no core-file changes).
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 :)
You could re-use the SQL queries from /includes/modules/upcoming.php (that's the centerbox implementation).
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??
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:
and then change the /includes/templates/YOUR_TEMPLATE/sideboxes/tpl_whats_new_scrolling.php to display that information:Code:// -----
// 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, pd.products_description
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);
}
Code:// -----
// 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>';
$content .= '<div>' . zen_trunc_string (zen_clean_html ($whats_new_scrolling->fields['products_description'])) . '</div>';
$content .= '<div>' . $whats_new_price . '</div>';
$content .= '</div>';
$whats_new_scrolling->MoveNextRandom();
}
$content .= '</div><script type="text/javascript">$("div.whatsNewScroller").cycle(10000);</script>' . "\n";
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,
You're very welcome. If you'd post a link to the site, perhaps I can help further.
Here's the link http://www.allmart.ca/store/ it's work in progress, learning slowly.
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:
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.Code:$('#whatsnewscrolling).css({ 'display': 'none', 'visibility': 'hidden' });