-
Notifications
You must be signed in to change notification settings - Fork 116
feat: show configurable option values in order history AND feat: show more order details #996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packages/theme/modules/customer/pages/MyAccount/OrderHistory/OrderSummaryAddressRow.vue
Outdated
Show resolved
Hide resolved
| </SfTableHeading> | ||
| <SfTableRow | ||
| v-for="item in currentOrder.items" | ||
| :key="item.key" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no longer any formatting in the computed as in the last PR - I'm just using values from the Order directly
| > | ||
| <SfTableData class="products__name"> | ||
| {{ item.name }} | ||
| {{ item.product_name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for M2-510 (add customizable product options)
| <SfTableData>{{ $fc(item.product_sale_price.value) }}</SfTableData> | ||
| </SfTableRow> | ||
|
|
||
| <OrderSummaryRow> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no very large because there's no v-for as before. This is because I needed to add the shipping and billing address components, so the data format is not homogenous anymore
I could probably still do something like
v-if="isADdress"
v-else
but at this point I really prefer the flexibility of keeping it that way in the template.
I wanted to move it to a separate component but this isn't possible since Vue 2 doesn't support multi-root components (natively). This could be made possible with some more digging through the summary and its table (display: table etc.) but I didn't want to do this in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, but I forgot could also use <component :is="", but then I wouldn't be able to use the label and value slots
ea16797 to
e654e36
Compare
| if (order === null) { | ||
| return null; | ||
| } | ||
| const uniqueCountryCodePromises = [...new Set([order.shipping_address.country_code, order.billing_address.country_code])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no way of downloading only selected country codes, it's either load() all countries, or search() one country at a time
This is M2-510 and M2-509 in one PR because I didn't want to create conflicts with myself.