TheMJ Posted April 21, 2006 Posted April 21, 2006 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 Quote
kgt Posted April 21, 2006 Posted April 21, 2006 Can you give a link so we can see the page, or even a screenshot? It'll help to actually see what's going on. Quote Contributions Discount Coupon Codes Donations
kgt Posted April 21, 2006 Posted April 21, 2006 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. Quote Contributions Discount Coupon Codes Donations
TheMJ Posted April 21, 2006 Author Posted April 21, 2006 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 Quote
Jan Zonjee Posted April 22, 2006 Posted April 22, 2006 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. Quote
TheMJ Posted April 23, 2006 Author Posted April 23, 2006 Hooray that fixed it! I will submit this as a contribution here: http://www.oscommerce.com/community/contributions,3007 Thanks, TheMJ Quote
Recommended Posts
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.