Commit graph

3492 commits

Author SHA1 Message Date
Jan Goralski
814df1e110
[Order] Ensure correct item in post_add event 2023-03-15 17:23:02 +01:00
Jan Goralski
acecbb210e
[Behat][Shop] Not seeing discount when original price is lower than current 2023-02-16 14:18:54 +01:00
Grzegorz Sadowski
906e722e72
bug #14800 Fix being unable to pick up latest non-empty cart started in shop and continued in API (jakubtobiasz)
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 | fixes #14539, successor of #14597                      |
| License         | MIT                                                          |

PR created by @Nek- was great, but was involving some sort of changes we've called feature and bc policy breaking. We (believe that) we've found a way to fix the bug part without changing the previous behavior on the web shop. 

Commits
-------

854e3e7ceb Add Behat scenarios for continuing cart from web in api
fb70c5e34a Fix being unable to pick up latest non-empty cart started in shop and continued in API
1e3410a72b Rename custom Order factory
efdbb44594 Rename composite to hybrid within Behats & post review improvements
2023-02-16 07:44:21 +01:00
Jakub Tobiasz
efdbb44594
Rename composite to hybrid within Behats & post review improvements 2023-02-15 18:06:59 +01:00
Jakub Tobiasz
ab84ad6bdb
Logout Admin User after being disabled 2023-02-10 16:33:20 +01:00
Jakub Tobiasz
854e3e7ceb
Add Behat scenarios for continuing cart from web in api 2023-02-07 08:22:56 +01:00
SirDomin
619464c028
[Behat] add scenario for disabled admin 2023-02-03 14:01:56 +01:00
TheMilek
1b0ce98c52
Merge branch '1.11' into 1.12
* 1.11:
  [Promotion] Revert removing min and max validation messages for code length
  [Behat] Add minor improvements to range validations fixes
  Set correct notInRangeMessage for unit percentage discount promotion action
  Set correct notInRangeMessage for coupon generation validation
2023-01-31 16:35:58 +01:00
Kamil Grygierzec
c477884ae8
minor #14576 Fix notInRangeMessage usage for a few Range validations (diimpp, GSadee)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11                  |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | yes  |
| Related tickets | fixes #13883                       |
| License         | MIT                                                          |

