Forums / Addon Sideboxes / What's New Sidebox not working

What's New Sidebox not working

Locked

Views: 1,395

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
2 Jul 2010, 9:41 PM
#1
bertles86 avatar

bertles86

New Zenner

Join Date:
Jan 2010
Location:
United Kingdom
Posts:
46
Plugin Contributions:
0

What's New Sidebox not working

Hi folks,

Site: Link

I am using the template Pure Red Free, and tried the scrolling What's New sidebox, after some testing and critique from other helpful users here I decided against it. I switched back to the standard default WN Sidebox, but now it will not show up on the site! It's status is switched on the admin.

Any tips on resetting that particular sidebox to default?

Thanks! :smile:

<a href="http://www.cranbrookconserves.co.uk">Buy Jam & Chutney Online</a>

2 Jul 2010, 10:39 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: What's New Sidebox not working

I have never used the scrolling whats new sidebox, but it could be that it overwrote core files.

Core whats new sidebox generally comprises the following files:

zen-cart-v1.3.9d-full-fileset-06032010includes\modules\sideboxes\whats_new.php

zen-cart-v1.3.9d-full-fileset-06032010includes\templates\template_default\sideboxes\tpl_whats_new.php

Custom sideboxes may have an additional file in the respective language extra_definitions folder.

Go look in your server (in the above paths) and see if those files are there.

They may have been corrupted, so just over-write them with "fresh" files from your local copy of the software.

2 RULES:-

  1. Backup any file before you overwrite it
  2. Overwrite files ONLY with new files of the same version

20 years a Zencart User

3 Jul 2010, 7:30 AM
#3
bertles86 avatar

bertles86

New Zenner

Join Date:
Jan 2010
Location:
United Kingdom
Posts:
46
Plugin Contributions:
0

Re: What's New Sidebox not working

Cheers schoolboy, I'll try that later on today!

<a href="http://www.cranbrookconserves.co.uk">Buy Jam & Chutney Online</a>

3 Jul 2010, 8:53 AM
#4
bertles86 avatar

bertles86

New Zenner

Join Date:
Jan 2010
Location:
United Kingdom
Posts:
46
Plugin Contributions:
0

Re: What's New Sidebox not working

Hmmm well I've backed up what I had, and replaced with the default from the zip, now I have:

tpl_whats_new.php - in /includes/templates/pure_red_free/sideboxes

<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @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: tpl_whats_new.php 6128 2007-04-08 04:53:32Z birdbrain $
 */
  $content = "";
  $whats_new_box_counter = 0;
  while (!$random_whats_new_sidebox_product->EOF) {
    $whats_new_box_counter++;
    $whats_new_price = zen_get_products_display_price($random_whats_new_sidebox_product->fields['products_id']);
    $content .= '<div class="sideBoxContent centeredContent">';
    $content .= '<a href="' . zen_href_link(zen_get_info_page($random_whats_new_sidebox_product->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($random_whats_new_sidebox_product->fields['master_categories_id']) . '&products_id=' . $random_whats_new_sidebox_product->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_whats_new_sidebox_product->fields['products_image'], $random_whats_new_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
    $content .= '<br />' . $random_whats_new_sidebox_product->fields['products_name'] . '</a>';
    $content .= '<div>' . $whats_new_price . '</div>';
    $content .= '</div>';
    $random_whats_new_sidebox_product->MoveNextRandom();
  }
?>

and whats_new.php - in /public_html/includes/modules/sideboxes/pure_red_free

<?php
/**
 * whats_new sidebox - displays a random "new" product
 *
 * @package templateSystem
 * @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: whats_new.php 6475 2007-06-08 21:10:33Z ajeh $
 */

// display limits
// $display_limit = zen_get_products_new_timelimit();
  $display_limit = zen_get_new_date_range();
  $random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, 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 " . $display_limit;

//  $random_whats_new_sidebox_product = zen_random_select($random_whats_new_sidebox_product_query);
  $random_whats_new_sidebox_product = $db->ExecuteRandomMulti($random_whats_new_sidebox_product_query, MAX_RANDOM_SELECT_NEW);

  if ($random_whats_new_sidebox_product->RecordCount() > 0 ) {
    require($template->get_template_dir('tpl_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_whats_new.php');
    $title =  BOX_HEADING_WHATS_NEW;
    $title_link = FILENAME_PRODUCTS_NEW;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
  }
?>

And in the back office, sideboxes/pure_red_free/whats_new.php has Left/Right column status set to On.

Still not showing up, any ideas?

<a href="http://www.cranbrookconserves.co.uk">Buy Jam & Chutney Online</a>