Jump to content

In development: Theme optimized for Mobile Devices


Recommended Posts

I am currently developing a theme based on jquery mobile framework to give our customers a comfortable way to buy our products with their mobile devices. I just started and figured out, that it is not so difficult to do such a theme and it looks promising. I need to solve 2 major problems I am facing right now. I know, I could just buy iPrestashop, but I don't like the design and I don't want to pay for something I don't like.

 

1. Need two versions of the shop with shared database

I know how to code a mobile detection script which redirects automatically to an url for the mobile device once a mobile device is detected. I can also configure this script that customer can switch to the regular site if they don't want to use the mobile version. A cookie will be set on the devices browser to remember the setting. But I don't know how to handle the workflow of prestashop to run parallel on two platforms (desktop and mobile).

 

How can I create an aditional Prestashop installation (for example in a subdomain or subfolder) which has a separate mobile template activated but is using the same database as the desktop version (for customer, products, vouchers, shipping, carriers....)?

 

2. I don't want to change the core files

I consider everything outside my theme folder as core files which I don't want to change. When an update for prestashop is available, I only want to update the theme and not the core files. In my first developing progress, I had already to change a file from the core (prestashop/modules/blockcurrencies/blockcurrencies.tpl). I really don't want to do that.

 

How can I tell my mobile theme to use the core module but with the customised template from the mobile theme folder. I can see in the default prestashop template folder (themes/prestashop), that there are many .tpl files located. Can be templates (like blockcurrencies.tpl) also be hosted in the theme folder?

 

Help will be rewarded

I am not going to sell this mobile template. I am very thankful for your help and will provide you the mobile template code for your own unlimited usage and modification. With no restrictions. You can also send me a PM and I will provide you my template code at any development stage.

 

Here from you soon?

Cheers

 

Ralph

Link to comment
Share on other sites

Hi Santscho,

 

maybe I will do the same ;-)

 

1. I have to check the PrestaShop core code, I will update you :)

 

2. You should use the override dir extending classes (controllers), so you don´t have to change the core files. Put your templates in the themes/yourtheme/youmodule/ dir.

 

Cheers,

Patrick

  • Like 1
Link to comment
Share on other sites

Thanks Patrick

 

2. This works. You must know... It is the first time I do an own theme.

 

1. I have an idea. Not sure if this would work. Just brainstorming....

  • Two prestashop installations: 1 desktop [www.myshop.com], 1 mobile [www.myshop.com/mobile]
  • Both using same database.
  • The mobile installation uses the file library (downloads, product photos...) of the desktop installation.
  • The desktop installation uses the default theme 'prestashop'.
  • Because of the entry in the database, the mobile installation uses the default theme 'prestashop' too.
  • Now, the theme 'prestashop' in the mobile installation needs to be replaced with the mobile theme. Kind of trojan horse. Only the name is 'prestashop'. The templates/functions/contents are not.
  • The deskop installation will get a mobile-detection and -redirection function.
  • The mobile installation will get a 'use desktop' function to let the user decide which platform to use.

Link to comment
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
×
×
  • Create New...