Beispiel #1
0
			<th class="product-subtotal hidden-mb"><?php 
_e('Total', 'woocommerce');
?>
</th>
		</tr>
	</thead>
	<tbody>
		<?php 
do_action('woocommerce_before_cart_contents');
?>

		<?php 
foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {
    $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key);
    $product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key);
    $articleObj = Article_Object::initById($product_id);
    if ($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_cart_item_visible', true, $cart_item, $cart_item_key)) {
        ?>
				<tr class="<?php 
        echo esc_attr(apply_filters('woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key));
        ?>
">


					<td class="product-thumbnail">
						<?php 
        $thumbnail = apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key);
        if (!$_product->is_visible()) {
            echo $thumbnail;
        } else {
            printf('<a href="%s">%s</a>', esc_url($_product->get_permalink($cart_item)), $thumbnail);
Beispiel #2
0
function filter_woocommerce_cart_item_thumbnail($product_get_image, $cart_item, $cart_item_key)
{
    return '<img src="' . Article_Object::initById($cart_item['product_id'])->getFirstImageUrl() . '" alt="placeholder" />';
}