Buyer's Email in the comments section and Personal data protection

  • Posts: 23
  • Thank you received: 0
  • Hikashop Essential
3 months 1 week ago #305512

-- HikaShop version -- : 4.0.3
-- Joomla version -- : 3.9.4
-- PHP version -- : 7.1
-- Browser(s) name and version -- : Chrome

Hi!

I faced with the following serious, in my opinion, problem.
In Hikashop as in all modern e-Commerce components user Login = user Email.
It is convenient and has long been used by all.
But when a user writes and places a comment on the product page, his Login is written in the "vote_pseudo" field but not his Name. As a result we have a publication of the user email in the comments, which is a direct violation of the Law on personal data that we undertake to store and not to transfer to third parties without the consent of the user.
I can hide using css field with user login, but it is not correct decision. Need to solve the problem in the code, writing user Name in the field "vote_pseudo". The question is how to do it, because I'm not strong in PHP :(
Or maybe there are alternatives to solve this problem?

Please Log in or Create an account to join the conversation.

  • Posts: 66270
  • Thank you received: 9716
  • MODERATOR
3 months 1 week ago #305523

Hi,

Actually, your situation is not how it is by default in HikaShop.
The user email is not used for the username of the user accounts by default instead you change the "registration" setting of the HikaShop registration to "simplified registration" which removes the username field.
And we actually use the username of the user account instead of the user's name in order to prevent the display of the user's name in the comments so that only his username (which can be anything) appears in order to protect his privacy.

Now, if you want to keep the way it works with the registration and only replace the vote_pseudo display on the listing of comments by the name of the user, you can edit the file vote/listing.php via the menu Display>Views.
There, you'll see:

<?php if ($elt->vote_pseudo == '0') { ?>
			<span itemprop="name" class="hika_vote_listing_username"><?php echo $elt->username; ?> </span>
<?php } else { ?>
			<span itemprop="name" class="hika_vote_listing_username" ><?php echo $elt->vote_pseudo; ?></span>
<?php } ?>
which you can replace by:
<span itemprop="name" class="hika_vote_listing_username"><?php echo $elt->name; ?> </span>

The following user(s) said Thank You: Takuan

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
  • Hikashop Essential
3 months 1 week ago #305525

Thanks, Nicolas!!!
It's really what I need!

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 1
  • Hikashop Business
3 months 12 hours ago #305839

Hi,

I extended Nicolas' answer a bit so it takes also the votes of non-registered users into account:

<?php if ($elt->name != "") { ?>
   <span itemprop="name" class="hika_vote_listing_username"><?php echo $elt->name; ?> </span>
<?php } 
else { ?>
   <span itemprop="name" class="hika_vote_listing_username"><?php echo $elt->vote_pseudo; ?> </span>
<?php } ?>

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
  • Hikashop Essential
2 months 4 weeks ago #305867

ericdewaal wrote: Hi,

I extended Nicolas' answer a bit so it takes also the votes of non-registered users into account:

<?php if ($elt->name != "") { ?>
   <span itemprop="name" class="hika_vote_listing_username"><?php echo $elt->name; ?> </span>
<?php } 
else { ?>
   <span itemprop="name" class="hika_vote_listing_username"><?php echo $elt->vote_pseudo; ?> </span>
<?php } ?>


Thank you, though I use comments only for registered users who bought some goods.

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 1
  • Hikashop Business
2 months 4 weeks ago #305872

Takuan wrote:
Thank you, though I use comments only for registered users who bought some goods.


So do we, but I just wanted to keep the original functionality intact.

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum