Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customization Help


thall89553

Recommended Posts

Posted

I am trying to get from here -->

<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="infoBoxHeading2_table">
<tr>
<td  class="infoBoxHeading2_td">Categories</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="infoBox2_table">
<tr>
<td  class="infoBox2_td"><table border="0" width="100%" cellspacing="0" cellpadding="0"  class="infoBoxContents2_table">
<tr>
<td  class="boxText"><ul class="list"><li class="bg bg_list"><a href="http://www.mts-diesel.com/index.php?cPath=1"><b>Dodge</b>-></a></li></ul></td>
</tr>
</table>
</td>
</tr>

 

To here -->

<tr>
<td>
<ul class="list">
<li class="bg bg_list"><a href="http://www.mts-diesel.com/index.php?cPath=1"><b>Dodge</b>-></a></li>
</ul>
</td>
</tr>

 

but for the life of me can not figure out how to get rid of the extra table code. I am in the includes/column_left.php file as well as the classes/boxes.php file.

 

Can someone shed some light?

Posted

You are close in that you have identified includes/classes/boxes.php.

 

In that file find:

/

/ class constructor
   function tableBox($contents, $direct_output = false) {

and

class infoBoxHeading extends tableBox {

 

That's where the html is generated, the td's and table's and all the css for them.

 

Spend a couple of days and parse through the code under the above. It will be tedious. You will have to learn some basic php (not much, just terminology and how write an 'if' statement. )

Note that in each box you will find this code:

 

new infoBoxHeading($info_box_contents); 

new infoBox($info_box_contents); 

 

This is how each box calls the class code.

 

It's worth spending the time learning how this works, as you be a long way toward being an OSCommerce expert if you do. You can also go to Amazon and buy books on OSCommerce and how to understand this.

Oscommerce site:

 

 

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

Posted

Thanks for putting me on the right path. I had done this some time back for www.shopthevitaminstore.com and after 5 years he is making 5-10K a month. OS Commerce is truly a programming gem but I'm left wondering why some many tables in the layout? Really not good coding. Thanks again. T

Posted

The whole cart is built in tables. It was written almost 10 years ago. But, yes, by today's standards tables are old hat. You can do two things. Use the current version of OSCommerce, 2.3 or convert an 2.2 cart to tableless with this:

 

http://addons.oscommerce.com/info/7263

Oscommerce site:

 

 

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

Posted

Thanks, I had actaully come across that but for some reason when I download the file there is only a MS Word file formatted for a MAC. A bit clueless as to what to do. Thanks, Tom

Posted

downloading contributions can get a bit screwy. Be sure you click the history tab on that link and download ' OSC to CSS version 2.0'. The files above are indeed created on my mac and they contain only minor corrections to the the lastest version, OSC to CSS version 2.0.

Oscommerce site:

 

 

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

Posted

Hey thanks, Not sure what is happening but I downloaded / uploaded the files to here - www.mts-diesel.com and it seems as if I missed something. In the index.php file there is an echo for stylesheets but none are coming up. Any help would be appreciated. T

Posted

Me again. I went to this page - http://addons.oscommerce.com/info/7263 and in the history I downloaded the files that were uploaded on 15 Sept. 2010. In the text for that download it reads "This version is the full package and replaces all earlier versions." I uploaded ALL of these files to www.mts-diesel.com and I get a broken site. I'm really confused. When I look at the source code for the index.php file there are not any ref. to any stylesheets. Tom

Posted

I suspect you missed step 3, 'Step 3: Open includes/application_top.php' , in the html file: 'OSC-CSS v2.0 upgrade installation.html' .

 

Granted, I realize looking at this it says 'upgrade', but I mean upgrade 2.2rc2a to OSC-CSS v2.0.

 

To fix your installation what you need to do is Open includes/application_top.php and find:

 

// initialize the message stack for output messages
require(DIR_WS_CLASSES . 'message_stack.php');
$messageStack = new messageStack;

 

Just below add:


$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" href="css/960.css" /> 
<link rel="stylesheet" href="css/text.css" />
<link rel="stylesheet" href="css/styles.css" /> 
<link rel="stylesheet" href="css/css-buttons.css" />
<link rel="stylesheet" href="css/superfish.css" /> 
<link rel="stylesheet" href="css/json-addtocart-themes.css" /> 
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" /> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript" src="javascript/jquery.prettyPhoto.js"></script>
<script type="text/javascript" src="javascript/superfish.js"></script>
<script type="text/javascript" src="javascript/osc_cart.js"></script> 
';

Oscommerce site:

 

 

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

Posted

Hey thanks so much, I really appreciate your efforts on this. Tom

Checking your site, it looks like you have it installed perfectly. I really prefer OSC to CSS over 2.3. 2.3 has some great features and security updates, but you can upgrade your installation with the new security features. The main thing is that the OSC 2 CSS has a more logical div structure, and it much easier to install javascript and css on individual pages.

Oscommerce site:

 

 

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

Posted

Hey George, I am assuming that you wrote the code for this contribution, if so BRAVO. Those tables were really a challenge for me and caused so much clutter. I have a couple questions for you on one other modification.

 

1. How hard is it to increase the overall width from 960 to another dimension?

 

2. Please look here - http://www.mts-diesel.com/index.php?cPath=20_23 There seems to be a lot of white space to the right of the categories. Ideally what I would like to do is make the left column wider to close that gap on the right hand side.

 

Thanks George.

 

Tom

Posted

Both are really quite easy to do with the 960 system once you get the hang of it.

column size:

open includes/template_bottom.php and delete or comment out this:

<div class="grid_2" id="column_right">
	<?php 
	require(DIR_WS_INCLUDES . 'column_right.php'); 
	?>
</div><!--close column right-->

Since the overall width of the site is 12 units, and you have now deleted 2 of those units, you can add that width to column_left.php. So open includes/template_top.php and change this:

<div class="grid_2" id="column_left">
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
</div>

to:

<div class="grid_4" id="column_left">
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
</div>

 

To adjust the overall width of the site, all you need to do is replace the 960.css stylesheet with a stylesheet that has wider grid units. You can generate such a stylesheet on a number of sites. Google '960 grid generator' or similar. Here is a good site:

http://www dot spry-soft dot com/grids/

Just check the 'check to edit width' and enter the width you need, download the resulting stylesheet, rename it 960.css and upload it to your site.

Oscommerce site:

 

 

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

Posted

Hello, in includes/modules/product_listing.php there is a line of code that reads - new plistBox($list_box_contents);

 

For the life of me I can not find the function plistBox

 

I looked in the files in Boxes but come up empty, any ideas?

 

Thanks.

Posted

I should have mentioned that what I am after is this. The line of code new plistBox($list_box_contents); puts out this html -

 

<div  class="pl categories">
   <div class="pl-image"><a href="http://www.mts-diesel.com/product_info.php?cPath=20_23_42&products_id=173"><img src="images/136006A-S1.jpg" alt="" /><br />03 - 04  Street, Strip Tow & Go Master Rebuild Kit</a></div>
   <div class="pl-price">$800.00</div>
   <div class="pl-buynow"><a href="http://www.mts-diesel.com/index.php?cPath=20_23_42&sort=6a&action=buy_now&products_id=173">Buy Now</a></div>
<div class="divider"></div> </div>

 

When what I want is this

 

<div  class="pl categories">
<a href="http://www.mts-diesel.com/product_info.php?cPath=20_23_42&products_id=173"><img src="images/136006A-S1.jpg" alt="" /><br />03 - 04  Street, Strip Tow & Go Master Rebuild Kit</a>
$800.00
<a href="http://www.mts-diesel.com/index.php?cPath=20_23_42&sort=6a&action=buy_now&products_id=173">Buy Now</a>
</div>

Posted

The code: new plistBox($list_box_contents) is calling the function 'plistBox' in includes/classes/boxes.php. That function 'plistBox' is an extension of a larger function 'plisttableBox'.

It is in plisttableBox that the div and their classes in the code you are referring to above are added. With a lot of patience and some php and html skills you can work through those functions and make the changes you need. However it changes more than just that one box.

Oscommerce site:

 

 

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

Archived

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

×
×
  • Create New...