Hmmm, bin gerade etwas am Verzweifeln. Der Einbau macht mir wegen der geänderten product_attributes.php nun doch etwas mehr Schwierigkeiten als angenommen.
Das erste Problem erhalte ich in der product_info.php, weil ich dort ja unterhalb von:
include (DIR_WS_MODULES.'product_attributes.php');
include (DIR_WS_MODULES.'product_reviews.php');
etwas einfügen sollte. Und das zweite Problem beginnt in der function.products_attributes.php (welche die products_attributes.php) ersetzt. Dort wurde ja auch einiges geändert. Vielleicht hat hier jemand eine Ahnung wie ich den Einbau in diese zwei Dateien bewerkstelligen könnte.
includes/modules/product_info.php
-----------------------------
Suche:
$info_smarty->assign('FORM_ACTION', xtc_draw_form('cart_quantity', xtc_href_link(FILENAME_PRODUCT_INFO, xtc_get_all_get_params(array ('action')).'action=add_product')));
$info_smarty->assign('FORM_END', '</form>');
$info_smarty->assign('PRODUCTS_PRICE', $products_price['formated']);
Füge danach ein:
$info_smarty->assign('PRODUCTS_PRICE_PLAIN', $products_price['plain']); // ioptcalc
-----------------------------
Suche:
include (DIR_WS_MODULES.'product_attributes.php');
include (DIR_WS_MODULES.'product_reviews.php');
Füge danach ein:
// ioptcalc beginn
if( isset($products_options_data) ) {
$count_opt=0;
$options_js_idlist='';
$options_js_pricelist='';
$sep='';
foreach( $products_options_data as $opt ) {
$count_opt += sizeof($opt['DATA']);
foreach ( $opt['DATA'] as $opt_val ) {
$options_js_idlist .= $sep."'".$opt_val['JS_ID']."'";
$options_js_pricelist .= $sep.$opt_val['JS_PRICE'];
$sep=', ';
}
}
$info_smarty->assign('curr_format_symbol_left', $xtPrice->currencies[$xtPrice->actualCurr]['symbol_left']);
$info_smarty->assign('curr_format_symbol_right', $xtPrice->currencies[$xtPrice->actualCurr]['symbol_right']);
$info_smarty->assign('curr_format_decimal_point', $xtPrice->currencies[$xtPrice->actualCurr]['decimal_point']);
$info_smarty->assign('curr_format_thousands_point', $xtPrice->currencies[$xtPrice->actualCurr]['thousands_point']);
$info_smarty->assign('curr_format_decimal_places', $xtPrice->currencies[$xtPrice->actualCurr]['decimal_places']);
$info_smarty->assign('OPTIONS_JS_COUNT', $count_opt);
$info_smarty->assign('OPTIONS_JS_IDLIST', $options_js_idlist);
$info_smarty->assign('OPTIONS_JS_PRICELIST', $options_js_pricelist);
}
// ioptcalc end
-----------------------------
-----------------------------
-----------------------------
includes/modules/product_attributes.php
-----------------------------
Suche:
if ($product->getAttributesCount() > 0) {
$products_options_name_query = xtDBquery("select distinct ............. etc..........
$row = 0;
$col = 0;
Füge danach ein:
$js_id_count=0; // ioptcalc
-----------------------------
Suche die Zeile (Zeile hier ist übersichtlicher formatiert als im Original!):
$products_options_data[$row]['DATA'][$col] = array ('ID' => $products_options['products_options_values_id'],
'TEXT' => $products_options['products_options_values_name'],
'MODEL' => $products_options['attributes_model'],
'PRICE' => $xtPrice->xtcFormat($price, true),
'FULL_PRICE' => $xtPrice->xtcFormat($full, true),
'PREFIX' => $products_options['price_prefix']);
Ersetze durch:
$products_options_data[$row]['DATA'][$col] = array ('ID' => $products_options['products_options_values_id'],
'JS_ID' => "f0_a$js_id_count", // ioptcalc
'JS_PRICE' => $attr_price*1, // ioptcalc
'TEXT' => $products_options['products_options_values_name'],
'MODEL' => $products_options['attributes_model'],
'PRICE' => $xtPrice->xtcFormat($price, true),
'FULL_PRICE' => $xtPrice->xtcFormat($full, true),
'PREFIX' => $products_options['price_prefix']);
$js_id_count++; // ioptcalc