Poolcorner
Installiert
Domnowski
EOS-Iframe
Attribute_price_updater
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
Hersteller entfernt
/templates/xtc5/module/advanced_search.html
Zeile 20 -23 auskommentiert