This commit is contained in:
2026-04-01 12:48:10 +02:00
parent acef745ccc
commit 4a2135cf13
6 changed files with 58 additions and 40 deletions

View File

@@ -187,23 +187,8 @@
"lmtime": 0, "lmtime": 0,
"modified": false "modified": false
}, },
"changelog": {},
"classes": {}, "classes": {},
".claude": {
"settings.local.json": {
"type": "-",
"size": 96,
"lmtime": 1772461611751,
"modified": false
},
"memory": {
"feedback_changelog.md": {
"type": "-",
"size": 636,
"lmtime": 1773876629308,
"modified": false
}
}
},
"composer.lock": { "composer.lock": {
"type": "-", "type": "-",
"size": 429111, "size": 429111,
@@ -795,6 +780,7 @@
"lmtime": 0, "lmtime": 0,
"modified": false "modified": false
}, },
"scripts": {},
"sitemaps": {}, "sitemaps": {},
"sitemap_shop_2.xml": { "sitemap_shop_2.xml": {
"type": "-", "type": "-",
@@ -841,27 +827,6 @@
"size": 448, "size": 448,
"lmtime": 0, "lmtime": 0,
"modified": false "modified": false
},
".serena": {
".gitignore": {
"type": "-",
"size": 28,
"lmtime": 1773876286926,
"modified": false
},
"memories": {},
"project.local.yml": {
"type": "-",
"size": 407,
"lmtime": 1773876286922,
"modified": false
},
"project.yml": {
"type": "-",
"size": 8787,
"lmtime": 1773876286912,
"modified": false
}
} }
} }
} }

View File

@@ -25,3 +25,23 @@
- `modules/crosssellpro/` - `modules/crosssellpro/`
- `scripts/` - `scripts/`
## Aktualizacja: bieżące zmiany robocze
### Co zmieniono
- Zmieniono nagłówek sekcji cross-sell w `cartCrossSell.tpl`:
- W checkout (`$crosssellpro_is_checkout`) wyświetlany jest komunikat: `Ostatnia szansa na pełen komfort snu`.
- Poza checkout wyświetlany jest komunikat: `Klienci, ktorzy kupili ten materac, wybierali tez:`.
- Usunięto znak BOM z początku pliku `modules/crosssellpro/crosssellpro.php` (porządkowanie kodowania pliku).
- Dodano zabezpieczenie w `pm_advancedsearch4` dla cyklu AJAX:
- W callbacku `complete` zawsze usuwany jest loader (`removeLayer()`).
- Dodano callback błędu `showAsError`, który usuwa loader i loguje błąd do konsoli.
- Podpięto callback `error` oraz `complete` do opcji żądań AJAX w obu wariantach konfiguracji pluginu.
- Zaktualizowano wpisy w `.vscode/ftp-kr.sync.cache.json` (cache synchronizacji FTP po zmianach w drzewie projektu).
### Bieżąco zmienione pliki
- `.vscode/ftp-kr.sync.cache.json`
- `modules/crosssellpro/crosssellpro.php`
- `modules/crosssellpro/views/templates/hook/cartCrossSell.tpl`
- `modules/pm_advancedsearch4/views/js/as4_plugin-17.js`
- `modules/pm_advancedsearch4/views/js/as4_plugin.js`

View File

