@viur/shop-components 0.2.2 → 0.4.0
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
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
</sl-format-number>
|
|
21
21
|
<span v-else>{{ $t('viur.shop.free_shipping') }}</span>
|
|
22
22
|
</div>
|
|
23
|
-
|
|
23
|
+
<span slot="right">{{ option['dest']['description'] }}</span>
|
|
24
|
+
<!--
|
|
24
25
|
<span slot="right">{{$t('viur.shop.deliverytime')}}: {{ option['dest']['delivery_time_range'] }} {{ $t('viur.shop.day',option['dest']['delivery_time_max'] - option['dest']['delivery_time_min']) }}</span>-->
|
|
25
26
|
</sl-bar>
|
|
26
27
|
</template>
|
|
@@ -73,7 +74,16 @@ async function nextStep(){
|
|
|
73
74
|
return await fetchOrder(shopStore.state.orderKey)
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
onBeforeMount(()=>{
|
|
77
|
+
onBeforeMount(() => {
|
|
78
|
+
// console.debug(shopStore.state.cartRoot?.['shipping_status']);
|
|
79
|
+
// By default a cart has always the cheapest shipping set, therefore we can skip this step.
|
|
80
|
+
// But with the link on verify the user is still able to choose a different shipping.
|
|
81
|
+
if (shopStore.state.cartRoot?.['shipping_status'] === 'cheapest') {
|
|
82
|
+
console.debug(`Skip cheapest shipping @ %o`, shopStore.state.cartRoot);
|
|
83
|
+
nextStep().then(() => shopStore.navigateToNext());
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
77
87
|
fetchShippingData()
|
|
78
88
|
state.selectedShippingMethod = shopStore.state.cartRoot?.['shipping']
|
|
79
89
|
})
|
package/src/composables/cart.js
CHANGED
|
@@ -94,12 +94,12 @@ export function useCart() {
|
|
|
94
94
|
name:name?name:shopStore.state.cartRoot['name'],
|
|
95
95
|
customer_comment:customer_comment?customer_comment:shopStore.state.cartRoot['customer_comment'],
|
|
96
96
|
shipping_address_key:shipping_address_key?shipping_address_key:shippingAddressKey.value,
|
|
97
|
-
shipping_key:shipping_key
|
|
97
|
+
shipping_key: shipping_key, // only after explicit user selection
|
|
98
98
|
discount_key:discount_key?discount_key:shopStore.state.cartRoot?.['discount']?.['dest']?.['key'],
|
|
99
99
|
cart_key:cart_key ? cart_key : shopStore.state.cartRoot['key'],
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
if (commission) {
|
|
102
|
+
if (commission) { // TODO: that's not standard, must be more generic!
|
|
103
103
|
data.commission = commission
|
|
104
104
|
}
|
|
105
105
|
|
package/src/translations/fr.js
CHANGED
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
'payment': 'Paiement',
|
|
26
26
|
'pay': 'Payer',
|
|
27
27
|
'next': 'continuer',
|
|
28
|
-
'edit': '
|
|
28
|
+
'edit': 'Modifier',
|
|
29
29
|
'add_discount': 'Valider',
|
|
30
30
|
'add_discount_placeholder': 'Votre code promo',
|
|
31
31
|
'use_shipping_as_billing_address': 'Livraison à l\'adresse de facturation',
|
|
@@ -50,11 +50,11 @@ export default {
|
|
|
50
50
|
'discount_no_sale_article': 'Bon d’achat non cumulable avec d’autres promotions en cours.',
|
|
51
51
|
'discount_scope_not_satisfied': 'Le code promo n’est pas applicable pour ce panier / cet ou ces article(s).',
|
|
52
52
|
'order_step_cart': 'Panier',
|
|
53
|
-
'order_step_data': 'Données',
|
|
53
|
+
'order_step_data': 'Données personnelles',
|
|
54
54
|
'order_step_shipping': 'Mode de livraison',
|
|
55
55
|
'order_step_payment': 'Mode de paiement',
|
|
56
56
|
'order_step_verify': 'Vérifier la commande',
|
|
57
|
-
'order_step_complete': '
|
|
57
|
+
'order_step_complete': 'Valider la commande',
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
messages: {
|