@viur/shop-components 0.1.18 → 0.1.20
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 +1 -1
- package/src/Shop.vue +2 -2
- package/src/ShopSummary.vue +5 -7
- package/src/Steps/ShopCart.vue +0 -1
- package/src/Steps/ShopOrderConfirm.vue +4 -4
- package/src/Steps/ShopPaymentProvider.vue +3 -3
- package/src/Steps/ShopShippingMethod.vue +3 -3
- package/src/Steps/ShopUserDataGuest.vue +2 -2
- package/src/components/CardSelector.vue +19 -14
- package/src/components/CartItemSmall.vue +4 -3
- package/src/translations/de.js +6 -4
- package/src/translations/en.js +67 -4
- package/src/translations/fr.js +23 -15
package/package.json
CHANGED
package/src/Shop.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="viur-shop-stepper-wrap"
|
|
4
4
|
:class="{ 'full-width': (!summary || summary==='bottom' || shopStore.state.currentTab==='complete') }"
|
|
5
5
|
>
|
|
6
|
-
<shop-order-stepper
|
|
6
|
+
<shop-order-stepper>
|
|
7
7
|
<template #template_cart>
|
|
8
8
|
<slot name="template_cart"></slot>
|
|
9
9
|
</template>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
paid: {{ shopStore.state.order?.['is_paid'] }}<br><br>
|
|
54
54
|
|
|
55
55
|
OrderObject: {{shopStore.state.order}}
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
</sl-details>
|
|
58
58
|
</template>
|
|
59
59
|
<div id="dialogs"></div>
|
package/src/ShopSummary.vue
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<sl-format-number lang="de" type="currency" currency="EUR" :value="state.shippingTotal">
|
|
28
28
|
</sl-format-number>
|
|
29
29
|
</div>
|
|
30
|
-
<div class="viur-shop-cart-shipping-item" v-if="shopStore.state.order?.cart?.dest?.shipping">
|
|
30
|
+
<div class="viur-shop-cart-sidebar-info viur-shop-cart-shipping-item" v-if="shopStore.state.order?.cart?.dest?.shipping">
|
|
31
31
|
<span v-html="$t('viur.shop.summary_delivery_time')"></span>
|
|
32
32
|
<span>
|
|
33
33
|
{{
|
|
@@ -94,11 +94,9 @@ const state = reactive({
|
|
|
94
94
|
}),
|
|
95
95
|
shippingTotal: computed(() => {
|
|
96
96
|
let total = 0
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if( shopStore.state?.order?.cart?.dest?.shipping?.dest?.shipping_cost > 0 ) {
|
|
97
|
+
if (shopStore.state.cartRoot.shipping?.dest?.shipping_cost>=0 ){
|
|
98
|
+
total += shopStore.state.cartRoot.shipping?.dest?.shipping_cost
|
|
99
|
+
}else if( shopStore.state?.order?.cart?.dest?.shipping?.dest?.shipping_cost) {
|
|
102
100
|
total += shopStore.state.order.cart.dest.shipping.dest.shipping_cost
|
|
103
101
|
}
|
|
104
102
|
|
|
@@ -150,7 +148,7 @@ function calc_percent(val){
|
|
|
150
148
|
display: flex;
|
|
151
149
|
flex-direction: row;
|
|
152
150
|
flex-wrap: nowrap;
|
|
153
|
-
span {
|
|
151
|
+
span:first-of-type {
|
|
154
152
|
margin-right: auto;
|
|
155
153
|
}
|
|
156
154
|
}
|
package/src/Steps/ShopCart.vue
CHANGED
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
<component :is="params['additionalComponent']" v-if="params['additionalComponent']" ref="additionalComponent">
|
|
72
72
|
</component>
|
|
73
73
|
|
|
74
|
-
<
|
|
75
|
-
<sl-button size="
|
|
76
|
-
</
|
|
74
|
+
<sl-bar class="wrapper">
|
|
75
|
+
<sl-button slot="right" size="large" @click="startCheckout" :disabled="!shopStore.state.canCheckout" variant="success">{{ $t('viur.shop.order_pay') }}</sl-button>
|
|
76
|
+
</sl-bar>
|
|
77
77
|
|
|
78
78
|
<template v-if="shopStore.state.order?.['payment_provider'] !== null && shopStore.state.order?.['payment_provider'].startsWith('unzer-')">
|
|
79
|
-
<sl-dialog v-if="state.paymentPopup" label="
|
|
79
|
+
<sl-dialog v-if="state.paymentPopup" :label="$t('viur.shop.order_pay')" :open="state.paymentPopup" @sl-after-hide="state.paymentPopup=false">
|
|
80
80
|
<payment-provider-unzer @cancel="paymentCanceled"></payment-provider-unzer>
|
|
81
81
|
</sl-dialog>
|
|
82
82
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<slot name="top_actions" v-if="shopStore.state.topActions"
|
|
3
|
-
nextName="
|
|
3
|
+
:nextName="$t('viur.shop.next')"
|
|
4
4
|
:activefunction="()=>shopStore.state.order?.['payment_provider']"
|
|
5
5
|
:nextfunction="()=>true"
|
|
6
6
|
>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</slot>
|
|
28
28
|
|
|
29
29
|
<slot
|
|
30
|
-
nextName="
|
|
30
|
+
:nextName="$t('viur.shop.next')"
|
|
31
31
|
:activefunction="()=>shopStore.state.order?.['payment_provider']"
|
|
32
32
|
:nextfunction="()=>true"
|
|
33
33
|
>
|
|
@@ -67,4 +67,4 @@ onBeforeMount(()=>{
|
|
|
67
67
|
state.selection = shopStore.state.order?.['payment_provider']
|
|
68
68
|
})
|
|
69
69
|
})
|
|
70
|
-
</script>
|
|
70
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<slot name="top_actions" v-if="shopStore.state.topActions"
|
|
3
|
-
nextName="
|
|
3
|
+
:nextName="$t('viur.shop.next')"
|
|
4
4
|
:activefunction="()=>shopStore.state.cartRoot?.['shipping']"
|
|
5
5
|
:nextfunction="()=>nextStep"
|
|
6
6
|
>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
@change="updateShippingMethod"
|
|
14
14
|
>
|
|
15
15
|
<template v-slot="{option, index}">
|
|
16
|
-
|
|
16
|
+
<!--<img slot="image">-->
|
|
17
17
|
|
|
18
18
|
<sl-format-number lang="de" type="currency" currency="EUR" :value=" option['dest']['shipping_cost']" v-if="option['dest']['shipping_cost']">
|
|
19
19
|
</sl-format-number>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</slot>
|
|
28
28
|
|
|
29
29
|
<slot
|
|
30
|
-
nextName="
|
|
30
|
+
:nextName="$t('viur.shop.next')"
|
|
31
31
|
:activefunction="()=>shopStore.state.cartRoot?.['shipping']"
|
|
32
32
|
:nextfunction="nextStep"
|
|
33
33
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<slot name="top_actions" v-if="shopStore.state.topActions"
|
|
3
|
-
nextName="
|
|
3
|
+
:nextName="$t('viur.shop.next')"
|
|
4
4
|
:activefunction="()=>true"
|
|
5
5
|
:nextfunction="nextStep"
|
|
6
6
|
:hint="$t('messages.order_check_later')"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</slot>
|
|
33
33
|
|
|
34
34
|
<slot
|
|
35
|
-
nextName="
|
|
35
|
+
:nextName="$t('viur.shop.next')"
|
|
36
36
|
:activefunction="()=>true"
|
|
37
37
|
:nextfunction="nextStep"
|
|
38
38
|
:hint="$t('messages.order_check_later')"
|
|
@@ -37,7 +37,7 @@ function changeSelection(i){
|
|
|
37
37
|
state.currentSelection = i
|
|
38
38
|
selection.value = props.options[i]
|
|
39
39
|
}
|
|
40
|
-
emits("change",
|
|
40
|
+
emits("change", props.options[i])
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
onMounted(()=>{
|
|
@@ -50,19 +50,24 @@ onMounted(()=>{
|
|
|
50
50
|
</script>
|
|
51
51
|
|
|
52
52
|
<style scoped>
|
|
53
|
-
sl-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
border:1px solid var(--sl-color-primary-500);
|
|
57
|
-
box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color);
|
|
58
|
-
}
|
|
53
|
+
sl-radio-group {
|
|
54
|
+
margin-top: var(--ignt-spacing-small);
|
|
55
|
+
}
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
sl-card {
|
|
58
|
+
width: calc(100% - 6px);
|
|
59
|
+
margin-left: 3px;
|
|
60
|
+
&[selected]::part(base){
|
|
61
|
+
border:1px solid var(--sl-color-primary-500);
|
|
62
|
+
box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&::part(body){
|
|
66
|
+
display:flex;
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
justify-content: space-between;
|
|
69
|
+
align-items: center;
|
|
70
|
+
}
|
|
66
71
|
}
|
|
67
72
|
|
|
68
|
-
</style>
|
|
73
|
+
</style>
|
|
@@ -183,17 +183,18 @@ function removeArticle(){
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
.viur-shop-cart-leaf-article-number {
|
|
186
|
-
align-self:
|
|
186
|
+
align-self: flex-end;
|
|
187
187
|
grid-column: span 2;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
.viur-shop-cart-leaf-quantity {
|
|
191
|
-
align-self:
|
|
191
|
+
align-self: flex-end;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
.viur-shop-cart-leaf-unitprice {
|
|
195
|
-
align-self:
|
|
195
|
+
align-self: flex-end;
|
|
196
196
|
grid-column: 4 / span 1;
|
|
197
|
+
text-align: right;
|
|
197
198
|
}
|
|
198
199
|
|
|
199
200
|
.viur-shop-cart-leaf-label,
|
package/src/translations/de.js
CHANGED
|
@@ -22,7 +22,9 @@ export default {
|
|
|
22
22
|
'unit_price': 'Stückpreis',
|
|
23
23
|
'total_price': 'Gesamtpreis',
|
|
24
24
|
'article_number': 'Artikelnummer',
|
|
25
|
+
'payment': 'Zahlung',
|
|
25
26
|
'pay': 'Bezahlen',
|
|
27
|
+
'next': 'weiter',
|
|
26
28
|
'add_discount': 'Hinzufügen',
|
|
27
29
|
'add_discount_placeholder': 'Dein Rabattcode',
|
|
28
30
|
'use_shipping_as_billing_address': 'Lieferung zur Rechnungsadresse',
|
|
@@ -55,12 +57,12 @@ export default {
|
|
|
55
57
|
},
|
|
56
58
|
},
|
|
57
59
|
messages: {
|
|
58
|
-
loading: 'Daten werden abgefragt
|
|
59
|
-
updating: 'Daten werden aktualisiert
|
|
60
|
-
wait_for_payment: 'Warte auf Zahlung
|
|
60
|
+
loading: 'Daten werden abgefragt …',
|
|
61
|
+
updating: 'Daten werden aktualisiert …',
|
|
62
|
+
wait_for_payment: 'Warte auf Zahlung …',
|
|
61
63
|
remove_article_from_cart: 'Wollen sie den Artikel wirklich entfernen?',
|
|
62
64
|
order_check_later: 'Sie können Ihre Bestellung am Ende noch einmal überprüfen.',
|
|
63
65
|
email_equal_error: 'E-Mail-Adressen stimmen nicht überein.',
|
|
64
|
-
phone_equal_error:
|
|
66
|
+
phone_equal_error: 'Telefonnummern stimmen nicht überein.',
|
|
65
67
|
},
|
|
66
68
|
};
|
package/src/translations/en.js
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
actions: {
|
|
3
|
+
add: 'Add',
|
|
4
|
+
cancel: 'Cancel',
|
|
5
|
+
delete: 'Delete',
|
|
6
|
+
},
|
|
7
|
+
viur: {
|
|
8
|
+
shop: {
|
|
9
|
+
'check_order': 'Review and submit',
|
|
10
|
+
'order_pay': 'Place binding order',
|
|
11
|
+
'order_number': 'Your order number',
|
|
12
|
+
'order_thanks': 'Thank you for your order',
|
|
13
|
+
'order_message': 'We have received your order and will process it as soon as possible.<br /> You will receive a confirmation email in a few minutes.',
|
|
14
|
+
'order_paid': 'Your payment has been received.',
|
|
15
|
+
'order_ready_to_ship': 'Your order is ready for shipping.',
|
|
16
|
+
'cart_empty': 'Your cart is currently empty.',
|
|
17
|
+
'order_summary': 'Order summary',
|
|
18
|
+
'deliverytime': 'Delivery time',
|
|
19
|
+
'day': 'Day | Days',
|
|
20
|
+
'availability': 'Availability',
|
|
21
|
+
'quantity': 'Quantity',
|
|
22
|
+
'unit_price': 'Unit price',
|
|
23
|
+
'total_price': 'Total price',
|
|
24
|
+
'article_number': 'Article number',
|
|
25
|
+
'payment': 'Payment',
|
|
26
|
+
'pay': 'Pay',
|
|
27
|
+
'next': 'next',
|
|
28
|
+
'add_discount': 'Add',
|
|
29
|
+
'add_discount_placeholder': 'Your discount code',
|
|
30
|
+
'use_shipping_as_billing_address': 'Use shipping address as billing address',
|
|
31
|
+
'no_valid_shipping_found': 'No valid shipping methods found.',
|
|
32
|
+
'error_message': 'An error has occurred.',
|
|
33
|
+
'free_shipping': 'Free shipping',
|
|
34
|
+
'proceed-checkout': 'Proceed to checkout',
|
|
35
|
+
'summary_headline': 'Summary',
|
|
36
|
+
'summary_subtotal': 'Subtotal',
|
|
37
|
+
'summary_shipping_total': 'Shipping and handling',
|
|
38
|
+
'summary_delivery_time': 'Delivery time',
|
|
39
|
+
'summary_discount': 'You save during the promotion period',
|
|
40
|
+
'summary_checkout': 'Proceed to checkout',
|
|
41
|
+
'summary_total': 'Total amount',
|
|
42
|
+
'summary_vat': 'incl. {percentage} VAT',
|
|
43
|
+
'discount_not_found': 'This discount code does not exist.',
|
|
44
|
+
'discount_not_active': 'This discount code is not active.',
|
|
45
|
+
'discount_not_available': 'This discount code is not available for this country.',
|
|
46
|
+
'discount_already_used': 'This discount code has already been used.',
|
|
47
|
+
'discount_invalid_period': 'The discount period has not yet started or has already ended.',
|
|
48
|
+
'discount_minimum_not_reached': 'The minimum order value of {{minimum_order_value}} € has not been reached.',
|
|
49
|
+
'discount_no_sale_article': 'The discount code cannot be applied to already discounted items.',
|
|
50
|
+
'discount_scope_not_satisfied': 'The discount code cannot be applied to this cart or these items.',
|
|
51
|
+
'order_step_cart': 'Cart',
|
|
52
|
+
'order_step_data': 'Details',
|
|
53
|
+
'order_step_shipping': 'Shipping method',
|
|
54
|
+
'order_step_payment': 'Payment method',
|
|
55
|
+
'order_step_verify': 'Review order',
|
|
56
|
+
'order_step_complete': 'Order complete',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
messages: {
|
|
60
|
+
loading: 'Fetching data …',
|
|
61
|
+
updating: 'Updating data …',
|
|
62
|
+
wait_for_payment: 'Waiting for payment …',
|
|
63
|
+
remove_article_from_cart: 'Do you really want to remove this item?',
|
|
64
|
+
order_check_later: 'You will be able to review your order at the end.',
|
|
65
|
+
email_equal_error: 'Email addresses do not match.',
|
|
66
|
+
phone_equal_error: 'Phone numbers do not match.',
|
|
67
|
+
},
|
|
68
|
+
};
|
package/src/translations/fr.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
actions: {
|
|
3
|
-
add: '
|
|
4
|
-
cancel: '
|
|
5
|
-
delete: '
|
|
3
|
+
add: 'Ajouter',
|
|
4
|
+
cancel: 'Annuler',
|
|
5
|
+
delete: 'Supprimer',
|
|
6
6
|
},
|
|
7
7
|
viur: {
|
|
8
8
|
shop: {
|
|
@@ -10,9 +10,9 @@ export default {
|
|
|
10
10
|
'order_pay': 'Valider',
|
|
11
11
|
'order_number': 'N° de commande',
|
|
12
12
|
'order_thanks': 'Merci pour votre commande et l’intérêt porté à notre société.',
|
|
13
|
-
'order_message': '
|
|
14
|
-
'order_paid': '
|
|
15
|
-
'order_ready_to_ship': '
|
|
13
|
+
'order_message': 'Nous avons bien reçu votre commande et nous allons la traiter dans les plus brefs délais.<br /> Vous recevrez une confirmation par e-mail dans quelques minutes',
|
|
14
|
+
'order_paid': 'Nous avons bien reçu votre paiement',
|
|
15
|
+
'order_ready_to_ship': 'Votre commande est prête à être expédiée',
|
|
16
16
|
'cart_empty': 'Votre panier est vide.',
|
|
17
17
|
'order_summary': 'Envoyer la commande',
|
|
18
18
|
'deliverytime': 'Délai de livraison',
|
|
@@ -22,18 +22,20 @@ export default {
|
|
|
22
22
|
'unit_price': 'Prix par pièce',
|
|
23
23
|
'total_price': 'Montant total',
|
|
24
24
|
'article_number': 'Numéro d\'article',
|
|
25
|
+
'payment': 'Paiement',
|
|
25
26
|
'pay': 'Payer',
|
|
27
|
+
'next': 'continuer',
|
|
26
28
|
'add_discount': 'Valider',
|
|
27
29
|
'add_discount_placeholder': 'Votre code promo',
|
|
28
|
-
'use_shipping_as_billing_address': '
|
|
29
|
-
'no_valid_shipping_found': '
|
|
30
|
-
'error_message': '
|
|
30
|
+
'use_shipping_as_billing_address': 'Livraison à l\'adresse de facturation',
|
|
31
|
+
'no_valid_shipping_found': 'Aucun mode d\'expédition correspondant trouvé.',
|
|
32
|
+
'error_message': 'Une erreur s\'est produite.',
|
|
31
33
|
'free_shipping': 'Livraison gratuite',
|
|
32
34
|
'proceed-checkout': 'Acheter cet article',
|
|
33
35
|
'summary_headline': 'Résumé',
|
|
34
36
|
'summary_subtotal': 'Sous-total',
|
|
35
37
|
'summary_shipping_total': 'Emballage et envoi',
|
|
36
|
-
'summary_delivery_time': '',
|
|
38
|
+
'summary_delivery_time': 'Délai de livraison',
|
|
37
39
|
'summary_discount': 'Vous économisez sur votre achat',
|
|
38
40
|
'summary_checkout': 'Acheter cet article',
|
|
39
41
|
'summary_total': 'Montant total',
|
|
@@ -46,15 +48,21 @@ export default {
|
|
|
46
48
|
'discount_minimum_not_reached': 'Le montant minimum de commande de {{minimum_order_value}} € n’a pas été atteint.',
|
|
47
49
|
'discount_no_sale_article': 'Bon d’achat non cumulable avec d’autres promotions en cours.',
|
|
48
50
|
'discount_scope_not_satisfied': 'Le code promo n’est pas applicable pour ce panier / cet ou ces article(s).',
|
|
51
|
+
'order_step_cart': 'Panier',
|
|
52
|
+
'order_step_data': 'Données',
|
|
53
|
+
'order_step_shipping': 'Mode de livraison',
|
|
54
|
+
'order_step_payment': 'Mode de paiement',
|
|
55
|
+
'order_step_verify': 'Vérifier la commande',
|
|
56
|
+
'order_step_complete': 'Commande terminée',
|
|
49
57
|
},
|
|
50
58
|
},
|
|
51
59
|
messages: {
|
|
52
|
-
loading: '
|
|
53
|
-
updating: '
|
|
54
|
-
wait_for_payment: '
|
|
60
|
+
loading: 'Données en cours de consultation …',
|
|
61
|
+
updating: 'Données en cours de mise à jour …',
|
|
62
|
+
wait_for_payment: 'Attente de paiement …',
|
|
55
63
|
remove_article_from_cart: 'Désirez-vous vraiment supprimer cet article du panier?',
|
|
56
64
|
order_check_later: 'Vous pourrez revérifier vos données avant de valider votre commande.',
|
|
57
|
-
email_equal_error:
|
|
58
|
-
phone_equal_error:
|
|
65
|
+
email_equal_error: 'Les adresses e-mail ne correspondent pas.',
|
|
66
|
+
phone_equal_error: 'Les numéros de téléphone ne correspondent pas.',
|
|
59
67
|
},
|
|
60
68
|
};
|