Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Any thoughts in making oscommerce tableless?


lindsayanng

Recommended Posts

I have pretty much stripped all of the major tables out of one of my oscommerce installs and i am TRYING to make an install that is completely tableless (except for places where it is ok to have them)

 

I was wondering if anyone else had done this, and if they did - where is the site? I'd like to see and compare.

 

Also, is there a possibility that an update will yield a tableless structure? Its the nature of web developement, and tables are not technically the ideal way to structure a website. I mean, when i look at the code base for osc, there are an infinite number of tables within tables within tables. It would really simplify things to have them in divs and other CSS elements.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

  • Replies 79
  • Created
  • Last Reply

I seem to recall looking at the "roadmap" for version 3 and seeing that it will have tableless page layout. You might look and see if I remembered correctly.

 

I would not expect that the developers will put any effort into making version 2.2 tableless. That version seems to be pretty much dead in the water. I would not see any point in you editing your code to make it tableless layout, unless you were either planning to fork osC or to stay on 2.2 for a very long time. In either case, you might be doing enough future code/layout development to make the effort worthwhile.

Link to comment
Share on other sites

well thats the thing.. And entirely tableless layout will only work if people who design addons update theirs to work with the new update.. but it would DEFINITELY be worth it because in no time, oscommerce will be considered pretty useless if it continues to stay on a table layout. Its really not ideal for development.

 

it doesn't need to be a fork to be the same exact code base but tableless. It just would require a large undertaking and like i said, the addon developers would need to work it into the upgrade.. but then again, people need to update their addons anyways to work with any major upgrades to osc.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Well, it would be a code fork, as I seriously doubt that Harald & company would be interested in folding in such large changes into the 2.2 stream (which is basically dead). With or without the blessings of the osC developers (so long as you stay within the license terms), you ought to start up a separate project, under a new name. If not, perhaps they would be willing to host a third branch of osC: 2.2, 2.3 (your revision), and 3.0, if they did not have to maintain and enhance it? I would suggest that while you are removing the tables, you should also go ahead and 1) pull out the common PHP layout code (header, footer, etc.) into include files, so that each page's file can be greatly simplified, and 2) structure layout-related file references to use a Theme name or number to facilitate switching among themes (even on the fly, as with multiple departments within a store). I've done quite a bit of that, along with cleaning up the database queries, fixing a number of minor bugs, putting in the MySQL 5 fixes, and replacing the deprecated ereg functions. I haven't yet cleanly separated calculations (into modules) from display layout, to make templating easier, but maybe you've addressed that? Ideally, the store engine and shopping cart would be separated out from display so that cart functions could be integrated into an existing site (along the lines of PayPal "Buy Now" buttons).

 

Right now I've set it aside as I mull over how to do a lot of things that osC doesn't make easy. For example, I need to charge different tax rates (in New York) for different kinds of merchandise, as well as having different tax rates for different tax jurisdictions (destination based). There are many things that other store owners on this forum have asked for (e.g., display a price with or without VAT depending on customer's country) that are difficult with the database-driven structure of osC. It may be as simple as allowing custom plug-in PHP modules to override the database-driven prices, taxes, and shipping charges, but I haven't had the time to look at it (too busy with my real job). Some things, like newsletters, shouldn't even be part of osC -- just export the email address list to another utility. Product entry and updates should be all CSV tables (or maybe XML), rather than all through forms, and sales data should be exportable (CSV files) to accounting programs or spreadsheets. Customer sign-in should be such that osC can be integrated into a larger site with a single ID and sign on, so a visitor could sign on upon entering my forum, pop over to the store, jump back to the forum, and return to the store all without losing the shopping cart contents or having to sign on multiple times.

 

I've got lots of ideas for what should be in a store, so PM me if you want to take the discussion off line.

Link to comment
Share on other sites

I have pretty much stripped all of the major tables out of one of my oscommerce installs and i am TRYING to make an install that is completely tableless (except for places where it is ok to have them)

 

I was wondering if anyone else had done this, and if they did - where is the site? I'd like to see and compare.

 

Also, is there a possibility that an update will yield a tableless structure? Its the nature of web developement, and tables are not technically the ideal way to structure a website. I mean, when i look at the code base for osc, there are an infinite number of tables within tables within tables. It would really simplify things to have them in divs and other CSS elements.

 

Take a look at my site here <A href="http://www.niora.com">www.niora.com</a>. I have stripped out the tables on most pages, still a few more to go. I started doing this for three reasons 1) so I could use CSS to make more a professional design and to make those changes efficiently, 2) for SEO , and 3) There is no way I am going to be able to switch versions to the new OSCommerce anytime soon, I just have way to much stuff added to my shop and it works just fine like it is.

 

