Skip to content

Commit

Permalink
Merge branch '4.0' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaantony92 committed Oct 12, 2023
2 parents bffeb58 + 9e6c392 commit b4af625
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@ env:
PIMCORE_PROJECT_ROOT: ${{ github.workspace }}
APP_ENV: test
PIMCORE_TEST: 1
# PIMCORE_TEST_DB_DSN: "mysql://root@127.0.0.1:33006/pimcore_test"
PIMCORE_TEST_DB_DSN: "mysql://root@127.0.0.1:33006/pimcore_test"
PIMCORE_TEST_REDIS_DSN: "redis://127.0.0.1:63379"

jobs:
codeception-tests:
name: "Codeception tests"
runs-on: "ubuntu-20.04"
continue-on-error: ${{ matrix.experimental }}
env:
PIMCORE_TEST_DB_DSN: "mysql://root@127.0.0.1:33006/pimcore_test?serverVersion=${{ matrix.server_version }}"
strategy:
matrix:
include:
- { php-version: 8.1, database: "mariadb:10.7", server_version: "10.7.7-MariaDB-1:10.7.7+maria~ubu2004", dependencies: lowest, experimental: false }
- { php-version: 8.2, database: "mariadb:10.7", server_version: "10.7.7-MariaDB-1:10.7.7+maria~ubu2004", dependencies: highest, experimental: false }
- { php-version: 8.2, database: "mariadb:10.7", server_version: "10.7.7-MariaDB-1:10.7.7+maria~ubu2004", dependencies: highest, pimcore_version: "11.x-dev as 11.0.0", experimental: true }
- { php-version: 8.1, database: "mariadb:10.3", dependencies: lowest, experimental: false }
- { php-version: 8.2, database: "mariadb:10.11", dependencies: highest, experimental: false }
- { php-version: 8.2, database: "mariadb:10.11", dependencies: highest, pimcore_version: "11.x-dev as 11.0.0", experimental: true }

services:
redis:
Expand Down
2 changes: 1 addition & 1 deletion doc/30_Personalization/05_Example_Usecases.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ doing so, a target group with the same name is automatically created and linked
When using targeting rules with the `Assign Target Group` action, besides assigning target group to the current visitor,
there are also options to store the connected segment to the current customer and track activities.

Storing the segement to the customer is necessary to persist this information for later visits of the customer, especially
Storing the segment to the customer is necessary to persist this information for later visits of the customer, especially
when the customer visits from a different device.

![VIP Customer Rule](../img/assign-target-group-vip-customer.jpg)
Expand Down
6 changes: 5 additions & 1 deletion src/Newsletter/Command/NewsletterSyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($input->getOption('customer-data-sync') || $input->getOption('all-customers')) {
$lockKey = 'plugin_cmf_newsletter_sync_queue';

$this->lock($lockKey);
if (!$this->lock($lockKey)) {
$output->writeln('The command is already running in another process.');

return 0;
}

if (!$input->getOption('force-segments')) {
$this->newsletterManager->syncSegments();
Expand Down
9 changes: 6 additions & 3 deletions src/Resources/public/admin/js/cmf.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,12 @@ app.SearchFilter.DateRangePicker = (function () {
$(document).ready(function() {
window.app.init($('body'));

$('#customerDuplicatesMerge').on('click', function () {
const duplicateIds = $('#customerDuplicatesMerge').data('duplicate-ids');
new window.top.pimcore.plugin.objectmerger.panel(duplicateIds[0], duplicateIds[1]);
const duplicates = $('.customer-duplicates-merge');
$.each(duplicates , function(index,duplicate) {
duplicate.addEventListener('click', (event) => {
const duplicateIds = JSON.parse(duplicate.dataset.duplicateIds);
new window.top.pimcore.plugin.objectmerger.panel(duplicateIds[0], duplicateIds[1]);
});
});
});
})(jQuery);
2 changes: 1 addition & 1 deletion src/Resources/views/admin/duplicates/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<tbody id="customerduplicates_{{ duplicate.getDuplicateCustomers[0].getId() }}_{{ duplicate.getDuplicateCustomers[1].getId() }}" class="js-duplicates-item duplicates-item" >
<tr>
<td colspan="99">
<a class="btn btn-primary btn-xs pull-right" id="customerDuplicatesMerge" data-duplicate-ids='[{{ duplicate.getDuplicateCustomers[0].getId() }},{{ duplicate.getDuplicateCustomers[1].getId() }}]'>
<a class="btn btn-primary btn-xs pull-right customer-duplicates-merge" data-duplicate-ids='[{{ duplicate.getDuplicateCustomers[0].getId() }},{{ duplicate.getDuplicateCustomers[1].getId() }}]'>
{{ 'cmf_duplicates_merge' | trans({}, 'admin') }}
</a>
{% if(not app.request.get('declined')) %}
Expand Down

0 comments on commit b4af625

Please sign in to comment.