Bon bah du coup j'ai feinté...
J'ai remplacé dans thelia.js :
// Product Quick view Dialog
$(document).on('click.product-quickview', '.product-quickview', function () {
if (doAjax) {
$.get(this.href,
function (data) {
// Hide all currently active bootbox dialogs
bootbox.hideAll();
// Show dialog
bootbox.dialog({
message : $("#product",data),
onEscape: function() {
bootbox.hideAll();
}
});
window.pseManager.load();
}
);
return false;
}
});
par
// Product Quick view Dialog
$(document).on('click.product-quickview', '.product-quickview', function () {
if (doAjax) {
$.get(this.href, { ajax: 1 } ).done(function (data) {
// Hide all currently active bootbox dialogs
bootbox.hideAll();
// Show dialog
bootbox.dialog({
message : $("#product",data),
onEscape: function() {
bootbox.hideAll();
}
});
window.pseManager.load();
});
return false;
}
});
et dans mon module j'ai mis les deux hooks :
<hook id="additional_pse_field.pse_change" class="AdditionalPseField\Hook\HookManager" scope="request">
<tag name="hook.event_listener" event="product.javascript-initialization" type="front" method="onPseChange" />
<tag name="hook.event_listener" event="product.details-bottom" type="front" method="onPseChangeQuickView" />
</hook>
puis j'ai dupliqué ma fonction avec vérification de la variable $_GET['ajax'] :
public function onPseChange(HookRenderEvent $event) {
$isAjax = $this->getRequest()->query->get("ajax");
if(!$isAjax){
...
public function onPseChangeQuickView(HookRenderEvent $event) {
$isAjax = $this->getRequest()->query->get("ajax");
if($isAjax){
...
Voir pour les prochaines versions de Thelia pour éviter ce souci ?