Jump to content

Recommended Posts

Defrosted version ?


Live   : OsC 2.2, php 5.6 & UTF-8  |  Local : phoenix and oscommerce v4 test when v4 will be available

Share this post


Link to post
Share on other sites

I use Bootstrap 5 for the responsive grid because it is superior to the grid of W3.CSS

In template_top.php you will find:

		<div id="bodyContent" class="col-md-<?php echo $oscTemplate->getGridContentWidth(); ?> order-first order-md-2">

In template_bottom.php you will find:

<?php
  if ($oscTemplate->hasBlocks('boxes_column_left')) {
?>

<div id="columnLeft" class="col-md-<?php echo $oscTemplate->getGridColumnWidth(); ?>">	
  <?php echo $oscTemplate->getBlocks('boxes_column_left'); ?>
</div>

<?php
  }

  if ($oscTemplate->hasBlocks('boxes_column_right')) {
?>

<div id="columnRight" class="col-md-<?php echo $oscTemplate->getGridColumnWidth(); ?> order-last">
  <?php echo $oscTemplate->getBlocks('boxes_column_right'); ?>
</div>

<?php
  }
?>

Then in includes/classes/osc_template.php:

var $_grid_content_width = 6;

and

    function getGridColumnWidth() {
      return 3;
    }

These settings control the project layout. No changes to the database are made. I imagine that the way it is setup now would suit most installations. In Admin, you can still turn on/off boxes, or move them left/right. By doing so you could have a 1,2 or 3 column layout without having to edit code.

If anyone has installed the package from when I have made it available, i have updated it with some progress. You should be able to overwrite the files (minus the configure and htaccess files) to see the changes.

Share this post


Link to post
Share on other sites

W3.CSS is easy to learn, easier than Bootstrap. And easier to theme with.

Go to:

https://www.w3schools.com/w3css/w3css_color_themes.asp

for a list of pre-defined colour schemes.

By adding 1 line of code to template_top.php with your chosen scheme, you now have a new look to the site.

 

w3-1-min.png

w3-2-min.png

Share this post


Link to post
Share on other sites

Made some edits to the english language file to achieve this. Anybody using another language pack can / will have to do the same.

#define('PREVNEXT_BUTTON_PREV', '[&lt;&lt;&nbsp;Prev]');
#define('PREVNEXT_BUTTON_NEXT', '[Next&nbsp;&gt;&gt;]');
define('PREVNEXT_BUTTON_PREV', '&laquo;');
define('PREVNEXT_BUTTON_NEXT', '&raquo;');

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×