Countdown

Countdown for Shop-Script

Countdown timer to the upcoming event

How to insert multiple countdown counters on a page?
Answer:
There are two options for displaying the plugin, automatically using the hook and inserting the code into the template.
Automatically, the plugin will be inserted only in the site header with the parameters specified in the plugin settings.
For multiple insertion, you can use the code insert in the template:
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], ID )} where ID is an optional unique identifier, for example 1,2,3,4, ... etc.
Example:
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '1')}
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '2')}
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '3')}

What other parameters of the plugin can I use in the code to insert into the template?
Answer:
In the code to insert, you can use almost all the parameters that are available in the plugin's settings.
Parameters that were not specified in the code to be inserted will be replaced with those used in the plug-in of the plug-in.
The following format is used {shopCountdownPlugin :: show (true, [parameter => value], 'unique identifier')}
Below is a list of all the parameters with their default values (for the plug-in version > = 0.1.0 ):
'auto_init' => 1, {* Automatic initialization (1 or 0) *}
'countdown_date' => '', {* Date and time of the countdown (line: '2099-12-1 00:00:00') *}
'display_year' => 0, {* Display year (1 or 0) *}
'display_month' => 0, {* Display the month (1 or 0) *}
'display_day' => 1, {* Display day (1 or 0) *}
'display_hours' => 1, {* Display hours (1 or 0) *}
'display_minutes' => 1, {* Display minutes (1 or 0) *}
'display_seconds' => 1, {* Display seconds (1 or 0) *}
'timezone' => 'auto', {* Set the time zone offset (auto or number from -12 to +13 *)
'separator' => ':', {* Delimiter between digits (':') *}
'leading_zeros' => 1, {* Add leading zeros to the countdown digits (1 or 0) *}
'countdown_url' => '', {* URL of countdown (URL) *}
'open_url_in_window' => 1, {* Open the URL in a new window (1 or 0) *}
'expiry_text' => '', {* Display text after timeout (line) *}
'expiry_url' => '', {* Go to the URL after the countdown (line) *}
'description' => '', {* The text of the description of the countdown (line) *}
'description_on_top' => 1, {* Displays the description text at the top of the countdown (1 or 0) *}
'text_shadow' => '1px 1px 1px rgba (0,0,0,0,75)', {* Text shadow in CSS format, for title, timer and description text *}
'box_shadow' => '1px 1px 1px 1px rgba (0,0,0,0,2)', {* Background shadow in CSS format *}
'stylesheet' => 'countdown', {* Style (string: 'countdown', or 'separated') *}
'theme' => 'none', {* Subject (string: 'none', 'random', 'default', 'red', 'green', 'blue', 'black', 'digital', 'digital2' , 'Alarm', 'future', 'dark', 'light', 'halloween', 'pattaya', 'time', 'handwriting', 'lobster', 'lobster2', 'lobster3', 'ruslan', ' Football ',' football2',' football3 ',' ubuntu ',' marmelad ',' funny ',' lightgrey ','darkgrey ') *}
'font_family' => 'Roboto Condensed', {* A family of fonts from the Google font list or a custom font name (string: 'Roboto Condensed') *}
'google_fonts' => 1, {* Enable the use of Google fonts (1 or 0) *}
'numbers_font_size' => '8vmin', {* The font size of the digits of the countdown (px, em,%, ex, pt, vmin, vmax, vw, vh) *}
'description_font_size' => '2vmin', {* The font size of the description (px, em,%, ex, pt, vmin, vmax, vw, vh) *}
'timeout_font_size' => '2vmin', {* The font size of the text that is displayed after the expiration of the time (px, em,%, ex, pt, vmin, vmax, vw, vh) *}
'bg_color' => '# bd0a39', {* Background color of the countdown (HEX, for the use of transparency, enter the word "transparent") *}
'bg_radius' => '1vmin', {* Radius of the rounding for the background of the timer (px, em,%, ex, pt, vmin, vmax, vw, vh) *}
'text_color' => '#FFF', {* The color of the countdown digits (HEX) *}
'description_text_color' => '# bd0a39', {* Specify the color of the description text (HEX) *}
'position' => '', {* The identifier, or the class of the element in which to move the countdown container (string: '#id' or '.classname') *}
'text_align' => 'center', {* Alignment of the text of the countdown (line: 'center', 'left', 'right') *}
'wrapper_color' => 'transparent', {* Wrapper color (HEX, for transparency use "transparent") *}
'wrapper_texture' => 'none', {* Texture of the wrapper (string: 'none', 'arabtile', 'argyle', 'asfalt', 'batthern', 'carbon', 'carbon2', 'climatecool', 'connect ',' Dirty ',' dirty ',' dnoise ',' dots', 'dots2', 'dots3', 'fabric', 'fibers',' floral ',' furley ',' gobbler ',' gplay ', 'Graphy', 'gridme', 'inflicted', 'leather', 'leather2', 'linen', 'lyonnette', 'nistri', 'noise', 'padded', 'pattern', 'paven', 'pinstripe',' Plaid ',' px ',' rnd ',' ravenna ',' redox ',' robots', 'rose', 'scales',' shattered ',' smirrored ',' squares', 'squares2', 'Stars','stripes', 'struckaxiom', 'tissue', 'type', 'vichy', 'vlines',' wall', 'wall2 ',' widerectangles', 'wood', 'wood2', 'wood3 ',' Wool ',' woven',' wtiles', 'xcross',' xv ',' zigzag ') *}
'wrapper_radius' => '1vmin', {* Rounding radius for the wrapper (px, em,%, ex, pt, vmin, vmax, vw, vh) *}
'show_captions' => 1, {* Show signatures (1 or 0) *}
'captions_top' => 0, {* Show signatures at the top of the timer (1 or 0) *}
'years_caption' => _wp ('Years'), {* Signature "Years" (line) *}
'months_caption' => _wp ('Months'), {* Signed "Months" (line) *}
'days_caption' => _wp ('Days'), {* Signature "Days" (line) *}
'hours_caption' => _wp ('Hours'), {* Signature "Hours" (line) *}
'minutes_caption' => _wp ('Minutes'), {* Signature "Minutes" (line) *}
'seconds_caption' => _wp ('Seconds'), {* Signature "Second" (line) *}
'captions_font_size' => '2vmin', {* The font size of the signatures (px, em,%, ex, pt, vmin, vmax, vw, vh) *}
'captions_color' => '#ffffff', {* Color of signatures (HEX) *}
'animation' => 'none', {* Animation (string: 'none', 'flipx', 'flipy', 'bounce', 'fade', 'rotate', 'zoom') *}

How can I use the plug-in on the product page?
Answer:
On the product page, the plugin can be added by inserting the code into the product.html template.
Example of use:

{* Display a countdown only for goods with a specific ID *}
{If $ product.id == 1}
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '1')}
{/ If}

