Commit graph

29175 commits

Author SHA1 Message Date
TheMilek
fd1834479d
Use localeCode in ProductAttribute form to prevent logic from breaking when not using default locale 2023-08-10 13:52:56 +02:00
TheMilek
ec4d4d890f
Remove usage of defaultLocaleCode from SelectAttributeChoicesCollectionType 2023-08-10 13:52:56 +02:00
Grzegorz Sadowski
163953bf8e
bug #15214 Fix configuring amount for catalog promotions fixed discount actions (TheMilek)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 <!-- see the comment below -->                  |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                      |
| BC breaks?      | no                                                     |
| Deprecations?   | yes <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | fixes [#X](https://github.com/Sylius/Sylius/issues/15193)                     |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.12 branch
 - Features and deprecations must be submitted against the 1.13 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->
it is now possible to configure decimal amounts with comma without validation errors

Commits
-------

e85e30b553 Fix configuring amount for catalog promotions fixed discount actions
2023-08-10 13:37:57 +02:00
Grzegorz Sadowski
64c76dea41
style #15217 Fix cart styles after coupon form submission failure (shochdoerfer)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12                   |
| Bug fix?        |  yes                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets |  |
| License         | MIT                                                          |

When you are on the cart page and submit the "apply coupon" form and the form errors (e.g. coupon code not valid) then the cart styles are broken. 

This is because when viewing the cart the data-route is set to "sylius_shop_cart_summary". When the coupon code error is shown, the data-route is set to "sylius_shop_cart_save" and thus the specific styles for the "sylius_shop_cart_summary" data-route don't match, see the screenshot:

![broken styles](https://github.com/Sylius/Sylius/assets/596449/384430d8-7cf0-4b63-af3c-aa75c8d3a8a7)

This PR makes sure that all styles for the "sylius_shop_cart_summary" data-route also work for the "sylius_shop_cart_save" data-route, see:

![fixed styles](https://github.com/Sylius/Sylius/assets/596449/9fd8892c-f42e-4440-8ce6-29b905fc6cb0)





Commits
-------

eac9b3ec63 Fix cart styles after form submission
2023-08-10 07:24:53 +02:00
Stephan Hochdörfer
eac9b3ec63 Fix cart styles after form submission 2023-08-09 19:04:47 +02:00
Jacob Tobiasz
aaa5535ed0
minor #15207 [Behat] Fix minor mistake in names of scenarios for receiving discount according to promotions priorities (GSadee)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12|
| Bug fix?        | no                                                       |
| New feature?    | no                                                      |
| BC breaks?      | no                                                      |
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.12 branch
 - Features and deprecations must be submitted against the 1.13 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


Commits
-------
  [Behat] Fix minor mistake in names of scenarios for receiving discount according to promotions priorities
2023-08-08 07:38:56 +02:00
Sylius Bot
ad1fc1713c [CS][DX] Refactor 2023-08-07 15:04:22 +02:00
TheMilek
e85e30b553
Fix configuring amount for catalog promotions fixed discount actions 2023-08-07 13:34:16 +02:00
Grzegorz Sadowski
cb5f39fadd
minor #15204 Resolve comments from #15195 (TheMilek)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12  <!-- see the comment below -->                  |
| Bug fix?        | no                                                     |
| New feature?    | no                                                       |
| BC breaks?      | no                                                     |
| Deprecations?   | no <!-- don't forget to update the UPGRADE-*.md file --> |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.12 branch
 - Features and deprecations must be submitted against the 1.13 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->
resolves https://github.com/Sylius/Sylius/pull/15195 comments

Commits
-------

6bbe87c7ff Resolve comments from SYL-2943
2023-08-04 11:07:51 +02:00
Grzegorz Sadowski
8589e7e79b
[Behat] Fix minor mistake in names of scenarios for receiving discount according to promotions priorities 2023-08-04 10:16:08 +02:00
Jacob Tobiasz
6c69833295
minor #15205 [Maintenance] Remove depractions from OrderPaymentProcessor (NoResponseMate)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 |
| Bug fix?        | somewhat                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | -                      |
| License         | MIT                                                          |

An oversight, deprecations shouldn't be added in a patch version.

Commits
-------
  [Maintenance] Remove depractions from OrderPaymentProcessor
2023-08-03 18:10:01 +02:00
Jacob Tobiasz
8b898c97eb
docs #15202 Update catalog_promotions.rst (zairigimad)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT



Commits
-------
  Update catalog_promotions.rst
2023-08-03 18:09:14 +02:00
Zairig Imad
1e42b7af06
Update catalog_promotions.rst 2023-08-03 18:05:12 +02:00
Jan Goralski
37a14b5594
[Maintenance] Remove depractions from OrderPaymentProcessor 2023-08-03 15:16:37 +02:00
Grzegorz Sadowski
69798e40ba
bug #12502 Recalculate order adjustments total after adjustment is added or remo… (kayue, SirDomin, TheMilek)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.9
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

In the current code (1.8 at least) adjustment total is not being updated after shipping fee is added to order. For example in the code below:

f486b804e3/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php (L51-L59)

Recalculation is designed to happen when `$adjustment->setAmount()` is called, however the Order object is only added after. (in the last line) 

Proposed fixed is to trigger `recalculateAdjustmentsTotal()` whenever adjustment is added (or removed) to order. 

Commits
-------

6b69753689 Recalculate order adjustments total after adjustment is added or removed from order.
c925c28fb7 [Improvement] move recalculation to if statement, add tests
ec95d92e4a Recalculate adjustments total on OrderItem and OrderItemUnit level
2023-08-03 15:06:31 +02:00
Grzegorz Sadowski
01048bda05
bug #15187 [Order] Extract payments removal from OrderPaymentProcessor (NoResponseMate)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 |
| Bug fix?        | yes                                                       |
| New feature?    | kinda                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | fixes #11927, related #12437                      |
| License         | MIT                                                          |


Commits
-------

6582584837 [Order] Extract payments removal from OrderPaymentProcessor
d2d5734faa [Order] Add `fulfilled` as an unsupported state for OrderPaymentProcessor
c8c956cbef [Order] Make payments removing clearer and extract unavailable order states
f0116e3343 [Maintenance] Update upgrade file
2023-08-03 14:52:54 +02:00
Grzegorz Sadowski
5800859429
minor #15200 [Docs] Update order processing info (NoResponseMate)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12                  |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | related #12437                      |
| License         | MIT                                                          |

Commits
-------

45fd398438 [Docs] Update order processing info
2023-08-03 14:32:57 +02:00
TheMilek
6bbe87c7ff
Resolve comments from SYL-2943 2023-08-03 13:56:06 +02:00
TheMilek
ec95d92e4a
Recalculate adjustments total on OrderItem and OrderItemUnit level 2023-08-03 13:13:00 +02:00
SirDomin
c925c28fb7
[Improvement] move recalculation to if statement, add tests 2023-08-03 13:10:04 +02:00
Kayue Yeung
6b69753689
Recalculate order adjustments total after adjustment is added or removed from order. 2023-08-03 13:10:03 +02:00
Grzegorz Sadowski
a8419bbdf2
bug #15195 Fix percentage discount's decimal rounding issue (TheMilek)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12  <!-- see the comment below -->                  |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                     |
| BC breaks?      | no                                                     |
| Deprecations?   | no <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | fixes https://github.com/Sylius/Sylius/issues/11977                     |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.12 branch
 - Features and deprecations must be submitted against the 1.13 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->

`Rounding of 2.5%` 
- The correct amount is saved to the database, but when we try to edit the actual amount it is showing rounded value without decimal places

before:

![image](https://github.com/Sylius/Sylius/assets/53942444/feda7b28-d46d-4188-8a5f-ccd57007f9bf)

after:

![image](https://github.com/Sylius/Sylius/assets/53942444/862718ce-0a35-46f4-9ac7-5b407e168d15)



Commits
-------

a3ff2373e9 Fix catalog promotion percentage discount to be rounded to 2 decimal places
cecee76932 Fix cart promotion percentage discount to be rounded to 2 decimal places
2023-08-03 12:53:36 +02:00
Jan Goralski
45fd398438
[Docs] Update order processing info 2023-08-03 10:33:53 +02:00
TheMilek
cecee76932
Fix cart promotion percentage discount to be rounded to 2 decimal places 2023-08-03 08:24:06 +02:00
Jan Goralski
f0116e3343
[Maintenance] Update upgrade file 2023-08-02 17:30:41 +02:00
Jan Goralski
c8c956cbef
[Order] Make payments removing clearer and extract unavailable order states 2023-08-02 16:01:04 +02:00
Jan Goralski
d2d5734faa
[Order] Add fulfilled as an unsupported state for OrderPaymentProcessor 2023-08-02 16:01:04 +02:00
Jan Goralski
6582584837
[Order] Extract payments removal from OrderPaymentProcessor 2023-08-02 16:01:04 +02:00
Kamil Grygierzec
21b3446df8
bug #15162 Abstracts out ShopBasedCartContext::reset to an interface (palttamas, jakubtobiasz)
This PR was merged into the 1.12 branch.

Discussion
----------

`ShopBasedCartContext` now implements the new `ResettingCartContextInterface`.
    
The service `sylius.context.cart.new_shop_based` is no longer explicitly tagged with the `kernel.reset` tag.
    
Cart contexts that implement the `ResettingCartContextInterface` will be automatically tagged with the `kernel.reset` tag.


| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 <!-- see the comment below -->                  |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                      |
| BC breaks?      | no                                                       |
| Deprecations?   | no <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | [fixes #15021 ](https://github.com/Sylius/Sylius/issues/15021)                    |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.12 branch
 - Features and deprecations must be submitted against the 1.13 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


Commits
-------

26c64dcac4 Abstracts out ShopBasedCartContext::reset to an interface
a2b9a1d3a0 Remove custom ResettingCartContextInterface
8f2aee0795 Rename the pass and preventing tagging with the kernel.reset tag twice
0911998d04 Remove leftovers after removing ResettingCartContextInterface
8eb79d79ea Declare symfony/service-contracts dependency where needed
2023-08-02 13:59:47 +02:00
TheMilek
a3ff2373e9
Fix catalog promotion percentage discount to be rounded to 2 decimal places 2023-08-02 11:49:49 +02:00
Jacob Tobiasz
8eb79d79ea
Declare symfony/service-contracts dependency where needed 2023-08-02 10:00:25 +02:00
Jacob Tobiasz
0911998d04
Remove leftovers after removing ResettingCartContextInterface 2023-08-02 09:12:40 +02:00
Jacob Tobiasz
8f2aee0795
Rename the pass and preventing tagging with the kernel.reset tag twice 2023-08-02 09:12:40 +02:00
Jacob Tobiasz
a2b9a1d3a0
Remove custom ResettingCartContextInterface 2023-08-02 09:12:40 +02:00
Tamas Pal
26c64dcac4
Abstracts out ShopBasedCartContext::reset to an interface
`ShopBasedCartContext` now implements the new `ResettingCartContextInterface`.

The service `sylius.context.cart.new_shop_based` is no longer explicitly tagged with the `kernel.reset` tag.

Cart contexts that implement the `ResettingCartContextInterface` will be automatically tagged with the `kernel.reset` tag.
2023-08-02 09:12:40 +02:00
Kamil Grygierzec
80c326b242
minor #15197 Add a conflict for doctrine/orm 2.15.2 and higher (jakubtobiasz)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

It became pointless to add a conflict for every single `doctrine/orm` version above `2.15.2`. For now, it'll conflict with every future release until we figure out where the problem is with newer versions.

Commits
-------

1d6208074d Add a conflict for doctrine/orm 2.15.2 and higher
2023-08-02 08:50:54 +02:00
Jacob Tobiasz
1d6208074d
Add a conflict for doctrine/orm 2.15.2 and higher 2023-08-02 07:53:31 +02:00
Jacob Tobiasz
bbfe3f6025
minor #15184 Cover the order item units based tax calculation strategy with scenarios (GSadee)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12|
| Bug fix?        | no?                                                       |
| New feature?    | yes?                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no|
| Related tickets | |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.12 branch
 - Features and deprecations must be submitted against the 1.13 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


Commits
-------
  [Behat] Cover the order item units based tax calculation strategy with scenarios
  Calculate taxes based on units calculation strategy with decimal precision and distribution across units
  [Behat] Minor improvements to scenarios for applying taxes based on units calculation strategy
  [Behat] Change step name for configuring tax calculation strategy on channel
2023-08-01 14:30:44 +02:00
Grzegorz Sadowski
cb85edf3cf
[Behat] Change step name for configuring tax calculation strategy on channel 2023-08-01 09:21:41 +02:00
Grzegorz Sadowski
89e5cceef5
[Behat] Minor improvements to scenarios for applying taxes based on units calculation strategy 2023-08-01 09:21:38 +02:00
Grzegorz Sadowski
046b6b7924
Calculate taxes based on units calculation strategy with decimal precision and distribution across units 2023-08-01 09:21:37 +02:00
Grzegorz Sadowski
a3fe405150
[Behat] Cover the order item units based tax calculation strategy with scenarios 2023-08-01 09:21:37 +02:00
Kamil Grygierzec
82655ddfb2
minor #15191 Readme banner refresh (kulczy)
This PR was merged into the 1.12 branch.

Discussion
----------



Commits
-------

896fc719a5 Readme banner update
2023-07-31 14:48:18 +02:00
Szymon
896fc719a5
Readme banner update 2023-07-31 13:39:44 +02:00
Grzegorz Sadowski
03031fd19a
bug #15148 Fix rendering admin creation form with errors (jakubtobiasz, NoResponseMate)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | replaces #13241
| License         | MIT

Previously, when an avatar was added while creating a new administrator, once any error occurred, Sylius was throwing `500` due to being unable to create a CSRF token for the delete button.

Commits
-------

b8576ddbda Fix rendering admin creation form with errors
1394309b87 [Behat][Admin] Cover validation errors while adding a new avatar
2023-07-28 15:18:31 +02:00
Grzegorz Sadowski
a81b06226c
bug #15185 Avoid displaying taxon names inside of autocomplete in different locales than the store (TheMilek)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 <!-- see the comment below -->                  |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                      |
| BC breaks?      | no                                                    |
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file --> |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.12 branch
 - Features and deprecations must be submitted against the 1.13 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->
There is a problem, that taxon autocomplete shows taxon names from different locales than we are using in our store, the image below shows `autem dolores quis` that comes from Mexico locale while the channel is in US locale

Before:
![image](https://github.com/Sylius/Sylius/assets/53942444/06bea33f-becd-4057-8d38-255579f78303)

After:
![image](https://github.com/Sylius/Sylius/assets/53942444/8b01245e-7a2f-4bd7-b245-63209fbe4d67)

P.S. copy of https://github.com/Sylius/Sylius/pull/15182 as it couldn't be reopened

Commits
-------

83244f6b78 Add subquery to findMyNamePart method
eb23076294 Add behat scenarios
2023-07-28 15:17:32 +02:00
Grzegorz Sadowski
2b77f7f0b5
refactor #15128 [Docs] Sylius Plus installation guide update (Rafikooo)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 and 1.13 <!-- see the comment below -->                  |
| Bug fix?        | no                                                      |
| New feature?    | no                                                      |
| BC breaks?      | no                                                      |
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | https://github.com/Sylius/RefundPlugin/pull/396, https://github.com/Sylius/Plus/pull/1261
| License         | MIT                                                          |

To be merged by the new tag of Sylius Plus

Commits
-------

9f9e096a10 [Docs] Update Sylius Plus installation guide
2023-07-28 13:58:19 +02:00
TheMilek
eb23076294
Add behat scenarios 2023-07-28 11:29:33 +02:00
TheMilek
83244f6b78
Add subquery to findMyNamePart method 2023-07-28 11:29:33 +02:00
Jan Goralski
1394309b87
[Behat][Admin] Cover validation errors while adding a new avatar 2023-07-28 11:27:22 +02:00