It was not a difficult process, and really did not take much time. The tricky part was getting the basic layout set up. Many of the pages I simply went through and blindly deleted tables, and then went back in with div tags.

 

What was neat was that typically once I got the tables out, and div tags in, pages were smaller. It is just so much easier to make design changes.

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

Its sad to think that oscommerce will never evolve like this. I mean, a real upgrade is a large undertaking, whether or not you change the overall structure. And honestly, if you wanted to keep the backend tables, i wouldn't care as much.. but the front end really needs to be tableless in order to keep up.

 

It would be amazingly nice to have a template ready structure similar to what wordpress has. The ability to just click "activate" on themes and plugins and have them work would turn oscommerce into an unstoppable open source shopping cart. BUt that is not even what I am asking for. What I am asking for is the ability to design the front end in only css and remove the tables where ever they are not needed.

 

I am not really interested in creating a new fork unless i had a LOAD of help and more interest than just two of us.

I will definitely be interested in trading notes and maybe working on something with you... I definitely want to do some more research to see if MAYBE someone did this already.. maybe there is some little known fork out there..

 

npn - you aren't kidding about div's being easier to work with when changing looks!! With tables, if you want to move an element, you have a HUGE task ahead of you!! I did SOME movement from tables to divs in my photography website to create the basic structure, but i have a LOAD more to do within the categories and the products listing pages.

 

Have you ever looked at osc in firebug? you can open up 10+ tables until you get to the actual element you are looking for!!!!

Maybe we can all share notes and see where it lands us.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I think its been done already, google oscss. smile.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I ggoogled osc tableless but didn't find anything COMPELTE..

 

Off to google

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

No, the package is called oscss

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

that looks exactly like what we are talking about.. but it's in a different language.. I am using google translator, but its not perfect.. maybe someone can help move that over to english as well

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

that looks exactly like what we are talking about.. but it's in a different language.. I am using google translator, but its not perfect.. maybe someone can help move that over to english as well

 

We were crossing posts!! biggrin.gif

 

It would'nt be too dificult, I speak a smattering & there are some french here, but their terms need to be checked out.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Its sad to think that oscommerce will never evolve like this. I mean, a real upgrade is a large undertaking, whether or not you change the overall structure. And honestly, if you wanted to keep the backend tables, i wouldn't care as much.. but the front end really needs to be tableless in order to keep up.

 

It would be amazingly nice to have a template ready structure similar to what wordpress has. The ability to just click "activate" on themes and plugins and have them work would turn oscommerce into an unstoppable open source shopping cart. BUt that is not even what I am asking for. What I am asking for is the ability to design the front end in only css and remove the tables where ever they are not needed.

 

I am not really interested in creating a new fork unless i had a LOAD of help and more interest than just two of us.

I will definitely be interested in trading notes and maybe working on something with you... I definitely want to do some more research to see if MAYBE someone did this already.. maybe there is some little known fork out there..

 

npn - you aren't kidding about div's being easier to work with when changing looks!! With tables, if you want to move an element, you have a HUGE task ahead of you!! I did SOME movement from tables to divs in my photography website to create the basic structure, but i have a LOAD more to do within the categories and the products listing pages.

 

Have you ever looked at osc in firebug? you can open up 10+ tables until you get to the actual element you are looking for!!!!

Maybe we can all share notes and see where it lands us.

 

I'm not familiar with firebug, but if you add some simple code to your stylesheet, I forgot what it is, something like td.{border:1px dotted #red}, it will put a red dotted border around ALL the cells, the same works for TR and TABLE. You'll see just how nested the tables are in OSC.

 

It took me about 3 weeks to strip out tables in my website that works for my purposes, it would probably take me months and months (if I ever could) to create a table-less template for OSCommerce that would work for everyone else. I would be happy to share what I have though.

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

so do you think we can make this a combined project to come out with a tableless front end that people can use in place of the default one?

 

I dont need to see outlined tabels to know how bad it is. Firebug is an extention to firefox that lets you see the source code.. its REALLY bad when you put it into perspective.. REALLY bad

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

so do you think we can make this a combined project to come out with a tableless front end that people can use in place of the default one?

 

I dont need to see outlined tabels to know how bad it is. Firebug is an extention to firefox that lets you see the source code.. its REALLY bad when you put it into perspective.. REALLY bad

 

