Add customer address books in order creation view | Add webpack #184
Add customer address books in order creation view | Add webpack #184BartoszWojdalowicz wants to merge 22 commits intoSylius:mainfrom
Conversation
Now created `Order` passed to email template to be able to render breakdown / user can see what he pays for
When dealing with virtual products or ( when only one shipping method is enabled and channel skipping_shipping_step_allowed )
Feature/address book
|
It could be great to merge this feature |
| @@ -0,0 +1,8 @@ | |||
| import 'semantic-ui-css/components/dropdown'; | |||
There was a problem hiding this comment.
--- src/Resources/assets/admin/js/index.js
+++ src/Resources/private/admin/js/app.jsI'm not sure if it's part of new bundle notation, that allows this Resource/assets path, but it should be either Resources/private or /assets in the root if plugin's symfony version allows it
There was a problem hiding this comment.
AFAIR it doesn't change anything as the paths are configured in the webpack.config.js. We can go with Resource/private (as we do in Sylius) and change it to the /assets once the plugin structure updated.
| @@ -0,0 +1,4 @@ | |||
| { | |||
There was a problem hiding this comment.
- Built assets shouldn't be included in git
- public/build shouldn't exists in plugin unless it's a test app
| "symfony/web-profiler-bundle": "^4.4 || ^5.4", | ||
| "symfony/webpack-encore-bundle": "^1.12", | ||
| "symfony/web-server-bundle": "^4.4 || ^5.4" |
| Scenario: Creating an order with both addresses from address books | ||
| When I create a new order for "jon.snow@the-wall.com" and channel "United States" | ||
| And I add "Stark Coat" to this order | ||
| And I see the address book shipping address select | ||
| And I see the address book billing address select | ||
| And I select first address in shipping address book with name "Jon Snow" | ||
| And I select first address in billing address book with name "Ned Stark" | ||
| And I select "Free" shipping method | ||
| And I select "Cash on Delivery" payment method | ||
| And I place and confirm this order | ||
| Then I should be notified that order has been successfully created | ||
| And this order shipping address should be "Jon Snow", "Frost Alley", "90210", "Ankh-Morpork", "United States" | ||
| And this order billing address should be "Ned Stark", "Banana Street", "90232", "New York", "United States" | ||
| And there should be one not paid nor shipped order with channel "United States" for "jon.snow@the-wall.com" in the registry |
There was a problem hiding this comment.
| Scenario: Creating an order with both addresses from address books | |
| When I create a new order for "jon.snow@the-wall.com" and channel "United States" | |
| And I add "Stark Coat" to this order | |
| And I see the address book shipping address select | |
| And I see the address book billing address select | |
| And I select first address in shipping address book with name "Jon Snow" | |
| And I select first address in billing address book with name "Ned Stark" | |
| And I select "Free" shipping method | |
| And I select "Cash on Delivery" payment method | |
| And I place and confirm this order | |
| Then I should be notified that order has been successfully created | |
| And this order shipping address should be "Jon Snow", "Frost Alley", "90210", "Ankh-Morpork", "United States" | |
| And this order billing address should be "Ned Stark", "Banana Street", "90232", "New York", "United States" | |
| And there should be one not paid nor shipped order with channel "United States" for "jon.snow@the-wall.com" in the registry | |
| Scenario: Creating an order with both addresses from address books | |
| When I create a new order for "jon.snow@the-wall.com" and channel "United States" | |
| And I add "Stark Coat" to this order | |
| And I select first address in shipping address book with name "Jon Snow" | |
| And I select first address in billing address book with name "Ned Stark" | |
| And I select "Free" shipping method | |
| And I select "Cash on Delivery" payment method | |
| And I place and confirm this order | |
| Then I should be notified that order has been successfully created | |
| And this order shipping address should be "Jon Snow", "Frost Alley", "90210", "Ankh-Morpork", "United States" | |
| And this order billing address should be "Ned Stark", "Banana Street", "90232", "New York", "United States" | |
| And there should be one not paid nor shipped order with channel "United States" for "jon.snow@the-wall.com" in the registry |
If we don't see the address book select field, we can't click it. So, in my opinion, these two steps seem redundant. Same below.
| And I should not see the address book shipping address select | ||
| And I should not see the address book billing address select |
There was a problem hiding this comment.
Not needed as well. If there's some kind of "wait" we should move it to the specify step.
| @@ -0,0 +1,8 @@ | |||
| import 'semantic-ui-css/components/dropdown'; | |||
There was a problem hiding this comment.
AFAIR it doesn't change anything as the paths are configured in the webpack.config.js. We can go with Resource/private (as we do in Sylius) and change it to the /assets once the plugin structure updated.
| {{ encore_entry_script_tags('admin-entry', null, 'admin') }} | ||
| {{ encore_entry_script_tags('sylius-orderCreation-admin', null, 'orderCreation_admin') }} |
There was a problem hiding this comment.
It should be done with using template events:
- sylius.admin.layout.stylesheets
- sylius.admin.layout.javascripts
- sylius.shop.layout.stylesheets
- sylius.shop.layout.javascripts
In such case, we don't require additional steps while installing the plugin. It applies to all 4 modified files.
PR include behat tests.