This is a support thread for the add on that was recently posted. This will create a tab system for the home page modules of the store.
Printable View
This is a support thread for the add on that was recently posted. This will create a tab system for the home page modules of the store.
Would be a good thing to also include the module link. :wink:
If module recently submitted to Zen Cart downloads but not yet available, need to mention that or wait till the module has been approved.
I think the best thing is to create the support thread with a note that it is not yet available, and include a link to the thread in the mod submission so it is easy to find.
Then when the mod is activated, you can link from the support thread to its page in Free Addons.
Does anyone know how to get this module working? It is a very simple mod, yet I can't get it to show at all. I'm not sure if its because it has a simple js script inserted right at the top of tpl_index_default.php
I've done a view source on ff, and the code doesn't seem to called at all, *BUT* if I view the file via FZ, the code is there.
Any ideas?
http://www. a u t o motiveace.com/upgrade/
un/pw: auto1
I'm using this module as part of your complete template, Abbington_mega.
Great module, great template!
Anyhow, is there a way to make the active tab look more "active"? Say with a different color tab or something?
Thanks!
Rick
I have installed the Abbington_Mega template and have posted this question in the template's support thread, but the author told me to check here for a solution. I am wanting to rearrange the order of the tabs so that the Waht's New tab shows up first. In the .PHP file, I have tried to rearrange the order of those blocks of code as well as modify the navOne, navTwo, navThree, etc, but to no avail. I am not sure if it matters, but I am using zencart v1.5.0. The tabs all display just fine as well as displaying their associated content, just cannot seem to get the New tab to be the first/default tab open.
Here is a screen cap of what shows up:
Attachment 10690
Here is my code for the file:
<?php
/**
* Page Template
*
* Main index page<br />
* Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br />
* Centerboxes are called as necessary
*
* @package templateSystem
* @copyright Copyright 2003-2006 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_index_default.php 3464 2006-04-19 00:07:26Z ajeh $
*/
?>
<script type="text/javascript">
$(document).ready(function() {
$('a.moduleBox').click(function() { // show selected module(s)
// variables
var popID = $(this).attr('rel');
var popNAV = $(this).attr('class');
// clear out menu styles and apply active
$('a.moduleBox').css('background', '');
$(this).css('background', '');
// hide all wrappers and display the one selected
$('.centerBoxWrapper').hide();
// check if all or single selection
if (popID != 'viewAll') {
$('#' + popID).show();
} else {
$('.centerBoxWrapper').show();
}
});
});
</script>
<div class="centerColumn" id="indexDefault">
<h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>
<!-- deprecated - to use uncomment this section
<?php if (TEXT_MAIN) { ?>
<div id="" class="content"><?php echo TEXT_MAIN; ?></div>
<?php } ?>-->
<!-- deprecated - to use uncomment this section
<?php if (TEXT_INFORMATION) { ?>
<div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
<?php } ?>-->
<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
<?php
/**
* get the Define Main Page Text
*/
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php } ?>
<div id="moduleMenu-wrapper">
<?php
// bof module navigation
$show_display_nav = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
if ($this_is_home_page) {
echo '';
}
echo '<div id="moduleMenu">';
while (!$show_display_nav->EOF) {
switch ($show_display_nav->fields['configuration_key']) {
case 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS':
echo '<span class="navOne moduleSpan"><a href="javascript:void(0)" rel="whatsNew" class="navOne moduleBox">New</a></span>';
break;
case 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS':
echo '<span class="navTwo moduleSpan"><a href="javascript:void(0)" rel="featuredProducts" class="navTwo moduleBox">Featured</a></span>';
break;
case 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS':
echo '<span class="navThree moduleSpan"><a href="javascript:void(0)" rel="specialsDefault" class="navThree moduleBox">Specials</a></span>';
break;
}
$show_display_nav->MoveNext();
}
//echo '<span id="navFour" class="moduleSpan"><a href="javascript:void(0)" id="navFour" rel="viewAll" class="moduleBox">All</a></span>';
echo '<br class="clearBoth" />';
echo '</div>';
// eof module navigation
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
while (!$show_display_category->EOF) {
?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?>
<?php
/**
* display the New Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?>
<?php
/**
* display the Featured Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
/**
* display the Special Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
<?php
/**
* display the Upcoming Products Center Box
*/
?>
<?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
<?php
$show_display_category->MoveNext();
} // !EOF
?>
</div>
</div>
Any assistence would be greatly appreciated--even if it is to just tell me it is how V 1.5.0 does things now.
Thanks!Attachment 10690
I'd like to know how to do this to but I would like just the featured products to show, I've been trying to do this for days :frusty:
Had the same problem. Try this:
In
yourTemplate/css/stylesheet_module_tabs.css:
add
#specialsDefault, #whatsNew, #featuredProducts {display: block;}
Change the order to suit. I like my specials to be first cab off the rank.
The stylesheet cannot affect the display order of the modules. Changing the order of the selectors in the rule will do nothing. You would need to edit the template file to output them in the desired order.
Apologies for the trip up the garden path. it seemed to work but obviously not.
This is not to affect the sort order of the modules but to set the tab displayed by default when the page is opened.
I need specials first and this will make that happen in ff,chrome, ie and safari,
at least on my site (mydollyandmedotcomdotau).
change this in stylesheet_module_tabs.css
`````````````#featuredProducts {
````````````` display:block;
`````````````}
to whichever of the three you want displayed by default
#featuredProducts #specialsDefault #whatsNew
Attachment 11385
Hello ;-) I just submitted a major update to this module:
11/22/2012-----Version 2.0
- Added new html readme file
- Updated jQuery version used by the module to 1.8.2
- Added neutral tabs styles to includes/templates/YOUR_TEMPLATE/css/stylesheet_module_tabs.css file
- Added jQuery fade in effect when selecting new tab
- Fixed XHTML Validation Errors
- Made pacakge multi language friendly by adding constants to incluldes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php and definitions to
includes/languages/english/extra_definitions/YOUR_TEMPLATE/module_tabs.php
Attachment 11505
See a live demo here:
Tabbed Home Page Modules Live Demo
I also added instructions in the readme for the common question, "How do I change which tab shows by default?" as well as common customization instructions.
Thanks,
Anne
Hi,
When I open my homepage, the tabs are there, but the products don't show up unless I click on the tab.
Is this how it's supposed to be? If not, then how can I fix this?
Here's my website: https://www.perfumefad.com/
Thanks
I'm having the same problem. Downloaded the Yorkshire free template and it also shows just the tab. You can only see the products if you click on the tab. I have posted on the support of your site but have not gotten a reply. Any help will be appreciated. Thanks
Hi Anne,
Thanks for your help. Yes that certainly did the trick! I understand now that since the default display block on css was featured products and we didn't have any featured product, it was not showing anything!
Great template! Thanks again!
great :D it worked.
I have a another website and I installed the "Alysa Rounded' template and this one came with the tabbed home page module.
How can I remove it?
Hi,
There was a question asked earlier in the thread but it didn't seem to get answered.
What would i have to change in the CSS to get the active tab color to highlight so customers know which tab they are currently viewing? If i put #moduleMenu a:hover {background-color:#2685bf} it changes the color when you hover over it, but i have tried #moduleMenu a:selected and a:active and it doesn't change the color of the selected tab?
Thanks
Hi,
Thanks for the quick response. However if you have a look at my site: www.drgreens.co.uk you can see that i have managed to change colors, and have put a hover over colour on the tabs too, however no matter what i try i can't get the currently active tab colour to change. So if somebody clicked on featured, i would like the featured tab to then stay a different colour, likewise if somebody clicked on New Products tab.
I have encountered another problem however which i'm struggling with. When the front page is first loaded, the tab box shows all the products from all the tabs until you click on one of the tabs. Do you know why this would be happening?
Thanks
Thanks! Just found the line i needed to change:
$(this).css('background', '#7eaa30');
Great module by the way :smile:
Ive still got that other problem however, when the page first loads it shows all the products from featured, specials and new. Ive tried taking the reference to it out of tpl_index_home.php but it just doesn't seem to want to stop doing it! Even without the "All" tab on there it still does it. Ive checked against the source code on one of your live demos and i have exactly the same as you in my file, do you think ive maybe got a problem with one of my other files?
Thanks
Thanks for the advice. It seems i had changed my html_header.php file at some point and it was affecting my stylesheets being loaded. Its all working now thanks :smile:
Just in case anybody else is having the same problem, i have found the cause to be the "Minify" module that is bundled with Tabbed Products Pro. If you turn off minify in admin under CSS/JS loader then it solves the problem.
I've figured out how to enable/disable the tabs in the centerbox on the main page.
I really would just prefer to have it show an "All Products" tab vs. New or Specials etc.
Is this possible to add a tab like that if it's not showing under configuration>Index listings?
Also where it stands now there is only a "New" tab but you have to click the tab in order for the products to show up. I'd prefer to have all of the products show up there when you load the page & not have to click on an additional link.
Thanks.
See this for changing which tab shows by default:
http://www.zen-cart.com/showthread.p...72#post1134272
You can add anything to the tabbed home page modules module that you like. It will require custgom php programming.
Thanks,
Anne
No otherwise this would have been suggested.. This code doesn't exist so it has to be created... You will need to have custom code created to add this to the centerbox tabs.. How many lines or what code is needed can't be determined unless someone actually takes the time to write this code.. If no one volunteers to create this then you will have to hire a developer to create it for you..
Not sure right place to post but only one I can find info directly related.
I am using 1.3.9 currently
I have my own template
heavily modified many of the files either for my own or for modules added.
Questions is concerning the tpl_index_default.php file(s). When I have previously tried the install following the instructions, the tabbed module semi loads, but un-useable and other areas of the site go bad...I have traced it down to the file above being the only one that would be overwritten. I am getting much better at ZenCart modification but still really stupid with this type of issue. It appears to be overwriting the file from the Module install.
Should I just merge the two files together? and if so...is there a particular area that I should try to merge the new code in to? Any help would be absolutely fantastic, as I really need this site functioning properly. I am going to be using the Abbington_mega template in the future which has this already, but I am no where near being ready to use it yet.
www.wreckerequip.com/2011_Store
Thanks Again in Advance.
When first visiting the home page why are no products showing until you click on one of of the center tabs then it loads something instead of having at least one of the 3 tabs always showing some products when first visiting the page?
http://visionaryscience.net/
Thanks.
I see a featured product within the tabs when I visit the homepage.
Hello!
Like some of others here I'm also having similar problem of not loading products unless I click any tab.
I also tried changing default display block in stylesheet_module_tabs.css still no help.
Can anybody help.
~Time
v1.5.1
You can change which tab shows by default by following these instructions:
http://www.zen-cart.com/showthread.p...72#post1134272
Thanks,
Anne
Hi,
Thank you for your time, but if you see my message I already tried changing default tab, one a time to 3 separate tabs but still same issue.
~Time
Here is a link to my site, at least one of them. I was able to get the zc v1.3.9h site to work properly with tabbed and it shows the products as it should. However the site that I am building to replace the one above zc v1.5.x doesn't show anything but the tabs no matter what I change in the above mentioned file(s).
www.wreckerequip.com/wreckersource
Help would be greatly appreciated.
Thanks
G'day
I've installed this without issue (no edits/overwrites) and have all the admin config settings enabled but I don't get any tabs? None, nada. Only 'new products' are displayed too but given the add-on's default admin settings I would have expected to see Featured, Specials and Upcoming listed beneath as well, given that no tabs are displayed to group them in a single box. :-(
I've got loads of add-ons installed but can't think of any that conflict or modify the main page center boxes.
Any pointers where to look?
The only thing I can think of is a jscript issue... CSS Mega Menu, Image Handler 4 and Zen Light Box 1.6.4 installed. Zen v1.5.1, site in development.
Cheers
GAM
Hi Anne
Thanks for replying.
I didn't need to edit index_home.css because I didn't have one before, so just uploaded your version. I have doubled checked and it is according to instructions in step 1.
I'm not sure about the following though:
As I don't know, I tried both with this file present and with it renamed to exclude it.Quote:
If you already have the jQuery library installed in your zen cart, or being called remotely in another file, don't upload the includes/templates/YOUR_TEMPLATE/jscript/jscript_jquery.min.php file.
The site is currently 'down for maintenance', but I will open it up for a while for you to check.
Appreciate your assistance Anne. Thanks.
Whoops, forgot this...
http://www.gammods.com.au/store3/
Yes, template override directories changed and files present in the correct locations.
Not sure about the load times you experienced, seems a little slow to me at the moment but not too bad (3-4 secs)... better than many I've visited.
Hi Anne
Something may have changed at the time you looked but all the files should be there. I'm working on the site at the moment and have checked that all the applicable files are in the correct places. Hopefully you can have another look and let me know what you find.
Using IE10 debugging, I can see the html for the various sections (new, featured, specials and upcoming) but only Featured is displayed before Upcoming. :-|
I don't whether there is a conflict with the following, so I have renamed the existing file for the time being:
jquery-1.4.4.min.js (currently renamed jquery-1.4.4.min._js)
jscript_jquery.min.php
If you do look and still don't find what you're looking for, please give me some examples for my own testing purposes.
Cheers
GAM
I've now seen an example of what I'm looking for and for the life of me I don't know why I'm not seeing the same things. I expect some conflict or other override somewhere or a dependency that doesn't exist as I've now renamed and then copied over the template files in my template_default folder and applicable template override folder. :frusty:
There must be something missing or something existing that shouldn't. Ugh.
Cheers
GAM
Hi
Thanks for looking. First, to be clear, I have seen an example on another site of what I should be seeing, but not on my site. The correct code and file is present on my server here: /includes/templates/GAM2/templates/tpl_index_default.php
Extract copied from downloaded file:
<script type="text/javascript">
$(document).ready(function() {
$('a.moduleBox').click(function() { // show selected module(s)
// variables
var popID = $(this).attr('rel');
var popNAV = $(this).attr('class');
// hide all wrappers and display the one selected
$('.centerBoxWrapper').hide();
// check if all or single selection
if (popID != 'viewAll') {
$('#' + popID).fadeIn();
} else {
$('.centerBoxWrapper').fadeIn();
}
});
});
</script>
My site is ignoring this template somehow. I must have something hardcoded or overriding the call to this template somewhere else.
Any tips on debugging this scenario?
Cheers
GAM
Looking through my add-ons the only one that I can identify that comes close to being related is Flexible Product Listing and one of its files; tpl_index_product_list, which does have code for Featured, Special and New Products centre boxes.
Edit; this appears to only affect the sub-category index pages and evidenced somewhat by the different display between my home page and main sub-category pages.
Hi Anne (and maybe others)
Getting somewhere now... Searching for examples of this mod in use I had not noticed any sites with Categories displayed on the main page. Although the heading formatting is crap at the moment, I have Tabbed Home Page functioning by disabling 'Categories - Always Show on Main Page' i.e.:
Admin | Configuration | Layout Settings...
Categories - Always Show on Main Page = 0 (false)
I hadn't noticed any reference to this scenario being incompatible and still not certain whether this is a result of another conflict, so hopefully you can investigate and advise further.
I want my Categories displayed in conjunction with Tabbed Home Pages, as my customers are accustomed to navigating the store this way and it is appropriate for the nature of my store and product.
Cheers
GAM
The code for the Tabbed home page module is not included in the plugin for
/includes/templates/YOUR_TEMPLATE/templates/tpl_index_categories.php
therefore will not work if admin configuration
Categories - Always Show on Main Page = 1 (true)
The code for the center box modules are very different (why, IDK) when categories are enabled for main page.
With some alterations it can work though.
Anne,
Any suggestions on removing the tabs if no products exist for that tab?
Thanks all. At least I know why the module wasn't working.
I'll look into the code changes and see what I can do.
Cheers
GAM
I have this complete to work on all center boxes
It is set to open all by default, I have custom coded it to include a carousel though.
I will try to clean the code to include just the changes you need and post it here.
You can see that it is operational here:
www[.]zcadditions[.]com/responsive_templates/
LOL, I have just successfully modified tpl_index_categories.php to work and was about to paste the code here... and I see your post. ;)
Bah, pasting for reference anyway:
To fix my headings I needed to include 'clear:left' in addition to adding my custom css to:PHP Code:
<?php
/**
* Page Template
*
* Loaded by main_page=index<br />
* Displays category/sub-category listing<br />
* Uses tpl_index_category_row.php to render individual items
*
* @package templateSystem
* @copyright Copyright 2003-2006 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_index_categories.php 4678 2006-10-05 21:02:50Z ajeh Modified by GAM to include Tabbed Home Page module (Picaflor Azul) with Categories 2013-08-09 $$
*/
?>
<script type="text/javascript">
$(document).ready(function() {
$('a.moduleBox').click(function() { // show selected module(s)
// variables
var popID = $(this).attr('rel');
var popNAV = $(this).attr('class');
// hide all wrappers and display the one selected
$('.centerBoxWrapper').hide();
// check if all or single selection
if (popID != 'viewAll') {
$('#' + popID).fadeIn();
} else {
$('.centerBoxWrapper').fadeIn();
}
});
});
</script>
<div class="centerColumn" id="indexCategories">
<?php if ($show_welcome == true) { ?>
<h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE; ?></h1>
<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>
<!-- deprecated - to use uncomment this section
<?php if (TEXT_MAIN) { ?>
<div id="" class="content"><?php echo TEXT_MAIN; ?></div>
<?php } ?>-->
<!-- deprecated - to use uncomment this section
<?php if (TEXT_INFORMATION) { ?>
<div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
<?php } ?>-->
<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
<div id="indexCategoriesMainContent" class="content"><?php
/**
* require the html_define for the index/categories page
*/
include($define_page);
?></div>
<?php } ?>
<?php } else { ?>
<h1 id="indexCategoriesHeading"><?php echo $breadcrumb->last(); ?></h1>
<?php } ?>
<?php
if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {
// categories_image
if ($categories_image = zen_get_categories_image($current_category_id)) {
?>
<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>
<?php
}
} // categories_image
?>
<?php
// categories_description
if ($current_categories_description != '') {
?>
<div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description; ?></div>
<?php } // categories_description ?>
<!-- BOF: Display grid of available sub-categories, if any -->
<?php
if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
// do nothing
} else {
// display subcategories
/**
* require the code to display the sub-categories-grid, if any exist
*/
require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php');
}
?>
<!-- EOF: Display grid of available sub-categories -->
</div>
<div id="moduleMenu-wrapper">
<?php
// bof module navigation
$show_display_nav = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
if ($this_is_home_page) {
echo '';
}
echo '<div id="moduleMenu">';
while (!$show_display_nav->EOF) {
switch ($show_display_nav->fields['configuration_key']) {
case 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS':
echo '<span class="navOne moduleSpan"><a href="javascript:void(0)" rel="featuredProducts" class="navOne moduleBox">' . MODULE_TABS_FEATURED . '</a></span>';
break;
case 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS':
echo '<span class="navThree moduleSpan"><a href="javascript:void(0)" rel="specialsDefault" class="navThree moduleBox">' . MODULE_TABS_SPECIALS . '</a></span>';
break;
case 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS':
echo '<span class="navTwo moduleSpan"><a href="javascript:void(0)" rel="whatsNew" class="navTwo moduleBox">' . MODULE_TABS_NEW . '</a></span>';
break;
}
$show_display_nav->MoveNext();
}
echo '<span class="navFour moduleSpan"><a href="javascript:void(0)" rel="viewAll" class="navFour moduleBox">' . MODULE_TABS_ALL . '</a></span>';
echo '<br class="clearBoth" />';
echo '</div>';
// eof module navigation
?>
<?php
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_CATEGORY);
while (!$show_display_category->EOF) {
// // echo 'I found ' . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS);
?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_FEATURED_PRODUCTS') { ?>
<?php
/**
* display the Featured Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_SPECIALS_PRODUCTS') { ?>
<?php
/**
* display the Special Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_NEW_PRODUCTS') { ?>
<?php
/**
* display the New Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_UPCOMING') { ?>
<?php
/**
* display the Upcoming Products Center Box
*/
?>
<?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
<?php
$show_display_category->MoveNext();
} // !EOF
?>
#indexHomeBody .centerBoxHeading {} in stylesheet_module_tabs.css
and include same css for .centerBoxHeading {} in stylesheet_module_tabs.css too
GAM
Thanks for your efforts rbarbour. Appreciated. :-) The carousel is not a bad idea too. Hmm. I wouldn't mind being able to specify number of rows to display with prev/next/page# functionality. Hint. lol.
While coding the changes to tpl_index_categories.php, I was thinking that including 'categories' into the same Tabbed Home Page module as another tab. Might be an even better/nicer option. ....along with above suggestions.
Cheers
GAM
Urmm, this was probably the wrong way to go about fixing my float left issues with centerboxheading and 'upcoming products' when no new, featured or specials.
Have modified the code as follows:
Find:
// eof module navigation
Replace with:
echo '<br class="clearBoth" />';
// eof module navigation
As I have two files now (tpl_index_categories.php and tpl_index_default.php, I replaced in both.
Cheers
Very doable, look at the bestseller plugin, using the product_listing display would achieve that and be very easy to do.
Also doable.
I do like the tabbed feature and Anne did a great job simplifying it, however I am looking for other alternatives do to the hassle it would be to custom code to turn off tabs with (no products). Very frustrating from a customer point of view. MO as well.
Thank you. Didn't notice those.:ohmy:
I believe I've captured them all...
Modified tpl_index_categories.php (zen 1.5.1) for use with Tabbed Home Page v2
(Required when displaying Categories on Main page):
CheersPHP Code:
<?php
/**
* Page Template
*
* Loaded by main_page=index<br />
* Displays category/sub-category listing<br />
* Uses tpl_index_category_row.php to render individual items
*
* @package templateSystem
* @copyright Copyright 2003-2006 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_index_categories.php 4678 2006-10-05 21:02:50Z ajeh Modified by GAM to include Tabbed Home Page module (Picaflor Azul) with Categories 2013-08-09 $$
*/
?>
<script type="text/javascript">
$(document).ready(function() {
$('a.moduleBox').click(function() { // show selected module(s)
// variables
var popID = $(this).attr('rel');
var popNAV = $(this).attr('class');
// hide all wrappers and display the one selected
$('.centerBoxWrapper').hide();
// check if all or single selection
if (popID != 'viewAll') {
$('#' + popID).fadeIn();
} else {
$('.centerBoxWrapper').fadeIn();
}
});
});
</script>
<div class="centerColumn" id="indexCategories">
<?php if ($show_welcome == true) { ?>
<h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE; ?></h1>
<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>
<!-- deprecated - to use uncomment this section
<?php if (TEXT_MAIN) { ?>
<div id="" class="content"><?php echo TEXT_MAIN; ?></div>
<?php } ?>-->
<!-- deprecated - to use uncomment this section
<?php if (TEXT_INFORMATION) { ?>
<div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
<?php } ?>-->
<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
<div id="indexCategoriesMainContent" class="content"><?php
/**
* require the html_define for the index/categories page
*/
include($define_page);
?></div>
<?php } ?>
<?php } else { ?>
<h1 id="indexCategoriesHeading"><?php echo $breadcrumb->last(); ?></h1>
<?php } ?>
<?php
if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {
// categories_image
if ($categories_image = zen_get_categories_image($current_category_id)) {
?>
<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>
<?php
}
} // categories_image
?>
<?php
// categories_description
if ($current_categories_description != '') {
?>
<div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description; ?></div>
<?php } // categories_description ?>
<!-- BOF: Display grid of available sub-categories, if any -->
<?php
if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
// do nothing
} else {
// display subcategories
/**
* require the code to display the sub-categories-grid, if any exist
*/
require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php');
}
?>
<!-- EOF: Display grid of available sub-categories -->
</div>
<div id="moduleMenu-wrapper">
<?php
// bof module navigation
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_CATEGORY);
if ($this_is_home_page) {
echo '';
}
echo '<div id="moduleMenu">';
while (!$show_display_category->EOF) {
switch ($show_display_category->fields['configuration_key']) {
case 'SHOW_PRODUCT_INFO_CATEGORY_FEATURED_PRODUCTS':
echo '<span class="navOne moduleSpan"><a href="javascript:void(0)" rel="featuredProducts" class="navOne moduleBox">' . MODULE_TABS_FEATURED . '</a></span>';
break;
case 'SHOW_PRODUCT_INFO_CATEGORY_SPECIALS_PRODUCTS':
echo '<span class="navThree moduleSpan"><a href="javascript:void(0)" rel="specialsDefault" class="navThree moduleBox">' . MODULE_TABS_SPECIALS . '</a></span>';
break;
case 'SHOW_PRODUCT_INFO_CATEGORY_NEW_PRODUCTS':
echo '<span class="navTwo moduleSpan"><a href="javascript:void(0)" rel="whatsNew" class="navTwo moduleBox">' . MODULE_TABS_NEW . '</a></span>';
break;
}
$show_display_category->MoveNext();
}
echo '<span class="navFour moduleSpan"><a href="javascript:void(0)" rel="viewAll" class="navFour moduleBox">' . MODULE_TABS_ALL . '</a></span>';
echo '<br class="clearBoth" />';
echo '</div>';
echo '<br class="clearBoth" />';
// eof module navigation
?>
<?php
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_CATEGORY);
while (!$show_display_category->EOF) {
// // echo 'I found ' . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS);
?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_FEATURED_PRODUCTS') { ?>
<?php
/**
* display the Featured Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_SPECIALS_PRODUCTS') { ?>
<?php
/**
* display the Special Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_NEW_PRODUCTS') { ?>
<?php
/**
* display the New Products Center Box
*/
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_UPCOMING') { ?>
<?php
/**
* display the Upcoming Products Center Box
*/
?>
<?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
<?php
$show_display_category->MoveNext();
} // !EOF
?>
GAM
The code posted was for the index_categories.php file, which would only show category specific new, special and featured products.
Turning the tab off will prevent those category specific tabs from appearing even if new, special and featured products exist for that category. Correct?
Thanks Anne, along with the code posted for the sub-category page, I also have the code to include on shopping cart page if you would like me to post that as well.
I see no possible way to check without running additional sql query's to check for products available and is more code than I want to write at this time.
I will keep checking for updates, the "0" products feature for the tabs would be a great feature though.
Thank you so much for this great mod. I am having css problem that I need help with. The mod is installed at http://www.clevershoppers.com I uploaded the index_home.css but it's not applying to the home page. I am assuming that the css for the home page is suppose to over the value in stylesheet.css for .centerBoxWrapper but mine is not doing that and as a result I am getting an extra border lines (which is not pretty to the eyes). If I comment out .centerBoxWrapper from stylesheet.css then everything looks fine but of course it messes up the center boxes that needs it on other pages. I will greatly appreciate how to approach solving this problem.
Also, we have Zen Lightbox installed which loads jquery-1.4.4.min.js inside the jscript folder. This mod also loads another jquery from. Does this create a conflict. It should seem like it to me. No sure how to combine the two.Code:<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
We also have CJLoader installed our site which is currently turned of at the moment.
We are running Zen Cart 1.5.1
Thank you!
Thanks Anne! The problem is not solved. If you look on our home page, you will notice there's a line above the title for each tab (for example, right about "New Products For August" is a line). There's also a line at the bottom inside the wrapper. Basically, what's happening is the home page is taking the style from .centerBoxWrapper stylesheet.css which is not supposed to be the case. If you're able to provide direction that would be great. Thanks!
Hi
Discovered an issue with my 'index_categories' version. Not sure where to look...
On category pages I'm getting 'all' displayed by default instead of 'new' (as configured by #whatsNew {display:block;}). Display on main page is fine.
I didn't notice or recall checking this before when I thought all was good, however I have just installed CSS/JS Loader and Fast Easy Checkout today. :-| So don't know whether this could be the cause or whether it was a problem all along.
Cheers
Cheers
hello,
I am trying to use Editable Home Page Centerboxes plugin with Tabbed Home Page Modules which is used in Anne's Abbington Mega template which is my default template, the problem being that the categories tabs (new, featured, specials) disappear when I use that plugin. Question is I tried using the modified tpl_index_categories.php file referred to in here as modified by GAM and it made the whole page disappear. Is there something else in this module that needs changing that I have missed to enable categories to show when using Editable Home Page Centerboxes plugin? I assume that this modified tpl_index_categories.php was done for this purpose as a file of this name does not exist in the Abbington Mega template?
* NOTE* I am using v1.3.9h - not sure if this matters? (I noted the version on the modified file referenced v1.5.1)
cheers,
Mike
Oh, sorry, I only posted since the module's from Nov 2012, and kitten091182's post is from Feb 2013 that the info'd still be current.
I think I'm looking for the same solution, though: I'd like the background-color of the currently active tab to change. I've got a.moduleBox:hover working.
Any ideas or pointers?
Thanks,
- Rand
With a link to a site with this mod installed, it should be easy to identify the CSS to use, assuming there is an identifier tag for the active tab.
OK, work in progress on a dev site, I've turned off maintenance mode for a bit.
http://151.twomorrows.com
I should have known without even looking... Since the "active" tab is controlled by javascript, not PHP, there is no tag built in to show a stylesheet what style to apply. You are going to need some javascript to modify the currently active tab with a relevant class tag, which can then be styled in the stylesheet. Sorry, but I can't help you with the js.
I agree that the ability to highlight the tab that applies to the currently visible module would be important. It will not be clear in many cases without that.
Thanks, though, Glenn. I appreciate it.
- Rand
(Maintenance mode back on)
OK, I looked at version 1.1 of the module which led me to add these lines to the javascript in tpl_index_default.php:
// clear out menu styles and apply active
$('a.moduleBox').css('background', '#eeeeee');
$('a.moduleBox').css('font-weight', 'normal');
$(this).css('background', '#bbbbbb');
$(this).css('font-weight', 'bold');
Also did some styling in stylesheet_module_tabs.css so the default tab would have background #bbb and font-weight bold initially.
Appears to work as I'd like it! Any caveats?
Thanks,
- Rand
Hi,
We have installed Top brands/manufacturers module which shows top brands/manufacturers shows on homepage in separate box than new/featured/special box which have been successful on standard zencart but on with this module Top brands/manufacturers box does not appear on home page. does any one know how to fix. I tried tweaking css which made Top brands/manufacturers but it also show all three new, specials, features products instead of clicking and see ones of them at a time.
Any idea how to fix this?
If tweaking CSS made the Top Brands box show on the homepage, we need to see your site live to advise on how to make all the boxes behave. If javascript is affecting this, Anne will probably have to be the one who answers it.