| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How do I change parts of the skin for mobile browsers only? | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
How do I change parts of the skin for mobile browsers only?
Hello,
I am looking to edit the default skin, to change the look on mobile devices only. Is there a way I can detect if the browser being used is desktop or mobile? Example: PHP Code:
__________________
X-Cart Version: 5.2.3 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: How do I change parts of the skin for mobile browsers only?
Can I use this inside a template file?
PHP Code:
__________________
X-Cart Version: 5.2.3 |
|||||||||
#3
|
|||||||
|
|||||||
Re: How do I change parts of the skin for mobile browsers only?
Use CSS media queries
https://developers.google.com/web/fundamentals/layouts/rwd-fundamentals/use-media-queries?hl=en https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries Good luck! Paul
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best |
|||||||
#4
|
|||||||||
|
|||||||||
Re: How do I change parts of the skin for mobile browsers only?
Is it possible to move/remove <div> sections using CSS?
If so, using what code?
__________________
X-Cart Version: 5.2.3 |
|||||||||
#5
|
|||||||
|
|||||||
Re: How do I change parts of the skin for mobile browsers only?
Sorry, I missed that you were using x-cart 5...
I don't have any experience with xc5...
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best |
|||||||
#6
|
|||||||||
|
|||||||||
Re: How do I change parts of the skin for mobile browsers only?
Quote:
Yes, this is correct code. Quote:
Well, if CSS code can accomplish what you need, then you can do this. In order to register CSS code for mobile skin, you can use the condition mentioned earlier (if (\XLite\Core\Request::isMobileDevice())) in the method described here: http://kb.x-cart.com/display/XDD/Adding+CSS+and+JS+files
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: How do I change parts of the skin for mobile browsers only?
I'm not using mobile skin. I just want to modify the default responsive skin to look better on mobile devices.
I will even share the mods that I do if somebody is willing to help point me in the right direction.
__________________
X-Cart Version: 5.2.3 |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: How do I change parts of the skin for mobile browsers only?
Quote:
Also, I tried using that code inside the template files, and it didn't work. It just displayed the code on the screen.
__________________
X-Cart Version: 5.2.3 |
|||||||||
#9
|
|||||||||
|
|||||||||
Re: How do I change parts of the skin for mobile browsers only?
Quote:
OK. Could you please explain what you are trying to achieve then? I need a bit more details in order to help. Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#10
|
|||||||||
|
|||||||||
Re: How do I change parts of the skin for mobile browsers only?
Quote:
I need to edit the files: - skins/default/en/checkout/steps/shipping/parts/subsection.shipping.tpl - skins/default/en/checkout/steps/shipping/parts/subsection.payment.tpl But I need the changes I make to only display on mobile devices. I wish there was a "mobile override" skin area, kinda like "custom skin", but one that only works if being viewed from a mobile device.
__________________
X-Cart Version: 5.2.3 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|