Looking for a way to add notifications at the top of the site. Notifications would relate to being closed on a holiday or shutting down shop earlier than expected one day.
Would also be nice if the user can x-out of them or better yet, schedule them to come on and come off at certain dates.
Does a module exist or can basic CS-Cart functions do this?
Running CS-Cart 4.3.4
I just go to Design, Layout, Default page and add a full width html block. I call it "Site Announcements".
I comment out parts I don't want. Then un-comment when I want it. I modify the announcement for sales, store closing, Black Friday Sale information. The same things you want to do. The user can't x it out, its permanent at the top of each page.
Bob
You could also use our promo banner addon.
Dear 8legstudio,
We have an add-on "Banner's text". Please check it. This addon adds title, text and even a link on the banner on the main page. If you need only notifications, not banners, do not hesitate to contact us. We are happy to help you.
Create HTML block with SMARTY support and use the following condition:
{if $smarty.const.TIME > xxx && $smarty.const.TIME < yyy}
.... NOTIFICATION CONTENT ....
{/if}
where
xxx - start time unix time stamp
yyy - end time unix time stamp
Use the following service to convert time:
http://www.epochconverter.com/
Or another simple way to get start and end times using Ecom's suggestion above:
:
{if $smarty.const.TIME > "12/1/2016"|strtotime && $smarty.const.TIME < "1/1/2017"|strtotime}
.... NOTIFICATION CONTENT ....
{/if}
Just one note. Using just a date without a time will return midnight of that day. For European date formats, use the Euro format with '-' separators instead of '/'.
This just makes it a bit easier to read and maintain.