Skip to content
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

[Admin][Order] Modifying a customer's shipping address on an order #6062

Merged
merged 7 commits into from
Sep 15, 2016

Conversation

GSadee
Copy link
Member

@GSadee GSadee commented Sep 12, 2016

Q A
Bug fix? no
New feature? yes
BC breaks? no
Related tickets
License MIT

This PR contains #6122

@GSadee GSadee changed the title [Admin][Order] Modifying a customer shipping address [WIP][Admin][Order] Modifying a customer shipping address Sep 12, 2016

@todo
Scenario: Modifying a customer's shipping address when the applied promotion is no longer valid
Given the promotion was disabled for the channel "Web"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it relevant to disable the promotion from the channel if the purchase was made - and the cart became an order?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we want to be sure, that changing a shipping address on a placed order won't affect the order totals.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so changing something on an order should not trigger the promotion calculator and get the totals changed, right? if so, then the promotion should still be active to testify that promotion calculator is not triggered on a shipping address change from admin.

maybe I'm missing something here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For 1.0 we deliver simple shipping address edit feature which will only modify the shipping address and leave the rest of the order untouched. That means the order will not be recalculated and this scenario covers situation when the promotion that was applied to an order is disabled after order was placed. It ensures the promotion is still applied to an order after shipping address modification and the totals are unchanged.

@GSadee GSadee changed the title [WIP][Admin][Order] Modifying a customer shipping address [Admin][Order] Modifying a customer's shipping address on an order Sep 13, 2016
@GSadee GSadee force-pushed the modifying-shipping-address branch 2 times, most recently from ac721e1 to d918aab Compare September 14, 2016 08:35
*/
public function specifyShippingAddress($city, $street, $postcode, $country, $firstAndLastName)
{
$customerName = explode(' ', $firstAndLastName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would vote for $customerNames? Or sth like this, for sure a plural for as this variable contains an array not a single value.


@ui
Scenario: Modifying a customer's shipping address when the applied coupon is no longer valid
Given the coupon "HOLIDAY" was used
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... was used up to its usage limit

And the store has "DHL" shipping method with "$20.00" fee within "EN" zone
And the store has a product "Suit" priced at "$400.00"
And there is a customer "mike@ross.com" that placed an order "#00000001"
And the customer have chosen to order in the "GBP" currency
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... has chosen...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix it in a separate PR 👍


Background:
Given the store operates on a single channel in "United States"
And the store ships everything for free within "US" zone
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...within the "US" zone

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix it in a separate PR 👍

Given the store operates on a single channel in "United States"
And the store ships everything for free within "US" zone
And the store allows paying offline
And the store has "VAT" tax rate of 20% for "Suits" within "US" zone
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...within the "US" zone

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above


Background:
Given the store operates on a single channel in the "United States" named "Web"
And that channel uses the "USD" currency by default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have step Given the store operates on a single channel in "United States" which will already create USD currency and make it a default currency of this channel.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have, but I wanted to clearly see what is our currency, because we modify it later.


@ui
Scenario: Modifying a customer's shipping address when the applied promotion is no longer valid
Given the "VAT" tax rate is of 10%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the "VAT" tax rate has changed to 10%

@michalmarcinkowski michalmarcinkowski merged commit 399c6b4 into Sylius:master Sep 15, 2016
@michalmarcinkowski
Copy link
Contributor

Nice work Grzesiu! 👍

@GSadee GSadee deleted the modifying-shipping-address branch September 22, 2017 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants