Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Convert Product-Listings to table-less CSS


npn2531

Recommended Posts

I installed a local copy and the same happens. Looks like an incompatibility with IE6, but I don't know if further IE versions are affected.

 

Dreamweaver also displays it well as firefox does.

 

I have very few knowledge on CSS but I will take a look and see if I can find something.

Link to comment
Share on other sites

  • 3 weeks later...

I installed a local copy and the same happens. Looks like an incompatibility with IE6, but I don't know if further IE versions are affected.

 

Dreamweaver also displays it well as firefox does.

 

I have very few knowledge on CSS but I will take a look and see if I can find something.

 

 

The latest contribution is missing the $doctype variable in the application_top.php file. It was stated in the instructions but was missing in the file. I had the exact same problem. I commented out echo $doctype in the index.php file and pasted in a standard doctype statement and it worked.

 

So to take advantage of the $doctype variable you will need to define it in application_top.php with the following code.

 

$doctype='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">';

 

I added it right after the $stylesheet code that was modified for this contribution.

 

The author is going to need to update the contribution with this fix. It is affecting all users who download the latest full package.

Link to comment
Share on other sites

  • 1 month later...

The latest contribution is missing the $doctype variable in the application_top.php file. It was stated in the instructions but was missing in the file. I had the exact same problem. I commented out echo $doctype in the index.php file and pasted in a standard doctype statement and it worked.

 

So to take advantage of the $doctype variable you will need to define it in application_top.php with the following code.

 

$doctype='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">';

 

I added it right after the $stylesheet code that was modified for this contribution.

 

The author is going to need to update the contribution with this fix. It is affecting all users who download the latest full package.

 

It's in step three of the instructions. You paste it in to application_top.php just like you add the reference to the stylesheet

 

3) Open includes/application_top.php

 

find, near the end:

 

// initialize the message stack for output messages

require(DIR_WS_CLASSES . 'message_stack.php');

$messageStack = new messageStack;

just above, add this:

 

$doctype='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';

$stylesheet='<link rel="stylesheet" type="text/css" href="stylesheet.css">';

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

  • 1 month later...

Hello.

 

Just installed the OSC to CSS v 2.0 to a clean 2.2 store, and have a couple of questions.

 

When attempting to add a product to the cart, I have the buy now/add to cart button, but the cart itself remains empty.

 

Cosmetically, when adding a product with attributes (for example, the Matrox G200 graphic card) to the cart, where would I modify the output so that each attribute is on its own line, and not wrapped? I looked at the /jsonServices/ProductObject.php file, but couldn't find where a <BR> or other tag might go.

 

Thanks for the time and effort to creating this contribution.

 

Rob

Link to comment
Share on other sites

  • 3 weeks later...

To convert the new product listing to tableless CSS as well, do the above and then:

 

1) in includes/modules/new_products.php , at the end of the file

change:

 

 while ($new_products = tep_db_fetch_array($new_products_query)) {
   $info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => 'class="smallText" width="33%" valign="top"',
                                          'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

   $col ++;
   if ($col > 2) {
     $col = 0;
     $row ++;
   }
 }

 new contentBox($info_box_contents);

 

to this

 

while ($new_products = tep_db_fetch_array($new_products_query)) {    
   echo '<div class="cssproduct_listing_item"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '"><br/>' . $new_products['products_name'] . '</a><br/><br/>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])).'</div>';   
 }

  new csscontentBox($info_box_contents);

2) add the following code (new class definition) to includes/classes/boxes.php before the final ?>

class csscontentBox extends csstableBox {
   function csscontentBox($contents) {
     $this->csstableBox($info_box_contents, true);
   }
 }

that's it

 

 

I did all of the above things and it made my new product listings perfect however it hid my normal product listings am I missing something? I'd like to have them both the same.

Link to comment
Share on other sites

  • 4 months later...

This looks like what I am trying to do. Is there an OSC to CSS mod for version 2.3.1?

Or, has anyone seen it updated for OSC 2.3+ or know where I can find it?

 

Thank you!

Cindy

Link to comment
Share on other sites

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...