Skip to content

Commit

Permalink
Merge pull request #114 from okom3pom/fix-rgpd-checkbox
Browse files Browse the repository at this point in the history
Fix GDPR checkbox
  • Loading branch information
Progi1984 authored Oct 27, 2021
2 parents 80c04e0 + 18bcfc0 commit a3e358b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions productcomments.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public function install($keep = true)
!$this->registerHook('registerGDPRConsent') ||
!$this->registerHook('actionDeleteGDPRCustomer') ||
!$this->registerHook('actionExportGDPRData') ||
!$this->registerHook('displayGDPRConsent') ||

!Configuration::updateValue('PRODUCT_COMMENTS_MINIMAL_TIME', 30) ||
!Configuration::updateValue('PRODUCT_COMMENTS_ALLOW_GUESTS', 0) ||
Expand Down Expand Up @@ -989,6 +990,7 @@ private function renderProductCommentModal($product)
'moderation_active' => (int) Configuration::get('PRODUCT_COMMENTS_MODERATE'),
'criterions' => $criterions,
'product' => $product,
'id_module' => $this->id,
]);

return $this->context->smarty->fetch('module:productcomments/views/templates/hook/post-comment-modal.tpl');
Expand Down
2 changes: 1 addition & 1 deletion upgrade/install-5.0.0.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@

function upgrade_module_5_0_0($object)
{
return $object->registerHook('filterProductContent');
return $object->registerHook('filterProductContent') && $object->registerHook('displayGDPRConsent');
}
6 changes: 6 additions & 0 deletions views/templates/hook/post-comment-modal.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@
</div>
</div>

<div class="row">
<div class="col-md-12 col-sm-12">
{hook h='displayGDPRConsent' mod='psgdpr' id_module=$id_module}
</div>
</div>

<div class="row">
<div class="col-md-6 col-sm-6">
<p class="required"><sup>*</sup> {l s='Required fields' d='Modules.Productcomments.Shop'}</p>
Expand Down

0 comments on commit a3e358b

Please sign in to comment.