Commit 71e3678 1 parent cf4849b commit 71e3678 Copy full SHA for 71e3678
File tree 3 files changed +31
-0
lines changed
tests/Integration/Legacy/Price
3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 11
11
### Fixed
12
12
- Shop ID resolution considers SSL language URLs
13
13
- Email existence check when changing from user to guest email [ #0006860 ] ( https://bugs.oxid-esales.com/view.php?id=6860 )
14
+ - Shipping costs calculation in cart and checkout after login [ #0007682 ] ( https://bugs.oxid-esales.com/view.php?id=7682 )
14
15
15
16
### Changed
16
17
- Raised minimum required version of Symfony components to 6.4
Original file line number Diff line number Diff line change @@ -329,6 +329,10 @@ public function delete($sOxId = null)
329
329
*/
330
330
public function isForBasket ($ oBasket )
331
331
{
332
+ $ this ->_iItemCnt = 0 ;
333
+ $ this ->_iProdCnt = 0 ;
334
+ $ this ->_dPrice = 0 ;
335
+
332
336
// amount for conditional check
333
337
$ blHasArticles = $ this ->hasArticles ();
334
338
$ blHasCategories = $ this ->hasCategories ();
Original file line number Diff line number Diff line change @@ -117,4 +117,30 @@ public function testGetDeliveryListWithRuleAssignedWillSkipWrongRule($testCase):
117
117
$ this ->assertCount (1 , $ suitableDeliveries );
118
118
$ this ->assertEquals ('ok-rule ' , reset ($ suitableDeliveries )->getFieldData ('oxtitle ' ));
119
119
}
120
+
121
+ #[DataProvider('providerDeliveryCostRules ' )]
122
+ public function testDeliveryCostNotDoubledWithSameDeliveryObject (array $ testCase ): void
123
+ {
124
+ $ basket = (new BasketConstruct ())->calculateBasket ($ testCase );
125
+
126
+ $ user = oxNew (User::class);
127
+ $ user ->load ($ testCase ['user ' ]['oxid ' ]);
128
+ $ deliveryList = oxNew (DeliveryList::class);
129
+ $ deliveries = $ deliveryList ->getDeliveryList (
130
+ $ basket ,
131
+ $ user ,
132
+ BasketConstruct::getDefaultCountryId (),
133
+ $ basket ->getShippingId ()
134
+ );
135
+ $ delivery = reset ($ deliveries );
136
+
137
+ $ delivery ->isForBasket ($ basket );
138
+ $ firstPrice = $ delivery ->getDeliveryPrice ()->getBruttoPrice ();
139
+
140
+ $ delivery ->setDeliveryPrice (null );
141
+ $ delivery ->isForBasket ($ basket );
142
+ $ secondPrice = $ delivery ->getDeliveryPrice ()->getBruttoPrice ();
143
+
144
+ $ this ->assertEquals ($ firstPrice , $ secondPrice );
145
+ }
120
146
}
You can’t perform that action at this time.
0 commit comments