Jump to content



Photo
- - - - -

Convert OSCommerce 2.2RC2a to table-less CSS


  • Please log in to reply
233 replies to this topic

#101   jwilkins

jwilkins
  • Members
  • 63 posts
  • Real Name:James Wilkins
  • Gender:Male
  • Location:Hull, UK

Posted 09 April 2010 - 17:50

No probs.. thanks for taking the time to put the initial release up. I have made a few amendments to suit my own needs, but a lot of it can be re-applied back into your build..

James

#102   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 09 April 2010 - 17:52

I have a quick question.. Do you guys have a suggestion for installing this addon for a store that already has a bunch of plugins installed?


There is no reason this can't be done.

One method would be:

1) Make a backup copy of your website in such a way that you will be able to use your HTML editor ( Dreamweaver, Golive, or whatever you use) to cut and paste from the backup copy into the website you are installing the OSC to CSS contribution.

2) Install the OSC to CSS contribution on your website.
Once you install the OSC to CSS contribution, the various contributions you have installed now will still be installed on the admin side and your database, but not on the catalog side.

3) Identify which catalog pages from the original website, your backup copy, have been altered by your existing contributions. Perhaps you could go back through the instructions for each contribution installed to help identify this.

4) Then for each catalog page from the backup copy that has been altered by your existing contributions, open up that catalog page side by side with the same catalog page from your website that now has the OSC to CSS contribution installed.

Then using your best HTML and php skills cut and paste the contribution snippets from that catalog page in your backup copy full of tables to the 'same spot' in the catalog page in the tableless copy. It is identifying the 'same spot' or workable spot that will require creativlty.


The alternative would be to reinstall the contributions all over again from scratch, but I really think that would be much more work. You would still have to 'translate' the contribution snippet locations on the catalog side from table to tableless, and you already have the contributions installed and working on your database and the admin side.

#103   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 09 April 2010 - 18:00

No probs.. thanks for taking the time to put the initial release up. I have made a few amendments to suit my own needs, but a lot of it can be re-applied back into your build..

James



#104   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 09 April 2010 - 18:01

When you have what you like for me to test for putting up on the contribution, post the link, and also post how you like to be identified, link, name so I can give credit where credit is due.

#105   jwilkins

jwilkins
  • Members
  • 63 posts
  • Real Name:James Wilkins
  • Gender:Male
  • Location:Hull, UK

Posted 09 April 2010 - 18:17

When you have what you like for me to test for putting up on the contribution, post the link, and also post how you like to be identified, link, name so I can give credit where credit is due.

I think that was intended for me?? If so, you can grab a copy now.. it's on Google Code, so anyone can take a copy.. http://code.google.c.../downloads/list

This is "work in progress" at the minute and part of a larger picture.. i.e a "full" store all the "usual" contributions in place for people to use if they like. I plan to firstly valdiate the admin, then convert this to tableless, then add in some of the more usefull contributions, then to re-work the whole thing so that it feels a bit more Web 2.0.

You'll notice that it's in 'RC' state at the moment.. so credits, working notes, finalised framework from the osC team, etc all need to be applied as I make some more progress.

No credits are needed for me.. it's all your work to date anyway /thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' />

#106   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 09 April 2010 - 18:31

Jwilkins,

It sounds like then your copy,
http://code.google.c.../downloads/list
has contributions installed? Which ultimately I think folks might prefer, but then that would mean the shop has to be installed with the admin side and database updated.

Right now the OSC to CSS is 'contribution-free'.

#107   jwilkins

jwilkins
  • Members
  • 63 posts
  • Real Name:James Wilkins
  • Gender:Male
  • Location:Hull, UK

Posted 09 April 2010 - 18:53

Jwilkins,

It sounds like then your copy,
http://code.google.c.../downloads/list
has contributions installed? Which ultimately I think folks might prefer, but then that would mean the shop has to be installed with the admin side and database updated.

Right now the OSC to CSS is 'contribution-free'.

Ultimately that's what it will become, pre-built with contributions installed. However, at the moment, the site (built off a snapshot of GitHub 26/02/2010) is free from contributions that require any installation. That being said, it's a 'full site', so you can drop it into your dev environment (recommended) and run it up. It's good to go.

In place of some of your code, I added a contribution that removed the need for the infoBox class (infoboxes now use <ul><li></li></ul> and CSS, plus your CSS product_listing enhancement (referenced on the download page at code.google.com)), which had a 'better' feel to it.

Of course, this goes beyond what you had in place (some extra code has been removed, left over for Article Manager and X-Sell to make it a more 'stock' site), but for someone adept at 'merge-compare', or for yourself to merge the valid HTML into your contribution, it may act as a usefull addition. If not, then that's cool /smile.gif' class='bbc_emoticon' alt=':)' />

James

#108   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 09 April 2010 - 19:35

I appreciate your work. I'm going to have a better look at it this weekend.

When I made the conversion, there was a trade-off between doing stuff 'better', such as changing the infoboxes, and keeping it close to the stock site.

#109   jwilkins

jwilkins
  • Members
  • 63 posts
  • Real Name:James Wilkins
  • Gender:Male
  • Location:Hull, UK

Posted 09 April 2010 - 19:53

I appreciate your work. I'm going to have a better look at it this weekend.

When I made the conversion, there was a trade-off between doing stuff 'better', such as changing the infoboxes, and keeping it close to the stock site.

I totally agree.. You've done an excellent job at retaining the original look, something which is very hard to do (considering how outdated the stock site looks! /wink.gif' class='bbc_emoticon' alt=';)' /> ). Visually there won't be much difference apart from the product_listing table and a few "quirks" on the infobox styling (which I haven't got around to fixing just yet), but all the catalog files (and stylesheet) are now W3C compliant and I'm making good progress on the admin end..

