Hallöchen,
so nun der 2. Schritt
erstmal habe ich den Style organisiert und unwesentliche Dinge rausgenommen. so schaut jetzt der Merkzettel aus:
Also wenn ich beim Produkt Auf den Merkzettel klicke kommt man dann direkt im Merkzettel raus ( siehe auch Foto oben ) nun kann man auch auf den Button In den Warenkorb klicken und das Produkt wandert in den WE
was noch nicht funktioniert:
- ist die Gesamte Menge in den WE legen,
- Löschen des Produkts
- Produkt mit Atributte Auf den Merkzettel
- Fotos sind noch hard verlinkt, da es nicht irgendwie mit { img nicht funktioniert }
hier mal den neuen code aus der includes/modules/order_details_wishlist.php ( ist teilweise aus der shopping_cart.php )
Code: Alles auswählen
$module_smarty = new template();
// include needed functions
require_once(DIR_FS_INC . 'xtc_draw_separator.inc.php');
require_once(DIR_FS_INC . 'xtc_draw_form.inc.php');
require_once(DIR_FS_INC . 'xtc_draw_input_field.inc.php');
require_once(DIR_FS_INC . 'xtc_draw_checkbox_field.inc.php');
require_once(DIR_FS_INC . 'xtc_draw_selection_field.inc.php');
require_once(DIR_FS_INC . 'xtc_draw_hidden_field.inc.php');
als wer lust hat, da können wir das modul auch fertig machen und beim nächsten update mit einspielen
require_once(DIR_FS_INC . 'xtc_check_stock.inc.php');
require_once(DIR_FS_INC . 'xtc_get_products_stock.inc.php');
require_once(DIR_FS_INC . 'xtc_remove_non_numeric.inc.php');
require_once(DIR_FS_INC . 'xtc_get_short_description.inc.php');
require_once(DIR_FS_INC . 'xtc_format_price.inc.php');
require_once (DIR_FS_INC. 'xtc_get_attributes_model.inc.php'); // NEU 5.2.2014
require_once (DIR_FS_INC.'get_images.inc.php');
$module_content=array();
$any_out_of_stock='';
$mark_stock='';
for ($i = 0, $n = sizeof($products); $i < $n; $i ++) {
if (STOCK_CHECK == 'true') {
$mark_stock= xtc_check_stock($products[$i]['id'], $products[$i]['quantity']);
if ($mark_stock) {
$_SESSION['any_out_of_stock'] = 1;
}
}
$prd_qty = xtc_draw_input_field(
'cart_quantity[]',
$products[$i]['quantity'],
'size="2"'
)
. xtc_draw_hidden_field(
'products_id[]',
$products[$i]['id']
)
. xtc_draw_hidden_field(
'old_qty[]',
$products[$i]['quantity']
);
$image='';
if ($products[$i]['image'] != '') {
$image= "img/cache/thumb_box/77/".$products[$i]['image']; //DIR_WS_THUMBNAIL_IMAGES
}
//echo "Image: ".$image;
// NEU 5.2.2014
$del_url = xtc_href_link(FILENAME_WISH_LIST, 'action=remove_product&products_id=' . $products[$i]['id'], 'SSL');
$del_link = sprintf('<a href="%s">%s</a>', $del_url, IMAGE_BUTTON_ENTFERNEN);
$del_button = sprintf('<a href="%s">%s</a>', $del_url, xtc_image_button('button_cart_del.gif', IMAGE_BUTTON_ENTFERNEN));
// END NEU
$module_content[$i]=array(
'PRODUCTS_NAME' => htmlspecialchars($products[$i]['name'], ENT_QUOTES, CHARSET).$mark_stock,
'PRODUCTS_QTY' => xtc_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"') . xtc_draw_hidden_field('products_id[]', $products[$i]['id']),
'PRODUCTS_MODEL' => $products[$i]['model'],
'PRODUCTS_TAX' => number_format($products[$i]['tax'], TAX_DECIMAL_PLACES),
'PRODUCTS_IMAGE' => $image,
'IMAGE_ALT' => htmlspecialchars($products[$i]['name'], ENT_QUOTES, CHARSET),
'BOX_DELETE' => xtc_draw_checkbox_field('cart_delete[]', $products[$i]['id']),
// NEU 5.2.2014
'BUTTON_DELETE' => $del_button,
'LINK_DELETE' => $del_link,
'URL_DELETE' => $del_url,
// END NEU
'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']),
'PRODUCTS_PRICE' => $xtPrice->xtcFormat($products[$i]['price']*$products[$i]['quantity'],true),
'PRODUCTS_SINGLE_PRICE'=>$xtPrice->xtcFormat($products[$i]['price'],true),
'PRODUCTS_SHORT_DESCRIPTION' => strip_tags(xtc_get_short_description($products[$i]['id'])),
'ATTRIBUTES' => '',
'BUY_NOW' => '<a href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=buy_now&BUYproducts_id=' . $products[$i]['id'], 'NONSSL') . '">' . xtc_image_button('button_in_cart.gif', TEXT_BUY . TEXT_NOW)
);
// Product options names
$attributes_exist = ((isset($products[$i]['attributes'])) ? 1 : 0);
if ($attributes_exist == 1) {
reset($products[$i]['attributes']);
// NEU 5.2.2014
foreach ( $products[$i]['attributes'] as $option => $value ) {
$attribute_stock_check = NULL;
if (ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true') {
$attribute_stock_check = xtc_check_stock_attributes($products[$i][$option]['products_attributes_id'], $products[$i]['quantity']);
if ($attribute_stock_check) {
$_SESSION['any_out_of_stock'] = 1;
}
}
$model = xtc_get_attributes_model(
xtc_get_prid($products[$i]['id']),
$products[$i][$option]['products_options_values_name'],
$products[$i][$option]['products_options_name']
);
$module_content[$i]['ATTRIBUTES'][] = array(
'ID' => $products[$i][$option]['products_attributes_id'],
'MODEL'=> $model,
'NAME' => $products[$i][$option]['products_options_name'],
'VALUE_NAME' => $products[$i][$option]['products_options_values_name'] . $attribute_stock_check
);
}
}
}
$module_content = get_images($module_content);
$total_content='';
if ( $_SESSION['customers_status']['customers_status_show_price'] == '1' ) {
if ( $_SESSION['customers_status']['customers_status_show_price_tax'] == 0
&& $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0 ) {
$total -= $discount;
}
if ( $_SESSION['customers_status']['customers_status_show_price_tax'] == 0
&& $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1 ) {
$total -= $discount;
}
if ( $_SESSION['customers_status']['customers_status_show_price_tax'] == 1 ) {
$total -= $discount;
}
$total_content['total'] = $xtPrice -> xtcFormat($total, true);
} else {
$total_content .= NOT_ALLOWED_TO_SEE_PRICES;
}
$module_smarty->assign('TOTAL_CONTENT',$total_content);
$module_smarty->assign('module_content',$module_content);
$module = $module_smarty->fetch('module/wish_list_order_details.html');
$smarty->assign('MODULE_order_details',$module);
es kann bestimmt erstmal bis code raus, also aufräumen
grüssle und danke fein basteldehs
ps.: am Samstag geht mein Online Shop Offiziel Online
![Überglücklich :D](./images/smilies/icon_e_biggrin.gif)