cart.php 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php if ( shopp( 'cart.hasitems' ) ) : ?>
  2. <form id="cart" action="<?php shopp( 'cart.url' ); ?>" method="post">
  3. <div>
  4. <a href="<?php shopp( 'cart.referrer' ); ?>" class="button">&laquo; <?php _e( 'Continue Shopping', 'Shopp' ); ?></a>
  5. <a href="<?php shopp( 'checkout.url' ); ?>" class="right button"><?php _e( 'Proceed to Checkout', 'Shopp' ); ?> &raquo;</a>
  6. </div>
  7. <?php shopp( 'cart.function' ); ?>
  8. <table class="cart">
  9. <tr>
  10. <th scope="col" class="item"><?php _e( 'Cart Items', 'Shopp' ); ?></th>
  11. <th scope="col"><?php _e( 'Quantity', 'Shopp' ); ?></th>
  12. <th scope="col" class="money"><?php _e( 'Item Price', 'Shopp' ); ?></th>
  13. <th scope="col" class="money"><?php _e( 'Item Total', 'Shopp' ); ?></th>
  14. </tr>
  15. <?php while ( shopp( 'cart.items' ) ) : ?>
  16. <tr>
  17. <td>
  18. <a href="<?php shopp( 'cartitem.url' ); ?>"><?php shopp( 'cartitem.name' ); ?></a>
  19. <?php shopp( 'cartitem.options' ); ?>
  20. <?php shopp( 'cartitem.addons-list' ); ?>
  21. <?php shopp( 'cartitem.inputs-list' ); ?>
  22. </td>
  23. <td>
  24. <?php shopp( 'cartitem.quantity', 'input=text' ); ?>
  25. <?php shopp( 'cartitem.remove', 'input=button' ); ?>
  26. </td>
  27. <td class="money"><?php shopp( 'cartitem.unitprice' ); ?></td>
  28. <td class="money"><?php shopp( 'cartitem.total' ); ?></td>
  29. </tr>
  30. <?php endwhile; ?>
  31. <?php while ( shopp( 'cart.discounts' ) ) : ?>
  32. <tr>
  33. <td colspan="4" class="money">
  34. <?php shopp( 'cart.discount-name' ); ?>
  35. <strong><?php shopp( 'cart.discount-applied', array( 'before' => '&nbsp;&mdash;&nbsp;' ) ); ?></strong>
  36. </td>
  37. </tr>
  38. <?php endwhile; ?>
  39. <tr class="totals">
  40. <td colspan="2" rowspan="5">
  41. <?php if ( shopp( 'cart.needs-shipping-estimates' ) ) : ?>
  42. <small><?php _e( 'Estimate shipping &amp; taxes for:', 'Shopp' ); ?></small>
  43. <?php shopp( 'cart.shipping-estimates' ); ?>
  44. <?php endif; ?>
  45. <?php shopp( 'cart.apply-code' ); ?>
  46. </td>
  47. <th scope="row"><?php _e( 'Subtotal', 'Shopp' ); ?></th>
  48. <td class="money"><?php shopp( 'cart.subtotal' ); ?></td>
  49. </tr>
  50. <?php if ( shopp( 'cart.hasdiscount' ) ) : ?>
  51. <tr class="totals">
  52. <th scope="row"><?php _e( 'Discount', 'Shopp' ); ?></th>
  53. <td class="money">-<?php shopp( 'cart.discount' ); ?></td>
  54. </tr>
  55. <?php endif; ?>
  56. <?php if ( shopp( 'cart.needs-shipped' ) ) : ?>
  57. <tr class="totals">
  58. <th scope="row"><?php shopp( 'cart.shipping', 'label=' . __( 'Estimated Shipping', 'Shopp' ) ); ?></th>
  59. <td class="money"><?php shopp( 'cart.shipping' ); ?></td>
  60. </tr>
  61. <?php endif; ?>
  62. <tr class="totals">
  63. <th scope="row"><?php shopp( 'cart.tax', 'label=' . __( 'Tax', 'Shopp' ) ); ?></th>
  64. <td class="money"><?php shopp( 'cart.tax' ); ?></td>
  65. </tr>
  66. <tr class="totals total">
  67. <th scope="row"><?php _e( 'Total', 'Shopp' ); ?></th>
  68. <td class="money"><?php shopp( 'cart.total' ); ?></td>
  69. </tr>
  70. <tr class="buttons">
  71. <td colspan="4"><?php shopp( 'cart.update-button' ); ?></td>
  72. </tr>
  73. </table>
  74. <div>
  75. <a href="<?php shopp( 'cart.referrer' ); ?>" class="button">&laquo; <?php _e( 'Continue Shopping', 'Shopp' ); ?></a>
  76. <a href="<?php shopp( 'checkout.url' ); ?>" class="right button"><?php _e( 'Proceed to Checkout', 'Shopp' ); ?> &raquo;</a>
  77. </div>
  78. </form>
  79. <?php else : ?>
  80. <p class="notice"><?php _e( 'There are currently no items in your shopping cart.', 'Shopp' ); ?></p>
  81. <p>
  82. <a href="<?php shopp( 'storefront.url' ); ?>">&laquo; <?php _e( 'Continue Shopping', 'Shopp' ); ?></a>
  83. </p>
  84. <?php endif; ?>