_e('Qty', 'sunshine'); ?> </th> <th class="sunshine-cart-price"><?php _e('Item Price', 'sunshine'); ?> </th> <th class="sunshine-cart-total"><?php _e('Item Total', 'sunshine'); ?> </th> </tr> <?php $i = 1; $tabindex = 0; foreach (sunshine_cart_items() as $item) { $tabindex++; ?> <tr class="sunshine-cart-item <?php sunshine_product_class($item['product_id']); ?> "> <td class="sunshine-cart-item-image" data-label="<?php _e('Image', 'sunshine'); ?> "> <?php $thumb = wp_get_attachment_image_src($item['image_id'], 'sunshine-thumbnail'); $image_html = '<a href="' . get_permalink($item['image_id']) . '"><img src="' . $thumb[0] . '" alt="" class="sunshine-image-thumb" /></a>'; echo apply_filters('sunshine_cart_image_html', $image_html, $item, $thumb); ?>
function sunshine_checkout_order_review() { global $sunshine; ?> <div id="sunshine-checkout-order-review"> <h2><?php _e('Order Summary', 'sunshine'); ?> </h2> <p><a href="#sunshine-order-review-cart" id="sunshine-order-review-cart-link"><?php _e('View items in cart', 'sunshine'); ?> </a></p> <div id="sunshine-order-review-cart" style="display: none;"> <table id="sunshine-cart-items"> <tr> <th class="sunshine-cart-image"><?php _e('Image', 'sunshine'); ?> </th> <th class="sunshine-cart-name"><?php _e('Product', 'sunshine'); ?> </th> <th class="sunshine-cart-qty"><?php _e('Qty', 'sunshine'); ?> </th> <th class="sunshine-cart-price"><?php _e('Item Price', 'sunshine'); ?> </th> <th class="sunshine-cart-total"><?php _e('Item Total', 'sunshine'); ?> </th> </tr> <?php $i = 1; $tabindex = 0; foreach (sunshine_cart_items() as $item) { $tabindex++; ?> <tr class="sunshine-cart-item <?php sunshine_product_class($item['product_id']); ?> "> <td class="sunshine-cart-item-image" data-label="<?php _e('Image', 'sunshine'); ?> "> <?php $thumb = wp_get_attachment_image_src($item['image_id'], 'sunshine-thumbnail'); $image_html = '<a href="' . get_permalink($item['image_id']) . '"><img src="' . $thumb[0] . '" alt="" class="sunshine-image-thumb" /></a>'; echo apply_filters('sunshine_cart_image_html', $image_html, $item, $thumb); ?> </td> <td class="sunshine-cart-item-name" data-label="<?php _e('Product', 'sunshine'); ?> "> <?php $product = get_post($item['product_id']); $cat = wp_get_post_terms($item['product_id'], 'sunshine-product-category'); ?> <h3><span class="sunshine-item-cat"><?php echo apply_filters('sunshine_cart_item_category', isset($cat[0]->name) ? $cat[0]->name : '', $item); ?> </span> - <span class="sunshine-item-name"><?php echo apply_filters('sunshine_cart_item_name', $product->post_title, $item); ?> </span></h3> <div class="sunshine-item-comments"><?php echo apply_filters('sunshine_cart_item_comments', $item['comments'], $item); ?> </div> </td> <td class="sunshine-cart-item-qty" data-label="<?php _e('Qty', 'sunshine'); ?> "> <?php echo $item['qty']; ?> </td> <td class="sunshine-cart-item-price" data-label="<?php _e('Price', 'sunshine'); ?> "> <?php sunshine_money_format($item['price']); ?> </td> <td class="sunshine-cart-item-total" data-label="<?php _e('Total', 'sunshine'); ?> "> <?php sunshine_money_format($item['total']); ?> </td> </tr> <?php $i++; } ?> </table> </div> <script> jQuery(document).ready(function($){ $('#sunshine-order-review-cart-link').click(function(){ $('#sunshine-order-review-cart').toggle(); return false; }); }); </script> <table id="sunshine-checkout-review-totals"> <tr class="sunshine-subtotal"> <th><?php _e('Item(s) total', 'sunshine'); ?> </th> <td><?php sunshine_subtotal(); ?> </td> </tr> <?php if ($sunshine->options['tax_location'] && $sunshine->options['tax_rate']) { ?> <tr class="sunshine-tax"> <th><?php _e('Tax', 'sunshine'); ?> </th> <td><?php sunshine_tax_total(); ?> </td> </tr> <?php } ?> <tr class="sunshine-shipping"> <th><?php _e('Shipping', 'sunshine'); ?> </th> <td><?php sunshine_shipping_method(); ?> </td> </tr> <?php if ($sunshine->cart->discount_total > 0) { ?> <tr class="sunshine-discount"> <th><?php _e('Discounts', 'sunshine'); ?> </th> <td><?php sunshine_discount_total(); ?> </td> </tr> <?php } ?> <tr class="sunshine-credits"<?php if (!$sunshine->cart->use_credits) { echo 'style="display: none;"'; } ?> > <th><?php _e('Credits', 'sunshine'); ?> </th> <td><?php sunshine_usable_credits(); ?> </td> </tr> <tr class="sunshine-total"> <th><?php _e('Order Total', 'sunshine'); ?> </th> <td><?php sunshine_total(); ?> </td> </tr> </table> </div> <?php }
<?php do_action('sunshine_before_content'); ?> <div id="sunshine-main"> <form method="post" action="<?php sunshine_url('checkout'); ?> " id="sunshine-checkout" class="sunshine-form"> <?php do_action('sunshine_checkout_start_form'); ?> <input type="hidden" name="sunshine_checkout" value="1" /> <?php if (sunshine_cart_items()) { ?> <ol id="sunshine-checkout-steps"> <?php do_action('sunshine_before_checkout_steps'); ?> <li id="sunshine-checkout-step-contact"> <?php sunshine_checkout_contact_fields(); ?> </li> <li id="sunshine-checkout-step-shipping-methods"> <?php sunshine_checkout_shipping_methods(); ?>