Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Any thoughts in making oscommerce tableless?


lindsayanng

Recommended Posts

  • Replies 79
  • Created
  • Last Reply

I've modified all pages and stripped out the section from the setting the breadcrumb upto the body_text beginning where the actual page contents is.

Similarly I have done the same at the end of the page.

Result is that by modifying my css_before & after and css files, I can change the layout of the site quite easily. As for SEO, My header navigation actually loads last ...

...
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));

 require('includes/css_before.php');

?>
<!-- body_text //-->


....

<!-- body_text_eof //-->
<?php require('includes/css_after.php'); ?>

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I've modified all pages and stripped out the section from the setting the breadcrumb upto the body_text beginning where the actual page contents is.

Similarly I have done the same at the end of the page.

Result is that by modifying my css_before & after and css files, I can change the layout of the site quite easily. As for SEO, My header navigation actually loads last ...

...
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));

 require('includes/css_before.php');

?>
<!-- body_text //-->


....

<!-- body_text_eof //-->
<?php require('includes/css_after.php'); ?>

 

How this effect the appearance of the html within the body tags? Have you been successful in stripping out the tables from the boxes or from the product listings?

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

no, you are correct, it does not.

Left and right I have stripped down pages, but I for instance have not removed the tables from the boxes as I didn't need it.

My point was to have a website layout that I can easily modify and to get rid of the column left & right.

I still use pretty much the standard boxes. The fact that they are html tables is not important to me as I call the required classes to generate these from code.

I thought the point is that modifying a table based layout is hard, the fact that smaller tables are used as part of an overall css based layout is of no consequence (to me at least)

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Thought I'd put the boot in here against the "tableless css" evangelists.

 

We all agree that div/css based design is the way forward but css evangelists take this too far .. tables are still valid!!!

 

By all means build the site in divs/css but tabular data should be in tables.

Link to comment
Share on other sites

ok yes..tabular data should be in tables. There are a FEW places in osc where tables are ok.. but the lists that exist in the boxes are not that place.. the overall website is a huge mess of tables.. I am not a css "evangelist" but i do absolutely feel that osc's structure should be shifted towards CSS just to simply keep up with the times. If this is done it will also open up for easier skinning

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

ok yes..tabular data should be in tables. There are a FEW places in osc where tables are ok.. but the lists that exist in the boxes are not that place.. the overall website is a huge mess of tables.. I am not a css "evangelist" but i do absolutely feel that osc's structure should be shifted towards CSS just to simply keep up with the times. If this is done it will also open up for easier skinning

 

Agree totally Lindsay and please let me add that you weren't the evangelist I was booting :)

Link to comment
Share on other sites

Yes there is a place for tables for tabular data, but it would be really nice to get the tables out of the product listings on the index or the shopping cart page. It's on the products displays that attractive, compelling design is crucial.

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

Gotcha Robert..

 

I am considering doing a tableless design for the next cart that I am designing, but the only concern is the updateability for this type of change. My client is going to have a VERY VERY heavily styled and graphic heavy website.. i would PREFER to do it using css to make some unique backgrounds and stuff.. Well, we will see. If it get it done I will definitely upload a blank version of it.. meaning no addons or graphics, just completely tableless.

 

Id like to play with osCSS but i dont speak the language.

Another question..

 

Are there any "other" open source shopping carts out there that do use CSS for the layout instead of tables? I noticed that a LOT of the shopping carts do still use tables, but I bet that if someone comes out with something like wordpress that is easily skinnable, they will become the #1 choice.. Right now there isn't anything otu there like that, but theres no reason there can't be. Wordpress is open source and free and they managed to do it.. someone needs to do that for a shopping cart. Maybe make the money back by doing it wordpress style and offerin the free shop.shoppingcartname.com with paid upgrades.

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

Gotcha Robert..

 

I am considering doing a tableless design for the next cart that I am designing, but the only concern is the updateability for this type of change. My client is going to have a VERY VERY heavily styled and graphic heavy website.. i would PREFER to do it using css to make some unique backgrounds and stuff.. Well, we will see. If it get it done I will definitely upload a blank version of it.. meaning no addons or graphics, just completely tableless.

 

Id like to play with osCSS but i dont speak the language.

Another question..

 

Are there any "other" open source shopping carts out there that do use CSS for the layout instead of tables? I noticed that a LOT of the shopping carts do still use tables, but I bet that if someone comes out with something like wordpress that is easily skinnable, they will become the #1 choice.. Right now there isn't anything otu there like that, but theres no reason there can't be. Wordpress is open source and free and they managed to do it.. someone needs to do that for a shopping cart. Maybe make the money back by doing it wordpress style and offerin the free shop.shoppingcartname.com with paid upgrades.

 

