/**
 * Output the permalink of the current product in the loop.
 *
 * @since 4.0
 * @uses  wpsc_get_product_permalink()
 */
function wpsc_product_permalink($id = 0)
{
    echo wpsc_get_product_permalink($id);
}
    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 
    }