Add translations for cookie consent and footer links in multiple languages; update checkout consent messages
- Updated French, Italian, Dutch, and US English translations to include cookie consent messages and footer links. - Modified checkout consent messages to include privacy policy acceptance. - Added new pages for cookies, contact, returns, and complaints with appropriate styling and content. - Updated routing in index.php to include new pages. - Refactored image selection script to use click events instead of mouseover.
This commit is contained in:
@@ -258,7 +258,7 @@ $view = '
|
||||
</ul>
|
||||
</div>
|
||||
'. $age_consent.'
|
||||
'.$maintenanceMode;
|
||||
'.$maintenanceMode . cookie_consent();
|
||||
|
||||
return $view;
|
||||
|
||||
@@ -581,8 +581,8 @@ function template_footer() {
|
||||
<div class="container">
|
||||
<div class="payment-methods">
|
||||
<img src="'.base_url.'custom/assets/iDEAL.png" alt="iDeal" class="payment-method">
|
||||
<!-- <img src="'.base_url.'custom/assets/mastercard.png" alt="Mastercard" class="payment-method"> -->
|
||||
<!-- <img src="'.base_url.'custom/assets/visa.png" alt="Visa" class="payment-method"> -->
|
||||
<img src="'.base_url.'custom/assets/mastercard.png" alt="Mastercard" class="payment-method">
|
||||
<img src="'.base_url.'custom/assets/visa.png" alt="Visa" class="payment-method">
|
||||
<img src="'.base_url.'custom/assets/paypal.png" alt="Pay Pal" class="payment-method">
|
||||
</div>
|
||||
|
||||
@@ -591,8 +591,12 @@ function template_footer() {
|
||||
©2025 All rights reserved
|
||||
</div>
|
||||
<div class="footer-links">
|
||||
<a href="'.termsandconditions_link.'">'.$terms_text.'</a>
|
||||
<a href="'.privacy_link.'">'.$privacy_text.'</a>
|
||||
<a href="'.url('index.php?page=termsandconditions').'">'.$terms_text.'</a>
|
||||
<a href="'.url('index.php?page=privacy').'">'.$privacy_text.'</a>
|
||||
<a href="'.url('index.php?page=cookies').'">'.$cookie_text.'</a>
|
||||
<a href="'.url('index.php?page=contact').'">'.$contact_text.'</a>
|
||||
<a href="'.url('index.php?page=returns').'">'.$returns_text.'</a>
|
||||
<a href="'.url('index.php?page=complaints').'">'.$complaint_text.'</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -853,4 +857,32 @@ echo <<<EOT
|
||||
EOT;
|
||||
|
||||
}
|
||||
|
||||
// Cookie consent banner
|
||||
function cookie_consent() {
|
||||
if (isset($_COOKIE['cookie_consent']) && $_COOKIE['cookie_consent'] == 'accepted') {
|
||||
return '';
|
||||
}
|
||||
|
||||
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||
|
||||
$cookie_policy_link = url('index.php?page=cookies');
|
||||
|
||||
$html = '
|
||||
<div id="cookie-consent-banner" style="position: fixed; bottom: 0; left: 0; right: 0; background: #333; color: #fff; padding: 10px; text-align: center; z-index: 1000;">
|
||||
'.($cookie_consent_text ?? 'This website uses cookies to improve your experience.').' <a href="' . $cookie_policy_link . '" style="color: #4CAF50; text-decoration: underline; margin-left: 5px;">'.($cookie_consent_learn_more ?? 'Learn more').'</a> <button id="accept-cookies" style="margin-left: 10px; padding: 5px 10px;">'.($cookie_consent_accept ?? 'Accept').'</button> <button id="decline-cookies" style="margin-left: 10px; padding: 5px 10px;">'.($cookie_consent_decline ?? 'Decline').'</button>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("accept-cookies").onclick = function() {
|
||||
document.cookie = "cookie_consent=accepted; path=/; max-age=15768000";
|
||||
document.getElementById("cookie-consent-banner").style.display = "none";
|
||||
};
|
||||
document.getElementById("decline-cookies").onclick = function() {
|
||||
document.cookie = "cookie_consent=declined; path=/; max-age=15768000";
|
||||
document.getElementById("cookie-consent-banner").style.display = "none";
|
||||
};
|
||||
</script>
|
||||
';
|
||||
return $html;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user