Skip to content

Commit

Permalink
disable Write your view in QuickView refresh action
Browse files Browse the repository at this point in the history
  • Loading branch information
leemyongpakvn committed Jan 10, 2024
1 parent a46ac63 commit e7e83f2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions productcomments.php
Original file line number Diff line number Diff line change
Expand Up @@ -1072,9 +1072,16 @@ public function renderWidget($hookName = null, array $configuration = [])
$idProduct = $this->context->controller->getProduct()->id;
$variables = $this->getWidgetVariables($hookName, ['id_product' => $idProduct]);

$filePath = 'quickview' === Tools::getValue('action')
? $tplHookPath . 'product-additional-info-quickview.tpl'
: $tplHookPath . 'product-additional-info.tpl';
switch (Tools::getValue('action')) {
case 'quickview':
$filePath = $tplHookPath . 'product-additional-info-quickview.tpl';
break;
case '':
$filePath = $tplHookPath . 'product-additional-info.tpl';
break;
default: // 'refresh' and other unpredicted cases
$filePath = '';
}
}

if (empty($variables) || empty($filePath)) {
Expand Down

0 comments on commit e7e83f2

Please sign in to comment.