Announcement

Collapse
No announcement yet.

Reduce the bulk of unnecessary code!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reduce the bulk of unnecessary code!

    this is the second or third time i have done this to the products listing page. the default "listing_0.html" is 759 lines of code

    WAY too much html in here. this is bad for several reason
    1. difficult to understand
    2. visitors have to reload all this html on each page, css is cached and therefore much faster
    3. more code for search engines to parse, making your content not as high on the page


    Just to filter through this code and trim it down takes me an hour, and is pretty tedious. I will provide it here, if anyone is interested in customizing their product pages, this could be very useful! This reduces the code to only 411 lines; basically half the size!

    from there you can easily modify the page from a mess of tables to a clean CSS design.

    you can download the txt file and rename it to .html and put in your templates folder. backup first, and use at your own risk! if this is helpful to people i might post more or post versions that have css. let me know
    Attached Files

  • #2
    I have always wanted to try to create a completely CSS 3DC site. It would be allot of work, but would be a great learning project. I have done an entire site in CSS (no tables or java) and it was not too bad. If you go down this road, please keep us posted.

    I would think a completely clean CSS site design would be easier to maintain, would rank higher, and load faster. Of course there are the issues with regard to browser rendering issues. When I did that site completely in CSS I actually had to load an alternate style sheet when the browser was below IE 6.something. This was really due to me using a fairly complex CSS menu system that used images instead of the basic blocks.

    If I only had the time......

    Comment


    • #3
      unless you are using the default templates, going the css route is probably less work than trying to manipulate the default tables.

      already have two 3dcart sites that are over 90% css (not worth it to change every template file). regarding the alternate css... unfortunately microsoft's trash browser (ie6 in particular) almost requires this. most every browser will understand css and display it just fine, then you go back and fix for internet explorer, which looks something like this:

      Code:
      <!--[if lte IE 6]>
          <LINK REL="StyleSheet" HREF="assets/templates/[template]/css/ie.css" TYPE="text/css" MEDIA="screen">
      <![endif]-->
      <!--[if lte IE 7]>
          <LINK REL="StyleSheet" HREF="assets/templates/[template]/css/ie7.css" TYPE="text/css" MEDIA="screen">
      <![endif]-->

      Comment


      • #4
        That's exactly what I had to do to get the CSS site I did to render the menu correctly in IE.

        Would you post a link to your site(s) are are 3DC and CSS? If not can you PM me a link? I would be very interested in seeing the final result.

        Comment


        • #5
          sure, PMed

          Comment


          • #6
            link

            Please pm me the link also.

            Thanks!

            Comment


            • #7
              If 3DC is following this thread I would highly suggest that you create 3 new CSS templates in addition to the templates you already have, especially after seeing the sites bristweb has done. All of them would be more or less the same with one having a left column and center panel, another being with a left and right column and a main center panel, and lastly one with just a center panel. The header and navigation could be the same for all and these would be considered more advanced templates that require some CSS knowledge to work and definitely require customization.

              The benefits to 3DC and users would be:
              • Faster loading pages thanks to streamlined code (less bandwidth for 3DC to pay for)
              • Offering something I have not seen anywhere else, 3DC has many unique features and I this would be one more. Imagine how many CSS savvy designers are out there that would love a 3DC level solution with a CSS front end ready to customize!
              • A site that is very easy to completely change with minimal effort by editing the CSS file only.
              • Future proof, keep in mind that tables are going away slowly and will hopefully continue to do so, some day if 3DC only offers table based designs it will be looked at as old technology, no matter how great the features behind the cart.
              • Possibly better SEO
              • More I can't think of right now....


              I understand that dealing with the browsers is a small issue but with one code base you could constantly be addressing the cross browser issues (really just IE) and updating the templates when problems are reported would eventually leave you with templates that work across all platforms.

              The only possible drawback I see would be that some may go this route instead of designing their own. On the contrary these templates would require editing right off the bat and I still feel users would pay for a CSS design job just as quickly as a standard tables design.

              Any thoughts 3DC?????

              Comment


              • #8
                Yes, am lovin' in bristweb. Could you please pm me your sites as well. I'd really like to check them out. Also, thanks for sharing this is awesome!! :)
                (¯`v´¯)
                `*.¸.*´

                ¸.•´¸.•*¨) ¸.•*¨)
                (¸.•´ (¸.•´ .•´ ¸¸.•¨¯`•
                * P£†®ª *

                Shadow Trailers
                www.TrailerandTruckParts.com
                www.Trailer-Wheels.com
                www.iTrailerParts.com

                Comment


                • #9
                  If 3DC is following this thread I would highly suggest that you create 3 new CSS templates in addition to the templates you already have, especially after seeing the sites bristweb has done. All of them would be more or less the same with one having a left column and center panel, another being with a left and right column and a main center panel, and lastly one with just a center panel. The header and navigation could be the same for all and these would be considered more advanced templates that require some CSS knowledge to work and definitely require customization.
                  I could not agree more. I think this would be a huge improvement!!!!! I too hope that 3DC is reading and following this thread.

                  John

                  Comment


                  • #10
                    I completely agree and hope they are reading this. They need to use much more CSS and update the large amount of outdated code. I learned html/css using the current standards, and had to actually go and read some old books/manuals to regress my code knowledge to be able to make updates.
                    Last edited by DCG; 05-21-2008, 08:16 PM.

                    Comment


                    • #11
                      Originally posted by DCG View Post
                      I learned html/css using the current standards, and had to actually go and read some old books/manuals to regress my code knowledge to be able to make updates.
                      LOL - one big DITTO here!

                      Comment

                      Working...
                      X