Jump to content
Sign in to follow this  
djmonkey1

Product Listing in Columns v2.0

Recommended Posts

Anyone here install this and had their picture show up TWICE ?? When I use 2 or more columns I get 2 of the same picture with every item! :blink:

 

Anyone know why? :'(

 

 

I'm still looking for help too! :(

Share this post


Link to post
Share on other sites

Awfully sorry but I've decided that this contribution doesn't suit my shop and I'd like to uninstall it. The modified files are fine but how do I remove the SQL statement and restore the product listing to how it was?


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

the headers already sent stuff is often a whitespace issue, check the ends of any modified files for blank lines.

 

manufacturer's name is an option in product listing, set it to 0 and it should disappear.

 

twice... hmm... check that you haven't duplicated any code?? Or entered the SQL twice??

 

removing the sql... The SQL adds 3 lines to the configuration table, go find them in phpmyadmin or whatever database editor you use and delete them!

 

I didn't run into the stylesheet thing but then I think my odd and even rows are set to be the same background colour anyway.

 

Working on an on/off thingy, in theory it shouldn't be that tricky, add a separate 'FILENAME_PRODLISTCOL' define and a configuration entry to the database and then an 'if' statement to check for the configuration setting...

 

My specials.php appears to show products in columns anyway.

Share this post


Link to post
Share on other sites
removing the sql... The SQL adds 3 lines to the configuration table, go find them in phpmyadmin or whatever database editor you use and delete them!

 

So it didn't replace anything?


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples column', 'PRODUCT_LIST_MULTIPLE', '0', 'Do you want to display the Multiple Quantity with Attributes column?', '8', '11', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples with Buy Now column', 'PRODUCT_LIST_BUY_NOW_MULTIPLE', '0', 'Do you want to display the Multiple Quantity Buy Now with Attributes column?', '8', '12', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Number of column per row', 'PRODUCT_LIST_NUMCOL', '3', 'How many columns per row to display?', '8', '13', now());

 

Nope these all add new rows. :)

Share this post


Link to post
Share on other sites
manufacturer's name is an option in product listing, set it to 0 and it should disappear.

 

I didn't run into the stylesheet thing but then I think my odd and even rows are set to be the same background colour anyway.

 

Thanks for the tip on maufacturer.

 

My colors on odd/even rows are set equal as well and still I get the first row to display only white background and only from the second row onwards its displays the proper color as set in the stylesheet.

 

Any Ideas?

 

many thanks

BB

Share this post


Link to post
Share on other sites

I just want to express my thanks to Randy Pertiet and the rest of the coders who helped develop this mod.

 

Thanks a bunch. You guys made me a very happy man. :D

Share this post


Link to post
Share on other sites
I've driven myself crazy trying to sort things like this. Luckily with MySQL the ORDER BY clause accepts multiple entries. Have you tried "order by m.manufacturers_name, pd.products_name"?

 

Wow, I just now saw your post. Well it worked!! Thanks so much for the tip.

Share this post


Link to post
Share on other sites

Hello..

 

i have problem ...

 

in the admin area .. the fields...

 

in product listing sub category..

 

Display Add Multiples column 0

Display Add Multiples with Buy Now column

Number of column per row

 

are not showing...

 

can you please let me know hat i did wrong.. i

 

first installl

individual_boxes_v1.2

then..product_listing_columns_with_iIndividual_boxes_1.2

 

 

waiting for response

 

thanks in advance///

Share this post


Link to post
Share on other sites

hello,

 

i have installed the complete package 16-12-06.

looks great i like this so much.

 

also i use this contrib:

http://www.oscommerce.com/community/contributions,1743

 

if i include your describtion function i do not get product description some pages. i.e. all-products-page

 

so i modified the file for it, and the description is back ao every page.

 

thanks for this great contribution.

 

bg

Michael

Edited by mfg

Share this post


Link to post
Share on other sites
i have installed the complete package 16-12-06.