**Issue**
Symfony validation constraint [`Range`](https://symfony.com/doc/4.4/reference/constraints/Range.html#notinrangemessage) instroduced new behavior since 4.4 release -- if both `min` and `max` options are defined, then `notInRangeMessage` will be shown and `minMessage`/`maxMessage` will be disregarded.

<details><summary>Example</summary>

If you will try to generate coupons for promotion with code length larger than 40, then you will see symfony standard message `notInRangeMessage: This value should be between {{ min }} and {{ max }}.` instead of sylius `maxMessage: Coupon code must not be longer than {{ limit }} characters.`
![image](https://user-images.githubusercontent.com/870747/203878039-2d6ac8c3-130c-4758-a7ae-bd638817faf7.png)


</details>

#### Case 1

9506c80f20/src/Sylius/Bundle/PromotionBundle/Resources/config/validation/PromotionCouponGeneratorInstruction.xml (L33-L37)

- [x] Remove minMessage, maxMessage and their translations
- [x] Introduce notInRangeMessage and new translation
- [x] Cover case with behat scenario 

#### Case 2
9506c80f20/src/Sylius/Bundle/PromotionBundle/Form/Type/Action/UnitPercentageDiscountConfigurationType.php (L35-L41)

- [x] Remove minMessage, maxMessage usage; Their translations were already removed.
- [x] Introduce notInRangeMessage; Translation already exists as it's shared between order/item percentage discount
- [x] Cover case with behat scenario

#### Case 3
9506c80f20/src/Sylius/Bundle/ApiBundle/Resources/config/validation/AddProductReview.xml (L23-L28)

- [x] Remove minMessage, maxMessage
- [x] Rename translation key `range` to `not_in_range`
- [x] Move to separate https://github.com/Sylius/Sylius/pull/14584 due deprecation.

**Questions**
1. Does removal of `sylius.promotion_coupon_generator_instruction.code_length.min` and `...max` messages constitute a deprecation entry? Because those translation strings were inactive (effectively deprecated by symfony upgrade) since project was upgraded to symfony 4.4 and even if somebody has custom translation over there, it has no effect whatsoever. 
2. Please advise on adding/removal of translation strings, do I need to do anything else? I do recall some translation service was in use.


Commits
-------

f1ae3df84d Set correct notInRangeMessage for coupon generation validation
f55babdb58 Set correct notInRangeMessage for unit percentage discount promotion action
7d88a38986 [Behat] Add minor improvements to range validations fixes
63e8b69f6c [Promotion] Revert removing min and max validation messages for code length
2023-01-31 16:34:55 +01:00
Rafikooo
63ed46f0d0
Merge branch '1.11' into 1.12
* 1.11:
  [Behat] Fix return type of cart transformer
  [Behat] Fix problem with duplicated step in cart contexts
  [Behat][Admin] Cover trying to show cart in the admin panel
  Changing the naming of the order function
  Throwing a not found when order is still a cart
2023-01-31 16:10:45 +01:00
Rafał Jaskulski
b88d58d5c8
minor #14174 [Admin] Fix 500 error when showing cart in admin panel (lchrusciel)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11           |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | down ported version of https://github.com/Sylius/Sylius/pull/13831, fixes https://github.com/Sylius/Sylius/issues/13826 |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible)
 - Features and deprecations must be submitted against the master 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
-------

8b66199933 Throwing a not found when order is still a cart

If the order is in state cart the order show should not throw a 500.
095d5c90a2 Changing the naming of the order function
ea87cabc26 [Behat][Admin] Cover trying to show cart in the admin panel
deddc31da6 [Behat] Fix problem with duplicated step in cart contexts
ba8f290948 [Behat] Fix return type of cart transformer
2023-01-31 16:09:36 +01:00
Grzegorz Sadowski
a02de0206b
Merge branch '1.11' into 1.12
* 1.11:
  [Behat][Product] Tests of adding select attributes
  [Product] Always translate attribute label
  [Product] Fixed product attribute translations #11570
2023-01-31 14:09:15 +01:00
Grzegorz Sadowski
f9236df12e
bug #14416 [Product] Fixed product attribute translations #11570 (NoResponseMate)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11                  |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                      |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | fixes #11570                     |
| License         | MIT                                                          |

Bug :
Select attributes on product edit page in BO are not translated.

Fix : 
Get locale from context and translate with this locale.

<!--
 - Bug fixes must be submitted against the 1.11 branch
 - Features and deprecations must be submitted against the 1.12 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
-------

73dc8a9af9 [Product] Fixed product attribute translations #11570
9670a1c6a7 [Product] Always translate attribute label
0ccdbf69c5 [Behat][Product] Tests of adding select attributes
2023-01-31 13:55:16 +01:00
Grzegorz Sadowski
7d88a38986
[Behat] Add minor improvements to range validations fixes 2023-01-31 10:19:30 +01:00
Dmitri Perunov
f55babdb58
Set correct notInRangeMessage for unit percentage discount promotion action 2023-01-31 10:19:30 +01:00
Dmitri Perunov
f1ae3df84d
Set correct notInRangeMessage for coupon generation validation 2023-01-31 10:19:29 +01:00
Jan Goralski
0ccdbf69c5
[Behat][Product] Tests of adding select attributes 2023-01-31 09:48:36 +01:00
Grzegorz Sadowski
deddc31da6
[Behat] Fix problem with duplicated step in cart contexts 2023-01-31 07:41:13 +01:00
Grzegorz Sadowski
ea87cabc26
[Behat][Admin] Cover trying to show cart in the admin panel 2023-01-30 15:17:21 +01:00
Grzegorz Sadowski
5801d07694
Merge branch '1.11' into 1.12
* 1.11:
  [ECS] Fix
  Fix applying catalog promotions when there is no applied promotions and price differ from original price
2023-01-27 14:18:49 +01:00
TheMilek
f67b6d0da9
Fix applying catalog promotions when there is no applied promotions and price differ from original price 2023-01-25 12:51:42 +01:00
Grzegorz Sadowski
b24a525d33
Merge branch '1.11' into 1.12
* 1.11:
  creating data provider
2023-01-23 08:14:03 +01:00
everwhatever
869dcaea29 creating data provider 2023-01-23 06:18:56 +01:00
everwhatever
1689d05d58 Extract authorized user assignment to separate method 2023-01-12 07:55:02 +01:00
Grzegorz Sadowski
4f25cdef0f
Merge branch '1.11' into 1.12
* 1.11:
  fix behat
  modify tests
  [CatalogPromotions] Fixed percentage discount prices rounding
2023-01-05 08:34:24 +01:00
everwhatever
ccacebd290 fix behat 2022-12-27 09:01:15 +01:00
everwhatever
1ccc7a3640 modify tests 2022-12-27 08:15:06 +01:00
Max Mishyn
0d6d5a15cc [CatalogPromotions] Fixed percentage discount prices rounding 2022-12-27 07:24:44 +01:00
Kevin Kaniaburka
a7235eeb84
Fix builds with PostgreSQL 2022-12-22 08:59:10 +01:00
Grzegorz Sadowski
fab297af18
Merge branch '1.11' into 1.12
* 1.11:
  [ProductAssociation] Fix empty product associations
2022-12-16 08:45:11 +01:00
Kevin Kaniaburka
1cc89537f1
[ProductAssociation] Fix empty product associations 2022-12-14 15:38:00 +01:00
Mateusz Zalewski
6e61aecb1b
Add hostname to channel to allow resolving channel for API calls 2022-12-08 11:06:34 +01:00
Grzegorz Sadowski
3fb867cbd1
Merge branch '1.11' into 1.12
* 1.11:
  [Behat][ProductAssociation] Improve the readability of the background steps
  [ProductAssociation] Clean up ProductAssociationRepository
  [ProductAssociation] Show enabled associated products only
  [Behat][ProductAssociation] Add scenario for viewing enabled associated products only
  [ProductAssociation] Show product associations within current channel only
  [Behat][ProductAssociation] Add scenario for viewing product associations within current channel
2022-12-08 07:25:39 +01:00
Kevin Kaniaburka
6a7b45348e
[Behat][ProductAssociation] Improve the readability of the background steps 2022-12-07 12:33:48 +01:00
Kevin Kaniaburka
2dacda28b2
[Behat][ProductAssociation] Add scenario for viewing enabled associated products only 2022-12-06 15:40:20 +01:00
Kevin Kaniaburka
09ad1a2d6f
[ProductAssociation] Show product associations within current channel only 2022-12-06 15:40:20 +01:00
Kevin Kaniaburka
be0da06953
[Behat][ProductAssociation] Add scenario for viewing product associations within current channel 2022-12-06 15:40:20 +01:00
Grzegorz Sadowski
5f027c37e3
Merge branch '1.11' into 1.12
* 1.11:
  [Fix] Change behat using dual session as javascript scenario
2022-12-06 08:58:07 +01:00
Rafikooo
71348ee99d
[Fix] Change behat using dual session as javascript scenario 2022-12-05 19:20:46 +01:00
Kevin Kaniaburka
fd298f1869
Merge branch '1.11' into 1.12
* 1.11:
  [Behat][API] Add missing channels suite to imports
2022-11-29 08:36:42 +01:00
Kevin Kaniaburka
ed7df7a38c
bug #14514 [Behat][API] Add missing channels suite to imports (GSadee)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11|
| Bug fix?        | yes                                                       |
| New feature?    | no                                                      |
| BC breaks?      | no                                                      |
| Deprecations?   | no|
| Related tickets | after https://github.com/Sylius/Sylius/pull/14155|
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.11 or 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
-------

19db727efd [Behat][API] Add missing channels suite to imports
2022-11-29 08:29:58 +01:00
Grzegorz Sadowski
46e50cc3ea
Merge branch '1.11' into 1.12
* 1.11:
  add sql and fix product list positioning
  [Core] Fix invalid catalog promotion repository service id
2022-11-24 13:15:18 +01:00
everwhatever
4bc8885fb3 add sql and fix product list positioning 2022-11-24 11:55:51 +01:00
Grzegorz Sadowski
19db727efd
[Behat][API] Add missing channels suite to imports 2022-11-24 00:14:24 +01:00
Grzegorz Sadowski
df1e1725e3
Merge branch '1.11' into 1.12
* 1.11:
  Add new method to TaxonDeletionListener
2022-11-23 13:19:04 +01:00
TheMilek
c52baf29da
Add new method to TaxonDeletionListener 2022-11-22 09:22:52 +01:00
Grzegorz Sadowski
5a8d598baf
Merge branch '1.11' into 1.12
* 1.11:
  [Product] Fix product variant choice labels
2022-11-16 13:40:05 +01:00
Jan Goralski
c3ea16ea7b
[Product] Fix product variant choice labels 2022-11-15 13:26:04 +01:00
Grzegorz Sadowski
03b3902f9a
Merge branch '1.11' into 1.12
* 1.11:
  Fixes the descending order scenarios
  Added correct tags to all scenarios
  Added more sorting scenarios
  Only join channel pricings for the current channel
  Added Behat scenario to reproduce the issue
2022-11-09 07:42:24 +01:00
Grzegorz Sadowski
ebd238a580
bug #14489 [Api] Sorting products by price should be per channel (j92)
This PR was merged into the 1.11 branch.

Discussion
----------

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

<!--
 - Bug fixes must be submitted against the 1.11 branch
 - Features and deprecations must be submitted against the 1.12 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
-->

[Api] Sorting products by price should be channel specific. Having a different price for the same product on another channel, should not affect the sorting on the current channel. 


Commits
-------

eca1836ba1 Added Behat scenario to reproduce the issue
cc34b4ae43 Only join channel pricings for the current channel
d01136bba7 Added more sorting scenarios
b12adaa465 Added correct tags to all scenarios
4d6c12e020 Fixes the descending order scenarios
2022-11-09 07:42:01 +01:00