Jump to content

Mobile Skins ..


ChrisColeman
 Share

Recommended Posts

Yes I guess, but media queries can give the size but not the platform.

There is a 'handheld' media type but thats rarely usefull because the mobile user-agents rarely use it.

If for example I wished to change text size on parts of the page but only on handhelds it is difficult using media queries..

Chris.   

 

 

 

Link to comment
Share on other sites

6 minutes ago, ChrisColeman said:

Yes I guess, but media queries can give the size but not the platform.

There is a 'handheld' media type but thats rarely usefull because the mobile user-agents rarely use it.

If for example I wished to change text size on parts of the page but only on handhelds it is difficult using media queries..

Chris.   

 

 

 

That's exactly what media queries are for. The CSS logic can be along the lines of "if screen size is less than X pixels make font size y pixels".

Maybe I misunderstood you.

 

Link to comment
Share on other sites

On 13/12/2017 at 11:20 PM, Al Brookbanks said:

That's exactly what media queries are for. The CSS logic can be along the lines of "if screen size is less than X pixels make font size y pixels".

Maybe I misunderstood you.

 

Ok well perhaps that was not a good example, what if I wanted to display a different navigation on handheld devices, nothing to do with the width of the platform just a different 'look & feel' ?

Chris.

Link to comment
Share on other sites

CubeCart does have the code to detect mobile device's "user agent strings". The regex may not be up to date, but can be easily changed.

If CubeCart detects a mobile device, it then checks to see if the current skin (according to a setting in the skin's config.xml file) is 'responsive'. If it is, CubeCart will not switch to using an alternate skin. If 'responsive' is false or not found, CubeCart then asks if there is a "mobile" skin that has been selected. If so, CubeCart uses that skin.

In admin, you will need to have installed a skin that is not responsive. You will also need to have installed a "mobile" skin. The skins "Kurouto" and "Mobile" are available in the Marketplace.

In CubeCart's admin, Store Settings, Layout tab, select Kurouto as the 'Default front-end skin'. Save. Back at this page, the 'Default front-end mobile skin' selector should now be usable. Choose Mobile. Be sure that 'Disable mobile skin' is not checked. Save.

Test by accessing your store with a browser whose user agent string states it is a mobile device.

Edited by bsmither
Link to comment
Share on other sites

Ok a simple follow up ..

       Maybe I have a set of variables for a mobile platform, which I need to send to each HTML page. I would like to be able to pass the $_SESSION data between pages (server side) and normally (?) I would use $_SESSION to do that.

Maybe I'll use SMARTY to extract the data and send to the page -  infact definately I would use SMARTY so I need to be able to get/set the $_SESSION variable within the plugins/hooks system with which I am familiar.

  How would I hande the $_SESSION array  in CubeCart, I'm guessing that its not so complicated but rather than diving into the CubeCart code and then maybe coming up with the wrong answer would appretiate some 'inside info'.

Thank You - No Rush - I'm taking a breather until the New Year.

Chris.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...