#110   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 09 April 2010 - 20:07

The W3C complaint is a nice touch.

#111   Mister_dj

Mister_dj
  • Members
  • 60 posts
  • Real Name:Wim Van Gorp

Posted 22 April 2010 - 17:04

Hi!

there seems to be a problem with this contribution's login page.
When I create a new account and then want to login on the login page, the page refreshes when signing in.
Making it impossible to sign in.
The items in the (guests)cart are deleted

I installed this contribution on a vanilla shop. No other contributions installed so far.

Any ideas what this might be?


Kind regards

#112   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 22 April 2010 - 17:43

I just checked the contribution file 'login.php'. The programming is the same, as it should be, with 'login.php' on the current download 2.2rc2a

Check your installation.

#113   lindsayanng

lindsayanng
  • Members
  • 4,258 posts
  • Real Name:Lindsay
  • Gender:Female
  • Location:Milford, Connecticut U.S.A.

Posted 22 April 2010 - 18:33

Check your cookies or session id settings. That is a common issue that has nothing to do with this plugin/ addon
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!!

#114   TS153

TS153
  • Members
  • 47 posts
  • Real Name:Terry Scarr

Posted 26 April 2010 - 06:07

Hi Guys
Just wanted to see whether anyone has had success with changing the amount of columns of the new product module on the index page.
I have changed my from new products to specials but am not having much success in changing the column count.
I cant tell whether its the css version of OSC or my changing it to specials that is making it not work.
Any ideas would be appreciated.

#115   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 26 April 2010 - 06:33

Hi Guys
Just wanted to see whether anyone has had success with changing the amount of columns of the new product module on the index page.
I have changed my from new products to specials but am not having much success in changing the column count.
I cant tell whether its the css version of OSC or my changing it to specials that is making it not work.
Any ideas would be appreciated.


The column count is superceded in this contribution. The 'column count' is done in the stylesheet. Find in stylesheet.css
.productlisting-odd, .productlisting-even
Note the 'width'. The column count will be however many of that width fits within the width of
#pagecontent
also in the stylesheet.css

For example if the width of
#pagecontent
is 650px and the width of
.productlisting-odd, .productlisting-even
is 200px, your 'column count will be 3. If you reduce the width of
.productlisting-odd, .productlisting-even
to 150px your column count will be 4, simply because 4 x 150 is less than 650px. You can also play with the margins to space out the columns and reduce the column count without making the columns wider, for example. That's actually the beauty of CSS, you can do so much from a single file, the stylesheet.

#116   TS153

TS153
  • Members
  • 47 posts
  • Real Name:Terry Scarr

Posted 26 April 2010 - 07:04

Thanks, so simple I dont know what I was thinking lol not CSS obviously.
productlisting-new was the one I was after.
Love the contrib by the way so much easier to work with in general.

#117   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 26 April 2010 - 14:43

Thanks, so simple I dont know what I was thinking lol not CSS obviously.
productlisting-new was the one I was after.
Love the contrib by the way so much easier to work with in general.

For the new products, in the stylesheet look for:

.productlisting-new and .productlisting-new-heading

and compare those widths to the width of the #pagecontent.

also see:

.cssproduct_listing_content and
.cssproduct_listing_item or

Edited by npn2531, 26 April 2010 - 14:51.


#118   Mister_dj

Mister_dj
  • Members
  • 60 posts
  • Real Name:Wim Van Gorp

Posted 30 April 2010 - 08:00

I just checked the contribution file 'login.php'. The programming is the same, as it should be, with 'login.php' on the current download 2.2rc2a

Check your installation.

You're right! I made a mistake...
This problem did occur on jwilkins's version.
Yours works like a charm!

#119   Mister_dj

Mister_dj
  • Members
  • 60 posts
  • Real Name:Wim Van Gorp

Posted 30 April 2010 - 08:16

ul/li manufacturers list

If you use the manufacturers list on your website, you can change this to a ul/li list like the categories list. And apply the same css style to it

in includes/boxes/manufacturers.php
Find:
// Display a list
      $manufacturers_list = '';
      while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
        $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
        if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>';
        $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';
      }

      $manufacturers_list = substr($manufacturers_list, 0, -4);

      $info_box_contents = array();
      $info_box_contents[] = array('text' => $manufacturers_list);
    } else {
Replace by:
// Display a list
      $manufacturers_list = '<ul id="nav">';
      while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
        $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
        if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>';
        $manufacturers_list .= '<li class="cat_lev_1"><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a></li>';
      }

      $manufacturers_list = ($manufacturers_list) . '</ul>';

      $info_box_contents = array();
      $info_box_contents[] = array('text' => $manufacturers_list);
    } else {


#120   npn2531

npn2531
  • Members
  • 1,135 posts
  • Real Name:Jase
  • Gender:Not Telling

Posted 30 April 2010 - 09:17

ul/li manufacturers list

If you use the manufacturers list on your website, you can change this to a ul/li list like the categories list. And apply the same css style to it

in includes/boxes/manufacturers.php
Find:

// Display a list
      $manufacturers_list = '';
      while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
        $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
        if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>';
        $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';
      }

      $manufacturers_list = substr($manufacturers_list, 0, -4);

      $info_box_contents = array();
      $info_box_contents[] = array('text' => $manufacturers_list);
    } else {
Replace by:
// Display a list
      $manufacturers_list = '<ul id="nav">';
      while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
        $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
        if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>';
        $manufacturers_list .= '<li class="cat_lev_1"><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a></li>';
      }

      $manufacturers_list = ($manufacturers_list) . '</ul>';

      $info_box_contents = array();
      $info_box_contents[] = array('text' => $manufacturers_list);
    } else {


Hey Thanks,

I can use this.