looks great i like this so much.

 

also i use this contrib:

http://www.oscommerce.com/community/contributions,1743

 

if i include your describtion function i do not get product description some pages. i.e. all-products-page

 

so i modified the file for it, and the description is back ao every page.

 

thanks for this great contribution.

 

 

wrong thread sorry.

Share this post


Link to post
Share on other sites

Hi. I have installed product listing and am pretty happy with the result. However, i want to tighten the index pages where the product listing shows.

I dont want the space to be equal from border to images to border, so i want it more to look lite this:

http://www.neimanmarcus.com/store/catalog/...0731&cmCat=

 

I mean i want to shrink the space between images. Now there is an equal amount of space between images and borders.

 

 

Can anyone point me to the right direction?

Share this post


Link to post
Share on other sites

Hello :D First I would like to say a big thank you for this mod. It has helped me sooooo much! I am not a newbie but not quite a toddler either LOL. I use the contribution Sold Out But Displayed which is working fine on my product_info.php file but I cannot seem to get it to work on my product_listing_col.php.

 

I have read through this thread and the thread for the other contribution many times and anything I find is not working...I have googled and I am not giving up it should not be that hard. So anyway here is my product_listing_col.php file which has my feeble coding attempt to get it working.

 

If anyone has these contribs working together and would like to throw me a bone I would appreciate it.

<?php
/*
original: $Id: product_listing.php,v 1.44 2003/06/09 22:49:43 hpdl Exp $

corrected for proper HTML 2005/07/10 JanZ
merged and updated by djmonkey1 with indispensable assistance by JanZ 2005/10/05
v2.1 developed by djmonkey1 with indispensable assistance by the Mighty JanZ  2005/10/09
reverted to  a non-SPPC state by djmonkey1
v 2.2 modified by adilovetini with small feature 2006/04/18

osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License

*/

//version 2.2 modification
//if number of column per row is 1, include the original product_listing.php
if (PRODUCT_LIST_NUMCOL == 1) {
include(dirname(__FILE__).'/product_listing.php');

} else{
//display the version 2.2 product_listing_col.php code

//bof product listing with attributes
$list_box_contents = array();
$list_box_contents[] = array('params' => 'class="productListing-heading"');
$cur_row = sizeof($list_box_contents) - 1;

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
	case 'PRODUCT_LIST_MULTIPLE':
		$add_multiple = "1";
		echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_multiple', 'NONSSL') . '">';
		break;
}
}
//eof product listing with attributes
?>
<?php
$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>  <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
 <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
</tr>
</table>
<?php
}

$list_box_contents = array();

