First upload
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of O3-Shop GDPR opt-in module.
|
||||
*
|
||||
* O3-Shop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* O3-Shop is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with O3-Shop. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* @copyright Copyright (c) 2022 OXID eSales AG (https://www.oxid-esales.com)
|
||||
* @copyright Copyright (c) 2022 O3-Shop (https://www.o3-shop.com)
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3)
|
||||
*/
|
||||
|
||||
$sLangName = 'Deutsch';
|
||||
|
||||
$aLang = [
|
||||
'charset' => 'UTF-8', // Supports german language specific chars like: ä, ö. ß, etc.
|
||||
'oegdproptin' => 'OE GDPR Opt-in Modul',
|
||||
|
||||
'SHOP_MODULE_GROUP_oegdproptin_settings' => 'DSGVO-Einstellungen',
|
||||
'SHOP_MODULE_blOeGdprOptinInvoiceAddress' => 'Opt-in für Rechnungsadresse anzeigen',
|
||||
'SHOP_MODULE_blOeGdprOptinDeliveryAddress' => 'Opt-in für Lieferadresse anzeigen',
|
||||
'SHOP_MODULE_blOeGdprOptinUserRegistration' => 'Opt-in für die Benutzerregistrierung anzeigen',
|
||||
'SHOP_MODULE_blOeGdprOptinProductReviews' => 'Opt-in für Artikelbewertungen anzeigen',
|
||||
|
||||
'SHOP_MODULE_GROUP_oegdproptin_contact_form' => 'Einstellungen für das Kontaktformular',
|
||||
'SHOP_MODULE_OeGdprOptinContactFormMethod' => '', // right side of the inputs, if some notes will be needed
|
||||
'SHOP_MODULE_OeGdprOptinContactFormMethod_deletion' => 'Hinweis auf Löschen der Daten nach Verarbeitung anzeigen',
|
||||
'SHOP_MODULE_OeGdprOptinContactFormMethod_statistical' => 'Opt-in für Verarbeitung und statistische Verwendung der Daten anzeigen',
|
||||
];
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of O3-Shop GDPR opt-in module.
|
||||
*
|
||||
* O3-Shop is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* O3-Shop is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with O3-Shop. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
* @copyright Copyright (c) 2022 OXID eSales AG (https://www.oxid-esales.com)
|
||||
* @copyright Copyright (c) 2022 O3-Shop (https://www.o3-shop.com)
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3)
|
||||
*/
|
||||
|
||||
$sLangName = 'English';
|
||||
|
||||
$aLang = [
|
||||
'charset' => 'UTF-8',
|
||||
'oegdproptin' => 'OE GDPR opt-in module',
|
||||
|
||||
'SHOP_MODULE_GROUP_oegdproptin_settings' => 'GDPR settings',
|
||||
'SHOP_MODULE_blOeGdprOptinInvoiceAddress' => 'Show opt-in for invoice address',
|
||||
'SHOP_MODULE_blOeGdprOptinDeliveryAddress' => 'Show opt-in for shipping address',
|
||||
'SHOP_MODULE_blOeGdprOptinUserRegistration' => 'Show opt-in for user registration',
|
||||
'SHOP_MODULE_blOeGdprOptinProductReviews' => 'Show opt-in for product reviews',
|
||||
|
||||
'SHOP_MODULE_GROUP_oegdproptin_contact_form' => 'Settings for the contact form',
|
||||
'SHOP_MODULE_OeGdprOptinContactFormMethod' => '', // right side of the inputs, if some notes will be needed
|
||||
'SHOP_MODULE_OeGdprOptinContactFormMethod_deletion' => 'Show a note for deletion of the data after processing',
|
||||
'SHOP_MODULE_OeGdprOptinContactFormMethod_statistical' => 'Show an opt-in for processing and statistical usage of the data',
|
||||
];
|
||||
@@ -0,0 +1,21 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-[{$leftCol|default:2}] col-lg-[{$rightCol|default:10}]">
|
||||
[{if $oView->isOptInValidationRequired()}]
|
||||
<label for="c_oegdproptin">
|
||||
<input type="hidden" name="c_oegdproptin" value="0">
|
||||
<input type="checkbox"
|
||||
name="c_oegdproptin"
|
||||
id="c_oegdproptin"
|
||||
value="1">
|
||||
<strong>[{oxmultilang ident="OEGDPROPTIN_CONTACT_FORM_MESSAGE_STATISTICAL" }]</strong>
|
||||
</label>
|
||||
[{if $oView->isOptInError()}]
|
||||
<div class="text-danger">[{oxmultilang ident="OEGDPROPTIN_CONTACT_FORM_ERROR_MESSAGE" }]</div>
|
||||
[{/if}]
|
||||
[{else}]
|
||||
[{oxmultilang ident="OEGDPROPTIN_CONTACT_FORM_MESSAGE_DELETION"}]
|
||||
[{/if}]
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinDeliveryAddress')}]
|
||||
[{if $Errors.oegdproptin_deliveryaddress}]
|
||||
[{assign var=oError value=$Errors.oegdproptin_deliveryaddress.0}]
|
||||
<div class="alert alert-danger">[{$oError->getOxMessage()}]</div>
|
||||
<div class="help-block"></div>
|
||||
[{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinInvoiceAddress')}]
|
||||
[{if $Errors.oegdproptin_invoiceaddress}]
|
||||
[{assign var=oError value=$Errors.oegdproptin_invoiceaddress.0}]
|
||||
<div class="alert alert-danger">[{$oError->getOxMessage()}]</div>
|
||||
<div class="help-block"></div>
|
||||
[{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{$smarty.block.parent}]
|
||||
@@ -0,0 +1,21 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinUserRegistration')}]
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-9 col-lg-offset-3 offset-lg-3">
|
||||
<div class="checkbox">
|
||||
<label for="oegdproptin_userregistration">
|
||||
<input type="checkbox" name="oegdproptin_userregistration" id="oegdproptin_userregistration" value="1"> [{oxmultilang ident="OEGDPROPTIN_USER_REGISTRATION_OPTIN"}]
|
||||
</label>
|
||||
</div>
|
||||
[{if $Errors.oegdproptin_userregistration}]
|
||||
[{assign var=oError value=$Errors.oegdproptin_userregistration.0}]
|
||||
<div class="text-danger">[{$oError->getOxMessage()}]</div>
|
||||
[{/if}]
|
||||
</div>
|
||||
</div>
|
||||
[{/if}]
|
||||
@@ -0,0 +1,51 @@
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{if $oxcmp_user}]
|
||||
[{assign var="delivadr" value=$oxcmp_user->getSelectedAddress()}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinDeliveryAddress')}]
|
||||
[{if $delivadr}]
|
||||
[{oxscript add="$('#showShipAddress').change( function() { $('#GdprShippingAddressOptin, #shippingAddressForm').hide($(this).is(':checked'));});"}]
|
||||
[{oxscript add="$('.dd-edit-shipping-address').click(function(){ $('#GdprShippingAddressOptin').toggle($(this).is(':not(:checked)')); document.getElementById('oegdproptin_changeDelAddress').value=1; });"}]
|
||||
[{oxscript add="$('.dd-add-delivery-address').click( function(){ $('#GdprShippingAddressOptin').toggle($(this).is(':not(:checked)')); });"}]
|
||||
[{else}]
|
||||
[{oxscript add="$('#showShipAddress').change( function() { $('#GdprShippingAddressOptin').toggle($(this).is(':not(:checked)')); });"}]
|
||||
[{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinInvoiceAddress')}]
|
||||
[{oxscript add="$('#userChangeAddress').click( function() { $('#GdprInvoiceAddressOptin').show();$('#userChangeAddress').hide();return false;});"}]
|
||||
[{/if}]
|
||||
|
||||
[{capture assign="optinValidationJS"}]
|
||||
[{strip}]
|
||||
$("#accUserSaveTop").click(function(event){
|
||||
$("#oegdproptin_deliveryaddress_error").hide();
|
||||
$("#oegdproptin_invoiceaddress_error").hide();
|
||||
|
||||
var success = true;
|
||||
if ( $('#oegdproptin_invoiceaddress').is(':visible') && $('#oegdproptin_invoiceaddress').is(':not(:checked)') )
|
||||
{
|
||||
event.preventDefault();
|
||||
$("#oegdproptin_invoiceaddress_error").show();
|
||||
}
|
||||
if ($('#oegdproptin_deliveryaddress').is(':visible') && $('#oegdproptin_deliveryaddress').is(':not(:checked)'))
|
||||
{
|
||||
event.preventDefault();
|
||||
$("#oegdproptin_deliveryaddress_error").show();
|
||||
}
|
||||
|
||||
$(this).submit();
|
||||
if (!success){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
|
||||
[{oxscript add=$optinValidationJS}]
|
||||
|
||||
[{$smarty.block.parent}]
|
||||
@@ -0,0 +1,22 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinInvoiceAddress')}]
|
||||
<div class="form-group[{if $Errors.oegdproptin_invoiceaddress}] oxInValid[{/if}]" id="GdprInvoiceAddressOptin" style="display: none;">
|
||||
<div class="col-lg-9 col-lg-offset-3 offset-lg-3">
|
||||
<div class="checkbox">
|
||||
<label for="oegdproptin_invoiceaddress">
|
||||
<input type="hidden" class="hidden" id="oegdproptin_changeInvAddress" name="oegdproptin_changeInvAddress" value="0">
|
||||
<input type="checkbox" name="oegdproptin_invoiceaddress" id="oegdproptin_invoiceaddress" value="1"> <strong>[{oxmultilang ident="OEGDPROPTIN_STORE_INVOICE_ADDRESS"}]</strong>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-lg-offset-3 offset-lg-3">
|
||||
<div id="oegdproptin_invoiceaddress_error" style="display:none;" class="text-danger">[{oxmultilang ident="OEGDPROPTIN_CONFIRM_STORE_INVOICE_ADDRESS" }]</div>
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
[{/if}]
|
||||
@@ -0,0 +1,59 @@
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{if $oxcmp_user}]
|
||||
[{assign var="delivadr" value=$oxcmp_user->getSelectedAddress()}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinDeliveryAddress')}]
|
||||
[{if $delivadr}]
|
||||
[{oxscript add="function toggleGdprOptinShipAddress() { $('#GdprOptinShipAddress, #shippingAddressForm').hide($(this).is(':checked'));}"}]
|
||||
[{oxscript add="$('#showShipAddress').change(toggleGdprOptinShipAddress);"}]
|
||||
[{oxscript add="toggleGdprOptinShipAddress.bind($('#showShipAddress')[0])();"}]
|
||||
[{oxscript add="$( '.dd-edit-shipping-address' ).click(function(){ $('#GdprOptinShipAddress').toggle($(this).is(':not(:checked)')); document.getElementById('oegdproptin_changeDelAddress').value=1; });"}]
|
||||
[{oxscript add="$( '.dd-add-delivery-address' ).click( function(){ $('#GdprOptinShipAddress').toggle($(this).is(':not(:checked)')); });"}]
|
||||
[{else}]
|
||||
[{oxscript add="function toggleGdprOptinShipAddress() { $('#GdprOptinShipAddress').toggle($(this).is(':not(:checked)'));}"}]
|
||||
[{oxscript add="toggleGdprOptinShipAddress.bind($('#showShipAddress')[0])();"}]
|
||||
[{oxscript add="$('#showShipAddress').change(toggleGdprOptinShipAddress);"}]
|
||||
[{/if}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinInvoiceAddress')}]
|
||||
[{oxscript add="$('#userChangeAddress').click( function() { $('#GdprInvoiceAddressOptin').toggle();return false;});"}]
|
||||
[{/if}]
|
||||
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{capture assign="optinValidationJS"}]
|
||||
[{strip}]
|
||||
$("#userNextStepBottom, #userNextStepTop").click(function(event){
|
||||
$("#oegdproptin_deliveryaddress_error").hide();
|
||||
$("#oegdproptin_invoiceaddress_error").hide();
|
||||
|
||||
var success = true;
|
||||
if ( $('#oegdproptin_invoiceaddress').is(':visible') && $('#oegdproptin_invoiceaddress').is(':not(:checked)') )
|
||||
{
|
||||
event.preventDefault();
|
||||
$("#oegdproptin_invoiceaddress_error").show();
|
||||
}
|
||||
if ($('#oegdproptin_deliveryaddress').is(':visible') && $('#oegdproptin_deliveryaddress').is(':not(:checked)'))
|
||||
{
|
||||
event.preventDefault();
|
||||
$("#oegdproptin_deliveryaddress_error").show();
|
||||
}
|
||||
|
||||
$(this).submit();
|
||||
if (!success){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
[{/strip}]
|
||||
[{/capture}]
|
||||
|
||||
[{oxscript add=$optinValidationJS}]
|
||||
@@ -0,0 +1,22 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinDeliveryAddress')}]
|
||||
<div class="form-group[{if $Errors.oegdproptin_deliveryaddress}] oxInValid[{/if}]" id="GdprOptinShipAddress" style="display: none;">
|
||||
<div class="col-lg-9 col-lg-offset-3 offset-lg-3">
|
||||
<div class="checkbox">
|
||||
<label for="oegdproptin_deliveryaddress">
|
||||
<input type="hidden" class="hidden" id="oegdproptin_changeDelAddress" name="oegdproptin_changeDelAddress" value="0">
|
||||
<input type="checkbox" name="oegdproptin_deliveryaddress" id="oegdproptin_deliveryaddress" value="1"> <strong>[{oxmultilang ident="OEGDPROPTIN_STORE_DELIVERY_ADDRESS"}]</strong>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-lg-offset-3 offset-lg-3">
|
||||
<div id="oegdproptin_deliveryaddress_error" style="display:none;" class="text-danger">[{oxmultilang ident="OEGDPROPTIN_CONFIRM_STORE_DELIVERY_ADDRESS" }]</div>
|
||||
<div class="help-block"></div>
|
||||
</div>
|
||||
</div>
|
||||
[{/if}]
|
||||
@@ -0,0 +1,21 @@
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinInvoiceAddress')}]
|
||||
<div class="clearfix"></div>
|
||||
<div id="GdprInvoiceAddressOptin" class="form-group" style="display: none;">
|
||||
<div class="col-lg-9 col-lg-offset-3 offset-lg-3">
|
||||
<div class="checkbox">
|
||||
<label class="req">
|
||||
<input type="hidden" class="hidden" id="oegdproptin_changeInvAddress" name="oegdproptin_changeInvAddress" value="0">
|
||||
<input type="checkbox" name="oegdproptin_invoiceaddress" id="oegdproptin_invoiceaddress" value="1" >
|
||||
<strong>[{oxmultilang ident="OEGDPROPTIN_STORE_INVOICE_ADDRESS"}]</strong>
|
||||
</label>
|
||||
</div>
|
||||
<div id="oegdproptin_invoiceaddress_error" style="display:none;" class="text-danger">[{oxmultilang ident="OEGDPROPTIN_CONFIRM_STORE_INVOICE_ADDRESS" }]</div>
|
||||
</div>
|
||||
</div>
|
||||
[{/if}]
|
||||
@@ -0,0 +1,25 @@
|
||||
[{if !isset($oConfig)}]
|
||||
[{assign var="oConfig" value=$oViewConf->getConfig()}]
|
||||
[{/if}]
|
||||
|
||||
[{$smarty.block.parent}]
|
||||
|
||||
[{if $oxcmp_user}]
|
||||
[{assign var="delivadr" value=$oxcmp_user->getSelectedAddress()}]
|
||||
[{/if}]
|
||||
|
||||
[{if true == $oConfig->getConfigParam('blOeGdprOptinDeliveryAddress')}]
|
||||
<div class="clearfix"></div>
|
||||
<div id="GdprShippingAddressOptin" class="form-group" style="[{if $delivadr || !$oView->showShipAddress()}]display: none;[{/if}]">
|
||||
<div class="col-lg-9 col-lg-offset-3 offset-lg-3">
|
||||
<div class="checkbox">
|
||||
<label class="req">
|
||||
<input type="hidden" class="hidden" id="oegdproptin_changeDelAddress" name="oegdproptin_changeDelAddress" value="0">
|
||||
<input type="checkbox" name="oegdproptin_deliveryaddress" id="oegdproptin_deliveryaddress" value="1" >
|
||||
<strong>[{oxmultilang ident="OEGDPROPTIN_STORE_DELIVERY_ADDRESS"}]</strong>
|
||||
</label>
|
||||
</div>
|
||||
<div id="oegdproptin_deliveryaddress_error" style="display:none;" class="text-danger">[{oxmultilang ident="OEGDPROPTIN_CONFIRM_USER_REGISTRATION_OPTIN" }]</div>
|
||||
</div>
|
||||
</div>
|
||||
[{/if}]
|
||||
@@ -0,0 +1,37 @@
|
||||
[{capture name="optInJs" assign="optInJs"}]
|
||||
$("#rvw_oegdproptin").parents("form").first().submit(function(event){
|
||||
event.preventDefault();
|
||||
$("#rvw_oegdproptin_error").addClass("hidden");
|
||||
|
||||
if ($("#rvw_oegdproptin:checked").length === 1) {
|
||||
this.submit();
|
||||
} else {
|
||||
$("#rvw_oegdproptin_error").removeClass("hidden");
|
||||
}
|
||||
});
|
||||
[{/capture}]
|
||||
|
||||
[{capture name="optIn" assign="optIn"}]
|
||||
[{if $oView->isReviewOptInValidationRequired()}]
|
||||
<div style="margin-top:10px;" class="rvw_oegdproptin_block">
|
||||
<input type="hidden" name="rvw_oegdproptin" value="0">
|
||||
<label for="rvw_oegdproptin">
|
||||
<input type="checkbox"
|
||||
name="rvw_oegdproptin"
|
||||
id="rvw_oegdproptin"
|
||||
value="1">
|
||||
<strong>[{oxmultilang ident="OEGDPROPTIN_REVIEW_FORM_MESSAGE" }]</strong>
|
||||
</label>
|
||||
|
||||
<div id="rvw_oegdproptin_error"
|
||||
class="[{if !$oView->isReviewOptInError()}]hidden [{/if}] text-danger">
|
||||
[{oxmultilang ident="OEGDPROPTIN_REVIEW_FORM_ERROR_MESSAGE" }]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
[{oxscript add=$optInJs}]
|
||||
[{/if}]
|
||||
[{/capture}]
|
||||
|
||||
[{$smarty.block.parent}]
|
||||
[{$smarty.capture.optIn}]
|
||||
Reference in New Issue
Block a user