echo $alt_class;
    ?>
">

         <td class="firstcol wpsc_product_image wpsc_product_image_<?php 
    echo wpsc_the_cart_item_key();
    ?>
">
         <?php 
    if ('' != wpsc_cart_item_image()) {
        ?>
			<?php 
        do_action("wpsc_before_checkout_cart_item_image");
        ?>
			<?php 
        echo get_the_post_thumbnail(wpsc_cart_item_product_id(), 'thumbnail');
        ?>
            <?php 
        do_action("wpsc_after_checkout_cart_item_image");
        ?>
         <?php 
    } else {
        /* I dont think this gets used anymore,, but left in for backwards compatibility */
        ?>
            <div class="item_no_image">
				<?php 
        do_action("wpsc_before_checkout_cart_item_image");
        ?>
               <a href="<?php 
        echo wpsc_the_product_permalink();
        ?>
Пример #2
0
        public function checkout_ids()
        {
            if (wpsc_cart_item_count() > 0) {
                global $wpsc_cart;
                $line_items = array();
                while (wpsc_have_cart_items()) {
                    wpsc_the_cart_item();
                    $current_item = $wpsc_cart->cart_item;
                    $parent = $this->get_parent_post($current_item->product_id);
                    if ($parent) {
                        $product_id = $parent->ID;
                        $product_name = $parent->post_title;
                    } else {
                        $product_id = wpsc_cart_item_product_id();
                        $product_name = wpsc_cart_item_name();
                    }
                    $line_item = (int) $product_id;
                    $line_items[] = $line_item;
                }
                echo '<script type="text/javascript">
			        var _ra = _ra || {};
			 	    _ra.checkoutIdsInfo =' . json_encode($line_items, JSON_PRETTY_PRINT) . '
			        if (_ra.ready !== undefined) {
				        _ra.checkoutIds(_ra.checkoutIdsInfo);
				  }
			</script>';
            }
        }