if ($listing_split->number_of_rows > 0) {

//BOF version 2.2 modification
if (PRODUCT_LIST_NUMCOL <= 0) {
	$colnum = 3;
	$tdsize = floor(100/3);
} else {
	$colnum = PRODUCT_LIST_NUMCOL;
	$tdsize = floor(100/PRODUCT_LIST_NUMCOL);
}
//EOF version 2.2 modification

$row = 0;
//$rows = 0;
$column = 0;
$listing_query = tep_db_query($listing_split->sql_query);
while ($listing = tep_db_fetch_array($listing_query)) {

// WARNING the code assumes there are three products per row. To use a different number change the number
// at line 195: if ($column >= 3) and the code to fill up the table row below that accordingly

// $counter = $row;
// $class_for_buy_now = 'class="productListing-odd"';
// $list_box_contents[$row] = array('params' => 'class="productListing-odd"');

	$rows++;

	if (($rows/2) == floor($rows/2) && ($row > $counter)) {
		$list_box_contents[$row] = array('params' => 'class="productListing-even"');
		//2.2 modification ,add width in td
		$class_for_buy_now = 'class="productListing-even" width="'.$tdsize.'%"';
		$counter = $row;
	} else {
		if ($row > $counter) {
			$list_box_contents[$row] = array('params' => 'class="productListing-odd"');
			//2.2 modification ,add width in td
			$class_for_buy_now = 'class="productListing-odd" width="'.$tdsize.'%"';
			$counter = $row;
		}
	}

	$product_contents = array();

	for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
		$lc_align = '';

		switch ($column_list[$col]) {
			case 'PRODUCT_LIST_MODEL':
			$lc_align = '';
			$lc_text = ' ' . $listing['products_model'] . ' ';
			break;
			case 'PRODUCT_LIST_NAME':
			$lc_align = '';
			if (isset($HTTP_GET_VARS['manufacturers_id'])) {
				$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
			} else {
				$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';
			}
			break;
			case 'PRODUCT_LIST_MANUFACTURER':
			$lc_align = '';
			$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
			break;
			case 'PRODUCT_LIST_PRICE':
			$lc_align = 'right';
			if (tep_not_null($listing['specials_new_products_price'])) {
				$lc_text = ' <s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
			} else {
				$lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
			}
			break;
			case 'PRODUCT_LIST_QUANTITY':
			$lc_align = 'right';
			$lc_text = ' ' . $listing['products_quantity'] . ' ';
			break;
			case 'PRODUCT_LIST_WEIGHT':
			$lc_align = 'right';
			$lc_text = ' ' . $listing['products_weight'] . ' ';
			break;
			case 'PRODUCT_LIST_IMAGE':
			$lc_align = 'center';
			if (isset($HTTP_GET_VARS['manufacturers_id'])) {
				$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
			} else {
				$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
			}
			break;
			//bof product listing with attributes
			case 'PRODUCT_LIST_BUY_NOW':
			$lc_align = 'center';
			$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
			break;
			// Begin Buy Now button with attributes and quantity mod 
			// Begin Add Multiple  with attributes Contrib
			case 'PRODUCT_LIST_MULTIPLE': 
			$lc_align = 'right'; 
			$lc_valign = 'top'; 
			$lc_text = (TABLE_HEADING_MULTIPLE . tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '0', 'size="4"'));
			$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $listing['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'");
			$product_info = tep_db_fetch_array($product_info_query);
			$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");
			$products_attributes = tep_db_fetch_array($products_attributes_query);
			if ($products_attributes['total'] > 0) {
				$lc_text .= '<table border="0" cellpadding="0" cellspacing"0">';
				$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");
				while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
					$selected = 0;
					$products_options_array = array();
					$lc_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n";
					$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");
					while ($products_options = tep_db_fetch_array($products_options_query)) {
						$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
						if ($products_options['options_values_price'] != '0') {
							$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
						}
					}
					//$lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]);
					//$lc_text .= tep_draw_pull_down_menu('id_'.$listing[$x]['products_id'].'[' . $products_options_name_values['products_options_id'] . ']', $products_options_array);
					$lc_text .= tep_draw_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]);
					//$lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); 
					$lc_text .= '</td></tr>';
				}
				$lc_text .= '</table>';
			}
			break;	
			case 'PRODUCT_LIST_BUY_NOW_MULTIPLE': 
			$lc_align = 'right'; 
			$lc_valign = 'top'; 
			$lc_text = '<form name="buy_now_' . $listing['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now_form', 'NONSSL') . '">';
			$lc_text .= (TABLE_HEADING_MULTIPLE) . '<input type="text" name="cart_quantity" value="1" maxlength="6" size="4">'; 
			$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $listing['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'"); 
			$product_info = tep_db_fetch_array($product_info_query); 
			$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); 
			$products_attributes = tep_db_fetch_array($products_attributes_query); 
			if ($products_attributes['total'] > 0) { 
				$lc_text .= '<table border="0" cellpadding="0" cellspacing"0">'; 
				$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); 
				while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { 
					$selected = 0; 
					$products_options_array = array(); 
					$lc_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n"; 
					$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $listing['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); 
					while ($products_options = tep_db_fetch_array($products_options_query)) { 
						$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); 
						if ($products_options['options_values_price'] != '0') { 
							$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; 
						} 
					} 
					$lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); 
					//$lc_text .= tep_draw_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]);
					$lc_text .= '</td></tr>'; 
				} 
				$lc_text .= '</table>'; 



