Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Description in Product Listing v2.5


TerryK

Recommended Posts

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

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

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...