Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Making the footer div non fluid?


Recommended Posts

i hope someone can advise!
 
Since this is considered "core code" below, taken from footer.php file.
 
And I am wanting to change the footer div to "container" rather than keep it "container-fluid", mainly to put the all 4 footer boxes the same width as the non fluid content (if selected from admin) that sits above it, other than editing the below code, how else can I overrite or change the div class below?
 
I don't want to mess with any core code, but it seems the below is kind of forcing a restrictive design choice by having those classes fixed as "container-fluid".

<footer>
  <div class="footer">
    <div class="container-fluid">
      <div class="row">
        <?php echo $oscTemplate->getContent('footer'); ?>
      </div>
    </div>
  </div>
  <div class="footer-extra">
    <div class="container-fluid">
      <div class="row">
        <?php echo $oscTemplate->getContent('footer_suffix'); ?>
      </div>

    </div>
  </div>
</footer>

When the div class is changed to "container", it shows how I want it. See attached picture.

I can't see any option in admin to edit this, unless im mistaken?


 

post-214618-0-60543600-1421957872_thumb.jpg

Link to comment
Share on other sites

@@vampirehunter

 

A  simple solution would be replace each class="container-fluid" in footer.php with class="<?php echo BOOTSTRAP_CONTAINER; ?>" (from template_top.php).

 

But if you do not want to change core code then you could do it with a header_tags module that contains some jquery that removes the container-fluid class from the footer and then adds the container class (similar to ht_grid_list_view.php, but without the cookie and pages stuff). 

          $oscTemplate->addBlock('<script>$(function(){ $(\'footer.footer\').removeClass(\'container-fluid\').addClass(\'container\'); $(\'footer.footer-extra\').removeClass(\'container-fluid\').addClass(\'container\'); });</script>' . "\n", $this->group);

But this option seems like a bit of overkill for something so minor.

 

Remember though, if footer core code changes in future you may need to modify this new module to reflect changes.

 

cheers

My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Link to comment
Share on other sites

@@vampirehunter

 

A  simple solution would be replace each class="container-fluid" in footer.php with class="<?php echo BOOTSTRAP_CONTAINER; ?>" (from template_top.php).

 

But if you do not want to change core code then you could do it with a header_tags module that contains some jquery that removes the container-fluid class from the footer and then adds the container class (similar to ht_grid_list_view.php, but without the cookie and pages stuff). 

          $oscTemplate->addBlock('<script>$(function(){ $(\'footer.footer\').removeClass(\'container-fluid\').addClass(\'container\'); $(\'footer.footer-extra\').removeClass(\'container-fluid\').addClass(\'container\'); });</script>' . "\n", $this->group);

But this option seems like a bit of overkill for something so minor.

 

Remember though, if footer core code changes in future you may need to modify this new module to reflect changes.

 

cheers

 

Yes thanks. i think jquery for such a minor change is indeed overkill!

 

I think just straight editing the html class is ok in this case even though its considered "core" code. I think some things just have to be edited, as making virtually everything modular is probably going to be in the future oscommerce releases.

 

The bootstrap version itself as a starting point is so so much better than the standard non bootstrap version. The bootstrap version just looks so much better, in every device you view it, especially mobile, looks awesome.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...