Skip to content

Commit 6963ff8

Browse files
Le ThuongLe Thuong
authored andcommitted
6.4.11.0 Compatible
1 parent af540a5 commit 6963ff8

File tree

8 files changed

+24
-14
lines changed

8 files changed

+24
-14
lines changed

CHANGELOG_de-DE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.2.0 - SW 6.4.11.0 Kompatibel
2+
- Die neue Version funktioniert ab 6.4.11.0, wenn Sie 6.4.10.0 rückwärts verwenden, benutzen Sie bitte die Version 1.1.0
3+
14
# 1.0.2 - SW 6.3.2 Compatible
25

36
# 1.0.1 - Fix HTTP Caching

CHANGELOG_en-GB.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.2.0 - SW 6.4.11.0 Compatible
2+
- New version work on 6.4.11.0 onward, if you're using 6.4.10.0 backward, please use the 1.1.0 version
3+
14
# 1.0.2 - SW 6.3.2 Compatible
25

36
# 1.0.1 - Fix HTTP Caching

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
## Demo:
66

7-
http://shopware.thuong.lv/
8-
97
![](https://media.giphy.com/media/VInadwfREBVz8QfIAI/giphy.gif)
108

119
![](https://user-images.githubusercontent.com/22548423/93246997-d00fe580-f7b7-11ea-925b-18ee10dca0ee.png)
@@ -29,9 +27,10 @@ http://shopware.thuong.lv/
2927

3028
## Requirements
3129

32-
| Version | Requirements |
33-
|--------- |---------------------------- |
34-
| 1.0.1 | Shopware 6.3 >= |
30+
| Version | Requirements |
31+
|-------------|------------------------------|
32+
| 1.0.1 | Shopware 6.3 >= 6.4.10.0 |
33+
| 1.2.0 | Shopware 6.4.11.0 |
3534

3635
## License
3736

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vienthuong/recently-viewed-products",
33
"description": "Recently viewed products plugin",
44
"type": "shopware-platform-plugin",
5-
"version": "1.1.0",
5+
"version": "1.2.0",
66
"license": "MIT",
77
"authors": [
88
{
@@ -16,8 +16,8 @@
1616
}
1717
},
1818
"require": {
19-
"shopware/core": "^6.3",
20-
"shopware/storefront": "^6.3"
19+
"shopware/core": "^6.4.10.1",
20+
"shopware/storefront": "^6.4.10.1"
2121
},
2222
"extra": {
2323
"shopware-plugin-class": "RecentlyViewedProduct\\RecentlyViewedProduct",

src/Core/System/SalesChannel/Context/SalesChannelContextPersisterDecorated.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace RecentlyViewedProduct\Core\System\SalesChannel\Context;
44

55
use Doctrine\DBAL\Connection;
6+
use Shopware\Core\Checkout\Cart\CartPersister;
67
use Shopware\Core\System\SalesChannel\Context\SalesChannelContextPersister;
78
use Shopware\Core\System\SalesChannel\SalesChannelContext;
89
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -22,12 +23,14 @@ class SalesChannelContextPersisterDecorated extends SalesChannelContextPersister
2223
public function __construct(
2324
SalesChannelContextPersister $decorated,
2425
Connection $connection,
25-
EventDispatcherInterface $eventDispatcher
26+
EventDispatcherInterface $eventDispatcher,
27+
CartPersister $cartPersister,
28+
?string $lifetimeInterval = 'P1D'
2629
) {
2730
$this->decorated = $decorated;
2831
$this->connection = $connection;
2932

30-
parent::__construct($connection, $eventDispatcher);
33+
parent::__construct($connection, $eventDispatcher, $cartPersister, $lifetimeInterval);
3134
}
3235

3336
public function replace(string $oldToken, SalesChannelContext $context): string
@@ -47,9 +50,9 @@ public function replace(string $oldToken, SalesChannelContext $context): string
4750
return $newToken;
4851
}
4952

50-
public function delete(string $token): void
53+
public function delete(string $token, ?string $salesChannelId = null, ?string $customerId = null): void
5154
{
52-
$this->decorated->delete($token);
55+
$this->decorated->delete($token, $salesChannelId, $customerId);
5356

5457
$this->connection->executeUpdate(
5558
'DELETE FROM recently_viewed_product WHERE token = :token',

src/Resources/app/storefront/dist/storefront/js/recently-viewed-product.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Resources/config/services.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
<argument type="service" id="RecentlyViewedProduct\Core\System\SalesChannel\Context\SalesChannelContextPersisterDecorated.inner"/>
5555
<argument type="service" id="Doctrine\DBAL\Connection"/>
5656
<argument type="service" id="event_dispatcher"/>
57+
<argument type="service" id="Shopware\Core\Checkout\Cart\CartPersister"/>
58+
<argument type="string">%shopware.api.store.context_lifetime%</argument>
5759
</service>
5860

5961
</services>

0 commit comments

Comments
 (0)