Poolcorner: Unterschied zwischen den Versionen
| (4 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) | |||
| Zeile 155: | Zeile 155: | ||
<!--{if $PRODUCTS_ADDED != ''}<p class="productinfoproductadded">{$PRODUCTS_ADDED}</p>{/if}--> | <!--{if $PRODUCTS_ADDED != ''}<p class="productinfoproductadded">{$PRODUCTS_ADDED}</p>{/if}--> | ||
| + | |||
| + | == Google Analytics == | ||
| + | |||
| + | nach fogender Anleitung eingebaut: | ||
| + | http://www.xtc-modified.org/wiki/Google_Analytics_datenschutzkonform_einbinden | ||
| + | |||
| + | 1. Folgenden Code im Header "/includes/header.php" im Head-Bereich (wo ist eigentlich egal, Google empfiehlt vor dem schließenden head-tag) einbauen. | ||
| + | |||
| + | <script type="text/javascript"><br> | ||
| + | var _gaq = _gaq || []; | ||
| + | _gaq.push(['_setAccount', 'UA-xxxxxxxx-x']); | ||
| + | _gaq.push(['_gat._anonymizeIp']); | ||
| + | _gaq.push(['_trackPageview']);<br> | ||
| + | </script> | ||
| + | |||
| + | Damit steht er im Quelltext dort wo er hin soll, nämlich ganz oben. | ||
| + | |||
| + | 2. Den asynchronen Funktionsaufruf für das eCommerce-Tracking unten in "/templates/xt5/module/checkout_success.html" einbinden und | ||
| + | |||
| + | <!-- Google e-Commerce Analytics --> | ||
| + | <script type="text/javascript"> | ||
| + | _gaq.push(['_addTrans', | ||
| + | '{$oID}', | ||
| + | 'Name deines Shops', | ||
| + | '{$VALUE}', | ||
| + | '{$TAX}', | ||
| + | '{$SHIPPING}', | ||
| + | '{$CITY}', | ||
| + | '{$STATE}', | ||
| + | '{$COUNTRY}' | ||
| + | ]); | ||
| + | {foreach name=aussen item=order_values from=$order_data} | ||
| + | _gaq.push(['_addItem', | ||
| + | '{$oID}', | ||
| + | '{$order_values.PRODUCTS_MODEL}', | ||
| + | '{$order_values.PRODUCTS_NAME}', | ||
| + | '{$order_values.CAT}', | ||
| + | '{$order_values.PRODUCTS_SINGLE_PRICE}', | ||
| + | '{$order_values.PRODUCTS_QTY}' | ||
| + | ]); | ||
| + | {/foreach} | ||
| + | _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers | ||
| + | </script> | ||
| + | <!-- Google e-Commerce Analytics Ende --> | ||
| + | |||
| + | die checkout_success.php aus dem entsprechenden "e-commerce-analytics-xtcModified 1.0x.zip" Paket aus dem Thema ANLEITUNG: E-Commerce-Tracking mit Google Analytics ins root-Verzeichnis des Shops legen. Somit wird der Code bei erfolgtem Einkauf in der Mitte aufgerufen. | ||
| + | |||
| + | 3. Damit der Rest des Codes am Seitenende geladen wird, muss in der "/templates/xt5/source/boxes.php" vor der Zeile: | ||
| + | |||
| + | $smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/'); | ||
| + | |||
| + | folgendes geschrieben werden: | ||
| + | |||
| + | $GOOGLE_ANALYTICS = | ||
| + | '<script type="text/javascript"> | ||
| + | |||
| + | (function() { | ||
| + | var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true; | ||
| + | ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\'; | ||
| + | var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s); | ||
| + | })(); | ||
| + | |||
| + | </script>'; | ||
| + | $smarty->assign('GOOGLE_ANALYTICS', $GOOGLE_ANALYTICS); | ||
| + | |||
| + | 4. Zum Schluss muss noch in der "/templates/xt5/index.html" ganz unten | ||
| + | |||
| + | {$GOOGLE_ANALYTICS} | ||
| + | |||
| + | rein. | ||
| + | |||
| + | Nun sollte Google Analytics funktionieren. | ||
| + | |||
| + | ==Attribute werden nicht gespeichert== | ||
| + | |||
| + | in die htaccess im Root-vberzeichnis folgendes ergänzen: | ||
| + | |||
| + | php_value max_input_vars 6000 | ||
| + | |||
| + | ==Klarna eingebunden am 07.01.2013== | ||
| + | |||
| + | Kopieren Sie bitte in ihre /includes/modules/product_info.php in Zeile 68 nach | ||
| + | |||
| + | '' | ||
| + | if ($product->data['products_fsk18'] == '1') { | ||
| + | $info_smarty->assign('PRODUCTS_FSK18', 'true'); | ||
| + | } | ||
| + | |||
| + | folgenden Text | ||
| + | |||
| + | //Edit Klarna | ||
| + | if (MODULE_PAYMENT_PCKREDITOR_DE_PRODUCTLEVEL == 'True' && MODULE_PAYMENT_PCKREDITOR_DE_STATUS == 'True') | ||
| + | { | ||
| + | include DIR_WS_CLASSES . 'kreditor_lang.php'; | ||
| + | require_once DIR_WS_CLASSES . 'kreditor.php'; | ||
| + | global $KRED_ISO3166_DE; | ||
| + | |||
| + | $lang_month = KREDITOR_LANG_INFO_DE_PAYMENTTEXT2_EACH; | ||
| + | $lang_from = KREDITOR_LANG_INFO_DE_PARTPAYMENT_FROM; | ||
| + | $fee = 195; | ||
| + | $rate = 1495; | ||
| + | $cc = $KRED_ISO3166_DE; | ||
| + | $level = MODULE_PAYMENT_PCKREDITOR_DE_MINLIMIT; | ||
| + | $maximum = MODULE_PAYMENT_KREDITOR_DE_ORDER_LIMIT; | ||
| + | $products_price = $xtPrice->xtcGetPrice($product->data['products_id'], $format = true, 1, $product->data['products_tax_class_id'], $product->data['products_price'], 1); | ||
| + | |||
| + | monthly_cost($products_price['plain']*100, $rate, 24, $fee, 1, $cc, $result); | ||
| + | |||
| + | |||
| + | if (($level*100) < "1390") | ||
| + | { | ||
| + | $level = 13.90; | ||
| + | } | ||
| + | |||
| + | if ($products_price['plain'] >= $level) | ||
| + | { | ||
| + | $pc = number_format(round($result/100),0) . " " . '€'; | ||
| + | |||
| + | if ($pc < 6.95) | ||
| + | { | ||
| + | $pc = 6.95. " " . '€'; | ||
| + | } | ||
| + | $info_smarty->assign('PRODUCT_KLARNA_RATE','<img src="images/klarna_icon.png" alt="" style="cursor:default" /><br />'.'Ab '. $pc ." ". $lang_month . '<br | ||
| + | />'.MODULE_PAYMENT_PCKREDITOR_INFO_KLARNA.'</a>'); | ||
| + | } } | ||
| + | // End edit Klarna | ||
| + | |||
| + | und fügen Sie bitte in /templates/"ihre verwendetes Template/module/product_info/product_info_v1.html in Zeile 28 nach | ||
| + | |||
| + | {if $PRODUCTS_VPE}{$PRODUCTS_VPE}{/if} <br /> | ||
| + | |||
| + | folgende Zeile ein | ||
| + | |||
| + | <br /><strong>{$PRODUCT_KLARNA_RATE}</strong><br /> | ||
| + | '' | ||
| + | |||
| + | |||
| + | Dann noch die ganzen Dateien eingespielt. | ||
Aktuelle Version vom 7. Januar 2013, 09:04 Uhr
Installiert[Bearbeiten]
Domnowski[Bearbeiten]
EOS-Iframe[Bearbeiten]
Attribute_price_updater[Bearbeiten]
http://www.xtc-modified.org/forum/index.php?topic=2122.0
ATTRIBUTE PRICE UPDATER VERS 0.90 RC4 for XTC MODIFIED (c) by web28 - www.rpa-com.de
based on a script by D Parry (Chrome) 2007 (dan@virtuawebtech.co.uk)
FUNKTIONWEISE:
Der ATTRIBUTE PRICE UPDATER berechnet aus den Optionswerten per JavaScript den Gesamtpreis des Artikels
INSTALLATION - 3 files to edit, 4 file to copy:
1. EDIT includes/header.php
FIND '</head>' at ca. line 260 and ADDED before:
<?php if (strstr($PHP_SELF, FILENAME_PRODUCT_INFO )) {
echo ('<link rel="stylesheet" type="text/css" href="' . 'templates/'.CURRENT_TEMPLATE.'/apu.css' . '" />');
require('includes/attribute_price_updater.js.php'); } ?>
2. EDIT includes/modules/product_attributes.php
FIND 'while ($products_options_name = xtc_db_fetch_array($products_options_name_query,true)) {'
at ca. line 36 and ADDED before:
//BOF ATTRIBUTE PRICE UPDATER $apu_js_var =; $apu_js_prices= ; $curr = $xtPrice->currencies[$xtPrice->actualCurr]; $decimal_places = $curr['decimal_places']; //needed for round
$apu_js_curr = "var decimalPlaces=" . $decimal_places . "; \n";
$apu_js_curr.= "var decimalPoint ='" . $curr['decimal_point'] ."'; \n"; $apu_js_curr.= "var thousandPoint ='" . $curr['thousands_point'] ."'; \n"; $apu_js_curr.= "var currLeft ='" . $curr['symbol_left'] . "'; \n"; $apu_js_curr.= "var currRight ='" . $curr['symbol_right'] . "'; \n"; $apu_js_init = "var isPriceUpdater= 0; \n"; //EOF ATTRIBUTE PRICE UPDATER
FIND (the second entry before //if PRICE for option is 0 we don't need to display it): '$products_options_data[$row]['DATA'][$col] = array ('ID' => $products_options['products_options_values_id'], 'TEXT'...
and ADDED before:
//BOF ATTRIBUTE PRICE UPDATER
$apu_js_var .= "apu_var[" . $products_options['products_options_values_id'] . "]='" . round($price,$decimal_places) . "|" . $products_options['price_prefix'] . "'; \n";
$apu_js_prices = "var basePrice=". $products_price ."; \n"; //EOF ATTRIBUTE PRICE UPDATER
FIND 'if ($product->data['options_template'] == or $product->data['options_template'] == 'default') {...
and ADDED before:
//BOF ATTRIBUTE PRICE UPDATER if ($_SESSION['customers_status']['customers_status_show_price'] != '0' && $xtPrice->checkAttributes($product->data['products_id']) != ) { $apu_js_init = "var isPriceUpdater= 1; \n"; } $module_smarty->assign('APU_INIT', $apu_js_init); $module_smarty->assign('APU_JS', $apu_js_var); $module_smarty->assign('APU_CURR', $apu_js_curr); $module_smarty->assign('APU_PRICES', $apu_js_prices); //EOF ATTRIBUTE PRICE UPDATER
3. EDIT lang/YOUR LANGUAGES/YOUR LANGUAGES.php
ADDED in your languages files - GERMAN EXAMPLE:
//ATTRIBUTE PRICE UPDATER define('UPDATER_PREFIX_TEXT', 'Ihre Auswahl: ');
4. COPY the file attribute_price_updater.js.php to the folder includes/
COPY the file apu.css to the folder templates/YOURTEMPLATE/ COPY the file product_options_dropdown_apu.html to the folder templates/YOURTEMPLATE/module/product_options COPY the file product_options_selection_apu.html to the folder templates/YOURTEMPLATE/module/product_options
5. Test the ATTRIBUTE_PRICE_UPDATER
6. SET/UNSET the DEBUG modus
OPEN the file attribute_price_updater.js.php
and set var _debug = false; to var _debug = true;
If all tests are ok, set it to false
7. CHANGE HTML OUTPUT OPEN the file attribute_price_updater.js.php
and find //HTML OUTPUT apuProductPrice
Edit the code
8. CHANGE PRICE UPDATE ON LOADING PAGE OPEN the file attribute_price_updater.js.php
and set var onloadPriceUpdate = false; to var onloadPriceUpdate = true;
9. Don't forget to chose one of the new ***_apu.html product_options template for your products.
That's all
Geändert Erweiterte Suche[Bearbeiten]
Hersteller entfernt
/templates/xtc5/module/advanced_search.html
Zeile 20 -23 auskommentiert
Geänderte Detailansicht[Bearbeiten]
vorletzte Zeile, Datum harausgenommen:
Google Analytics[Bearbeiten]
nach fogender Anleitung eingebaut: http://www.xtc-modified.org/wiki/Google_Analytics_datenschutzkonform_einbinden
1. Folgenden Code im Header "/includes/header.php" im Head-Bereich (wo ist eigentlich egal, Google empfiehlt vor dem schließenden head-tag) einbauen.
<script type="text/javascript">
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxxxxx-x']); _gaq.push(['_gat._anonymizeIp']); _gaq.push(['_trackPageview']);
</script>
Damit steht er im Quelltext dort wo er hin soll, nämlich ganz oben.
2. Den asynchronen Funktionsaufruf für das eCommerce-Tracking unten in "/templates/xt5/module/checkout_success.html" einbinden und
<script type="text/javascript">
_gaq.push(['_addTrans',
'{$oID}',
'Name deines Shops',
'{$VALUE}',
'{$TAX}',
'{$SHIPPING}',
'{$CITY}',
'{$STATE}',
'{$COUNTRY}'
]);
{foreach name=aussen item=order_values from=$order_data}
_gaq.push(['_addItem',
'{$oID}',
'{$order_values.PRODUCTS_MODEL}',
'{$order_values.PRODUCTS_NAME}',
'{$order_values.CAT}',
'{$order_values.PRODUCTS_SINGLE_PRICE}',
'{$order_values.PRODUCTS_QTY}'
]);
{/foreach}
_gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
</script>
die checkout_success.php aus dem entsprechenden "e-commerce-analytics-xtcModified 1.0x.zip" Paket aus dem Thema ANLEITUNG: E-Commerce-Tracking mit Google Analytics ins root-Verzeichnis des Shops legen. Somit wird der Code bei erfolgtem Einkauf in der Mitte aufgerufen.
3. Damit der Rest des Codes am Seitenende geladen wird, muss in der "/templates/xt5/source/boxes.php" vor der Zeile:
$smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/');
folgendes geschrieben werden:
$GOOGLE_ANALYTICS =
'<script type="text/javascript">
(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>';
$smarty->assign('GOOGLE_ANALYTICS', $GOOGLE_ANALYTICS);
4. Zum Schluss muss noch in der "/templates/xt5/index.html" ganz unten
{$GOOGLE_ANALYTICS}
rein.
Nun sollte Google Analytics funktionieren.
Attribute werden nicht gespeichert[Bearbeiten]
in die htaccess im Root-vberzeichnis folgendes ergänzen:
php_value max_input_vars 6000
Klarna eingebunden am 07.01.2013[Bearbeiten]
Kopieren Sie bitte in ihre /includes/modules/product_info.php in Zeile 68 nach
if ($product->data['products_fsk18'] == '1') {
$info_smarty->assign('PRODUCTS_FSK18', 'true'); }
folgenden Text
//Edit Klarna
if (MODULE_PAYMENT_PCKREDITOR_DE_PRODUCTLEVEL == 'True' && MODULE_PAYMENT_PCKREDITOR_DE_STATUS == 'True')
{
include DIR_WS_CLASSES . 'kreditor_lang.php';
require_once DIR_WS_CLASSES . 'kreditor.php';
global $KRED_ISO3166_DE;
$lang_month = KREDITOR_LANG_INFO_DE_PAYMENTTEXT2_EACH; $lang_from = KREDITOR_LANG_INFO_DE_PARTPAYMENT_FROM; $fee = 195; $rate = 1495; $cc = $KRED_ISO3166_DE; $level = MODULE_PAYMENT_PCKREDITOR_DE_MINLIMIT; $maximum = MODULE_PAYMENT_KREDITOR_DE_ORDER_LIMIT; $products_price = $xtPrice->xtcGetPrice($product->data['products_id'], $format = true, 1, $product->data['products_tax_class_id'], $product->data['products_price'], 1);
monthly_cost($products_price['plain']*100, $rate, 24, $fee, 1, $cc, $result);
if (($level*100) < "1390")
{
$level = 13.90;
}
if ($products_price['plain'] >= $level)
{
$pc = number_format(round($result/100),0) . " " . '€';
if ($pc < 6.95)
{
$pc = 6.95. " " . '€';
}
$info_smarty->assign('PRODUCT_KLARNA_RATE','<img src="images/klarna_icon.png" alt="" style="cursor:default" />
'.'Ab '. $pc ." ". $lang_month . '
'.MODULE_PAYMENT_PCKREDITOR_INFO_KLARNA.'</a>');
} } // End edit Klarna
und fügen Sie bitte in /templates/"ihre verwendetes Template/module/product_info/product_info_v1.html in Zeile 28 nach
{if $PRODUCTS_VPE}{$PRODUCTS_VPE}{/if}
folgende Zeile ein
{$PRODUCT_KLARNA_RATE}
Dann noch die ganzen Dateien eingespielt.