//	<!--Begin Sold Out-->
//<?php
 $products_sold_out = '';
$stock_left = tep_get_products_stock($products_id) - $products_quantity;
$products_sold_out = stock_left;
if ($stock_left > 0) {$lc_text .= tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW);

} else { $lc_text .= tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_sold_out.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW);
}
?>
			<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . $submit_button; ?></td>
//<!--End Sold Out-->



			}
			if ($products_attributes['total'] == 0) { 
				$lc_text .= '<br> ';
				$lc_text .= tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW);
				$lc_text .= '<br> ';
				$lc_text .= '<table border="0" cellpadding="0" cellspacing"0"><tr><td class="main"></td><td></td></tr></table>';
			}
			$lc_text .= '</form>'; 
			break; 
			// End Add Multiple mod
		}
		$product_contents[] = $lc_text;
	}
	$lc_text = implode('<br>', $product_contents);
	$list_box_contents[$row][$column] = array('align' => 'center',
											//bof product listing with attributes
											'valign' => $lc_valign,
											//eof product listing with attributes
											//2.2 modification ,add width in td
										  'params' => 'class="productListing-data" width="'.$tdsize.'%"',
										  'text'  => $lc_text);

	$column ++;

	if ($x == ($no_of_listings -1)) {

		//BOF version 2.2 modification
		// fill up the remainder of the table row with empty cells, assumes three products per row!
		for($column=1; $column < $colnum; $column++) {
			$list_box_contents[$row][$column + 1] = array('align' => 'center',
											//bof product listing with attributes
											'valign' => $lc_valign,
											//eof product listing with attributes
											//2.2 modification ,add width in td
										  'params' => 'class="productListing-data" width="'.$tdsize.'%"',
										  'text'  => " ");
		}
		//EOF version 2.2 modification

		//the commented code below is the old 2.1 version
		/*
		if ($column == '1') {
			$list_box_contents[$row][$column + 1] = array('align' => 'center',
											//bof product listing with attributes
											'valign' => $lc_valign,
											//eof product listing with attributes
										  'params' => 'class="productListing-data"',
										  'text'  => " ");
			$column ++;
		}
		if ($column == '2') {
			$list_box_contents[$row][$column + 1] = array('align' => 'center',
											//bof product listing with attributes
											'valign' => $lc_valign,
											//eof product listing with attributes
										  'params' => 'class="productListing-data"',
										  'text'  => " ");
		}
		*/
	}

	//BOF version 2.2 modification
	//change the hardcoded value of 3 to $colnum variable
	if ($column >= $colnum || $x == ($no_of_listings -1) ) {
		$row ++; // we start a new tr here  with $list_box_contents
		$list_box_contents[$row] = array('params' => $class_for_buy_now);
		$column = 0;
	}
	//EOF version 2.2 modification
} // end for ($x = 0; $x < $no_of_listings; $x++)

new productListingBox($list_box_contents);

} else {
$list_box_contents = array();

$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"',
							 'text' => TEXT_NO_PRODUCTS);

new productListingBox($list_box_contents);
}

if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) 
?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
 <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
 <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
</tr>
<?php if ($add_multiple == "1"){
?>
 <tr> 
<td align="left" class="main"><!--a href="<//?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'file:///Y|/Documents/Websites/Best%20Test%20Site/catalog/includes/modules/%20', 'SSL'); ?>"><//?php echo tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT); ?></a--></td>
	   // <td align="right" class="main"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> 
	   <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . $submit_button; ?></td>
 </tr> 
<?php } ?>
</table>
}

 

Thank you,

 

Diane

Share this post


Link to post
Share on other sites

