This new mod provides the capability to dynamically switch templates from the catalog side.
Download link is: https://www.zen-cart.com/downloads.php?do=file&id=2009
This new mod provides the capability to dynamically switch templates from the catalog side.
Download link is: https://www.zen-cart.com/downloads.php?do=file&id=2009
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
swguy, thanks for posting this! I'm trying to incorporate this function automatically based on mobile detect...would you be able to tell me how to automatically have template #1 used for desktops and template #2 used for mobile devices? I don't want to just rely on a responsive template as it still does not display the way I want on a mobile device. Having two templates would give me the flexibility I need. I would also like to mask the url to remove the template name if possible--that way if I sent a link from a mobile device to a desktop user, they would not be directed to the wrong template. Any help you can provide is appreciated. Thanks!
I'm actually working on the next version of this mod, which has a second set of example files that show you how to do automatic setup. Stay tuned!
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
The module has been updated with an example of how to do automatic template selection.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Hi,
" I would also like to mask the url to remove the template name if possible--that way if I sent a link from a mobile device to a desktop user, they would not be directed to the wrong template. Any help you can provide is appreciated."
I Would like to have an update regarding above question. Thx!
Example2 in Skin Switch (just released in Sept) shows you how to do this.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Great add-on . Now my templates switch from PC to mobile every Sunday.
function use_nondefault_template() {
// check whatever you want to here.
if (date("D") == "Sun") {
return true;
}
What I would really like them to do is switch whenever a mobile is detected. Would someone be kind enough to tell me how I can set up a mobile checking function in such a way as to operate this switch when ,
if ($detect->isMobile()) {
return true;
Thanks.
Use a mobile detect library such as http://mobiledetect.net/.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Thanks for replying. I've got the Mobile_Detect.php alright, but I can't figure out where to put it and how to get set_template.php to refer to it.
Look at example 2 - it shows how to use a single check.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Bookmarks