In an effort to customise the Bright Theme storefront message that by default includes 'powered by CS-cart' , I created a new HTML copyright block with the following content ( added with wysiwyg editor disabled )
© 2003 - 2020 MyCompany
In an effort to customise the Bright Theme storefront message that by default includes 'powered by CS-cart' , I created a new HTML copyright block with the following content ( added with wysiwyg editor disabled )
© 2003 - 2020 MyCompany
Use HTML block with SMARTY support and the following content
© {$settings.Company.company_start_year} - {$smarty.const.TIME|date_format:'%Y'} MyCompany
(!) Not tested
Use HTML block with SMARTY support and the following content
© {$settings.Company.company_start_year} - {$smarty.const.TIME|date_format:'%Y'} MyCompany
(!) Not tested
Thank you yes that worked and can be improved a little so the company name is automated too:
© {$settings.Company.company_start_year} - {$smarty.const.TIME|date_format:'%Y'} {$settings.Company.company_name}
Is there a library of CS-cart smarty values published somewhere for tasks like this ?
FWIW, overnight I figured out another solution, not as elegant as the above though. Inline scripts are moved to the end of the page just prior to the tag so it is necessary to point the script output into a div so that it appears in the correct position:
Is there a library of CS-cart smarty values published somewhere for tasks like this ?
Unfortunately, no
Unfortunately, no
That's a pity and feels like a serious oversight on behalf of the publishers that is going to generate a lot of work digging through Smarty templates :-(
Anyway, just to complete this thread for anyone new to this ( as I am ) the key to modifying the blocks that are static and cannot be edited within Design > Layouts > Manage Blocks admin page is to find the relevant .tpl file on the server and modify it.
\var\themes_repository\responsive\templates\blocks\static_templates\copyright.tpl
{** block-description:tmpl_copyright **}© {if $settings.Company.company_start_year && $smarty.const.TIME|date_format:"%Y" != $settings.Company.company_start_year} {$settings.Company.company_start_year} - {/if}
{$smarty.const.TIME|date_format:"%Y"} {$settings.Company.company_name}. {__("powered_by")} {__("copyright_shopping_cart", ["[product]" => $smarty.const.PRODUCT_NAME])}
Modified Version without the 'Powered by CS-Cart' text and hyperlink:
{** block-description:tmpl_modified_copyright **}© {if $settings.Company.company_start_year && $smarty.const.TIME|date_format:"%Y" != $settings.Company.company_start_year} {$settings.Company.company_start_year} - {/if}
{$smarty.const.TIME|date_format:"%Y"} {$settings.Company.company_name}.
You can always add the attribute 'data-no-defer' to your 'script' tags to prevent cs-cart from moving the script tag.
More details here about previous message here
https://docs.cs-cart.com/latest/user_guide/look_and_feel/changing_attributes/script_display.html
You can always add the attribute 'data-no-defer' to your 'script' tags to prevent cs-cart from moving the script tag.
excellent fix, much simpler, especially when it comes to embedding 3rd party scripts.