-
Seasonal Centerbox [support thread]
The Seasonal Centerbox is acenterbox - just like the New Products, Featured Products and Monthly Specials Centerboxes - which allows you to show off randomly selected items from a specific category.
https://www.zen-cart.com/downloads.php?do=file&id=2295
-
Re: Seasonal Centerbox [support thread]
The includes/templates/custom/templates/tpl_modules_seasonal.php goes in includes/templates/YOURTEMPLATE/templates/tpl_modules_seasonal.php.
Apparently, the plugin moderator missed the standardization at https://docs.zen-cart.com/user/first.../#yourtemplate.
:rotflmao:
Seriously, keep up the great work.
-
Re: Seasonal Centerbox [support thread]
I have installed and made modifications per the readme file. Should this display in admin/configuration/index listing ?
I cannot locate where to utilize this like I would the featured products.
zc 1.5.7.b
-
Re: Seasonal Centerbox [support thread]
It's not yet admin-controllable (will be in the next release). Right now, see step 6 in the README.txt for customization instructions.
-
Re: Seasonal Centerbox [support thread]
-
Re: Seasonal Centerbox [support thread]
Seasonal Centerbox has been updated to provide built-in admin controls so file edits are no longer required.
-
Re: Seasonal Centerbox [support thread]
Great! Just wonder if it is random order? Products in the featured Products are random order. If this plugin allows me to give the products some sort order, I can use it to replace featured products :smile:
-
Re: Seasonal Centerbox [support thread]
Yes, it is in random order.
-
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
swguy
Yes, it is in random order.
Many thanks for your reply. Is it possible to assign a sort order to the products?
-
Re: Seasonal Centerbox [support thread]
You'd have to change the code - nothing is built in to do this. They're in *random order* now.
-
Re: Seasonal Centerbox [support thread]
I installed your latest version on 1.5.7c. I followed instructions that says :
Right above
while (!$show_display_category->EOF) {
add this block of code:
<?php require($template->get_template_dir('tpl_modules_seasonal.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_seasonal.php'); ?>
Here is my file:
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
<?php require($template->get_template_dir('tpl_modules_seasonal.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_seasonal.php'); ?>
while (!$show_display_category->EOF) {
causes my Main page center to be empty. No Main page or features nor specials... Just blank.
Did I miss something????? Thanks
-
Re: Seasonal Centerbox [support thread]
You are already in PHP in the block where you pasted it. So no need for the start and end php - instead use
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
require($template->get_template_dir('tpl_modules_seasonal.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_seasonal.php');
while (!$show_display_category->EOF) {
...
-
1 Attachment(s)
Re: Seasonal Centerbox [support thread]
Silly Me..... so much for programming late at night.........
That helped but now Featured Products tab does not work correctly.
Attachment 19458
-
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
tedjmaines
Silly Me..... so much for programming late at night.........
That helped but now Featured Products tab does not work correctly.
Attachment 19458
Still having issues with Seasonal Centerbox stopping Feature from displaying. See previous post.
-
1 Attachment(s)
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
swguy
Seasonal Centerbox has been updated to provide built-in admin controls so file edits are no longer required.
It seems I can't see any details in Admin.
Attachment 19871
-
Re: Seasonal Centerbox [support thread]
You will need to work with a developer to fix this. The entries in the configuration table need to have the same group id as the configuration_group table entry.
-
Re: Seasonal Centerbox [support thread]
The sql did add to admin_pages and configuration_group but not to configuration table, so I did it thru phpMyAdmin. I had been looking into the php's but not the DB. Thank for pointing me in the right way.
Works fine now. :clap: Nice plugin!
-
Re: Seasonal Centerbox [support thread]
I installed your mod and it works great. Easy installation and setup via admin.
I just have one question:
Is it possible to add a "buy now " or "more info" button below each product?
site is atwww.royal-fleur.com for reference.
Thank you for your time
-
Re: Seasonal Centerbox [support thread]
The centerboxes don't normally have buy buttons on them but certainly you could add the code to do that for items without attributes. But there's nothing built in - you'd have to write the logic yourself.
-
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
swguy
The centerboxes don't normally have buy buttons on them but certainly you could add the code to do that for items without attributes. But there's nothing built in - you'd have to write the logic yourself.
Thank you for the prompt reply. Unfortunately, I am not coder so that s a bit out of my reach.
What i did for the other boxes is to replace the "more info" by a "buy now" button and i don't know how replicate this to your seasonal centerbox.
I came across this plug in at https://www.zen-cart.com/downloads.php?do=file&id=998 but it has not been updated for awhile. I will just keep digging around to seeif someone did the modifications.
Thanks again for your time.
-
Re: Seasonal Centerbox [support thread]
Quick question on this great plug-in:
How do i get to display between the special centerbox and the featured centerbox?
I know the order of special/featured/new product can be change via admin but no luck with seasonal centerbox.
I tried to move the display code between
Code:
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?
and
Code:
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
it appears to work at first by displaying seasonal box between the two. However, i end up with the seasonal box being display 2 more times below again. ( so 3 seasonal box total on main page :( )
Any suggestion on this please?
Thank you
-
Re: Seasonal Centerbox [support thread]
For clarification: the file being modified is
includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php
You added this block:
<?php require($template->get_template_dir('tpl_modules_seasonal.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_seasonal.php'); ?>
above
while (!$show_display_category->EOF) {
(per the instructions). Remove that.
Now place that block between
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
and the following line
<?php } ?>
-
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
swguy
For clarification: the file being modified is
includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php
You added this block:
<?php require($template->get_template_dir('tpl_modules_seasonal.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_seasonal.php'); ?>
above
while (!$show_display_category->EOF) {
(per the instructions). Remove that.
Now place that block between
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
and the following line
<?php } ?>
Thank you for the prompt reply and assitance.
It works perfectly
-
Re: Seasonal Centerbox [support thread]
You could of course add a SHOW_ key but I find that so complicated I didn't suggest it in my install documentation.
Glad it works for you.
-
Re: Seasonal Centerbox [support thread]
Hello everyone,
ZC 1.5.7
Bootstrap template
I installed this plug in on my website upgrade.
Installation went smooth and easy but i am getting some display issue.
Somehow the seasonal centerbox is not following the same "layout"as the featuredand/or special centerbox.
What do i need to do in order to fix it? site is at http://www.royal-fleur.com/upgrade
Thank you for the help
-
Re: Seasonal Centerbox [support thread]
Be sure you are using ./includes/modules/bootstrap/seasonal_index.php from the zip file, and not ./includes/modules/custom/seasonal_index.php.
-
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
swguy
Be sure you are using ./includes/modules/bootstrap/seasonal_index.php from the zip file, and not ./includes/modules/custom/seasonal_index.php.
I don t have a ./includes/modules/bootstrap/seasonal_index.php in the plugin zip file.
I copied the file ./includes/modules/custom/seasonal_index.php. from the release into ./includes/modules/bootstrap/.
Excuse my ignorance but where do i find thecorrect file?
Also should the file be placed in ./includes/modules/bootstrap/ or ./includes/modules/bootstrap/centerboxes?
Thank you
-
Re: Seasonal Centerbox [support thread]
You're right - I thought I had uploaded that change but I guess I didn't. Grab the new version and update ./includes/modules/bootstrap/seasonal_index.php.
-
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
swguy
You're right - I thought I had uploaded that change but I guess I didn't. Grab the new version and update ./includes/modules/bootstrap/seasonal_index.php.
Thank you very much for the fast reply and help.
The new file fixed the display layout to match the rest of thew centerboxes.
However , the pictures are really small. How can i fix that?
Thank you
-
Re: Seasonal Centerbox [support thread]
-
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
swguy
woops sorry brain lapse on my part. Not use to have admin controls on mods
-
Re: Seasonal Centerbox [support thread]
I am trying to have the seasonal box display 2 product per row on mobile with the bootstrap template.
I looked at the modification from post #554 in the bootstrap threads but i am not finding a similar file for the seasonal centerbox.
Code:
@@ -36,14 +36,14 @@ if (is_array($list_box_contents) > 0 ) {
//if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
?>
-<div class="card-deck text-center">
+<div class="card-deck text-center row row-cols-2">
<?php
for($col=0, $j=sizeof($list_box_contents[$row]); $col<$j; $col++) {
$r_params = "";
if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
if (isset($list_box_contents[$row][$col]['text'])) {
?>
- <?php echo '<div' . $r_params . '>' . $list_box_contents[$row][$col]['text'] . '</div>'; ?>
+ <?php echo '<span ' . $r_params . '>' . $list_box_contents[$row][$col]['text'] . '</span>'; ?>
<?php
}
}
How can i accomplish the same thing with this mod?
Thank you once again for your help
-
Re: Seasonal Centerbox [support thread]
Check the module file where the $list_box_contents variable is set
-
Re: Seasonal Centerbox [support thread]
Quote:
Originally Posted by
numinix
Check the module file where the $list_box_contents variable is set
There is no file for this mod in template/bootstrap/centerboxes.
The only file named tpl_modules_seasonal.php in includes/templates/bootstrap/templates looks nothing like the others.
here is the code
Code:
<?php
/**
* Module Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_modules_featured_products.php 2935 2006-02-01 11:12:40Z birdbrain $
*/
$zc_show_seasonal = false;
include(DIR_WS_MODULES . zen_get_module_directory('seasonal_index'));
?>
<?php if ($zc_show_seasonal) { ?>
<!-- bof: seasonal products -->
<div class="centerBoxWrapper" id="featuredProducts">
<?php
/**
* require the list_box_content template to display the product
*/
require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
?>
</div>
<!-- eof: seasonal products -->
<?php } ?>
The other file with the variable in it ( i think) is in modules/bootstrap/seasonal_index.php.
Code:
<?php
/**
* kitbuilder module - prepares content for display
*
* @package modules
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: featured_products.php 6424 2007-05-31 05:59:21Z ajeh $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
// initialize vars
$categories_products_id_list = '';
$list_of_products = '';
$seasonal_products_query = '';
$display_limit = '';
$zc_show_seasonal = false;
if (SEASONAL_CENTERBOX_CATEGORY != 0) {
$zc_show_seasonal = true;
}
if ($zc_show_seasonal) {
if ( (($manufacturers_id > 0 && $_GET['filter_id'] == 0) || $_GET['music_genre_id'] > 0 || $_GET['record_company_id'] > 0) || (!isset($new_products_category_id) || $new_products_category_id == '0') ) {
$seasonal_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.master_categories_id
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 p.products_status = 1
and p.master_categories_id = " . SEASONAL_CENTERBOX_CATEGORY . "
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
} else {
// get all products and cPaths in this subcat tree
$productsInCategory = zen_get_categories_products_list( (($manufacturers_id > 0 && $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : $cPath), false, true, 0, $display_limit);
if (is_array($productsInCategory) && sizeof($productsInCategory) > 0) {
// build products-list string to insert into SQL query
foreach($productsInCategory as $key => $value) {
$list_of_products .= $key . ', ';
}
$list_of_products = substr($list_of_products, 0, -2); // remove trailing comma
$seasonal_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.master_categories_id
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 p.products_status = 1
and p.master_categories_id = " . SEASONAL_CENTERBOX_CATEGORY . "
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id in (" . $list_of_products . ")";
}
}
if ($seasonal_products_query != '') {
$seasonal_products = $db->ExecuteRandomMulti($seasonal_products_query, MAX_DISPLAY_SEASONAL_CENTERBOX);
}
$row = 0;
$col = 0;
$list_box_contents = array();
$title = '';
$num_products_count = ($seasonal_products_query == '') ? 0 : $seasonal_products->RecordCount();
// show only when 1 or more
if ($num_products_count > 0) {
if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_SEASONAL_CENTERBOX || SHOW_PRODUCT_INFO_COLUMNS_SEASONAL_CENTERBOX == 0) {
$col_width = floor(100/$num_products_count);
} else {
$col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SEASONAL_CENTERBOX);
}
while (!$seasonal_products->EOF) {
$products_price = zen_get_products_display_price($seasonal_products->fields['products_id']);
if (!isset($productsInCategory[$seasonal_products->fields['products_id']])) $productsInCategory[$seasonal_products->fields['products_id']] = zen_get_generated_category_path_rev($seasonal_products->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContents card mb-3 p-3 text-center" id="centerBoxContentsFeatured"',
'text' => (($seasonal_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($seasonal_products->fields['products_id']), 'cPath=' . $productsInCategory[$seasonal_products->fields['products_id']] . '&products_id=' . $seasonal_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $seasonal_products->fields['products_image'], $seasonal_products->fields['products_name'], IMAGE_SEASONAL_CENTERBOX_LISTING_WIDTH, IMAGE_SEASONAL_CENTERBOX_LISTING_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($seasonal_products->fields['products_id']), 'cPath=' . $productsInCategory[$seasonal_products->fields['products_id']] . '&products_id=' . $seasonal_products->fields['products_id']) . '">' . $seasonal_products->fields['products_name'] . '</a><br />' . $products_price);
$col ++;
if ($col > (SHOW_PRODUCT_INFO_COLUMNS_SEASONAL_CENTERBOX - 1)) {
$col = 0;
$row ++;
}
$seasonal_products->MoveNextRandom();
}
if ($seasonal_products->RecordCount() > 0) {
if (isset($new_products_category_id) && $new_products_category_id !=0) {
$category_title = zen_get_categories_name((int)$new_products_category_id);
$title = '<h4 id="featuredCenterbox-card-header" class="centerBoxHeading card-header">' . TITLE_SEASONAL_CENTERBOX . ($category_title != '' ? ' - ' . $category_title : '') . '</h4>';
} else {
$title = '<h4 id="featuredCenterbox-card-header" class="centerBoxHeading card-header">' . TITLE_SEASONAL_CENTERBOX . '</h4>';
}
$zc_show_seasonal = true;
} else {
$zc_show_seasonal = false;
}
}
}
?>
Any ideas on how i can make this work please?
Thank you
-
Re: Seasonal Centerbox [support thread]
I could use some help .
The modules was working fine then i switch categories to 0 to disable the module for awhile.
I switch it back to categories 48 for example, however, i am getting a blank frame.
I tried to remove and reinstall the plugin but no luck.
It is on the main page of royal-fleur.com right above the deal of the week section.
Anyone know how i can fix this?
thank you for your help.