@@ -1,4 +1,4 @@
<?php <?php
/** /**
* Cross Sell PRO module for cart page upsell. * Cross Sell PRO module for cart page upsell.
* *

View File

@@ -10,7 +10,13 @@
> >
<div class="card-block"> <div class="card-block">
<div class="crosssellpro-header"> <div class="crosssellpro-header">
<h2 class="h4 crosssellpro-title">{l s='Produkty, ktore moga Ci sie przydac' mod='crosssellpro'}</h2> <h2 class="h4 crosssellpro-title">
{if $crosssellpro_is_checkout}
{l s='Ostatnia szansa na pełen komfort snu' mod='crosssellpro'}
{else}
{l s='Klienci, ktorzy kupili ten materac, wybierali tez:' mod='crosssellpro'}
{/if}
</h2>
<div class="crosssellpro-nav" aria-hidden="true"> <div class="crosssellpro-nav" aria-hidden="true">
<button type="button" class="crosssellpro-nav-btn js-crosssellpro-prev" aria-label="{l s='Poprzednie produkty' mod='crosssellpro'}">&lsaquo;</button> <button type="button" class="crosssellpro-nav-btn js-crosssellpro-prev" aria-label="{l s='Poprzednie produkty' mod='crosssellpro'}">&lsaquo;</button>
<button type="button" class="crosssellpro-nav-btn js-crosssellpro-next" aria-label="{l s='Nastepne produkty' mod='crosssellpro'}">&rsaquo;</button> <button type="button" class="crosssellpro-nav-btn js-crosssellpro-next" aria-label="{l s='Nastepne produkty' mod='crosssellpro'}">&rsaquo;</button>
@@ -68,3 +74,4 @@
</div> </div>
</section> </section>
{/if} {/if}

View File

@@ -86,6 +86,16 @@ var as4Plugin = {
// Prevent some action to be done if search is triggered from back/forward event // Prevent some action to be done if search is triggered from back/forward event
getASFormOptionsCompleteCallBack: function(arg1) { getASFormOptionsCompleteCallBack: function(arg1) {
as4Plugin.fromBackForwardEvent = false; as4Plugin.fromBackForwardEvent = false;
// Safety net: always remove loader/blur at the end of an AJAX cycle.
as4Plugin.removeLayer();
},
// Ajax error callback
showAsError: function(xhr, statusText, errorThrown) {
as4Plugin.removeLayer();
if (typeof(window.console) !== 'undefined' && typeof(window.console.error) === 'function') {
window.console.error('[AS4] AJAX error', statusText, errorThrown, xhr);
}
}, },
// Get Ajax dynamic parameters // Get Ajax dynamic parameters
@@ -93,6 +103,7 @@ var as4Plugin = {
return { return {
beforeSubmit: as4Plugin.showAsRequest, beforeSubmit: as4Plugin.showAsRequest,
success: as4Plugin.showAsResponse, success: as4Plugin.showAsResponse,
error: as4Plugin.showAsError,
complete: as4Plugin.getASFormOptionsCompleteCallBack, complete: as4Plugin.getASFormOptionsCompleteCallBack,
localCache: as4Plugin.localCache, localCache: as4Plugin.localCache,
localCacheKey: as4Plugin.localCacheKey, localCacheKey: as4Plugin.localCacheKey,
@@ -113,6 +124,8 @@ var as4Plugin = {
return { return {
beforeSubmit: as4Plugin.showAsRequest, beforeSubmit: as4Plugin.showAsRequest,
success: as4Plugin.showAsResponse, success: as4Plugin.showAsResponse,
error: as4Plugin.showAsError,
complete: as4Plugin.getASFormOptionsCompleteCallBack,
localCache: as4Plugin.localCache, localCache: as4Plugin.localCache,
localCacheKey: as4Plugin.localCacheKey, localCacheKey: as4Plugin.localCacheKey,
cacheTTL: 2, cacheTTL: 2,

View File

@@ -81,6 +81,16 @@ var as4Plugin = {
// Prevent some action to be done if search is triggered from back/forward event // Prevent some action to be done if search is triggered from back/forward event
getASFormOptionsCompleteCallBack: function(arg1) { getASFormOptionsCompleteCallBack: function(arg1) {
as4Plugin.fromBackForwardEvent = false; as4Plugin.fromBackForwardEvent = false;
// Safety net: always remove loader/blur at the end of an AJAX cycle.
as4Plugin.removeLayer();
},
// Ajax error callback
showAsError: function(xhr, statusText, errorThrown) {
as4Plugin.removeLayer();
if (typeof(window.console) !== 'undefined' && typeof(window.console.error) === 'function') {
window.console.error('[AS4] AJAX error', statusText, errorThrown, xhr);
}
}, },
// Get Ajax dynamic parameters // Get Ajax dynamic parameters
@@ -88,6 +98,7 @@ var as4Plugin = {
return { return {
beforeSubmit: as4Plugin.showAsRequest, beforeSubmit: as4Plugin.showAsRequest,
success: as4Plugin.showAsResponse, success: as4Plugin.showAsResponse,
error: as4Plugin.showAsError,
complete: as4Plugin.getASFormOptionsCompleteCallBack, complete: as4Plugin.getASFormOptionsCompleteCallBack,
localCache: as4Plugin.localCache, localCache: as4Plugin.localCache,
localCacheKey: as4Plugin.localCacheKey, localCacheKey: as4Plugin.localCacheKey,
@@ -108,6 +119,8 @@ var as4Plugin = {
return { return {
beforeSubmit: as4Plugin.showAsRequest, beforeSubmit: as4Plugin.showAsRequest,
success: as4Plugin.showAsResponse, success: as4Plugin.showAsResponse,
error: as4Plugin.showAsError,
complete: as4Plugin.getASFormOptionsCompleteCallBack,
localCache: as4Plugin.localCache, localCache: as4Plugin.localCache,
localCacheKey: as4Plugin.localCacheKey, localCacheKey: as4Plugin.localCacheKey,
cacheTTL: 2, cacheTTL: 2,
@@ -1233,4 +1246,4 @@ var as4Plugin = {
} }
} }
} }