If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / What's on Sale centerbox

What's on Sale centerbox

Started by swguy on 1 Nov 2010, 11:22 AM · Views: 10,794

Results 1 to 20 of 35
1 Nov 2010, 11:22 AM
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

What's on Sale centerbox

What's on Sale provides a centerbox for displaying items that are currently on sale. Both individual items and sale categories may be displayed.

What's on Sale is available here:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1797

That Software Guy

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

5 Nov 2010, 3:01 PM
#2
jphahn avatar

jphahn

New Zenner

Join Date:
Dec 2008
Posts:
2
Plugin Contributions:
0

Re: What's on Sale centerbox

Thanks for the great add on.

I installed it without problem, and it is working well except for one weird issue. I am not sure if it is supposed to work this way, or if it is an issue with my site, but if I only have one sale active, then nothing shows up in the section. If I have two or more then it seems to work fine. I haven't had any luck tracking down why this would be happening, and have tried activating and deactivating a variety of sales with different criteria, but still have the issue of needing two sales to get it to show up.

Site: http://www.allcreaturesart.com
Zen Version: v1.3.9f

Thanks,
Jason

5 Nov 2010, 3:06 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: What's on Sale centerbox

I'll try it and see what I find.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

6 Nov 2010, 6:20 AM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: What's on Sale centerbox

Sure enough, you're right. In includes/templates/custom/common/tpl_sale_columnar_display.php on line 34, please replace

$rand_big_cat_list = array_rand($big_cat_list, $sale_required);

with

if ($sale_required > 1) {
$rand_big_cat_list = array_rand($big_cat_list, $sale_required);
} else {
$rand_big_cat_list = $big_cat_list;
}

I'll put this fix in the next release. Thanks for reporting the issue.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

7 Dec 2010, 12:56 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: What's on Sale centerbox

The fix above is now bundled into the latest version (1.0.1) of this mod.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 Jul 2011, 12:19 AM
#6
jagall avatar

jagall

Zen Follower

Join Date:
Mar 2011
Location:
Ireland
Posts:
286
Plugin Contributions:
0

Re: What's on Sale centerbox

hi swguy,
this addon looks great just installed it but cannot get it to display any sale items, there is not centerbox appearing on main page at all so nto sure what I've done wrong here any ideas??

15 Jul 2011, 8:59 AM
#7
jagall avatar

jagall

Zen Follower

Join Date:
Mar 2011
Location:
Ireland
Posts:
286
Plugin Contributions:
0

Re: What's on Sale centerbox

jagall:

hi swguy,
this addon looks great just installed it but cannot get it to display any sale items, there is not centerbox appearing on main page at all so nto sure what I've done wrong here any ideas??

Solved: Sorry got this working fine, I was looking for the display in the wrong place, duh! thank you very much

28 Jul 2011, 1:19 PM
#8
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: What's on Sale centerbox

Hi,

Awesome mod! One question though, in Admin I have my small images set to 57 * 40 px, as I have two side boxes with small images. However this means that my product pics for this mod is also classed as small images. When I change the size for the small images to the same size as my other images (225 * 180 px), the images for this mod is the right size but all the small images in the side boxes are large as well! How can I get the product images from this mod to be larger without effecting the other small images on my site? Address is www.watsonpublishers.com.:cry:

28 Jul 2011, 1:34 PM
#9
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: What's on Sale centerbox

Change these files

./includes/modules/YOUR_TEMPLATE/sales_index.php
./includes/templates/YOUR_TEMPLATE/common/tpl_sale_columnar_display.php

and change SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT to values that make sense for you.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

28 Jul 2011, 2:17 PM
#10
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: What's on Sale centerbox

Hi,

Thank you for the quick reply. I changed this to MEDIUM_IMAGE_WIDTH and MEDIUM_IMAGE_HEIGHT, this fixed the problem. Awesome!:clap:

5 Sep 2011, 3:28 PM
#11
bigkev890 avatar

bigkev890

New Zenner

Join Date:
Feb 2011
Posts:
5
Plugin Contributions:
0

Re: What's on Sale centerbox

Hi, is there a way to get rid of the category images? My site does not use category images and I dont like the generic "no image" image that shows up in the sales list. I tried to comment out the line that calls for the category image however it just stops the script from working all together. Thank you for an awesome mod!

5 Sep 2011, 5:17 PM
#12
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: What's on Sale centerbox

Start by commenting out the call to zen_image in ./includes/templates/custom/common/tpl_sale_columnar_display.php. Once you get that working, you'll also want to delete the <td> and </td> that go around it.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

6 Sep 2011, 11:08 PM
#13
yan111 avatar

yan111

New Zenner

Join Date:
Feb 2011
Posts:
8
Plugin Contributions:
0

Re: What's on Sale centerbox

Thanks for this addon. I still cannot make it work on product listing, I suppose I do something wrong.

Anyway, what I wanted to ask is:
is there a way to show a sale's name (the one that I'm choosing when setting up sale in admin panel)?

7 Sep 2011, 12:27 AM
#14
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: What's on Sale centerbox

You'd have to write code; nothing is built in.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 Oct 2012, 12:24 PM
#15
annav avatar

annav

Zen Follower

Join Date:
Jul 2008
Location:
Sydney, Australia
Posts:
171
Plugin Contributions:
0

Re: What's on Sale centerbox

Hi,

Does this work with the ZC version 1.5.0.

Thanks.

15 Oct 2012, 12:43 PM
#16
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: What's on Sale centerbox

Yes it does.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 Oct 2012, 9:13 PM
#17
annav avatar

annav

Zen Follower

Join Date:
Jul 2008
Location:
Sydney, Australia
Posts:
171
Plugin Contributions:
0

Re: What's on Sale centerbox

Cheers, thanks.

Anna

17 Apr 2013, 6:26 AM
#18
fairylandembro avatar

fairylandembro

New Zenner

Join Date:
Apr 2013
Posts:
10
Plugin Contributions:
0

Re: What's on Sale centerbox

Thank you for this mod. But I get crazy to turn on it on the Home page. It's appears on category pages, but on Home Page - not. My Zen Cart is 1.5.0 I triple checked instalation and the files merging. Any advices?

17 Apr 2013, 7:17 AM
#19
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: What's on Sale centerbox

Just tried it and it worked for me. Make sure in the file ./includes/modules/custom/sales_index.php that $show_sales is getting set to true. Double check the 2 configuration settings MAX_DISPLAY_SALE_PRODUCTS_INDEX and MAX_DISPLAY_SALE_CATEGORIES_INDEX.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

18 Apr 2013, 5:28 AM
#20
fairylandembro avatar

fairylandembro

New Zenner

Join Date:
Apr 2013
Posts:
10
Plugin Contributions:
0

Re: What's on Sale centerbox

No, still not working. Can you take a look at my pl_index_default? Thanks a lot! ```php

<?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_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">' . HEADER_TITLE_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 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) {
?>

<!-- bof What's on Sale --> <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SALES_PRODUCTS') { ?> <?php /** * display the Sale Products Center Box */ require($template->get_template_dir('tpl_modules_sale_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_sale_products.php');?> <?php } ?> <!-- eof What's on Sale --> <?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_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_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> ```