Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I want to use the Seperate Pricing Per Customer contribution alongside the Product Listing in Columns contribution.

I tried the contribution that combined the two, but it gave errors that I didnt feel like fixing, and it was old.

 

I have combined the two myself, but there is one small problem. The last picture of every page does not show up.

I do not fully understand the code, so I am having trouble finding where exactly the problem is happening.

As an experiment, I added 1 to $no_of_listings which should have caused it to loop one more time, and it showed all the pictures as it should, plus an extra broken link at the end.

It vexes me. I am terribly vexed.

 

It is probaby a bad idea to post all 364 lines here, so I uploaded a txt here:

http://crimsonbluepartners.com/product_listing_col.php.txt

 

Thanks,

-TheMJ

Posted

Also, lines 175-185:

 

// next part is a debug feature, when uncommented it will print the info that this module receives

/*

  echo '<pre>';

  print_r($listing);

  echo '</pre>';

*/

 

Uncomment them and post the results.

Contributions

 

Discount Coupon Codes

Donations

Posted

Here is the output of print_r($listing)

Array
(
[0] => Array
	(
		[products_image] => L9001.jpg
		[products_model] => 
		[products_name] => L9001
		[products_id] => 85
		[manufacturers_id] => 0
		[products_price] => 0.0000
		[products_tax_class_id] => 0
		[specials_new_products_price] => 
		[final_price] => 0.0000
	)

[1] => Array
	(
		[products_image] => L9002.jpg
		[products_model] => 
		[products_name] => L9002
		[products_id] => 86
		[manufacturers_id] => 0
		[products_price] => 0.0000
		[products_tax_class_id] => 0
		[specials_new_products_price] => 
		[final_price] => 0.0000
	)

[2] => Array
	(
		[products_image] => L9003.jpg
		[products_model] => 
		[products_name] => L9003
		[products_id] => 87
		[manufacturers_id] => 0
		[products_price] => 0.0000
		[products_tax_class_id] => 0
		[specials_new_products_price] => 
		[final_price] => 0.0000
	)

[3] => Array
	(
		[products_image] => L9004.jpg
		[products_model] => 
		[products_name] => L9004
		[products_id] => 88
		[manufacturers_id] => 0
		[products_price] => 0.0000
		[products_tax_class_id] => 0
		[specials_new_products_price] => 
		[final_price] => 0.0000
	)

[4] => Array
	(
		[products_image] => L9005 L9025.jpg
		[products_model] => 
		[products_name] => L9005 L9025
		[products_id] => 89
		[manufacturers_id] => 0
		[products_price] => 0.0000
		[products_tax_class_id] => 0
		[specials_new_products_price] => 
		[final_price] => 0.0000
	)

[5] => Array
	(
		[products_image] => S9006.jpg
		[products_model] => 
		[products_name] => S9006
		[products_id] => 90
		[manufacturers_id] => 0
		[products_price] => 0.0000
		[products_tax_class_id] => 0
		[specials_new_products_price] => 
		[final_price] => 0.0000
	)

)

 

Here are screenshots:

http://crimsonbluepartners.com/normal.png

-Normal code

http://crimsonbluepartners.com/normaloutline.png

-Normal code with table cells outlined

http://crimsonbluepartners.com/plus1.png

-1 added to $no_of_listings

http://crimsonbluepartners.com/plus1outline.png

-1 added to $no_of_listings with table cells outlined

 

Thanks,

-TheMJ

Posted

Aren't you replacing the last td with an empty cell because of this 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'

I think $column=1 should not be hardcoded like this, shouldn't it be just $column ?

 

Additionally the 'text' => " " should be something like 'text' => "& nbsp;" (minus the space between the ampersand and the nbsp;) , otherwise (due to osC code) it won't add an empty cell anyway.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...