It would be a huge undertaking. One of the reasons it was feasible for me to do it on my cart was that I only need it to work for me. For example, my CSS layout is simple fixed two column layout with a header and footer, I have no right sidebar. To be useful to the community at large, you would need to create a template or system that allowed users to have options to change that layout as needed. I created my layout in a couple of days. But to make it a flexible layout with a good user interface any OSCommerce shop could take off the shelf and use, would take months. (I say months, because I have no idea how long it would take). And that would be before you even got started on the all the other pages.

 

To make matters worse, I started with a 4 year old version of CRE loaded.

 

It is tempting, though to consider doing it, but I'm an amateur, and spend most of my time trying to sell stuff on my shopping cart.

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

Yes, but generally milestones reached within upgrades of an existing codebase SHOULD be large undertakings. That is why they generally take a long time to come to life.. Obviously it is not something that one person can do in a matter of weeks.. But none the less, oscommerce will likely fall off the face of the earth if things arent brought up to speed with new technology. Tables are not meant for content the way that oscommerce uses them - yes it works.. but no, it is not ideal.

 

I dont nessecarily thing that there needs to be a quick easy way to switch from 2 columns to 3.. Right now as osc stands, it is 3 columns and its not SUPER easy to remove the other column unless you know coding. if you had a 3 column layout using divs, it would probably be the same amount of work to remove a column (or add a column) as with tables - but the INNER content will be SOO much easier to move and adjust and change.. and that is where the change really is important.

 

Redesigning the product layouts and epsecially the product info pages would make a world of difference.. then once there is a complete tableless design, people can start working on a plugin system and theming system similar to that of wordpress where it is a one click install type of deal.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Yes, but generally milestones reached within upgrades of an existing codebase SHOULD be large undertakings. That is why they generally take a long time to come to life.. Obviously it is not something that one person can do in a matter of weeks.. But none the less, oscommerce will likely fall off the face of the earth if things arent brought up to speed with new technology. Tables are not meant for content the way that oscommerce uses them - yes it works.. but no, it is not ideal.

 

I dont nessecarily thing that there needs to be a quick easy way to switch from 2 columns to 3.. Right now as osc stands, it is 3 columns and its not SUPER easy to remove the other column unless you know coding. if you had a 3 column layout using divs, it would probably be the same amount of work to remove a column (or add a column) as with tables - but the INNER content will be SOO much easier to move and adjust and change.. and that is where the change really is important.

 

Redesigning the product layouts and epsecially the product info pages would make a world of difference.. then once there is a complete tableless design, people can start working on a plugin system and theming system similar to that of wordpress where it is a one click install type of deal.

 

Here is essentially what I have done, but with all the programming removed:

Below is my index page with the relevant stylesheet elements

 

 

Stylesheet elements:

body {margin-left: 25px;margin-top:20px;padding: 0px;text-align: left;width:1000px;min-width: 760px;}

#Header {position: absolute;top: 10;left: 24;width: 900px;border-bottom:0px solid #ccc;}

#pageContent {float: right;width: 700px;border-width: 0px;border-color: #ccc;border-style: solid;}

#page {float: left;width: 900px;margin: 110px 0 10px 0;}

#pageColumnLeft {float: left;width: 190px;padding-left: 5px;border-width: 0px;border-color: #blue;border-style: solid;}

#Footer {clear: both;text-align: center;padding: 0px;border-top:1px solid #ccc;width:900px;}

 

 

my Index page:

<body>

 

<div id="Header">

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

</div>

 

 

<div id="page">

<div id="pageColumnLeft">

<?php require(DIR_WS_INCLUDES . FILENAME_COLUMN_LEFT); ?>

</div>

 

<div id="pageContent">

<?php require(DIR_WS_INCLUDES . FILENAME_CONTENT); ?>

</div>

</div>

<div id="Footer">

<?php require(DIR_WS_INCLUDES .FILENAME_FOOTER); ?>

 

 

</div>

 

</body>

 

 

Note: I create a new file called 'content'. It is the index file stripped of everything that doesn't go in the header, footer, or left or right columns, and all the metadata. In my CRe Loaded the programming it is the index file (actually the 'mainpage') that calls all the other pages as they are requested. I don't remember if the index page on a stock OSC has the programming to call the pages.

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

yea.. well, what you are giving us isn't much more than a basic CSS layout. Hate to say this but it doesn't reallyhelp all that much. The hard part is pulling out the intricate tables and making them work structurally within the new divs.

 

