-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add customer address books in order creation view | Add webpack #184
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--- src/Resources/assets/admin/js/index.js
+++ src/Resources/private/admin/js/app.js
I'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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Built assets shouldn't be included in git
- public/build shouldn't exists in plugin unless it's a test app
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.
- Rebase is needed
/public
and/src/Resources/public
should be removed- Including assets should be done with using template events
- The installation guide (at least) should be updated, due to added webpack
"symfony/web-profiler-bundle": "^4.4 || ^5.4", | ||
"symfony/webpack-encore-bundle": "^1.12", | ||
"symfony/web-server-bundle": "^4.4 || ^5.4" |
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.
It should be ^5.4 || ^6.0
Scenario: Creating an order with both addresses from address books | ||
When I create a new order for "[email protected]" 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 "[email protected]" in the registry |
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.
Scenario: Creating an order with both addresses from address books | |
When I create a new order for "[email protected]" 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 "[email protected]" in the registry | |
Scenario: Creating an order with both addresses from address books | |
When I create a new order for "[email protected]" 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 "[email protected]" 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.