@viur/shop-components 0.14.1 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viur/shop-components",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "Frontend Vue components for the shop module of ViUR",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,7 +40,7 @@
40
40
 
41
41
  <div class="viur-shop-cart-sidebar-info viur-shop-cart-sidebar-info--total">
42
42
  <span v-html="$t('viur.shop.summary_total')"></span>
43
- <sl-format-number lang="de" type="currency" currency="EUR" :value="state.total_discount_price">
43
+ <sl-format-number lang="de" type="currency" currency="EUR" :value="state.total">
44
44
  </sl-format-number>
45
45
  </div>
46
46
  <div class="viur-shop-cart-sidebar-info " v-for="vatObj in state.vat">
@@ -85,6 +85,7 @@ const props = defineProps({
85
85
  const state = reactive({
86
86
  items: computed(() => { return shopStore.state.cartList }),
87
87
  cartTotal: computed(() => {
88
+ // TODO: Why isn't total_raw used? :: return shopStore.state.cartRoot.total_raw
88
89
  let sum = state.items.reduce((acc,item)=>{
89
90
  if (item.skel_type==="leaf"){
90
91
  acc+=item.price.current *item.quantity
@@ -114,7 +115,7 @@ const state = reactive({
114
115
  }),
115
116
  discount:computed(()=> (state.cartTotal - shopStore.state.cartRoot.total_discount_price)*-1),
116
117
  total: computed(() => {
117
- return shopStore.state.cartRoot.total
118
+ return shopStore.state.cartRoot.total_discount_price
118
119
  }),
119
120
  vat:computed(()=>{
120
121
  return shopStore.state.cartRoot.vat