develodesign / vsf-payment-paypal

Paypal payment module for Vue Storefront
MIT License
45 stars 34 forks source link

Access grand_total as computed property #40

Closed benbenek closed 6 years ago

benbenek commented 6 years ago

When hitting the checkout process before the vuex cart/UPD_TOTALS mutation has been called (e.g. seconds after adding the first product) the following error appears:

bildschirmfoto 2018-08-09 um 16 49 12

I suggest to refer to grandTotal directly by using a computed property. I was not sure how to handle the fallback value which is 0 now. Probably this will require additional validation depending on the checkout process but it shouldn't either be possible to access it with no products in cart...