myStore for mobile changes back to the desktop version

Change your online store into modern look with myStore eCommerce VirtueMart Joomla template - discussion forum.
GK User
Thu Feb 06, 2014 3:56 pm
Hi,

if possible, I would like to receive a support for "joomla 1.5 template MyStore".

My problem is the following:

I need to use a "part of the template MyStore" for navigation and mobile.

More specifically, I use the "template eShop" (for joomla 1.5) and by default when users reach the site from mobile, the site responds by offering the display of the "Template MyStore"(mobile).

By the way the problem that I have not been able to solve is the following.

When by mobile (viewing the mobile version of MyStore) I want to see the Desktop version, the site, instead, direct me to a site with the default "template" (eShop) making me see the desktop version of MyStore.

I want to change the "template MyStore", making sure that, instead of the button "desktop version", it must be chosen the template configured by the administration, that is, the default template (eShop) or other .
I found the files involved but do not know the syntax that I should use.
thanks for the support.
Michele
User avatar
Fresh Boarder

teitbite
Thu Feb 06, 2014 8:47 pm
Hi

Unfortunatelly I do not know how You've made this separation in the first place, but I believe replacing the url in the part where the button changing the template layout to a desktop is should help. Please try to add a "tmpl=gk_esport" parameter to this link.
User avatar
Moderator

GK User
Fri Feb 07, 2014 4:34 pm
Hello and thank you for your response.
To use the template MyStore only mobile part, I used Sh404, in its configuration I set this feature by calling the template for mobile.
coivolti files should be:
--- layouts/blocks/usertools/layout-switcher.php
Code: Select all
<?php
   if (!($mobile = $this->mobile_device_detect())) return;
      $handheld_view = $this->getParam('ui');
   $switch_to = $handheld_view=='desktop'?'default':'desktop';
   $text = $handheld_view=='desktop'?'Mobile Version':'Desktop Version';
?>
<a class="gk-tool-switchlayout" href="<?php echo JURI::base()?>?ui=<?php echo $switch_to?>" title="<?php echo JText::_($text)?>"><span><?php echo JText::_($text)?></span></a>


----- layouts\blocks/footer.php
Code: Select all
<div class="gk-copyright">
      <?php
         if (($mobile = $this->mobile_device_detect())) :
            $handheld_view = $this->getParam('ui');
            $switch_to = $handheld_view=='desktop'?'default':'desktop';
            $text = $handheld_view=='desktop'?'Mobile Version':'Desktop Version';
      ?>
         <a class="gk-tool-switchlayout" href="<?php echo JURI::base()?>?ui=<?php echo $switch_to?>" title="<?php echo JText::_($text)?>"><span><?php echo JText::_($text)?></span></a>
      <?php endif ; ?>
      <?php echo JText::_('GK_TEMPLATE_FOOTER', ''); ?>
      <?php //echo $this->_tpl->params->get("footer_content"); ?>
   </div>


and perhaps libs/gk.template.helper.php

I want the change to be also valid for other types of default templates, and do not want to fix the code in the template, but I want to take the one set in the site configuration.
You have an idea how in PHP calls the default template in use on the site and how to change the code?
Thanks for the support.
Michele
User avatar
Fresh Boarder

teitbite
Mon Feb 10, 2014 10:38 pm
Hi

I'm sorry, but I'm confused right now becuase I believe I missunderstood You after the first post. I thought You just want a mobile version of myStore to have a link to a desktop of a different template. Am I right ?

Easiest to do this is to use a direct link with parameters in a mobile layout. Like this:

Code: Select all
href="<?php echo JURI::base()?>?ui=desktop&tmpl=YOUR_TEMPLATE
User avatar
Moderator

GK User
Wed Feb 12, 2014 3:37 pm
I'm not sure that I have explained myself well.
Website template works with eShop.
I want that when it is achieved by Mobile the template appears MyStore (mobile), and I managed to do this by setting a parameter in sh404.
My problem now is when they are on the site from a mobile, and I click on the link "Desktop version" remains in the template MyStore making me see the desktop version.
My problem is this: in the desktop version should work the template eShop, then the link is not working as I would like.
I also tried your line of code ... at various points, but I do not work, maybe I did not understand how to integrate it.
You help me understand how to follow the desired result, or better understand what changes I have to do.
Question: is there a way to invoke the default template written in the DB? With what syntax?
Sorry if my english is not the best
thanks
Michele
User avatar
Fresh Boarder

teitbite
Wed Feb 12, 2014 9:58 pm
Hi

Ok. Lets see if it will respond to a cookie name than. In each of mobile layout files as /layout/iphone.php, etc find line which looks like this:

Code: Select all
<a href="javascript:setCookie('gkGavernMobile<?php echo $tpl_name; ?>', 'desktop', 365);window.location.reload();"><?php echo JText::_('TPL_GK_LANG_MOBILE_SWITCH_DESKTOP'); ?></a>


try to replace the part <?php echo $tpl_name; ?> to "gk_esport". If this will not work than I'm guessing a redirection in /layout/default.php of myStore template to an eSport template.

Code: Select all
<?php header( 'Location: http://www.yoursite.com/index.php?tmpl=gk_esport' ) ; ?>
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.