Jump to content
ClicShopping News Read more... ×
Sign in to follow this  

How to add a new element for the grdp

Recommended Posts


First, Do you have installed or not the gdrp header tag modules ? 

ClicShopping propose a nice approach about the registred customer but for the not registred, you must install a specific module.

You we will found the modules the : https://github.com/ClicShoppingOfficialModulesV3/module_header_tags_gdpr or you can install via the extensions.

maybe it can help you to manage your need.

you can find a module cookie consent.


Else look the directory : Clichopping/Modules/Hooks/Account.

You will find some GRPD modules. it's easy to create another :

Copy the files and change the name :



 *  @copyright 2008 - https://www.clicshopping.org
 *  @Brand : ClicShopping(Tm) at Inpi all right Reserved
 *  @Licence GPL 2 & MIT
 *  @licence MIT - Portion of osCommerce 2.4 

  namespace ClicShopping\OM\Module\Hooks\Shop\Account;

  use ClicShopping\OM\CLICSHOPPING;

  use ClicShopping\OM\Registry;
  use ClicShopping\OM\HTML;

  class AccountGdprNoIp {

    protected $IpAddress;

    public function getIpAddress() {
      $CLICSHOPPING_Db = Registry::get('Db');
      $CLICSHOPPING_Customer = Registry::get('Customer');

      $Qgdpr = $CLICSHOPPING_Db->prepare('select no_ip_address
                                          from :table_customers_gdpr
                                          where customers_id = :customers_id
      $Qgdpr->bindInt(':customers_id', $CLICSHOPPING_Customer->getID());

      $ip_address = $Qgdpr->valueInt('no_ip_address');

      return $ip_address;

    public function display() {
        $output = '<div>';
        $output .= '<label class="checkbox-inline">';
        $output .= HTML::checkboxField('no_ip_address', $this->getIpAddress(), $this->getIpAddress());
        $output .= '</label>';
        $output .= CLICSHOPPING::getDef('module_account_customers_gdpr_no_ip_address');
        $output .= '</div>';

        return $output;

To create another module change 




Note : AccountGdpr is very important, it allow you  to implement the code in your catalog the new module. The files is reading dynamicly

I hope it can be an help to create your own module.


  • Thanks 1

Share this post

Link to post
Share on other sites

Thank @Patrick,


That's mean you can develop a specific module/apps and you can insert a grpd hooks in funcion the module/apps ?


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

By using this site, you agree to our Terms of Use