The future "Display Add Multiples column" it doesn't work at all. when I want to add multiple items, it display only the empty cart. :blink: :blink:

 

It need to be tested before release to public...


Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Share this post


Link to post
Share on other sites
The feature "Display Add Multiples column" it doesn't work at all. when I want to add multiple items, it display only the empty cart. :blink: :blink:

 

It need to be tested before release to public...

 

any one can help? or every one has got the same bug?


Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Share this post


Link to post
Share on other sites
The installation instructions with v2.2 are confusing. If you follow the steps below step by step you should be able to install the new version with no problems.

I was following along, until I got to copy prod_list_col php into catl/incl mods/dir;

I found the prod_list file in catl/inls/mods, not clear where else to copy to

I get following warning message

 

Warning: main(includes/modules/product_listing_col.php): failed to open stream: No such file or directory in /home/gourmeta/public_html/filcorgourmet/index.php on line 289

 

Warning: main(): Failed opening 'includes/modules/product_listing_col.php' for inclusion (include_path='.:/usr/lib/php') in /home/gourmeta/public_html/filcorgourmet/index.php on line 289

 

My Webpage

what did I do wrong?

thnx mike

Share this post


Link to post
Share on other sites
I was following along, until I got to copy prod_list_col php into catl/incl mods/dir;

I found the prod_list file in catl/inls/mods, not clear where else to copy to

I get following warning message

 

Warning: main(includes/modules/product_listing_col.php): failed to open stream: No such file or directory in /home/gourmeta/public_html/filcorgourmet/index.php on line 289

 

Warning: main(): Failed opening 'includes/modules/product_listing_col.php' for inclusion (include_path='.:/usr/lib/php') in /home/gourmeta/public_html/filcorgourmet/index.php on line 289

 

My Webpage

what did I do wrong?

thnx mike

Well, I got rid of error message, but I still have single column???

How come no multiple columns? (I have set to 3 in admin)

Share this post


Link to post
Share on other sites
Well, I got rid of error message, but I still have single column???

How come no multiple columns? (I have set to 3 in admin)

Any ideas why this listing in columns is not working??

thnx

Share this post


Link to post
Share on other sites

Hello, I have a problem with how this contribution displays attributes.

i've installed a contribution called Open Type Feature that allows me to add text boxes, checkboxes, etc. as attributes for my products instead of the regular drop down list. this contribution works for all my products (im using it to allow user to type in a name for characters they've chosen), but when the product listing in columns (with Display Add Multiples column selected) is displayed, it shows the products attributes as a drop down list instead of a text box.

 

here's a screenshot of what it looks like:

charpagedy5.jpg

 

or view it here:

http://colourmecrazy.ca/shop/index.php?cPath=22

 

i need the text box to display so users can purchase all at once on the product listing page.

 

thanks to anyone who may be able to help me out

Share this post


Link to post
Share on other sites

I need some help

 

I have installed the contrib. Individual boxes for products in central modules

 

Some of the boxes do overlap how can I get rid of this ??? What did I do wrong ?

 

Thanks for help

 

box.gif

Share this post


Link to post
Share on other sites
Any ideas why this listing in columns is not working??

thnx

 

you have Product Display Type (Default = 0 or Columns = 1) set to 1 yes

and Number of Columns for product listings set to 3

 

any one know how to get rid of division by 0 error when you have sub-categories?

Edited by steve_s

Share this post


Link to post
Share on other sites

I've been running v2.2 with clean install instructions for quite sometime now. Lately I've notice something strange where the products ALL show up as 1 column only. I have it set up in admin to show up 2 products per row.

This issue showed up when I added my 6th main category. If I deleted the category that I just added then the issue went away and the products all showed up 2 per row as I had set in admin, as soon as I added the 6th category and clicked on a product category link again all the products would show as 1 column only. Also, another interesting scenario is if I added a 7th main category there were NO issues with the products showing in 1 column only.

 

