Magento: Update footer copyright year
PHP script (/root/scripts/update_copyright_year.php)
<?php
$URL="https://raw.githubusercontent.com/panticz/magento/master/scripts/update_copyright_year.php";
echo "
"; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $URL); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo htmlspecialchars(curl_exec($c)); curl_close($c); echo "
";
?>
Cronjob (/etc/cron.d/newyear)
0 0 1 1 * root /root/scripts/update_copyright_year.php
Use in CMS block
{{config path='design/footer/copyright'}}
Dep: Update by SQL
update core_config_data
set value = CONCAT('© ', YEAR(CURDATE()), ' YOUR COMPANY INC.')
where path = 'design/footer/copyright';