-2

I want to add a notification message on the header for the mobile version in opencart, so whenever a user visits my site on mobile he can see this header message which will indicate the user to visit the desktop site for better experience. your comments will be appreciated.

DigitCart
  • 2,980
  • 2
  • 18
  • 28
Ali Javed
  • 1
  • 1
  • what is your opencart version and which theme? – DigitCart Dec 05 '17 at 16:32
  • Why do you have a mobile site if you're just going to tell mobile users **not** to use it? – ceejayoz Dec 05 '17 at 16:37
  • my opencart version is 2.3.0.2 and I am using Revo drag and drop theme for opencart, it is a responsive theme however the reason why I want to indicate this message in the mobile version is because I have a custom product designer plugin in my site which allows the user to design and in the mobile version when user visit the design page the experience is not good for the user that's where I want to indicate the user to visit desktop version – Ali Javed Dec 05 '17 at 16:41
  • "your comments will be appreciated" My comment is don't do this. – Paul Feakins Dec 06 '17 at 11:46

1 Answers1

2

Since your theme is compatible with Bootstrap framework (like OpenCart default theme), you can use this code:

<p class="alert alert-info visible-xs">add your message here</p>

in this file:

catalog\view\theme\your-theme\template\common\header.tpl

Here visible-xs class will make it visible only for extra small devices.

DigitCart
  • 2,980
  • 2
  • 18
  • 28