Antwort #14 am: 26. Dezember 2010, 20:36:35
Hallo Zusammen,
ich hab das Modul eingebaut und nach meine Vorstellungen modifiziert, z.B. HTML der Merkliste.
Dabei bin ich auf ein Problem gestoßen, dass ich leider mit meinen PHP Kenntnissen nicht gelöst bekommen:
Wenn ich in der Datei"/templates/<template-name>/module/wish_list_order_details.html"
die Anzeige der Artikelanzahl auskommentiere, kann ich die Artikel nicht mehr aus der Wishlist löschen.
meine "wish_list_order_details.html" sieht so aus:
{config_load
file="$language/lang_$language.conf" section
="shopping_cart"}<table
class="orderdetails" width
="100%" border
="1" cellspacing
="0" cellpadding
="6"> <tr
class="headerrow"> <td
class="left"></td
> <td
class="left">{#text_article#}</td>
<td
class="left">{#text_qty#}</td>
{php
}//<td class="right">{#text_single#}</td>{/php} <td
class="center">{#text_remove#}</td>
</tr
> {foreach name
=aussen item
=module_data from
=$module_content} <tr
class="{cycle values="contentrow1
,contentrow2
"}"> <td align
="left" valign
="top" class="main"> {if $module_data.PRODUCTS_IMAGE
!=''} <img src
="{$module_data.PRODUCTS_IMAGE}" width
="60" height
="60" border
="0"> {/if} </td
> <td
class="productname"> <strong
><a href
="{$module_data.PRODUCTS_LINK}">{$module_data.PRODUCTS_NAME
}</a
></strong
> {if $module_data.ATTRIBUTES
!=''} <table
class="productattributes" width
="100%" border
="0" cellspacing
="0" cellpadding
="0"> {foreach key=key_data item
=item_data from
=$module_data.ATTRIBUTES
} <tr
> <td
class="attribute"><strong
>{$item_data.NAME
}:</strong
></td
> <td
class="value">{$item_data.VALUE_NAME
}</td
> </tr
> {/foreach} </table
> {/if}</td
> {php
}//<td class="quantity">{$module_data.PRODUCTS_QTY}</td>{/php} <td
class="singleprice">{$module_data.PRODUCTS_SINGLE_PRICE
}</td
> {php
}/*
//DokuMan - 2009-11-03 - use delete button instead of checkbox in template (commented out)
<td class="delete">{$module_data.BOX_DELETE}{$module_data.BUTTON_DELETE}</td>
*/{/php
} <td
class="delete">{$module_data.BUY_NOW
}<br
>{$module_data.DELETE_ICON
}<br
>{$module_data.BUTTON_DELETE
}</td
> </tr
> {/foreach}</table
> Der Eintrag "$module_data.DELETE_ICON" dient nur zu Testzwecken und ist ohne Bedeutung.
Nehm ich jetzt die Zeile
<td class="quantity">{$module_data.PRODUCTS_QTY}</td>
wieder rein, kann ich die Einträge in der Wishlist löschen.
Kommentiere ich diese aus, bleibt der Löschvorgang ohne Erfolg.
Die Definition ist in"/includes/modules/order_details_wishlist.php" und sieht so aus:
$module_content[$i]=array( 'PRODUCTS_NAME' => $products[$i]['name'].$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' => $products[$i]['name'], 'BUTTON_DELETE' => xtc_draw_checkbox_field
('cart_delete[]', $products[$i]['id']), 'DELETE_ICON' => '<a href="'. xtc_href_link
(basename($PHP_SELF), 'action=update_product&products_id='.$products[$i]['id']). '">'. xtc_image
('templates/'.CURRENT_TEMPLATE
.'/img/button_cart_delete.jpg', 'löschen'). '</a>', '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_buy_now_small.gif', TEXT_BUY
. TEXT_NOW
) ); Kann mir jemand helfen das Problem zu lösen?
Gruß
Michael