content.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!--
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. -->
  7. <div class="block-title">
  8. <strong>
  9. <span class="text" translate="'My Cart'"/>
  10. <span
  11. class="qty empty"
  12. text="getCartParam('summary_count')"
  13. data-bind="css: { empty: !!getCartParam('summary_count') == false },
  14. attr: { title: $t('Items in Cart') }">
  15. </span>
  16. </strong>
  17. </div>
  18. <div class="block-content">
  19. <button type="button"
  20. id="btn-minicart-close"
  21. class="action close"
  22. data-action="close"
  23. data-bind="attr: { title: $t('Close') }">
  24. <span translate="'Close'"/>
  25. </button>
  26. <if args="getCartParam('summary_count')">
  27. <div class="items-total">
  28. <span class="count" if="maxItemsToDisplay < getCartLineItemsCount()" text="maxItemsToDisplay"/>
  29. <translate args="'of'" if="maxItemsToDisplay < getCartLineItemsCount()"/>
  30. <span class="count" text="getCartLineItemsCount()"/>
  31. <!-- ko if: (getCartLineItemsCount() === 1) -->
  32. <span translate="'Item in Cart'"/>
  33. <!--/ko-->
  34. <!-- ko if: (getCartLineItemsCount() > 1) -->
  35. <span translate="'Items in Cart'"/>
  36. <!--/ko-->
  37. </div>
  38. <each args="getRegion('subtotalContainer')" render=""/>
  39. <each args="getRegion('extraInfo')" render=""/>
  40. <div class="actions" if="getCartParam('possible_onepage_checkout')">
  41. <div class="primary">
  42. <button
  43. id="top-cart-btn-checkout"
  44. type="button"
  45. class="action primary checkout"
  46. data-action="close"
  47. data-bind="
  48. attr: {
  49. title: $t('Proceed to Checkout')
  50. },
  51. click: closeMinicart()
  52. "
  53. translate="'Proceed to Checkout'"
  54. />
  55. <div data-bind="html: getCartParam('extra_actions')"></div>
  56. </div>
  57. </div>
  58. </if>
  59. <if args="getCartParam('summary_count')">
  60. <strong class="subtitle" translate="'Recently added item(s)'"/>
  61. <div data-action="scroll" class="minicart-items-wrapper">
  62. <ol id="mini-cart" class="minicart-items" data-bind="foreach: { data: getCartItems(), as: 'item' }">
  63. <each args="$parent.getRegion($parent.getItemRenderer(item.product_type))"
  64. render="{name: getTemplate(), data: item, afterRender: function() {$parents[1].initSidebar()}}"
  65. />
  66. </ol>
  67. </div>
  68. </if>
  69. <ifnot args="getCartParam('summary_count')">
  70. <strong class="subtitle empty"
  71. data-bind="visible: closeSidebar()"
  72. translate="'You have no items in your shopping cart.'"
  73. />
  74. <if args="getCartParam('cart_empty_message')">
  75. <p class="minicart empty text" text="getCartParam('cart_empty_message')"/>
  76. <div class="actions">
  77. <div class="secondary">
  78. <a class="action viewcart" data-bind="attr: {href: shoppingCartUrl}">
  79. <span translate="'View and Edit Cart'"/>
  80. </a>
  81. </div>
  82. </div>
  83. </if>
  84. </ifnot>
  85. <div class="actions" if="getCartParam('summary_count')">
  86. <div class="secondary">
  87. <a class="action viewcart" data-bind="attr: {href: shoppingCartUrl}">
  88. <span translate="'View and Edit Cart'"/>
  89. </a>
  90. </div>
  91. </div>
  92. <div id="minicart-widgets" class="minicart-widgets" if="getRegion('promotion').length">
  93. <each args="getRegion('promotion')" render=""/>
  94. </div>
  95. </div>
  96. <each args="getRegion('sign-in-popup')" render=""/>