Footer - Date and Store Name

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 years ago
I use this technique on most of my sites so that when it gets round to the next year I don't have to go round updating the year in my copyright notice. Likewise, in the case of nopcommerce, better to retrieve the store name from the database than hard coding on the page:

Changed /Modules/Footer.ascx:


from:


            <td>
                <div class="copyright">
                    Copyright &copy; 2008 yourstore.com<br />
                    All Rights Reserved<br />
                    Powered by <a href="https://www.nopcommerce.com/">nopCommerce</a></div>
            </td>

to:


            <td>
                <div class="copyright">
                    Copyright &copy; <%=DateTime.Now.Year.ToString()%> <%= SettingManager.GetSettingValue("Common.StoreName")%><br />
                    All Rights Reserved<br />
                    Powered by <a href="https://www.nopcommerce.com/">nopCommerce</a></div>
            </td>

Reason:
Saves needing to update every year and reads store name from db rather than hard coding on page.

--------------------------------------------------------------------------------------------------------------

Regards,
Ben
15 years ago
Thanks, Ben!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.