I tested this on another test site and I was able to recreate the same issue, on the 6th main category added all the products showed as 1 column only.

 

So, I went and looked at product_listing_col.php in more detail and this is what I found...

 

In the if statement the 2 variable $x and $no_of_listings that are NOT initialize anywhere in product_listing_col.php

 

Just too double check I searched the entire OsCommerce project for $no_of_listings and could not find anything that was initializing the variable $no_of_listings. Then I search for the variable $x and there are many other files that use the variable $x specific to only those file that use it.

 

I did some tests on echoing out the variable $x and $no_of_listings and the values that echoed out was $x= -1 and $no_of_listings = null. These values where making the if statement true and executing the code inside. This unexpected code execution was causing ALL the products to show in 1 column only. I commented out the entire if statement because from my testing there is no logic in product_listing_col.php that makes if ($x == ($no_of_listings -1)) be a valid logic True.

 

/*COMMENTED CODE

if ($x == ($no_of_listings -1)) {

 

//BOF version 2.2 modification

// fill up the remainder of the table row with empty cells, assumes three products per row!

for($column=1; $column < $colnum; $column++) {

$list_box_contents[$row][$column + 1] = array('align' => 'center',

//bof product listing with attributes

'valign' => $lc_valign,

//eof product listing with attributes

//2.2 modification ,add width in td

'params' => 'class="productListing-data" width="'.$tdsize.'%"',

'text' => " ");

}

//EOF version 2.2 modification

 

//the commented code below is the old 2.1 version

/*

if ($column == '1') {

$list_box_contents[$row][$column + 1] = array('align' => 'center',

//bof product listing with attributes

'valign' => $lc_valign,

//eof product listing with attributes

'params' => 'class="productListing-data"',

'text' => " ");

$column ++;

}

if ($column == '2') {

$list_box_contents[$row][$column + 1] = array('align' => 'center',

//bof product listing with attributes

'valign' => $lc_valign,

//eof product listing with attributes

'params' => 'class="productListing-data"',

'text' => " ");

}

*/

}

COMMENTED CODE*/

There also this code that has the same variable in this if statement if ($column >= $colnum || $x == ($no_of_listings -1) )

if ($column >= $colnum || $x == ($no_of_listings -1) ) {

$row ++; // we start a new tr here with $list_box_contents

$list_box_contents[$row] = array('params' => $class_for_buy_now);

$column = 0;

}

I removed the $x == ($no_of_listings -1) from the if statement so now it looks like this

 

if ($column >= $colnum) {

$row ++; // we start a new tr here with $list_box_contents

$list_box_contents[$row] = array('params' => $class_for_buy_now);

$column = 0;

}

 

After the following changes above the products show correctly as set in admin. This issue looks to only surface when you have 6 main categories. Not sure why only the 6th main category causes this issue. The only thing I can think of is that some where in another file variable $x is getting initialized to -1 making the if statement true, causing the 1 column products issue.

 

FYI...

Many of us run our shops with register_globals = On, This feature has a security risk, if variables are NOT initialize an intruder can compromise the site by injecting the variable in the URL and making something execute you don’t want. More info here http://us2.php.net/register_globals. Un-initialized variable are time booms waiting to explode. ALLWAYS initialize your variable to some known value as good coding practice.

Share this post


Link to post
Share on other sites

Hello All,

 

I do not know if anyone can help me or if indeed this contribution can help me.

 

I need to be able to have some categories in my store in rows and coloum's i currently have it set to 4x4. However i also need on category to

just display the products in a list. Does anyone know if this is possible ?

 

Thanks in Advance Alex

Share this post


Link to post
Share on other sites

Hi! I need help with getting this contribution to order products by date added. Very grateful for some help. I've tried but can't find the right place to change the ordering.

Share this post


Link to post
Share on other sites

Hi! I need help with getting this contribution to order products by date added. Very grateful for some help. I've tried but can't find the right place to change the ordering.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×