Forums / Templates, Stylesheets, Page Layout / Buy Now/More Info Links New Products

Buy Now/More Info Links New Products

Locked

Started by gee38l on 9 Jan 2009, 7:06 AM · Views: 910

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
9 Jan 2009, 7:06 AM
#1
gee38l avatar

gee38l

Zen Follower

Join Date:
Jul 2008
Posts:
362
Plugin Contributions:
0

Buy Now/More Info Links New Products

Hi Zenner,

THis has been eating at me for the past month previous to installing column grid layout i use to have a buy now/more info button on my new products for (month) on the homepage and now thay are no longer there... I have asked several times in previous threads how to fix this but i have not got anywhere... Can someone pllease give me some assistance :wacko:

Link: https://www.truwater.com.au

Thanks in advance

9 Jan 2009, 3:20 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Buy Now/More Info Links New Products

You would have to see what you changed in the new_products.php module that the buttons added are now not showing ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Jan 2009, 11:51 PM
#3
gee38l avatar

gee38l

Zen Follower

Join Date:
Jul 2008
Posts:
362
Plugin Contributions:
0

Re: Buy Now/More Info Links New Products

Ok i had a look in my new_products module and compared it with the original but i still cant find what im looking for below is my current code..... Can someone please assist?

<?php
/**
 * new_products.php module
 *
 * @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: new_products.php 6424 2007-05-31 05:59:21Z ajeh $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}

//get function index_listing
include_once(DIR_WS_FUNCTIONS.'extra_functions/index_listing.php');

// initialize vars
$categories_products_id_list = '';
$list_of_products = '';
$new_products_query = '';

$display_limit = zen_get_new_date_range();

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') ) {
  $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and   p.products_status = 1 " . $display_limit;
} 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

    $new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
                                  p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and p.products_status = 1
                           and p.products_id in (" . $list_of_products . ")";  
  }
}

if (isset($new_products_category_id) && $new_products_category_id != 0) {
  $category_title = zen_get_categories_name((int)$new_products_category_id);
  $title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '' ) . '</h2>';
} else {
  $title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</h2>';
}
	    
if(INDEX_NEW_USE_PRODUCT_LISTING == '2')
	extract(index_listing($new_products_query, MAX_DISPLAY_NEW_PRODUCTS, SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS, IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT, $new_products_category_id, TABLE_HEADING_NEW_PRODUCTS,'zc_show_new_products'));
elseif(INDEX_NEW_USE_PRODUCT_LISTING == '3'){
	$listing_sql = $new_products_query;
	$show_submit = zen_run_normal();

	$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
	'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
	'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
	'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
	'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
	'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
	'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);
	
	/*                         ,
	'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
	*/
	asort($define_list);
	reset($define_list);
	$column_list = array();
	foreach ($define_list as $key => $value)
	{
	if ($value > 0) $column_list[] = $key;
	}
	$productListingId = 'newProducts';
	$is_index_listing = true;
	require($template->get_template_dir('tpl_modules_product_listing.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_product_listing.php');
	$is_index_listing = false;
}
elseif(INDEX_NEW_USE_PRODUCT_LISTING == '1'){
	if ($new_products_query != '') $new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS);
	
	$row = 0;
	$col = 0;
	$list_box_contents = array();
	
	$num_products_count = ($new_products_query == '') ? 0 : $new_products->RecordCount();
	
	// show only when 1 or more
	if ($num_products_count > 0) {
	  if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS == 0 ) {
	    $col_width = floor(100/$num_products_count) - 1.5;
	  } else {
	    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS) - 1.5;
	  }
	
	  while (!$new_products->EOF) {
	    $products_price = zen_get_products_display_price($new_products->fields['products_id']);
	    if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);
	
	    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
	    'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);
	
	    $col ++;
	    if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1)) {
	      $col = 0;
	      $row ++;
	    }
	    $new_products->MoveNextRandom();
	  }
	
	  if ($new_products->RecordCount() > 0) {
	    $zc_show_new_products = true;
	  }
	}
}
13 Jan 2009, 3:21 PM
#4
gee38l avatar

gee38l

Zen Follower

Join Date:
Jul 2008
Posts:
362
Plugin Contributions:
0

Re: Buy Now/More Info Links New Products

Anyone?