Well last year I did actually build a fork of osCommerce (that shall remain nameless here) the main aspects were ..

 


  •  
  • Object oriented core code.
  • Fast "Plug it In" template system (using PHP not heavy templating scripts)
  • Build complete templates without touching a single core file
  • Enhanced database access layers (PDO - PHP Data Objects)
  • All queries are prepared statements (highly secure)
  • Removed predefined long arrays ($HTTP_XXX_VARS)
  • Url Manager including standard urls - seo urls - seo urls (rewrite)
  • Enhanced efficiency (e.g. query efficiency)
  • PHP5/MySQL5 (PHP6 compatability a target)
  • Improved security
  • Powerful variable, object and query displays (function creation and debugging)
  • Valid XHTML, valid CSS level 3
  • UTF8 - Conversion of files and database.

 

The templates were based loosely on a single index.template.php (SMF forum stylee).

 

I got busy and never promoted it/took it further so there it sits gathering dust.

Link to comment
Share on other sites

Are interested in maybe working on it again?? PM me and maybe we can work together a little.. I'm not a wonderful php coder, but ANYTHIGN with promoting, design, and front end is all about me!!

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

It's not really a lot of work to strip out the tables from osCommerce.

They are only made by a few files, perhaps 40 at most!

 

What is more work; if you have only a small knowledge of CSS - you will struggle to make osCommerce look correct after stripping the tables.

Link to comment
Share on other sites

40 files and the number of tables does kind of equate to a LOT of work.. I think the CSS wouldn't be too hard. There are plenty of css templates out there for 2 and 3 column designs.. but the hard part is where to put the divs within the osc code i think

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

The number of tables is of little importance. If you look at the codebase you can easily see that the infoBoxes (one of the main "nested" tables) are controlled by 1 class file. You amend that class file properly, and those nested tables disappear, all in one shot.

Link to comment
Share on other sites

I guess i have to REALLY look into the class generator files. I always thought that the classes where just where the styling came from, i thought that the ACTUAL <tr> and <td>'s were in the code itself.. within the box files like boxes/shopping_cart.php files.

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

"boxes/shopping_cart.php"

 

Those files (in /includes/boxes/) would need to be amended as part of the 40ish files I originally mentioned.

 

Look at /includes/classes/boxes.php to see how those boxes are formed.

Link to comment
Share on other sites

 

Id like to play with osCSS but i dont speak the language.

Another question..

 

 

Although the oscss installer gives instructions in French I guess it's the same process as installing a new osCommerce, and although some of the admin menus are in French, the data structure appears to be basically still osCommerce - it is just a fork of osCommerce 2.2 anyway, and the table/field names are all in English, at least the ones I looked at. It don't think it would be difficult to change the sql that sets the database up to use the normal English field descriptions/titles etc just by copying the original wording from an osCommerce download. So you don't really need to speak French to get it set up.

 

Perhaps more of an issue would be that French is the main language in the support forums, and the fact that there don't appear to be any contributions for it yet - no doubt all of those from here that could be modified to work with it.

 

But I don't think the language alone need be a deterent to having a play.

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

  • 2 weeks later...

I dont know what the difference is to be honest, its an interesting debate non the less.

 

what is the difference between creating something using tables and using div tags/ css to get the same affect?

 

Why do DIV tags work out better for SEO?

 

How does the same design using DIV tags/ css give smaller size pages?(I guess you mean loading time/page size in kb/mb)

 

look forward to see how this goes

Getting better with mods but no programmer am I.

Link to comment
Share on other sites

I dont know what the difference is to be honest, its an interesting debate non the less.

 

what is the difference between creating something using tables and using div tags/ css to get the same affect?

 

Why do DIV tags work out better for SEO?

 

How does the same design using DIV tags/ css give smaller size pages?(I guess you mean loading time/page size in kb/mb)

 

look forward to see how this goes

I think a lot of people are confused by what is generally said by the div/css evangelists.

 

I think the div and the css should be seperated as an arguement.

 

div: is far more flexible and achieves the same result with far less code.

 

tables: use far more code than divs but still should be used for tabular data (div evangelists shudder)

 

css: Great idea whether a div or table based design to decouple the style to the css file, this allows great flexibility in changing design via one file only.

 

Design is not my thing I focus on LAMP but that is my take on it for what it's worth.

Link to comment
Share on other sites

