TerryK Posted January 17, 2004 Share Posted January 17, 2004 I'm using this mod and love the functionality. One thing I'd like to do, though, is assign a different class to the <TD> holding the description so I can use different styles with it. This code in the product_listing.php file seems to be one piece of the puzzle: // Products Description Hack begins $lc_params .= 'class="productListing-data"'; if ($column_list[$col] == 'PRODUCT_LIST_DESCRIPTION') { $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => $lc_params, 'text' => $lc_text, 'desc_flag' => 'true'); } else { $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => $lc_params, 'text' => $lc_text); } // Products Description Hack ends When I change 'class="productListing-data"' to a different name, the changes I make in the CSS file affect BOTH rows. Then in classes\boxes.php, this code comes into play: if (isset($contents[$i][0]) && is_array($contents[$i][0])) { for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) { Add after: // ################ Products Description Hack begins ########################"" if ($contents[$i][$x]['desc_flag'] == 'true') { $tableBox_string .= ' </tr>' . "\n"; $tableBox_string .= ' <tr'; if ($this->table_row_parameters != '') $tableBox_string .= ' ' . $this->table_row_parameters; if ($contents[$i]['params']) $tableBox_string .= ' ' . $contents[$i]['params']; $tableBox_string .= '>' . "\n"; } // ############### Products Description Hack ends ################ I don't understand PHP well enough to get my head around this. Any PHP experts out there who could help me? TIA, Terry Quote Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. * Link to comment Share on other sites More sharing options...
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.