Jump to content
Latest News: (loading..)

Recommended Posts

Store Hotline Header Content Module for Bootstrap

 

This Add-On adds a Button to the store header displaying the Store Phone.

It is a disabled BS Button on all views except xs mobile view where it acts like a button which opens the Mobile Phone Dialler with the Store Phone number.

 

Header Content Module

Easy installation, no file modifications. Only copy 2 files + language files. Install the module in Admin : Modules.

Includes Alignment class, text-left, text-center, text-right

 

Download:

http://addons.oscommerce.com/info/9291

Edited by raiwa

Share this post


Link to post
Share on other sites

@@raiwa

 

Rainer...you might want to have a look at the upload package...there seems to be a ton of files in there.   Was that intended?

 

Dan


Get the latest osC code (the community-supported responsive version - EDGE) here:

EDGE:  Gold + Extra Commits such as bugfixes:
https://github.com/gburton/osCommerce-234-bootstrap/archive/master.zip

Share this post


Link to post
Share on other sites

@@raiwa I've installed this addon - but the dialer does not open on iphone (not sure about other phones).

 

I get a phone number of 'STOREPHONE'

 

On line 2 of the template file you have;

  <a  class="btn btn-primary visible-xs" role="button" href="tel:' . STORE_PHONE . '"><?php echo MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE;?></a>

Which doesn't look quite right... Shouldn't it be more like (this still needs some cleaning up for sure...... note: change it from a button to a block and i've added a glyphibcon on xs as well......);

  <div class="btn  btn-info btn-block visible-xs"><?php echo tep_draw_button(MODULE_CONTENT_HEADER_PHONE_TEXT,'glyphicon glyphicon-earphone', 'tel:' . STORE_PHONE);?></div>
  <div class="btn btn-info btn-block hidden-xs"><?php echo MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE;?></div>

But it opens the dialer....

Share this post


Link to post
Share on other sites

Hello Scott @@greasemonkey,

 

Thank you very much for the report and suggestion.

I played a bit with the code and found that solution which uses the icon also for the main button and disables the button on desktop view, so it doesn't look like an action button.

Please can you test it and confirm that it also works on iPhone and if possible test with Android too. I have only Windows Phone for testing.

  <?php echo tep_draw_button(MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE,'glyphicon glyphicon-earphone', 'tel:' . STORE_PHONE, 'primary', null, 'btn btn-info visible-xs');?>
  <div class="btn btn-info hidden-xs" disabled="disabled"><span class="glyphicon glyphicon-earphone"></span><?php echo ' ' . MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE;?></div>

I removed the btn-block, I like more the smaller version and on xs it has no effect in any case.

 

If you wish to show the disabled button in standard color/opacity, add this to the user.css:

.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
  pointer-events: none;
  cursor: none;
  filter: alpha(opacity=100);
  -webkit-box-shadow: none;
          box-shadow: none;
  opacity: 1;
}

Here is also my Demo Store for testing:

http://www.sarfotostock.com/osCommerce234bs/

 

Please confirm and I'll upload this like an update.

 

Thank you again and kindest regrads

Rainer

Share this post


Link to post
Share on other sites

@@raiwa I've installed this addon - but the dialer does not open on iphone (not sure about other phones).

 

I get a phone number of 'STOREPHONE'

 

On line 2 of the template file you have;

  <a  class="btn btn-primary visible-xs" role="button" href="tel:' . STORE_PHONE . '"><?php echo MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE;?></a>

Which doesn't look quite right... Shouldn't it be more like (this still needs some cleaning up for sure...... note: change it from a button to a block and i've added a glyphibcon on xs as well......);

  <div class="btn  btn-info btn-block visible-xs"><?php echo tep_draw_button(MODULE_CONTENT_HEADER_PHONE_TEXT,'glyphicon glyphicon-earphone', 'tel:' . STORE_PHONE);?></div>
  <div class="btn btn-info btn-block hidden-xs"><?php echo MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE;?></div>

But it opens the dialer....

 

 

Keeping the original thought in mind, another approach might be:

<a class="btn btn-primary visible-xs" role="button" href="tel: <?php STORE_PHONE ?> "><?php echo MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE;?></a>

Malcolm


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Edge" release here

Share this post


Link to post
Share on other sites

Hello Malcolm @@ArtcoInc,

 

Thank you, but this shows the dialler empty, without number on windows phone.

 

This version is checked on windows phone and iPhone and works:

  <?php echo tep_draw_button(MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE,'glyphicon glyphicon-earphone', 'tel:' . STORE_PHONE, 'primary', null, 'btn btn-info visible-xs');?>
  <div class="btn btn-info hidden-xs"><span class="glyphicon glyphicon-earphone"></span><?php echo ' ' . MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE;?></div>

If you or @@greasemonkey or someone else could confirm that it works on Android, I'll upload the update with that version.

Here my teststore:

http://www.sarfotostock.com/osCommerce234bs/

 

Thank you

Rainer

Share this post


Link to post
Share on other sites

Hello @raiwa

 

Its a nice work.

 

Is it possible it the hotline shows in mobile only and not in tablet and web (laptop and etc ....)????

Share this post


Link to post
Share on other sites

Hello Raz @@razgre,

 

Yes sure. Just delete line 3 in includes/modules/content/header/templates/phone.php:

  <div class="btn btn-info hidden-xs"><span class="glyphicon glyphicon-earphone"></span><?php echo ' ' . MODULE_CONTENT_HEADER_PHONE_TEXT . STORE_PHONE;?></div>

See here for more info about how it works:

http://getbootstrap.com/css/#responsive-utilities

 

rgds

Rainer

Share this post


Link to post
Share on other sites

New ersion 2.0 with support for Skype uploaded:

http://addons.oscommerce.com/info/9291

 

Changes Version 2.0

- Added optional support for Skype call, chat and add contact.

- Phone button optional.

- Phone button disabled on desktop

- Instructions in PDF

- Screenshots included

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

×