Skip to content

Commit

Permalink
Merge branch '3.2' into 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed Dec 12, 2023
2 parents c1f658a + e57e0fb commit a1a456f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/CoreShop/Behat/Page/Frontend/Checkout/AddressPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public function chooseDifferentShippingAddress(): void

public function useShippingAddress(AddressInterface $shippingAddress): void
{
$this->getElement('shipping_address')->selectOption($shippingAddress->getId());
$this->getElement('shipping_address')->selectOption((string) $shippingAddress->getId());
}

public function useInvoiceAddress(AddressInterface $invoiceAddress): void
{
$this->getElement('invoice_address')->selectOption($invoiceAddress->getId());
$this->getElement('invoice_address')->selectOption((string) $invoiceAddress->getId());
}

public function shippingAddressVisible(): bool
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Behat/Page/Frontend/Checkout/PaymentPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function getRouteName(): string

public function selectPaymentProvider(PaymentProviderInterface $paymentProvider): void
{
$this->getElement('payment_provider')->selectOption($paymentProvider->getId());
$this->getElement('payment_provider')->selectOption((string) $paymentProvider->getId());
}

public function submitStep(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ services:

coreshop.expression_language:
class: Symfony\Component\ExpressionLanguage\ExpressionLanguage
arguments:
- '@cache.system'

CoreShop\Component\Pimcore\ExpressionLanguage\PimcoreLanguageProvider:
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,4 @@ public function load($key): mixed

return $data;
}

protected function prepareCacheData($data): mixed
{
/**
* It is useless to prepare the data for cache here
* since the Pimcore CoreCacheHandler on line 502 loads
* the data-object completely fresh, so we still have to use
* DeepCopy approach
*/
return $data;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public function modify(StorageListItemInterface $item, float $targetQuantity): v
$item->setQuantity($cleanTargetQuantity);

if ($item->hasUnitDefinition()) {
$item->setDefaultUnitQuantity($item->getUnitDefinition()->getConversionRate() * $item->getQuantity());
$item->setDefaultUnitQuantity(($item->getUnitDefinition()?->getConversionRate() ?? 1.0) * $item->getQuantity());
} else {
$item->setDefaultUnitQuantity($item->getQuantity());
$item->setDefaultUnitQuantity($item->getQuantity() ?? 1.0);
}
}

Expand Down

0 comments on commit a1a456f

Please sign in to comment.