{* Using add.Product parameters to display the reverse report *}

{If isset ($ product.params.action_date)}
{shopCountdownPlugin :: show (true, ['countdown_date' => $ product.params.action_date], '1')}
{/ If}

{* Displaying a countdown for only the specified product category *}
{If $ product.category_id == 1}
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '1')}
{/ If}

{* Displaying a countdown on the product page with a specific URL *}
{If $ product.url == ' myurl '}
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '1')}
{/ If}
Where 'myurl' is the identifier from the URL. For example: https://site.com/product/myurl/


How do I add a plugin to a category page?
Answer:
On the category page, the plugin can be added by inserting the code into the category.html template.
Example of use:
{If $ category.id == 1 }
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '1')}
{/ If}
Where 1 is the category ID on the page where you want to display the plugin.

{If $ category.name == 'Test' }
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '1')}
{/ If}
Where 'Test' is the name of the category on the page where you want to display the plugin.

{If $ category.url == 'myurl' }
{shopCountdownPlugin :: show (true, ['countdown_date' => '2099-12-1 00:00:00'], '1')}
{/ If}
Where 'myurl' is the identifier from the URL. For example: https://site.com/category/myurl/

Similarly, as in the case of the goods page, on the category page, there is also the possibility of using an additional. Parameters:
{If isset ($ category.params.action_date)}
{shopCountdownPlugin :: show (true, ['countdown_date' => $ category.params.action_date], '1')}
{/ If}

How do I make a plugin count the time every day?
Answer:
You can use the code in the template, for example:
{$ Target_date = date ("Ymd 23:59:59")}
{shopCountdownPlugin :: show (true, ['countdown_date' => $ target_date])}

How many profiles can I create in the plugin's settings?
Answer:
The number of created profiles is not limited, but for optimization purposes, it is not recommended to use more than 10 profiles.
Unused profiles, it is better to turn off with the appropriate check mark, or delete.

After updating to version 0.1.0, error # 1146 occurs.
Answer:
This version of the plugin is not compatible with previous versions.
Uninstall and reinstall the plugin.

Also, make a reset of the cache in the "Installer" application, after that, check the "Reset default settings" checkbox in the plugin settings and click "Save".