For instance the box classes - they are horrendous. To strip ALL of the tables and then reclass the boxes will be a HUGE undertaking.

 

The overall structure is easy.. I did what you did as well to my website, but it is VERY VERY far from tableless

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

yea.. i just had a better look at your website.. You dont have a tableless design.. You have a div structure on the home page, but everything within your content is all table based.

 

Also, on a side note, your div structure is not ideal.. you don't have a containing div, which will give you a LOT more reliable positioning.. instead you just have a few divs stacked on top of each other and nothing to keep them in place

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

yea.. i just had a better look at your website.. You dont have a tableless design.. You have a div structure on the home page, but everything within your content is all table based.

 

Also, on a side note, your div structure is not ideal.. you don't have a containing div, which will give you a LOT more reliable positioning.. instead you just have a few divs stacked on top of each other and nothing to keep them in place

Actually most of the pages on the site are tableless and since the pages all fit within the content tag, I can change them a few at a time, as long as I'm careful with the text. Note how short the pages are, high up on the pages the content is, or how much of it is content and not html.

 

I would disagree about the containing div tags, you can use the body tag for a lot, it's a bit more efficient. In any case this demonstrates my point, that what I've done works for my case but might not in another.

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

I dont know.. I had a look and although there are divs within your website, it is really far from being tableless. Like i said, within your product info page alone I counted i think 6 nested tables! You can definitely use the body tag for a lot of things, but you almost always need a containing div. For instance, your content uses a margin top to push it down underneath the top header when you could actually just display it as a block element within a container.

 

I am just saying that it's not a tableless osc install by any means. What I am looking to do is completely remove tables from the website except in the case where tabular data is shown

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I dont know.. I had a look and although there are divs within your website, it is really far from being tableless. Like i said, within your product info page alone I counted i think 6 nested tables! You can definitely use the body tag for a lot of things, but you almost always need a containing div. For instance, your content uses a margin top to push it down underneath the top header when you could actually just display it as a block element within a container.

 

I am just saying that it's not a tableless osc install by any means. What I am looking to do is completely remove tables from the website except in the case where tabular data is shown

Yes, there are more tables to remove, note that they are within the content or coloumnleft tags. The overall structure is set.

 

Again I would disagree about a the containing body tag. A containing div tag would be redundant and do nothing the body tag doesn't already do. This is an elegant set up. Note that the footer moves up and down to fit both the dynamic sizing of either of the two columns, and still floats perfectly aligned left and right to the page tag. The point of not having a containing tag is to allow the body tag to set the vertical position of the page tage. This keeps the header div separate from everything else, which in turns eliminates the need to do any relative positioning.

 

If you had any relative positioning in this structure, then if new div tags added to content or columnleft tags had any relative positioning they could affect the overall layout. With this set up you can use nested div tags with relative positioning within the content and column tags 'safely'.

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

I dont know.. I had a look and although there are divs within your website, it is really far from being tableless. Like i said, within your product info page alone I counted i think 6 nested tables! You can definitely use the body tag for a lot of things, but you almost always need a containing div. For instance, your content uses a margin top to push it down underneath the top header when you could actually just display it as a block element within a container.

 

I am just saying that it's not a tableless osc install by any means. What I am looking to do is completely remove tables from the website except in the case where tabular data is shown

Here's a quick and dirty way to get rid of the tables in the product listing, shopping cart and boxes. Go into modules/boxes.php and replace the "<table" -and all it's parameters on that line " with <div class="tables" and replace " /tables>" with "div>", replace "<tr" with "<ul", "/tr>" with "/ul" and all instance of "<td" with "<li" and all instances of "/td>" with "/li>" then add this bit of CSS to your stylesheet:

 

.tables {}

.tables ul {margin: 0px;padding: 0px;float: left;border: 0px solid #ccc;}

.tables ul li {list-style-type: none;border: 0px dashed #cccccc;width: 175px;}

 

Then you'll have no more tables any where, except where they are coded on the individual pages. Your shop will be a mess, but at least at that point it will all be a CSS problem.

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

Very interesting topic. Also seems to explain where Manmachine (author of OsPlayer, which hasn't been updated in years) is putting his energies :) Might even have a play with osCSS myself.

www.jyoshna.com. Currently using OsC with STS, Super Download Store, Categories Descriptons, Manufacturers Description, Individual Item Status, Infopages unlimited, Product Sort, Osplayer with flashmp3player, Product Tabs 2.1 with WebFx Tabpane and other bits and pieces including some I made myself. Many thanks to all whose contributions I have used!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...