public function column_product($item) { ?> <div class="wpsc-thumbnail wpsc-product-thumbnail"> <?php if (wpsc_has_product_thumbnail($item->ID)) { ?> <?php echo wpsc_get_product_thumbnail($item->ID, 'cart'); ?> <?php } else { ?> <?php wpsc_product_no_thumbnail_image('cart'); ?> <?php } ?> </div> <div class="wpsc-digital-product-title"> <strong><a href="<?php wpsc_product_permalink($item->ID); ?> "><?php wpsc_product_title('', '', $item->ID); ?> </a></strong> </div> <?php }
/** * Output the thumbnail for the current product in the loop. * * @since 4.0 * @uses wpsc_get_product_thumbnail() * * @param string $size Optional. Defaults to 'single'. See {@link wpsc_get_product_thumbnail()} for a list of available sizes you can use. * @param string $attr Optional. Query string or array of attributes. Defaults to ''. */ function wpsc_product_thumbnail($size = false, $attr = '') { echo wpsc_get_product_thumbnail(null, $size, $attr); }
<?php if ($this->show_thumbnails) { ?> <div class="wpsc-thumbnail wpsc-product-thumbnail"> <?php if (wpsc_has_product_thumbnail($item->product_id)) { echo wpsc_get_product_thumbnail($item->product_id, 'cart'); } else { wpsc_product_no_thumbnail_image('cart'); } ?> </div><!-- .wpsc-product-thumbnail --> <?php } ?> <div class="wpsc-cart-item-description"> <div class="wpsc-cart-item-title"> <strong> <a href="<?php echo $permalink; ?> "><?php echo esc_html($product_name); ?> </a> </strong> </div> <div class="wpsc-cart-item-details"> <?php if (!empty($item->sku)) {
protected function column_items($item, $key) { $product = get_post($item->product_id); $product_name = $item->product_name; if ($product->post_parent) { $permalink = wpsc_get_product_permalink($product->post_parent); $product_name = get_post_field('post_title', $product->post_parent); } else { $permalink = wpsc_get_product_permalink($item->product_id); } $variations = array(); if (is_array($item->variation_values)) { foreach ($item->variation_values as $variation_set => $variation) { $set_name = get_term_field('name', $variation_set, 'wpsc-variation'); $variation_name = get_term_field('name', $variation, 'wpsc-variation'); if (!is_wp_error($set_name) && !is_wp_error($variation_name)) { $variations[] = '<span>' . esc_html($set_name) . ':</span> ' . esc_html($variation_name); } } } $variations = implode(', ', $variations); $separator = ''; if (!empty($variations) && !empty($item->sku)) { $separator = ' | '; } ?> <?php if ($this->show_thumbnails) { ?> <div class="wpsc-thumbnail wpsc-product-thumbnail"> <?php if (wpsc_has_product_thumbnail($item->product_id)) { ?> <?php echo wpsc_get_product_thumbnail($item->product_id, 'cart'); ?> <?php } else { ?> <?php wpsc_product_no_thumbnail_image('cart'); ?> <?php } ?> </div> <?php } ?> <div class="wpsc-cart-item-description"> <div class="wpsc-cart-item-title"> <strong><a href="<?php echo $permalink; ?> "><?php echo esc_html($product_name); ?> </a></strong> </div> <div class="wpsc-cart-item-details"> <?php if (!empty($item->sku)) { ?> <span class="wpsc-cart-item-sku"><span><?php esc_html_e('SKU', 'wpsc'); ?> :</span> <?php echo esc_html($item->sku); ?> </span> <?php } ?> <?php if ($separator) { ?> <span class="separator"><?php echo $separator; ?> </span> <?php } ?> <?php if (!empty($variations)) { ?> <span class="wpsc-cart-item-variations"><?php echo $variations; ?> </span> <?php } ?> </div> <?php $this->cart_item_description($item, $key); ?> </div> <?php }
protected function column_image($item) { if ($this->show_thumbnails) { ?> <div class="wpsc-thumbnail wpsc-product-thumbnail"> <?php if (wpsc_has_product_thumbnail($item->product_id)) { ?> <?php echo wpsc_get_product_thumbnail($item->product_id, 'cart'); ?> <?php } else { ?> <?php wpsc_product_no_thumbnail_image('cart'); ?> <?php } ?> </div> <?php } }