Not trying to evangelize one way or the other, but using <div>s + CSS to lay out a page generally results in much smaller, cleaner, more understandable, and easier to program code than with tables. Using tables to physically lay out a page means nesting tables within tables within tables within tables... plus using all sorts of ugly little tricks such as one-pixel images to get spacing "just right". All of this is error-prone and tedious, and difficult to understand when you later come back to the page to change it. With a div, in the CSS you give width, height, and location within the page, and that's basically it. The idea with CSS is to separate content into HTML and styling (layout) into CSS. Now that most browsers in use (including IE6) at least support enough basic CSS to do that kind of layout, there's no real reason to start a new page coding using tables. It's debatable as to whether it's worth the effort to convert an existing table-driven layout to div/CSS -- if a page is going to be substantially upgraded, or will be in use for a very long time to come, it probably is. I'm not sure how big an effect it has on SEO, but it can make using a screen-reader (for the blind) a much better experience, and it should load faster (with tables, the entire table must be loaded before rendering can start). And by the way, tables should be used for genuinely tabular data, such as rows and columns such as would come from a spreadsheet. Any "div evangelist" who doesn't think so is an idiot.

Link to comment
Share on other sites

Not trying to evangelize one way or the other, but using <div>s + CSS to lay out a page generally results in much smaller, cleaner, more understandable, and easier to program code than with tables. Using tables to physically lay out a page means nesting tables within tables within tables within tables... plus using all sorts of ugly little tricks such as one-pixel images to get spacing "just right". All of this is error-prone and tedious, and difficult to understand when you later come back to the page to change it. With a div, in the CSS you give width, height, and location within the page, and that's basically it. The idea with CSS is to separate content into HTML and styling (layout) into CSS. Now that most browsers in use (including IE6) at least support enough basic CSS to do that kind of layout, there's no real reason to start a new page coding using tables. It's debatable as to whether it's worth the effort to convert an existing table-driven layout to div/CSS -- if a page is going to be substantially upgraded, or will be in use for a very long time to come, it probably is. I'm not sure how big an effect it has on SEO, but it can make using a screen-reader (for the blind) a much better experience, and it should load faster (with tables, the entire table must be loaded before rendering can start). And by the way, tables should be used for genuinely tabular data, such as rows and columns such as would come from a spreadsheet. Any "div evangelist" who doesn't think so is an idiot.

 

 

Using CSS and div tags does make a difference SEO wise. Just look at the source code in your browser of web pages done both ways. With div's the text is much higher up on the page, and more importantly, instead of having say 20% of your page as text, you can have 60% or more as text, and the page is less kilobites. That's google friendly.

 

As far as facilitating web design, there is no comparison. One design change can justify stripping out the tables in OSCommerce 2.2.

 

Also I would disagree with you on tabular data. You can do much more with div tags than with tables even when it comes to rows and columns. Since you feel those of us who prefer divs to tables are 'idiots' , I challenge you to name one reason why it is better to display data with tables than div tags. Just as one quick example, take a look at this chart here, it is done with div tags, not a table, tr or td on the site. http://invoicemachine.com/pricing. Or for an example of a chart in a tableless 2.2 OSCommerce site look here: http://www.niora.com/anti-aging-acne-care.

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

The <table> tag was put into HTML for the purpose of easily organizing tabular data, such as your list of features vs plans. It's great where you have a grid of items, where columns are of given width(s) and rows may be of fixed or varying height. If you want to go through (possibly) lots of extra work to lay it out with divs and CSS, be my guest. I would use a table for that purpose, but whatever makes you happy... My original point was that tables were never intended to do general layout of a page. They were pressed into this service, with nested tables within tables within tables and lots of oddball 1x1 pixel spacer images, simply because there was no other way to finely control page layout, pre-CSS. As you have demonstrated in your examples, it certainly is possible to lay out nice-looking tabular data with nary a table in sight, but I don't see the point of it. My argument is with those who insist that tables are pure evil and should never be used. They sound like "goto-less programming" fanatics, who would actually remove a useful feature from a language rather than see it abused by some programmers. Proper training and good judgment are the keys (when to use tables and when to use divs), not forbidding the use of a useful feature because some applications abuse it.

Link to comment
Share on other sites

MrPhil - you are completely and totally right. why WOULD you use divs to create a table when you have the absolutely proper way to do it - USING <table> !!!

 

I think to remove them completely would be silly, and creating more work for yourself is obviously counter productive.

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

MrPhil - you are completely and totally right. why WOULD you use divs to create a table when you have the absolutely proper way to do it - USING <table> !!!

 

I think to remove them completely would be silly, and creating more work for yourself is obviously counter productive.

 

It is actually less work to build a data chart with div tags than with table tags, and easier to style them. Look at the source code on http://www.invoicemachine.com/pricing and you'll see what I mean. Think about all the table, tr and td tags you would need to build that chart.

 

Anyway I'm off now, I need to find some useful code to abuse and some table tags to forbid.

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

Archived

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

×
×
  • Create New...