Jump to content

Recommended Posts

A simple header_tag module to let you place a back to top button on your site.

You can configure the button in admin. This is a standalone add-on and makes no changes to core files.

That’s it simply copy all files of the into relevant sections and go to admin modules /header tags and install.

Has been tested on CE BS4 and CE BS3

 

image.png.c7f7c2b34ed2ab11a8f764b1a8827d57.png

 


 

Share this post


Link to post
Share on other sites

Thank you very much Zahid for another excellent addon and to move oscommerce forward.


Running Old EDGE, setting up a new Frozen site with many nice addons available on the market and playing with Phoenix!

Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

tried the addon, and the font awesome icon did not appear for me.

but managed to fix it by changing the font family part within the css to

font-family: "Font Awesome 5 Free";

 

Share this post


Link to post
Share on other sites

Ok cool, It's odd how it works fine on the test site with the defaullt setting   "font-family: FontAwesome;"   https://chilleddisplays.co.uk/

I'll look to add that to the admin edit in the next update. I use a CDN so perhaps it's diferent if it's local install.

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">

 


 

Share this post


Link to post
Share on other sites

Hi @JcMagpie I change to font line to

font-family: "Font Awesome 5 Free";

as per a post above bit still only getting the box with no icon using frozen BS

Share this post


Link to post
Share on other sites

Ok it looks as if the CSS Pseudo-Elements for fontawesome were not working on all versions of CE. No idea why it could be they have droped them from the free version. If anyone knows why then post please.

To fix this have added a class option so all you do is add the fas fa-chevron-up  or anything else in admin and all should be good. Use only one option class or CSS Pseudo-Elements not both.


 

Share this post


Link to post
Share on other sites
Posted (edited)

 The the size and color are down to your site css you should be able to make changes. Also check which fonts you are using.

 

 

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

Is the color of the icon is not set in the admin? What is the "Button text-color #fff"parameter?

Share this post


Link to post
Share on other sites
Posted (edited)

It is but all it is doing is setting the css, if your site is overiding this then you will need to fix that. Post or PM a link to the site as without seeing what is happaning it's imposable to say.

fas fa-chevron-up is for Font Awesome 5 are you using that? if not then you need to change to fa fa-chevron-up for Font Awesome 4. Only you will know which you have.

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

In which file can I see it? I installed a new CMS, with almost no code changes, and this is one of the first plug-ins that was installed. No fonts exactly changed.

Share this post


Link to post
Share on other sites

What is here to change/add?

<!-- font awesome -->
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js"></script>

<link href="custom.css" rel="stylesheet">
<link href="user.css" rel="stylesheet">

<!--[if lt IE 9]>
   <script src="ext/js/html5shiv.js"></script>
   <script src="ext/js/respond.min.js"></script>
   <script src="ext/js/excanvas.min.js"></script>
<![endif]-->
 
<script src="ext/jquery/jquery-3.1.1.min.js"></script>

<?php echo $oscTemplate->getBlocks('header_tags'); ?>
</head>
<body>

  <?php echo $oscTemplate->getContent('navigation'); ?>
  
  <div id="bodyWrapper" class="<?php echo BOOTSTRAP_CONTAINER; ?>">
    <div class="row">

      <?php require('includes/header.php'); ?>

      <div id="bodyContent" class="col-md-<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'col-md-push-' . $oscTemplate->getGridColumnWidth() : ''); ?>">
 

Share this post


Link to post
Share on other sites
Posted (edited)

Hi Zahid,

I have just downloaded and installed this header tags module.

On my website, the button appears immediately on loading a page even when you are already at the top of the page.  It then disappears when you start scrolling - but just for the length of the 'Button scroll offset' before reappearing again.

I assume it is not meant to appear when you are at the top of the page. Any ideas what could be causing this? My website is ancientcointraders.com

EDIT: I have noticed the same issue on your website so appears this is the default behaviour. Is there a way to stop it appearing when you first load a page and you are already at the top?

Thanks

Regards,

Peter

 

Edited by peterpil19

Full-time I am a C-suite executive of a large retail company in Australia.

I am enjoying learning about web-design.

CE Phoenix is the best and only version of osCommerce worth considering. Download it here: https://github.com/gburton/CE-Phoenix

Share this post


Link to post
Share on other sites

Thanks, appreciate the speedy response,

Is there an easy way to change it so it only appears when you start scrolling?

Thanks,

Peter


Full-time I am a C-suite executive of a large retail company in Australia.

I am enjoying learning about web-design.

CE Phoenix is the best and only version of osCommerce worth considering. Download it here: https://github.com/gburton/CE-Phoenix

Share this post


Link to post
Share on other sites

Ok it's quite simple to fix I made a mistake in the add-on and hardcoded the diplay option. open  the header_tag file  and about line 44 change

display: inline-block;

to

display: none;

That's it now will only show when scrolling.


 

Share this post


Link to post
Share on other sites

Perfect, thank you!

The jquery part in your module matched all other examples I found on the net so could not work out why was not working the same way!

Great contribution and thanks again for your really quick responses,

Peter


Full-time I am a C-suite executive of a large retail company in Australia.

I am enjoying learning about web-design.

CE Phoenix is the best and only version of osCommerce worth considering. Download it here: https://github.com/gburton/CE-Phoenix

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

×