Moin HHGAG,
soweit war ich schon. Im Admin kann man kein Template auswählen für Mobile, das erkennt bzw wird automatisch erkannt durch mehrere Änderungen in der header, apllikation_top usw.
Anbei die Anleitung:
Code: Alles auswählen
## Schritt 1:
#######################################################
#
#-----[ COPY FILES ]----------------------------------------------------------
#
Kopieren Sie alle mitgelieferten Dateien in das Shop Verzeichnis.
## Schritt 2:
#######################################################
#
#-----[ COPY FILES ]----------------------------------------------------------
#
Kopieren Sie alle Mail Templates aus dem aktuell genutztem Haupt-Templateverzeichnis in das Mobile-Templateverzeichnis. Sie können die dort bestehenden Dateien ohne Bedenken überschreiben.
template\[IHR-TEMPLATE]\admin\ --> template\mobile\admin\
template\[IHR-TEMPLATE]\mail\ --> template\mobile\mail\
## Schritt 3:
#######################################################
#
#-----[ RENAME FILES ]----------------------------------------------------------
#
Schauen Sie, dass die Mobile-Templates (*.html) aus folgenden Ordnern den gleichen Namen tragen, wie die von dem Haupt-Template. Sollte Sie mehr Haupt-Templates in einem Ordner als im Mobile Ordner vorfinden, dann dublizieren Sie ein Mobile-Template und benennen Sie dieses entsprechend um.
template\[IHR-TEMPLATE]\module\categorie_listing\
template\[IHR-TEMPLATE]\module\product_info\
template\[IHR-TEMPLATE]\module\product_listing\
template\[IHR-TEMPLATE]\module\product_options\
## Schritt 4:
#######################################################
#
#-----[ OPEN ]----------------------------------------------------------------
#
account.php
#
#-----[ FIND ]----------------------------------------------------------------
#
require_once (DIR_FS_INC.'xtc_get_products_image.inc.php');
#
#-----[ AFTER, ADD ]----------------------------------------------------------
#
if (!isset ($_SESSION['customer_id'])) {
xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
}
## Schritt 5:
#######################################################
#
#-----[ OPEN ]----------------------------------------------------------------
#
includes\header.php
#
#-----[ FIND ]----------------------------------------------------------------
#
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo HTML_PARAMS; ?>>
#
#-----[ REPLACE ]----------------------------------------------------------
#
<?php if($_SESSION["tpl"]=="mobile" && file_exists(DIR_FS_CATALOG."templates/".$_SESSION["tpl"])) { ?>
<!DOCTYPE html>
<html <?php echo HTML_PARAMS; ?>>
<?php } else { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo HTML_PARAMS; ?>>
<?php } ?>
#
#-----[ FIND, FIRST ]----------------------------------------------------------------
#
<script type="text/javascript"><!--
#
#-----[ BEFORE, ADD ]----------------------------------------------------------
#
<?php
if(!($_SESSION["tpl"]=="mobile" && file_exists(DIR_FS_CATALOG."templates/".$_SESSION["tpl"]))) {
require('includes/detectmobilebrowser.js.php');
}
?>
## Schritt 6:
#######################################################
#
#-----[ OPEN ]----------------------------------------------------------------
#
includes\application_top.php
#
#-----[ FIND ]----------------------------------------------------------------
#
while ($configuration = xtc_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
#
#-----[ REPLACE ]----------------------------------------------------------
#
while ($configuration = xtc_db_fetch_array($configuration_query)) {
if($configuration['cfgKey']=="CURRENT_TEMPLATE") {
$template = $configuration['cfgValue'];
} else {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
}
#
#-----[ FIND ]----------------------------------------------------------------
#
// check the Agent
#
#-----[ AFTER, ADD ]----------------------------------------------------------
#
if(isset($_GET["tpl"])) {
$_SESSION["tpl"] = $_GET["tpl"];
}
if(isset($_SESSION["tpl"]) && file_exists(DIR_FS_CATALOG."templates/".$_SESSION["tpl"])) {
define("CURRENT_TEMPLATE", $_SESSION["tpl"]);
} else {
define("CURRENT_TEMPLATE", $template);
}
## Schritt 7a:
#######################################################
#
#-----[ OPEN ]----------------------------------------------------------------
#
lang\german\german.php
#
#-----[ FIND ]----------------------------------------------------------------
#
define('IMAGE_BUTTON_CONTINUE', 'Weiter');
#
#-----[ AFTER, ADD ]----------------------------------------------------------
#
define('IMAGE_BUTTON_CONTINUE_SHOPPING', 'Weiter Einkaufen');
#
#-----[ FIND ]----------------------------------------------------------------
#
?>
#
#-----[ Before, ADD ]----------------------------------------------------------
#
// MobileST
define('MOBILETEXT', 'Unseren Shop gibt es auch optimiert für Smartphones.');
define('MOBILELINKTEXT', 'Hier klicken für die optimierte Darstellung.');
## Schritt 7b:
#######################################################
#
#-----[ OPEN ]----------------------------------------------------------------
#
lang\english\english.php
#
#-----[ FIND ]----------------------------------------------------------------
#
define('IMAGE_BUTTON_CONTINUE', 'Next');
#
#-----[ AFTER, ADD ]----------------------------------------------------------
#
define('IMAGE_BUTTON_CONTINUE_SHOPPING', 'Continue Shopping');
#
#-----[ FIND ]----------------------------------------------------------------
#
?>
#
#-----[ Before, ADD ]----------------------------------------------------------
#
// MobileST
define('MOBILETEXT', 'Our Shop has also a smartphone optimized view.');
define('MOBILELINKTEXT', 'Click here for the optimized view.');
## Schritt 8:
#######################################################
#
#-----[ OPEN ]----------------------------------------------------------------
#
product_info.php
#
#-----[ FIND ]----------------------------------------------------------------
#
include (DIR_WS_MODULES.'product_info.php');
require (DIR_WS_INCLUDES.'header.php');
#
#-----[ REPLACE ]----------------------------------------------------------
#
require (DIR_WS_INCLUDES.'header.php');
include (DIR_WS_MODULES.'product_info.php');
## Schritt 9 (optional):
#######################################################
Sorgt dafür, dass bei den Sonderangeboten auch die Kurzbeschreibungen angezeigt.
#
#-----[ OPEN ]----------------------------------------------------------------
#
specials.php
#
#-----[ FIND ]----------------------------------------------------------------
#
pd.products_name,
#
#-----[ AFTER, ADD ]----------------------------------------------------------
#
pd.products_short_description,
## Schritt 10 (optional):
#######################################################
Behebt einen Bug auf der "Passwort vergessen" Seite.
#
#-----[ OPEN ]----------------------------------------------------------------
#
password_double_opt.php
#
#-----[ FIND EACH ]----------------------------------------------------------------
#
$smarty->assign('INPUT_CODE', xtc_draw_input_field('vvcode', '', 'size="6" maxlenght="6"', false, '', false));
#
#-----[ REPLACE EACH ]----------------------------------------------------------
#
$smarty->assign('INPUT_CODE', xtc_draw_input_field('vvcode', '', 'size="8" maxlength="6"', 'text', '', false));
## Schritt 11 (optional):
#######################################################
Ggf. muss die checkout_confirmation (Bestätigungsseite, wo der Kunde die Bestellung abschickt) Seite angepasst werden. Jenachdem, ob und wie die "Buttonlösung" umgesetzt wurde, sind evtl. Anpassungen nötig, dass auch alle Informationen im Mobile Template dargestellt werden.
## Fertig!
#######################################################
zum Testen auf dem PC im Browser folgende URL aufrufen:
www.[ihreDomain].de/index.php?tpl=mobile
Wer die Sprachvariablen im Mobile Template ändern oder auch welche hinzufügen möchte, der kann das über die PHP Daten machen die in folgenden Ordnern liegen:
templates\mobile\phodana\lang\german
templates\mobile\phodana\lang\english