first commit

This commit is contained in:
2024-10-28 22:14:22 +01:00
commit b65352c452
40581 changed files with 5712079 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
drwxr-xr-x 7 30094 users 14 Oct 6 10:16 .
drwxr-xr-x 115 30094 users 117 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 17685 Aug 31 2021 LICENSE.txt
-rw-r--r-- 1 30094 users 384 Aug 31 2021 Readme.md
drwxr-xr-x 2 30094 users 3 Oct 6 10:16 classes
-rw-r--r-- 1 30094 users 531 Aug 31 2021 config.xml
-rw-rw-r-- 1 30094 users 531 Aug 31 2021 config_pl.xml
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 controllers
-rw-r--r-- 1 30094 users 874 Aug 31 2021 index.php
-rw-r--r-- 1 30094 users 37447 Aug 31 2021 jxdaydeal.php
-rw-r--r-- 1 30094 users 18412 Aug 31 2021 logo.png
drwxr-xr-x 2 30094 users 5 Oct 6 10:16 sql
drwxr-xr-x 2 30094 users 9 Oct 6 10:16 translations
drwxr-xr-x 6 30094 users 7 Oct 6 10:16 views

View File

@@ -0,0 +1,124 @@
The GNU General Public License (GPL-2.0)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
One line to give the program's name and a brief idea of what it does.
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.

View File

@@ -0,0 +1,7 @@
# JX Deal of Day
v 1.2.3 - added token to instant product search in admin panel
v 1.2.2 - added creation message in a back-end
v 1.2.1 - fixed an issue with special product's new label assigning
v 1.2.0 - reworked method of products selecting in order to avoid crashing when store has a lot of products (10000+)
v 1.0.1 - fixed issue when counters disappear after ajax page reloading

View File

@@ -0,0 +1,3 @@
drwxr-xr-x 2 30094 users 3 Oct 6 10:16 .
drwxr-xr-x 7 30094 users 14 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 8578 Aug 31 2021 DayDeal.php

View File

@@ -0,0 +1,282 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class DayDeal extends ObjectModel
{
/** @var int default shop id */
public $id_shop;
/** @var int default tab id */
public $id_tab;
/** @var int default product id */
public $id_product;
/** @var int default specific price id */
public $id_specific_price;
/** @var string Object start date */
public $data_start;
/** @var string Object end date */
public $data_end;
/** @var string label */
public $label;
/** @var bool Status for display */
public $status;
/** @var float*/
public $discount_price;
/** @var string*/
public $reduction_type;
/** @var int*/
public $reduction_tax;
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'jxdaydeal',
'primary' => 'id_tab',
'multilang' => true,
'fields' => array(
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'size' => 128),
'id_shop' => array('type' => self::TYPE_INT, 'required' => true, 'validate' => 'isunsignedInt'),
'id_specific_price' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'size' => 128),
'data_start' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'data_end' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'status' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'label' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128),
'discount_price' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat', 'required' => true),
'reduction_type' => array('type' => self::TYPE_STRING, 'validate' => 'isReductionType', 'required' => true),
'reduction_tax' => array('type' => self::TYPE_INT, 'validate' => 'isBool', 'required' => true),
),
);
/**
* Get list with product id
* return bool $result if invalid or false
*/
public static function getProductsListIds()
{
$result = '';
$sql = 'SELECT p.`id_product`
FROM '._DB_PREFIX_.'product p
LEFT JOIN '._DB_PREFIX_.'product_shop ps
ON(p.`id_product` = ps.`id_product`)
WHERE ps.`id_shop` = '.(int)Context::getContext()->shop->id;
if (!$result = Db::getInstance()->executeS($sql)) {
return false;
}
return $result;
}
/**
* Get list with product id
* return bool $result if invalid or false
*/
public static function getProductsSpecificPrice($id_product)
{
$result = '';
$sql = 'SELECT sp.*
FROM '._DB_PREFIX_.'specific_price sp
WHERE `id_product` = '.(int)$id_product.'
AND sp.`id_shop` = '.(int)Context::getContext()->shop->id;
if (!$result = Db::getInstance()->executeS($sql)) {
return false;
}
return $result;
}
/**
* Get list with product id
* return bool $result if invalid or false
*/
public static function getProductsBySpecificPrice($id_product)
{
$result = '';
$sql = 'SELECT sp.*
FROM '._DB_PREFIX_.'specific_price sp
WHERE `id_product` = '.(int)$id_product.'
AND (sp.`id_shop` = '.(int)Context::getContext()->shop->id.' OR sp.`id_shop` = 0)
AND sp.`from` > 0 ';
if (!$result = Db::getInstance()->executeS($sql)) {
return false;
}
return $result;
}
/**
* Get products and info
*
* @param bool $id_product
* @return array $data
*/
public static function getDayDealProductsData($id_product)
{
$data = array();
$now = date('Y-m-d H:i:00');
$sql = 'SELECT tdd.*, tddl.`label`
FROM '._DB_PREFIX_.'jxdaydeal tdd
LEFT JOIN '._DB_PREFIX_.'jxdaydeal_lang tddl
ON(tdd.`id_tab` = tddl.`id_tab`)
JOIN '._DB_PREFIX_.'specific_price sp
ON(sp.`id_specific_price` = tdd.`id_specific_price`)
WHERE tdd.`id_product` = '.(int)$id_product.'
AND tdd.`id_shop` = '.(int)Context::getContext()->shop->id.'
AND tddl.`id_lang` = '.(int)Context::getContext()->language->id.'
AND tdd.`status` = 1
AND tdd.`data_end` >= \''.$now.'\'
AND tdd.`data_start` <= \''.$now.'\'
ORDER BY tdd.`id_tab`';
if (!$result = Db::getInstance()->executeS($sql)) {
return false;
}
foreach ($result as $res) {
$data['label'] = $res['label'];
$data['data_start'] = $res['data_start'];
$data['data_end'] = $res['data_end'];
$data['reduction_type'] = $res['reduction_type'];
$data['discount_price'] = $res['discount_price'];
}
return $data;
}
/**
* Get all active products data for list table
*
* @return array $result
*/
public static function getTabList()
{
$sql = 'SELECT tdd.*, pl.`name`, tddl.`label`
FROM '._DB_PREFIX_.'jxdaydeal tdd
LEFT JOIN '._DB_PREFIX_.'product_lang pl
ON(tdd.`id_product` = pl.`id_product`)
LEFT JOIN '._DB_PREFIX_.'jxdaydeal_lang tddl
ON(tdd.`id_tab` = tddl.`id_tab`)
LEFT JOIN `'._DB_PREFIX_.'product_shop` ps
ON (tdd.`id_product` = ps.`id_product`)
JOIN '._DB_PREFIX_.'specific_price sp
ON(sp.`id_specific_price` = tdd.`id_specific_price`)
WHERE tdd.`id_shop` = '.(int)Context::getContext()->shop->id.'
AND ps.`id_shop` = '.(int)Context::getContext()->shop->id.'
AND pl.`id_shop` = '.(int)Context::getContext()->shop->id.'
AND pl.`id_lang` = '.(int)Context::getContext()->language->id.'
AND tddl.`id_lang` = '.(int)Context::getContext()->language->id.'
ORDER BY tdd.`id_tab`';
if (!$result = Db::getInstance()->executeS($sql)) {
return false;
}
return $result;
}
/**
* Get all active products data
*
* @return array $result
*/
public static function getDayDealProducts()
{
$now = date('Y-m-d H:i:00');
$nbr = (int)Configuration::get('JX_DEAL_DAY_NB');
$ramdom = (int)Configuration::get('JX_DEAL_DAY_RANDOM');
if ($ramdom == 0) {
$ramdom_item = 'tdd.`id_tab`';
} else {
$ramdom_item = 'RAND()';
}
$sql = 'SELECT tdd.*
FROM '._DB_PREFIX_.'jxdaydeal tdd
INNER JOIN '._DB_PREFIX_.'product_shop ps
ON(ps.`id_product` = tdd.`id_product`)
JOIN '._DB_PREFIX_.'specific_price sp
ON(sp.`id_specific_price` = tdd.`id_specific_price`)
WHERE tdd.`id_shop` = '.(int)Context::getContext()->shop->id.'
AND ps.`id_shop` = '.(int)Context::getContext()->shop->id.'
AND tdd.`status` = 1
AND ps.`active` = 1
AND tdd.`data_end` >= \''.$now.'\'
AND tdd.`data_start` <= \''.$now.'\'
ORDER BY '.$ramdom_item.' LIMIT '.$nbr.'';
if (!$result = Db::getInstance()->executeS($sql)) {
return false;
}
return $result;
}
/**
* Get all product with specific price
*
* @param int $id_specific_price
* @return bool|array false or items
*/
public static function checkEntity($id_specific_price)
{
$sql = 'SELECT `id_product`
FROM '._DB_PREFIX_.'jxdaydeal
WHERE `id_specific_price` = '.(int)$id_specific_price;
return Db::getInstance()->getValue($sql);
}
/**
* Get all items from DB by product id and shop id
*
* @param int $id_product
* @param int $id_shop
* @return bool|array false or items
*/
public static function getItemsByProductId($id_product, $id_shop)
{
$sql = 'SELECT * FROM `'._DB_PREFIX_.'jxdaydeal`
WHERE `id_product` = '.(int)$id_product.'
AND `id_shop` = '.(int)$id_shop;
if (!$result = Db::getInstance()->executeS($sql)) {
return false;
}
return $result;
}
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>jxdaydeal</name>
<displayName><![CDATA[JX Deal of the day]]></displayName>
<version><![CDATA[1.2.3]]></version>
<description><![CDATA[The deal of the day module shows the daily deals with time counter on your products.]]></description>
<author><![CDATA[Zemez (Sergiy Sakun)]]></author>
<tab><![CDATA[administration]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>jxdaydeal</name>
<displayName><![CDATA[JX Deal of the day]]></displayName>
<version><![CDATA[1.2.3]]></version>
<description><![CDATA[The deal of the day module shows the daily deals with time counter on your products.]]></description>
<author><![CDATA[Zemez (Sergiy Sakun)]]></author>
<tab><![CDATA[administration]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,3 @@
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 .
drwxr-xr-x 7 30094 users 14 Oct 6 10:16 ..
drwxr-xr-x 2 30094 users 3 Oct 6 10:16 admin

View File

@@ -0,0 +1,3 @@
drwxr-xr-x 2 30094 users 3 Oct 6 10:16 .
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 2213 Aug 31 2021 AdminJXDayDealProducts.php

View File

@@ -0,0 +1,67 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
class AdminJXDayDealProductsController extends ModuleAdminController
{
public $specificprice = '';
/**
* Get information about products when the product has specific price
* @return array $data
*/
public function ajaxProcessGetProductsSpecificPrice()
{
$data = array();
$product_id = Tools::getValue('productId');
$specificprice_list = DayDeal::getProductsBySpecificPrice($product_id);
if (!count($specificprice_list)) {
die(Tools::jsonEncode(array('status' => false)));
}
foreach ($specificprice_list as $key => $specificprice) {
$data[$key]['id_specific_price'] = $specificprice['id_specific_price'];
$data[$key]['from'] = $specificprice['from'];
$data[$key]['to'] = $specificprice['to'];
$data[$key]['reduction_type'] = $specificprice['reduction_type'];
if ($data[$key]['reduction_type'] != 'amount') {
$data[$key]['reduction_type'] = '%';
} else {
$data[$key]['reduction_type'] = 'amount';
}
if ($specificprice['reduction_type'] != 'amount') {
$data[$key]['reduction'] = round($specificprice['reduction'] * 100);
} else {
$data[$key]['reduction'] = round($specificprice['reduction']);
}
$data[$key]['reduction_tax'] = $specificprice['reduction_tax'];
$data[$key]['status'] = DayDeal::checkEntity($data[$key]['id_specific_price']);
}
die(Tools::jsonEncode(array('status' => true, 'data' => $data)));
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,979 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
if (!defined('_PS_VERSION_')) {
exit;
}
use PrestaShop\PrestaShop\Adapter\Image\ImageRetriever;
use PrestaShop\PrestaShop\Adapter\Product\PriceFormatter;
use PrestaShop\PrestaShop\Core\Product\ProductListingPresenter;
use PrestaShop\PrestaShop\Adapter\Product\ProductColorsRetriever;
include_once(_PS_MODULE_DIR_.'jxdaydeal/classes/DayDeal.php');
class Jxdaydeal extends Module
{
public function __construct()
{
$this->name = 'jxdaydeal';
$this->tab = 'administration';
$this->version = '1.2.3';
$this->author = 'Zemez (Sergiy Sakun)';
$this->need_instance = 0;
$this->lang = true;
$this->module_key = 'e9338bceb8ef0cebd52fa0db917a0927';
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('JX Deal of the day');
$this->description = $this->l('The deal of the day module shows the daily deals with time counter on your products.');
$this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
}
public function install()
{
include(dirname(__FILE__).'/sql/install.php');
return parent::install() &&
$this->registerHook('header') &&
$this->registerHook('backOfficeHeader') &&
$this->registerHook('displayHome') &&
$this->registerHook('displayProductPriceBlock') &&
$this->registerHook('actionProductDelete') &&
$this->registerHook('displayBeforeBodyClosingTag') &&
Configuration::updateValue('JX_DEAL_DAY_NB', 4) &&
Configuration::updateValue('JX_DEAL_DAY_RANDOM', false) &&
$this->createAjaxController();
}
public function uninstall()
{
include(dirname(__FILE__).'/sql/uninstall.php');
Configuration::deleteByName('JX_DEAL_DAY_NB') &&
Configuration::deleteByName('JX_DEAL_DAY_RANDOM') &&
$this->removeAjaxContoller();
return parent::uninstall();
}
public function createAjaxController()
{
$tab = new Tab();
$tab->active = 1;
$languages = Language::getLanguages(false);
if (is_array($languages)) {
foreach ($languages as $language) {
$tab->name[$language['id_lang']] = 'jxdaydeal';
}
}
$tab->class_name = 'AdminJXDayDealProducts';
$tab->module = $this->name;
$tab->id_parent = - 1;
return (bool)$tab->add();
}
private function removeAjaxContoller()
{
if ($tab_id = (int)Tab::getIdFromClassName('AdminJXDayDealProducts')) {
$tab = new Tab($tab_id);
$tab->delete();
}
return true;
}
/**
* Load the configuration form
*/
public function getContent()
{
$output = '';
$checker = false;
if (Shop::getContext() == Shop::CONTEXT_GROUP || Shop::getContext() == Shop::CONTEXT_ALL) {
return $this->displayError($this->l('You cannot add/edit elements from \"All Shops\" or \"Group Shop\".'));
} else {
if ((bool)Tools::isSubmit('submitJxdaydealModule')) {
if (!$result = $this->preValidateForm()) {
$notice = 3;
if (Tools::getValue('id_tab')) {
$notice = 4;
}
$output .= $this->addTab();
Tools::redirectAdmin($this->context->link->getAdminLink('AdminModules', true).'&configure='.$this->name.'&conf='.$notice);
} else {
$checker = true;
$output = $result;
}
}
if ((bool)Tools::isSubmit('deletejxdaydeal')) {
$output .= $this->deleteTab();
}
if ((bool)Tools::isSubmit('statusjxdaydeal')) {
$output .= $this->updateStatusTab();
}
if ((bool)Tools::isSubmit('submitSettingsForm')) {
if (!$errors = $this->checkTabFields()) {
$output .= $this->updateSettingsFieldsValues();
$output = $this->displayConfirmation($this->l('Settings are saved'));
} else {
$output = $errors;
$checker = true;
$output .= $this->renderSettingsForm();
}
}
if (Tools::getIsset('updatejxdaydeal') || Tools::getValue('updatejxdaydeal')) {
if ($this->context->shop->id != Tools::getValue('id_shop')) {
$link_redirect = $this->context->link->getAdminLink('AdminModules', true).'&configure='.$this->name;
Tools::redirectAdmin($link_redirect);
} else {
$output .= $this->renderForm();
}
} elseif ((bool)Tools::isSubmit('addjxdaydeal')) {
$output .= $this->renderForm();
} elseif ((bool)Tools::isSubmit('updateSettings')) {
$output .= $this->renderSettingsForm();
} elseif (!$checker) {
if (!$this->getWarningMultishop()) {
$output .= $this->renderTabList();
$output .= $this->renderConfigButtons();
} else {
$output .= $this->getWarningMultishop();
}
}
}
return $output;
}
protected function renderConfigButtons()
{
$fields_form = array(
'form' => array(
'buttons' => array(
array(
'class' => 'btn btn-default pull-right',
'icon' => 'process-icon-cogs',
'title' => $this->l('Settings'),
'type' => 'submit',
'name' => 'updateSettings',
),
),
)
);
$helper = new HelperForm();
$helper->show_toolbar = true;
$helper->table = $this->table;
$helper->module = $this;
$helper->default_form_language = $this->context->language->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);
$helper->identifier = $this->identifier;
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array(
'fields_value' => $this->getConfigFormValues(),
'languages' => $this->context->controller->getLanguages(),
'id_language' => $this->context->language->id,
);
return $helper->generateForm(array($fields_form));
}
/**
* Create the form that will be displayed in the configuration of your module.
*/
protected function renderForm()
{
$fields_form = array(
'form' => array(
'legend' => array(
'title' => $this->l('Add item'),
'icon' => 'icon-cogs',
),
'input' => array(
array(
'type' => 'custom_autocomplete',
'name' => 'id_product',
'label' => $this->l('Select a product'),
'id' => 'products'
),
array(
'type' => 'switch',
'label' => $this->l('Status'),
'name' => 'status',
'is_bool' => true,
'values' => array(
array(
'id' => 'active_on',
'value' => true,
'label' => $this->l('Enabled')
),
array(
'id' => 'active_off',
'value' => false,
'label' => $this->l('Disabled')
)
)
),
array(
'type' => 'datetime',
'label' => $this->l('Start Date'),
'name' => 'data_start',
'col' => 6,
'required' => true
),
array(
'type' => 'datetime',
'label' => $this->l('End Date'),
'name' => 'data_end',
'col' => 6,
'required' => true
),
array(
'type' => 'text',
'label' => $this->l('Label'),
'col' => 2,
'name' => 'label',
'lang' => true,
'hint' => $this->l('Invalid characters:').' 0-9!&amp;lt;&amp;gt;,;?=+()@#"<22>{}_$%:'
),
array(
'type' => 'text',
'label' => $this->l('Discount price'),
'col' => 2,
'required' => true,
'name' => 'discount_price',
),
array(
'type' => 'select',
'name' => 'reduction_type',
'options' => array(
'id' => 'id_option',
'name' => 'name',
'query' => array(
array(
'id_option' => 'amount',
'name' => 'amount'
),
array(
'id_option' => 'percentage',
'name' => '%'
),
)
)
),
array(
'type' => 'select',
'name' => 'reduction_tax',
'options' => array(
'id' => 'id_option',
'name' => 'name',
'query' => array(
array(
'id_option' => 0,
'name' => 'Tax excluded'
),
array(
'id_option' => 1,
'name' => 'Tax included'
),
)
)
),
array(
'type' => 'block_specific',
'name' => 'block_specific',
),
),
'submit' => array(
'title' => $this->l('Save'),
),
'buttons' => array(
array(
'href' => AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'),
'title' => $this->l('Back to list'),
'icon' => 'process-icon-back'
)
)
),
);
if ((bool)Tools::getIsset('updatejxdaydeal') && (int)Tools::getValue('id_tab') > 0) {
$tab = new DayDeal((int)Tools::getValue('id_tab'));
$fields_form['form']['input'][] = array(
'type' => 'hidden',
'name' => 'id_tab',
'value' => (int)$tab->id);
$fields_form['form']['input'][] = array(
'type' => 'hidden',
'name' => 'id_specific_price',
'value' => $tab->id_specific_price
);
}
$this->displayJXDayDealWarning();
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->table = $this->table;
$helper->module = $this;
$helper->default_form_language = $this->context->language->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);
$helper->identifier = $this->identifier;
$helper->submit_action = 'submitJxdaydealModule';
if (Tools::isSubmit('submitJxdaydealModule')) {
if ($this->preValidateForm()) {
if (Tools::getValue('id_tab')) {
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name.'&updatejxdaydeal&id_shop='.(int)$this->context->shop->id.'&id_tab='.Tools::getValue('id_tab');
} else {
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name.'&addjxdaydeal&id_shop='.(int)$this->context->shop->id;
}
} else {
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
}
} else {
if ($this->preValidateForm()) {
if (Tools::getValue('id_tab')) {
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name.'&updatejxdaydeal&id_shop='.(int)$this->context->shop->id.'&id_tab='.Tools::getValue('id_tab');
} else {
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name.'&addjxdaydeal&id_shop='.(int)$this->context->shop->id;
}
} else {
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
}
}
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array(
'fields_value' => $this->getConfigFormValues(),
'languages' => $this->context->controller->getLanguages(),
'id_language' => $this->context->language->id,
'theme_url' => $this->context->link->getAdminLink('AdminJXDayDealProducts')
);
Media::addJsDef(array('theme_url' => $this->context->link->getAdminLink('AdminJXDayDealProducts')));
return $helper->generateForm(array($fields_form));
}
/**
* Set values for the tabs.
* @return array $fields_values
*/
protected function getConfigFormValues()
{
if ((bool)Tools::getIsset('updatejxdaydeal') && (int)Tools::getValue('id_tab') > 0) {
$tab = new DayDeal((int)Tools::getValue('id_tab'));
} else {
$tab = new DayDeal();
}
$fields_values = array(
'id_tab' => Tools::getValue('id_tab'),
'id_specific_price' => Tools::getValue('id_specific_price', $tab->id_specific_price),
'id_product' => Tools::getValue('id_product', $tab->id_product),
'data_start' => Tools::getValue('data_start', $tab->data_start),
'data_end' => Tools::getValue('data_end', $tab->data_end),
'status' => Tools::getValue('status', $tab->status),
'label' => Tools::getValue('label', $tab->label),
'discount_price' => Tools::getValue('discount_price', $tab->discount_price),
'reduction_type' => Tools::getValue('reduction_type', $tab->reduction_type),
'reduction_tax' => Tools::getValue('reduction_tax', $tab->reduction_tax)
);
return $fields_values;
}
/**
* Create warning of select product in form.
* @return array $data
*/
public function displayJXDayDealWarning()
{
$data = array();
if (Tools::getIsset('updatejxdaydeal')) {
$tab = new DayDeal((int)Tools::getValue('id_tab'));
$specificprice_list = DayDeal::getProductsBySpecificPrice($tab->id_product);
if (is_array($specificprice_list)) {
foreach ($specificprice_list as $key => $specificprice) {
$data[$key]['id_specific_price'] = $specificprice['id_specific_price'];
$data[$key]['reduction_type'] = $specificprice['reduction_type'];
if ($data[$key]['reduction_type'] != 'amount') {
$data[$key]['reduction_type'] = '%';
} else {
$data[$key]['reduction_type'] = 'amount';
}
if ($specificprice['reduction_type'] != 'amount') {
$data[$key]['reduction'] = round($specificprice['reduction'] * 100);
} else {
$data[$key]['reduction'] = round($specificprice['reduction']);
}
$data[$key]['from'] = $specificprice['from'];
$data[$key]['to'] = $specificprice['to'];
$data[$key]['reduction_tax'] = $specificprice['reduction_tax'];
$data[$key]['status'] = DayDeal::checkEntity($data[$key]['id_specific_price']);
}
}
}
$this->context->smarty->assign('specific_prices_data', $data);
return $data;
}
/**
* Create the structure of your form.
* @param bool $tab
* @return array $tabs and $fields_list
*/
public function renderTabList($tab = false)
{
if (!$tabs = DayDeal::getTabList($tab)) {
$tabs = array();
}
$fields_list = array(
'id_tab' => array(
'title' => $this->l('Id'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'id_specific_price' => array(
'title' => $this->l('Specific price id'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'id_product' => array(
'title' => $this->l('Product id'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'name' => array(
'title' => $this->l('Product name'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'data_start' => array(
'title' => $this->l('Start Data'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'data_end' => array(
'title' => $this->l('End Data'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'label' => array(
'title' => $this->l('Label'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'discount_price' => array(
'title' => $this->l('Discount price'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'reduction_type' => array(
'title' => $this->l('Reduction type'),
'type' => 'text',
'search' => false,
'orderby' => false,
),
'status' => array(
'title' => $this->l('Status'),
'type' => 'bool',
'active' => 'status',
'search' => false,
'orderby' => false,
),
);
$helper = new HelperList();
$helper->shopLinkType = '';
$helper->simple_header = false;
$helper->identifier = 'id_tab';
$helper->table = $this->name;
$helper->actions = array('edit', 'delete');
$helper->show_toolbar = true;
$helper->module = $this;
$helper->title = $this->displayName;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->toolbar_btn['new'] = array(
'href' => AdminController::$currentIndex
.'&configure='.$this->name.'&add'.$this->name
.'&token='.Tools::getAdminTokenLite('AdminModules'),
'desc' => $this->l('Add new')
);
$helper->currentIndex = AdminController::$currentIndex
.'&configure='.$this->name.'&id_shop='.(int)$this->context->shop->id;
return $helper->generateList($tabs, $fields_list);
}
public function renderSettingsForm()
{
$fields_form = array(
'form' => array(
'legend' => array(
'title' => $this->l('Settings'),
'icon' => 'icon-cogs'
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Products to display'),
'name' => 'JX_DEAL_DAY_NB',
'class' => 'fixed-width-xs',
'desc' => 'Define the number of products to be displayed in this block on home page.'
),
array(
'type' => 'switch',
'label' => $this->l('Random products'),
'name' => 'JX_DEAL_DAY_RANDOM',
'desc' => 'Enable if you wish the products to be displayed randomly (default: no).',
'values' => array(
array(
'id' => 'active_on',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'active_off',
'value' => 0,
'label' => $this->l('Disabled')
)
),
),
),
'submit' => array(
'title' => $this->l('Save'),
)
),
);
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->table = $this->table;
$lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
$helper->default_form_language = $lang->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);
$helper->identifier = $this->identifier;
$helper->submit_action = 'submitSettingsForm';
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array(
'fields_value' => $this->getSettingsFieldsValues(),
'languages' => $this->context->controller->getLanguages(),
'id_language' => $this->context->language->id
);
return $helper->generateForm(array($fields_form));
}
protected function getSettingsFieldsValues()
{
return array(
'JX_DEAL_DAY_NB' => Tools::getValue('JX_DEAL_DAY_NB', Configuration::get('JX_DEAL_DAY_NB')),
'JX_DEAL_DAY_RANDOM' => Tools::getValue('JX_DEAL_DAY_RANDOM', Configuration::get('JX_DEAL_DAY_RANDOM'))
);
}
protected function updateSettingsFieldsValues()
{
$form_values = $this->getSettingsFieldsValues();
foreach (array_keys($form_values) as $key) {
Configuration::updateValue($key, Tools::getValue($key));
}
}
private function getProductId()
{
return str_replace('-', '', Tools::getValue('id_product'));
}
/**
* Add tab
*/
protected function addElement()
{
if ((int)Tools::getValue('id_tab') > 0) {
$tab = new DayDeal((int)Tools::getValue('id_tab'));
$specificPrice = new SpecificPrice($tab->id_specific_price);
} else {
$tab = new DayDeal();
$specificPrice = new SpecificPrice();
}
$tab->id_product = $this->getProductId();
$tab->id_shop = Context::getContext()->shop->id;
$tab->data_start = Tools::getValue('data_start');
$tab->data_end = Tools::getValue('data_end');
$tab->status = (int)Tools::getValue('status');
$tab->discount_price = Tools::getValue('discount_price');
$tab->reduction_type = Tools::getValue('reduction_type');
$tab->reduction_tax = Tools::getValue('reduction_tax');
foreach (Language::getLanguages(false) as $lang) {
$tab->label[$lang['id_lang']] = Tools::getValue('label_'.$lang['id_lang']);
}
$specificPrice->id_product = $this->getProductId();
$specificPrice->id_shop = $this->context->shop->id;
$specificPrice->id_currency = 0;
$specificPrice->id_country = 0;
$specificPrice->id_group = 0;
$specificPrice->id_customer = 0;
$specificPrice->from_quantity = 1;
$specificPrice->price = -1;
$specificPrice->reduction_type = Tools::getValue('reduction_type');
if ($tab->reduction_type != 'amount') {
$specificPrice->reduction = Tools::getValue('discount_price') / 100;
} else {
$specificPrice->reduction = Tools::getValue('discount_price');
}
$specificPrice->reduction_tax = Tools::getValue('reduction_tax');
$specificPrice->from = Tools::getValue('data_start');
$specificPrice->to = Tools::getValue('data_end');
if (!Tools::getValue('id_tab')) {
if (!$specificPrice->add()) {
return $this->displayError($this->l('The specific price could not be added.'));
} else {
$tab->id_specific_price = $specificPrice->id;
}
} else {
if (!$specificPrice->update()) {
return $this->displayError($this->l('The specific price could not be updated.'));
} else {
$tab->id_specific_price = Tools::getValue('id_specific_price');
}
}
if (!Tools::getValue('id_tab')) {
if (!$tab->add()) {
return $this->displayError($this->l('The tab could not be added.'));
}
} elseif (!$tab->update()) {
return $this->displayError($this->l('The tab could not be updated.'));
}
}
/**
* Add tab if has specific price
*/
protected function addMarker()
{
$tab = new DayDeal((int)Tools::getValue('id_tab'));
$specificPrice = new SpecificPrice(Tools::getValue('specific_price_old'));
$tab->id_product = $specificPrice->id_product;
$tab->id_shop = $this->context->shop->id;
$tab->id_specific_price = Tools::getValue('specific_price_old');
$tab->data_start = $specificPrice->from;
$tab->data_end = $specificPrice->to;
$tab->reduction_type = $specificPrice->reduction_type;
$tab->reduction_tax = $specificPrice->reduction_tax;
if ($tab->reduction_type != 'amount') {
$tab->discount_price = $specificPrice->reduction * 100;
} else {
$tab->discount_price = $specificPrice->reduction;
}
if ((int)Tools::getValue('id_tab') > 0) {
if (!$tab->update()) {
return $this->displayError($this->l('The tab could not be added.'));
}
} else {
if (!$tab->add()) {
return $this->displayError($this->l('The tab could not be updated.'));
}
}
}
/**
* Add tab
*/
protected function addTab()
{
if (!Tools::getValue('specific_price_old')) {
$this->addElement();
return $this->displayConfirmation($this->l('The tab is saved.'));
} else {
$this->addMarker();
return $this->displayConfirmation($this->l('The tab is saved.'));
}
}
/**
* Delete tab
*/
protected function deleteTab()
{
$tab = new DayDeal(Tools::getValue('id_tab'));
$specific_price = new SpecificPrice($tab->id_specific_price);
$specific_price->delete();
$res = $tab->delete();
if (!$res) {
return $this->displayError($this->l('Error occurred when deleting the tab'));
}
return $this->displayConfirmation($this->l('The tab is successfully deleted'));
}
/**
* Delete tab
*
* @param int $id_product
* @param int $id_shop
*/
public static function deleteItemsByProductId($id_product, $id_shop)
{
if ($tabs = DayDeal::getItemsByProductId($id_product, $id_shop)) {
foreach ($tabs as $value) {
$tab = new DayDeal($value['id_tab']);
$tab->delete();
}
}
}
/**
* Update status tab
*/
protected function updateStatusTab()
{
$tab = new DayDeal(Tools::getValue('id_tab'));
if ($tab->status == 1) {
$tab->status = 0;
} else {
$tab->status = 1;
}
if (!$tab->update()) {
return $this->displayError($this->l('The tab status could not be updated.'));
}
return $this->displayConfirmation($this->l('The tab status is successfully updated.'));
}
/**
* Display Warning.
* return alert with warning multishop
*/
private function getWarningMultishop()
{
if (Shop::getContext() == Shop::CONTEXT_GROUP || Shop::getContext() == Shop::CONTEXT_ALL) {
return '<p class="alert alert-warning">'.
$this->l('You cannot manage this module settings from "All Shops" or "Group Shop" context,
select the store you want to edit').
'</p>';
} else {
return '';
}
}
/**
* Check for item fields validity
* @return array $errors if invalid or false
*/
protected function preValidateForm()
{
$errors = array();
$data = array();
$specificprice = null;
$from = Tools::getValue('data_start');
$to = Tools::getValue('data_end');
$discount_price = Tools::getValue('discount_price');
$specificprice_list = DayDeal::getProductsSpecificPrice($this->getProductId());
if (!$this->getProductId() || !Validate::isInt($this->getProductId())) {
$errors[] = $this->l('No one product was selected, please select product');
}
if (is_array($specificprice_list)) {
foreach ($specificprice_list as $specificprice) {
$data['to'] = $specificprice['to'];
$data['from'] = $specificprice['from'];
}
}
if (!Tools::getValue('specific_price_old')) {
if (!Tools::getValue('id_tab')) {
if (strtotime($from) == true || strtotime($to) == true) {
if (strtotime($specificprice['to']) >= strtotime($to) || strtotime($from) < strtotime($specificprice['to'])) {
$errors[] = $this->l('Invalid date range, this period has specific price');
}
}
}
if (!Validate::isDate($to) || !Validate::isDate($from)) {
$errors[] = $this->l('Invalid date field');
} elseif (strtotime($to) <= strtotime($from)) {
$errors[] = $this->l('Invalid date range');
}
if (!Validate::isPrice($discount_price)) {
$errors[] = $this->l('Invalid price field');
}
foreach (Language::getLanguages(false) as $lang) {
if (!Validate::isName(Tools::getValue('label_'.$lang['id_lang']))) {
$errors[] = sprintf($this->l('Name is invalid: %s'), $lang['iso_code']);
}
}
}
if (count($errors)) {
return $this->displayError(implode('<br />', $errors));
}
return false;
}
/**
* Check for item fields settings form
* @return array $errors if invalid or false
*/
protected function checkTabFields()
{
$errors = array();
$nbr = Tools::getValue('JX_DEAL_DAY_NB');
if (!Validate::isInt($nbr) || $nbr <= 0) {
$errors[] = $this->l('The number of products is invalid. Please enter a positive number.');
}
if (count($errors)) {
return $this->displayError(implode('<br />', $errors));
}
return false;
}
public function hookBackOfficeHeader()
{
if (Tools::getValue('configure') == $this->name && (Tools::getIsset('addjxdaydeal') || Tools::getIsset('updatejxdaydeal'))) {
$this->context->controller->addJquery();
Media::addJsDef(
array(
'product_token' => Tools::getAdminToken('AdminProducts'.(int)Tab::getIdFromClassName('AdminProducts').(int)$this->context->employee->id)
)
);
$this->context->controller->addJS($this->_path.'views/js/jxdaydeal_admin.js');
$this->context->controller->addCSS($this->_path.'views/css/jxdaydeal_admin.css');
}
}
/**
* Add the CSS & JavaScript files you want to be added on the FO.
*/
public function hookHeader()
{
$this->context->controller->addJS($this->_path.'/views/js/jquery.countdown.js');
$this->context->controller->addJS($this->_path.'/views/js/jxdaydeal.js');
$this->context->controller->addCSS($this->_path.'/views/css/jxdaydeal.css');
}
/**
* Returns module content for home page
*/
public function hookDisplayHome()
{
$products = array();
$products_extra = array();
$products_data = DayDeal::getDayDealProducts();
if (is_array($products_data)) {
foreach ($products_data as $key => $slide) {
$image = new Image();
$product = (new ProductAssembler($this->context))->assembleProduct(array('id_product' => $slide['id_product']));
$presenterFactory = new ProductPresenterFactory($this->context);
$presentationSettings = $presenterFactory->getPresentationSettings();
$presenter = new ProductListingPresenter(new ImageRetriever($this->context->link), $this->context->link, new PriceFormatter(), new ProductColorsRetriever(), $this->context->getTranslator());
$products[$key]['info'] = $presenter->present($presentationSettings, $product, $this->context->language);
$products[$key]['image'] = $image->getCover($slide['id_product']);
$products_extra[$product['id_product']] = DayDeal::getDayDealProductsData((int)$slide['id_product']);
}
}
$this->context->smarty->assign(
array(
'daydeal_products' => $products,
'daydeal_products_extra' => $products_extra
)
);
return $this->display(__FILE__, 'jxdaydeal-home.tpl');
}
public function hookdisplayProductPriceBlock($params)
{
$id_product = '';
if ($params['type'] != 'old_price') {
return;
}
if (isset($params['product']->id) && $params['product']->id) {
$id_product = $params['product']->id;
} elseif (isset($params['product']['id_product']) && $params['product']['id_product']) {
$id_product = $params['product']['id_product'];
}
$products_extra = DayDeal::getDayDealProductsData($id_product);
$this->context->smarty->assign(
array(
'daydeal_products_extra' => $products_extra
)
);
return $this->display(__FILE__, 'jxdaydeal-price-block.tpl');
}
public function hookActionProductDelete($params)
{
$id_product = (int)$params['id_product'];
$id_shop = Context::getContext()->shop->id;
$this->deleteItemsByProductId($id_product, $id_shop);
}
public function hookDisplayBeforeBodyClosingTag()
{
return $this->display($this->_path, '/views/templates/hook/jxdaydeal-script.tpl');
}
}

BIN
modules/jxdaydeal/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
modules/jxdaydeal/logo.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

View File

@@ -0,0 +1,5 @@
drwxr-xr-x 2 30094 users 5 Oct 6 10:16 .
drwxr-xr-x 7 30094 users 14 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 874 Aug 31 2021 index.php
-rw-r--r-- 1 30094 users 1416 Aug 31 2021 install.php
-rw-r--r-- 1 30094 users 830 Aug 31 2021 uninstall.php

View File

@@ -0,0 +1,32 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,50 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
$sql = array();
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'jxdaydeal` (
`id_tab` int(11) NOT NULL AUTO_INCREMENT,
`id_product` int(11) NOT NULL,
`id_shop` int(11) NOT NULL,
`id_specific_price` int(11) NOT NULL,
`data_start` datetime NOT NULL,
`data_end` datetime NOT NULL,
`status` int(11) NOT NULL,
`discount_price` decimal(20,2) NOT NULL,
`reduction_type` varchar(128),
`reduction_tax` int(11) NOT NULL,
PRIMARY KEY (`id_tab`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'jxdaydeal_lang` (
`id_tab` int(11) NOT NULL,
`id_lang` int(11) NOT NULL,
`label` varchar(128)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
foreach ($sql as $query) {
if (Db::getInstance()->execute($query) == false) {
return false;
}
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2017-2019 Zemez
*
* Zemez
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
$sql = array();
$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'jxdaydeal`';
$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'jxdaydeal_lang`';
foreach ($sql as $query) {
if (Db::getInstance()->execute($query) == false) {
return false;
}
}

View File

@@ -0,0 +1,9 @@
drwxr-xr-x 2 30094 users 9 Oct 6 10:16 .
drwxr-xr-x 7 30094 users 14 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 5458 Aug 31 2021 de.php
-rw-r--r-- 1 30094 users 6255 Aug 31 2021 en.php
-rw-r--r-- 1 30094 users 5455 Aug 31 2021 es.php
-rw-r--r-- 1 30094 users 5455 Aug 31 2021 fr.php
-rw-r--r-- 1 30094 users 874 Aug 31 2021 index.php
-rw-r--r-- 1 30094 users 0 Sep 2 2021 pl.php
-rw-r--r-- 1 30094 users 5472 Aug 31 2021 ru.php

View File

@@ -0,0 +1,56 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_31617239e640515ca9ef0848716e19d3'] = 'The deal of the day module shows the daily deals with time counter on your products.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3f37c2063c0d8a6801da4b29ff373780'] = 'You cannot add/edit elements from \"All Shops\" or \"Group Shop\".';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_cb4541f0aebfdcb7ed8cf2f20c6b02d0'] = 'Settings are saved';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff19c966036b4a0c7350b2fc7e2861c2'] = 'Add item';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fa0e92ab3c39a4fbdf81351af8d377ef'] = 'Select a product';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ec53a8c4f07baed5d8825072c89799be'] = 'Status';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Enabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_db3794c7d704611ce61c9d8cc09cd806'] = 'Start Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3c1429dca1ae285353b112dfacae5fe5'] = 'End Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b021df6aac4654c454f46c77646e745f'] = 'Label';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Invalid characters:';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c323374a9632d122f1294944a9846a4f'] = 'Discount price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c9cc8cce247e49bae79f15173ce97354'] = 'Save';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_630f6dc397fe74e52d5189e2c80f282b'] = 'Back to list';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_490aa6e856ccf208a054389e47ce0d06'] = 'Id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27e73b13d5819815805ba4389a2edf55'] = 'Specific price id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff65612dd434f24c8b50af2b45684e0b'] = 'Product id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df644ae155e79abf54175bd15d75f363'] = 'Product name';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d34c043ba3770e9281cea41da8bfdfe'] = 'Start Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_1aa2efc9f34459c8c4ad1c080d5aa287'] = 'End Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_7b28d39c479ba659159b3356616b0a04'] = 'Reduction type';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ef61fb324d729c341ea8ab9901e23566'] = 'Add new';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_26986c3388870d4148b1b5375368a83d'] = 'Products to display';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d28294550803dd7ed0e5f4c704d492d'] = 'Random products';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_688edf0a4d56c27fca62ff2a20b2a1a5'] = 'The specific price could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ba58e11691fc5427f3ad0870ed181497'] = 'The specific price could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df9e2b16f6f27137eac6045eee65cf30'] = 'The tab could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_13c1e375b1216e6aa7ffe6a3bfdf9c7d'] = 'The tab could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_246f06fbb3df99220b51b88c3919da89'] = 'The tab is saved.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6e13d54425370cdd6a2cefd94eb4e255'] = 'Error occurred when deleting the tab';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_493b7ecf3a201c1156c32579addf8aa7'] = 'The tab is successfully deleted';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_22ae03024d9085a4b98c8007e982c7dd'] = 'The tab status could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27364c18e496ff2acf5c2247b36caf52'] = 'The tab status is successfully updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_601bb4c0b25439e7b63eb872edb6ba7e'] = 'Invalid date range, this period has specific price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_208cdbf284339a73fb0f7ae4c7737b08'] = 'Invalid date field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c7e56badecce297feefe2a9b50a68794'] = 'Invalid date range';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_da8fe07383996aba069d6c25b05d3587'] = 'Invalid price field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6b445012dab0af25d5f188cf6d9fbf22'] = 'Name is invalid: %s';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fddb8a1881e39ad11bfe0d0aca5becc3'] = 'The number of products is invalid. Please enter a positive number.';
$_MODULE['<{jxdaydeal}prestashop>form_56f0934ee25270b22d0c7e4ad4d763dd'] = 'This product has specific price';
$_MODULE['<{jxdaydeal}prestashop>form_0abc69788bd617d39c9e88aa74816c34'] = 'Period:';
$_MODULE['<{jxdaydeal}prestashop>form_16ddbcdbac2a413e27fe18f3341fde39'] = 'Sale:';
$_MODULE['<{jxdaydeal}prestashop>form_5ef76d30bf9232902687324b5bfa0bd2'] = 'use';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_cffc3a7ef1450a70991313df9a0898ee'] = 'Deal of the day';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_e420850bc0f6c94eff7edb2041b206bd'] = 'No special products at this time.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_bb707d4979c76083c10985a174111696'] = 'Time left to buy';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_44fdec47036f482b68b748f9d786801b'] = 'tage';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_adab7b701f23bb82014c8506d3dc784e'] = 'studen';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_d8bd79cc131920d5de426f914d17405a'] = 'min';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_74459ca3cf85a81df90da95ff6e7a207'] = 'sec';

View File

@@ -0,0 +1,64 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_cffc3a7ef1450a70991313df9a0898ee'] = 'Deal of the day';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_31617239e640515ca9ef0848716e19d3'] = 'The deal of the day module shows the daily deals with time counter on your products.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3f37c2063c0d8a6801da4b29ff373780'] = 'You cannot add/edit elements from \"All Shops\" or \"Group Shop\".';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_cb4541f0aebfdcb7ed8cf2f20c6b02d0'] = 'Settings are saved';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff19c966036b4a0c7350b2fc7e2861c2'] = 'Add item';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fa0e92ab3c39a4fbdf81351af8d377ef'] = 'Select a product';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ec53a8c4f07baed5d8825072c89799be'] = 'Status';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Enabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_db3794c7d704611ce61c9d8cc09cd806'] = 'Start Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3c1429dca1ae285353b112dfacae5fe5'] = 'End Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b021df6aac4654c454f46c77646e745f'] = 'Label';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Invalid characters:';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c323374a9632d122f1294944a9846a4f'] = 'Discount price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c9cc8cce247e49bae79f15173ce97354'] = 'Save';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_630f6dc397fe74e52d5189e2c80f282b'] = 'Back to list';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_490aa6e856ccf208a054389e47ce0d06'] = 'Id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27e73b13d5819815805ba4389a2edf55'] = 'Specific price id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff65612dd434f24c8b50af2b45684e0b'] = 'Product id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df644ae155e79abf54175bd15d75f363'] = 'Product name';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d34c043ba3770e9281cea41da8bfdfe'] = 'Start Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_1aa2efc9f34459c8c4ad1c080d5aa287'] = 'End Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_7b28d39c479ba659159b3356616b0a04'] = 'Reduction type';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ef61fb324d729c341ea8ab9901e23566'] = 'Add new';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_26986c3388870d4148b1b5375368a83d'] = 'Products to display';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d28294550803dd7ed0e5f4c704d492d'] = 'Random products';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_688edf0a4d56c27fca62ff2a20b2a1a5'] = 'The specific price could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ba58e11691fc5427f3ad0870ed181497'] = 'The specific price could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df9e2b16f6f27137eac6045eee65cf30'] = 'The tab could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_13c1e375b1216e6aa7ffe6a3bfdf9c7d'] = 'The tab could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_246f06fbb3df99220b51b88c3919da89'] = 'The tab is saved.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6e13d54425370cdd6a2cefd94eb4e255'] = 'Error occurred when deleting the tab';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_493b7ecf3a201c1156c32579addf8aa7'] = 'The tab is successfully deleted';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_22ae03024d9085a4b98c8007e982c7dd'] = 'The tab status could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27364c18e496ff2acf5c2247b36caf52'] = 'The tab status is successfully updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_601bb4c0b25439e7b63eb872edb6ba7e'] = 'Invalid date range, this period has specific price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_208cdbf284339a73fb0f7ae4c7737b08'] = 'Invalid date field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c7e56badecce297feefe2a9b50a68794'] = 'Invalid date range';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_da8fe07383996aba069d6c25b05d3587'] = 'Invalid price field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6b445012dab0af25d5f188cf6d9fbf22'] = 'Name is invalid: %s';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fddb8a1881e39ad11bfe0d0aca5becc3'] = 'The number of products is invalid. Please enter a positive number.';
$_MODULE['<{jxdaydeal}prestashop>form_56f0934ee25270b22d0c7e4ad4d763dd'] = 'This product has specific price';
$_MODULE['<{jxdaydeal}prestashop>form_0abc69788bd617d39c9e88aa74816c34'] = 'Period:';
$_MODULE['<{jxdaydeal}prestashop>form_16ddbcdbac2a413e27fe18f3341fde39'] = 'Sale:';
$_MODULE['<{jxdaydeal}prestashop>form_5ef76d30bf9232902687324b5bfa0bd2'] = 'use';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_cffc3a7ef1450a70991313df9a0898ee'] = 'Deal of the day';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_2d0f6b8300be19cf35e89e66f0677f95'] = 'Add to cart';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_4351cfebe4b61d8aa5efa1d020710005'] = 'View';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_e420850bc0f6c94eff7edb2041b206bd'] = 'No special products at this time.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_bb707d4979c76083c10985a174111696'] = 'Time left to buy';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_44fdec47036f482b68b748f9d786801b'] = 'days';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_adab7b701f23bb82014c8506d3dc784e'] = 'hr';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_d8bd79cc131920d5de426f914d17405a'] = 'min';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_74459ca3cf85a81df90da95ff6e7a207'] = 'sec';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-product-page_bb707d4979c76083c10985a174111696'] = 'Time left to buy';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_44fdec47036f482b68b748f9d786801b'] = 'days';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_adab7b701f23bb82014c8506d3dc784e'] = 'hr';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_d8bd79cc131920d5de426f914d17405a'] = 'min';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_74459ca3cf85a81df90da95ff6e7a207'] = 'sec';

View File

@@ -0,0 +1,56 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_31617239e640515ca9ef0848716e19d3'] = 'The deal of the day module shows the daily deals with time counter on your products.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3f37c2063c0d8a6801da4b29ff373780'] = 'You cannot add/edit elements from \"All Shops\" or \"Group Shop\".';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_cb4541f0aebfdcb7ed8cf2f20c6b02d0'] = 'Settings are saved';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff19c966036b4a0c7350b2fc7e2861c2'] = 'Add item';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fa0e92ab3c39a4fbdf81351af8d377ef'] = 'Select a product';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ec53a8c4f07baed5d8825072c89799be'] = 'Status';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Enabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_db3794c7d704611ce61c9d8cc09cd806'] = 'Start Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3c1429dca1ae285353b112dfacae5fe5'] = 'End Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b021df6aac4654c454f46c77646e745f'] = 'Label';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Invalid characters:';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c323374a9632d122f1294944a9846a4f'] = 'Discount price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c9cc8cce247e49bae79f15173ce97354'] = 'Save';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_630f6dc397fe74e52d5189e2c80f282b'] = 'Back to list';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_490aa6e856ccf208a054389e47ce0d06'] = 'Id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27e73b13d5819815805ba4389a2edf55'] = 'Specific price id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff65612dd434f24c8b50af2b45684e0b'] = 'Product id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df644ae155e79abf54175bd15d75f363'] = 'Product name';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d34c043ba3770e9281cea41da8bfdfe'] = 'Start Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_1aa2efc9f34459c8c4ad1c080d5aa287'] = 'End Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_7b28d39c479ba659159b3356616b0a04'] = 'Reduction type';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ef61fb324d729c341ea8ab9901e23566'] = 'Add new';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_26986c3388870d4148b1b5375368a83d'] = 'Products to display';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d28294550803dd7ed0e5f4c704d492d'] = 'Random products';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_688edf0a4d56c27fca62ff2a20b2a1a5'] = 'The specific price could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ba58e11691fc5427f3ad0870ed181497'] = 'The specific price could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df9e2b16f6f27137eac6045eee65cf30'] = 'The tab could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_13c1e375b1216e6aa7ffe6a3bfdf9c7d'] = 'The tab could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_246f06fbb3df99220b51b88c3919da89'] = 'The tab is saved.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6e13d54425370cdd6a2cefd94eb4e255'] = 'Error occurred when deleting the tab';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_493b7ecf3a201c1156c32579addf8aa7'] = 'The tab is successfully deleted';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_22ae03024d9085a4b98c8007e982c7dd'] = 'The tab status could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27364c18e496ff2acf5c2247b36caf52'] = 'The tab status is successfully updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_601bb4c0b25439e7b63eb872edb6ba7e'] = 'Invalid date range, this period has specific price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_208cdbf284339a73fb0f7ae4c7737b08'] = 'Invalid date field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c7e56badecce297feefe2a9b50a68794'] = 'Invalid date range';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_da8fe07383996aba069d6c25b05d3587'] = 'Invalid price field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6b445012dab0af25d5f188cf6d9fbf22'] = 'Name is invalid: %s';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fddb8a1881e39ad11bfe0d0aca5becc3'] = 'The number of products is invalid. Please enter a positive number.';
$_MODULE['<{jxdaydeal}prestashop>form_56f0934ee25270b22d0c7e4ad4d763dd'] = 'This product has specific price';
$_MODULE['<{jxdaydeal}prestashop>form_0abc69788bd617d39c9e88aa74816c34'] = 'Period:';
$_MODULE['<{jxdaydeal}prestashop>form_16ddbcdbac2a413e27fe18f3341fde39'] = 'Sale:';
$_MODULE['<{jxdaydeal}prestashop>form_5ef76d30bf9232902687324b5bfa0bd2'] = 'use';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_cffc3a7ef1450a70991313df9a0898ee'] = 'Deal of the day';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_e420850bc0f6c94eff7edb2041b206bd'] = 'No special products at this time.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_bb707d4979c76083c10985a174111696'] = 'Time left to buy';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_44fdec47036f482b68b748f9d786801b'] = 'días';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_adab7b701f23bb82014c8506d3dc784e'] = 'hr';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_d8bd79cc131920d5de426f914d17405a'] = 'min';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_74459ca3cf85a81df90da95ff6e7a207'] = 'sec';

View File

@@ -0,0 +1,56 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_31617239e640515ca9ef0848716e19d3'] = 'The deal of the day module shows the daily deals with time counter on your products.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3f37c2063c0d8a6801da4b29ff373780'] = 'You cannot add/edit elements from \"All Shops\" or \"Group Shop\".';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_cb4541f0aebfdcb7ed8cf2f20c6b02d0'] = 'Settings are saved';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff19c966036b4a0c7350b2fc7e2861c2'] = 'Add item';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fa0e92ab3c39a4fbdf81351af8d377ef'] = 'Select a product';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ec53a8c4f07baed5d8825072c89799be'] = 'Status';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Enabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_db3794c7d704611ce61c9d8cc09cd806'] = 'Start Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3c1429dca1ae285353b112dfacae5fe5'] = 'End Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b021df6aac4654c454f46c77646e745f'] = 'Label';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Invalid characters:';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c323374a9632d122f1294944a9846a4f'] = 'Discount price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c9cc8cce247e49bae79f15173ce97354'] = 'Save';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_630f6dc397fe74e52d5189e2c80f282b'] = 'Back to list';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_490aa6e856ccf208a054389e47ce0d06'] = 'Id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27e73b13d5819815805ba4389a2edf55'] = 'Specific price id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff65612dd434f24c8b50af2b45684e0b'] = 'Product id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df644ae155e79abf54175bd15d75f363'] = 'Product name';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d34c043ba3770e9281cea41da8bfdfe'] = 'Start Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_1aa2efc9f34459c8c4ad1c080d5aa287'] = 'End Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_7b28d39c479ba659159b3356616b0a04'] = 'Reduction type';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ef61fb324d729c341ea8ab9901e23566'] = 'Add new';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_26986c3388870d4148b1b5375368a83d'] = 'Products to display';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d28294550803dd7ed0e5f4c704d492d'] = 'Random products';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_688edf0a4d56c27fca62ff2a20b2a1a5'] = 'The specific price could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ba58e11691fc5427f3ad0870ed181497'] = 'The specific price could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df9e2b16f6f27137eac6045eee65cf30'] = 'The tab could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_13c1e375b1216e6aa7ffe6a3bfdf9c7d'] = 'The tab could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_246f06fbb3df99220b51b88c3919da89'] = 'The tab is saved.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6e13d54425370cdd6a2cefd94eb4e255'] = 'Error occurred when deleting the tab';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_493b7ecf3a201c1156c32579addf8aa7'] = 'The tab is successfully deleted';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_22ae03024d9085a4b98c8007e982c7dd'] = 'The tab status could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27364c18e496ff2acf5c2247b36caf52'] = 'The tab status is successfully updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_601bb4c0b25439e7b63eb872edb6ba7e'] = 'Invalid date range, this period has specific price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_208cdbf284339a73fb0f7ae4c7737b08'] = 'Invalid date field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c7e56badecce297feefe2a9b50a68794'] = 'Invalid date range';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_da8fe07383996aba069d6c25b05d3587'] = 'Invalid price field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6b445012dab0af25d5f188cf6d9fbf22'] = 'Name is invalid: %s';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fddb8a1881e39ad11bfe0d0aca5becc3'] = 'The number of products is invalid. Please enter a positive number.';
$_MODULE['<{jxdaydeal}prestashop>form_56f0934ee25270b22d0c7e4ad4d763dd'] = 'This product has specific price';
$_MODULE['<{jxdaydeal}prestashop>form_0abc69788bd617d39c9e88aa74816c34'] = 'Period:';
$_MODULE['<{jxdaydeal}prestashop>form_16ddbcdbac2a413e27fe18f3341fde39'] = 'Sale:';
$_MODULE['<{jxdaydeal}prestashop>form_5ef76d30bf9232902687324b5bfa0bd2'] = 'use';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_cffc3a7ef1450a70991313df9a0898ee'] = 'Deal of the day';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_e420850bc0f6c94eff7edb2041b206bd'] = 'No special products at this time.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_bb707d4979c76083c10985a174111696'] = 'Time left to buy';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_44fdec47036f482b68b748f9d786801b'] = 'jours';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_adab7b701f23bb82014c8506d3dc784e'] = 'hr';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_d8bd79cc131920d5de426f914d17405a'] = 'min';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_74459ca3cf85a81df90da95ff6e7a207'] = 'sec';

View File

@@ -0,0 +1,32 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

View File

@@ -0,0 +1,56 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_31617239e640515ca9ef0848716e19d3'] = 'The deal of the day module shows the daily deals with time counter on your products.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3f37c2063c0d8a6801da4b29ff373780'] = 'You cannot add/edit elements from \"All Shops\" or \"Group Shop\".';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_cb4541f0aebfdcb7ed8cf2f20c6b02d0'] = 'Settings are saved';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff19c966036b4a0c7350b2fc7e2861c2'] = 'Add item';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fa0e92ab3c39a4fbdf81351af8d377ef'] = 'Select a product';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ec53a8c4f07baed5d8825072c89799be'] = 'Status';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Enabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disabled';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_db3794c7d704611ce61c9d8cc09cd806'] = 'Start Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_3c1429dca1ae285353b112dfacae5fe5'] = 'End Date';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_b021df6aac4654c454f46c77646e745f'] = 'Label';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Invalid characters:';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c323374a9632d122f1294944a9846a4f'] = 'Discount price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c9cc8cce247e49bae79f15173ce97354'] = 'Save';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_630f6dc397fe74e52d5189e2c80f282b'] = 'Back to list';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_490aa6e856ccf208a054389e47ce0d06'] = 'Id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27e73b13d5819815805ba4389a2edf55'] = 'Specific price id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ff65612dd434f24c8b50af2b45684e0b'] = 'Product id';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df644ae155e79abf54175bd15d75f363'] = 'Product name';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d34c043ba3770e9281cea41da8bfdfe'] = 'Start Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_1aa2efc9f34459c8c4ad1c080d5aa287'] = 'End Data';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_7b28d39c479ba659159b3356616b0a04'] = 'Reduction type';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ef61fb324d729c341ea8ab9901e23566'] = 'Add new';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_26986c3388870d4148b1b5375368a83d'] = 'Products to display';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_9d28294550803dd7ed0e5f4c704d492d'] = 'Random products';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_688edf0a4d56c27fca62ff2a20b2a1a5'] = 'The specific price could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_ba58e11691fc5427f3ad0870ed181497'] = 'The specific price could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_df9e2b16f6f27137eac6045eee65cf30'] = 'The tab could not be added.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_13c1e375b1216e6aa7ffe6a3bfdf9c7d'] = 'The tab could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_246f06fbb3df99220b51b88c3919da89'] = 'The tab is saved.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6e13d54425370cdd6a2cefd94eb4e255'] = 'Error occurred when deleting the tab';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_493b7ecf3a201c1156c32579addf8aa7'] = 'The tab is successfully deleted';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_22ae03024d9085a4b98c8007e982c7dd'] = 'The tab status could not be updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_27364c18e496ff2acf5c2247b36caf52'] = 'The tab status is successfully updated.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_601bb4c0b25439e7b63eb872edb6ba7e'] = 'Invalid date range, this period has specific price';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_208cdbf284339a73fb0f7ae4c7737b08'] = 'Invalid date field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_c7e56badecce297feefe2a9b50a68794'] = 'Invalid date range';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_da8fe07383996aba069d6c25b05d3587'] = 'Invalid price field';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_6b445012dab0af25d5f188cf6d9fbf22'] = 'Name is invalid: %s';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal_fddb8a1881e39ad11bfe0d0aca5becc3'] = 'The number of products is invalid. Please enter a positive number.';
$_MODULE['<{jxdaydeal}prestashop>form_56f0934ee25270b22d0c7e4ad4d763dd'] = 'This product has specific price';
$_MODULE['<{jxdaydeal}prestashop>form_0abc69788bd617d39c9e88aa74816c34'] = 'Period:';
$_MODULE['<{jxdaydeal}prestashop>form_16ddbcdbac2a413e27fe18f3341fde39'] = 'Sale:';
$_MODULE['<{jxdaydeal}prestashop>form_5ef76d30bf9232902687324b5bfa0bd2'] = 'use';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_cffc3a7ef1450a70991313df9a0898ee'] = 'Deal of the day';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-home_e420850bc0f6c94eff7edb2041b206bd'] = 'No special products at this time.';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-price-block_bb707d4979c76083c10985a174111696'] = 'Time left to buy';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_44fdec47036f482b68b748f9d786801b'] = 'дней';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_adab7b701f23bb82014c8506d3dc784e'] = 'часов';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_d8bd79cc131920d5de426f914d17405a'] = 'мин';
$_MODULE['<{jxdaydeal}prestashop>jxdaydeal-script_74459ca3cf85a81df90da95ff6e7a207'] = 'сек';

View File

@@ -0,0 +1,7 @@
drwxr-xr-x 6 30094 users 7 Oct 6 10:16 .
drwxr-xr-x 7 30094 users 14 Oct 6 10:16 ..
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 css
-rw-r--r-- 1 30094 users 874 Aug 31 2021 index.php
drwxr-xr-x 2 30094 users 6 Oct 6 10:16 js
drwxr-xr-x 2 30094 users 9 Oct 6 10:16 scss
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 templates

View File

@@ -0,0 +1,4 @@
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 .
drwxr-xr-x 6 30094 users 7 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 1273 Aug 31 2021 jxdaydeal.css
-rw-r--r-- 1 30094 users 721 Aug 31 2021 jxdaydeal_admin.css

View File

@@ -0,0 +1,48 @@
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
.daydeal-box {
padding: 5px; }
.daydeal-box h3 {
color: red; }
.daydeal-box > div > span {
display: inline-block;
padding-right: 7px; }
.daydeal-box > div > span > span {
display: inline-block;
padding-right: 3px; }
#content .label-daydeal {
position: absolute;
right: 5px;
top: 5px;
display: inline-block;
padding: 5px 12px;
background: #FF0;
color: #333; }
#content .product-miniature .thumbnail-container .product-description {
height: 140px; }
#content .product-miniature .thumbnail-container:hover .highlighted-informations {
bottom: 10rem; }
#content .thumbnail-container {
height: 390px; }
#content .product-description {
height: 140px; }

View File

@@ -0,0 +1,29 @@
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
#form-jxdaydeal .panel-heading .badge {
display: none; }
.daydeal-prices {
margin: 20px 0; }
.daydeal-checkbox {
vertical-align: -2px; }

View File

@@ -0,0 +1,32 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,6 @@
drwxr-xr-x 2 30094 users 6 Oct 6 10:16 .
drwxr-xr-x 6 30094 users 7 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 874 Aug 31 2021 index.php
-rw-r--r-- 1 30094 users 9550 Aug 31 2021 jquery.countdown.js
-rw-r--r-- 1 30094 users 576 Aug 31 2021 jxdaydeal.js
-rw-r--r-- 1 30094 users 7121 Aug 31 2021 jxdaydeal_admin.js

View File

@@ -0,0 +1,32 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,235 @@
/*!
* The Final Countdown for jQuery v2.1.0 (http://hilios.github.io/jQuery.countdown/)
* Copyright (c) 2015 Edson Hilios
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
(function(factory) {
"use strict";
if (typeof define === "function" && define.amd) {
define([ "jquery" ], factory);
} else {
factory(jQuery);
}
})(function($) {
"use strict";
var instances = [], matchers = [], defaultOptions = {
precision: 100,
elapse: false
};
matchers.push(/^[0-9]*$/.source);
matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);
matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);
matchers = new RegExp(matchers.join("|"));
function parseDateString(dateString) {
if (dateString instanceof Date) {
return dateString;
}
if (String(dateString).match(matchers)) {
if (String(dateString).match(/^[0-9]*$/)) {
dateString = Number(dateString);
}
if (String(dateString).match(/\-/)) {
dateString = String(dateString).replace(/\-/g, "/");
}
return new Date(dateString);
} else {
throw new Error("Couldn't cast `" + dateString + "` to a date object.");
}
}
var DIRECTIVE_KEY_MAP = {
Y: "years",
m: "months",
n: "daysToMonth",
w: "weeks",
d: "daysToWeek",
D: "totalDays",
H: "hours",
M: "minutes",
S: "seconds"
};
function escapedRegExp(str) {
var sanitize = str.toString().replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
return new RegExp(sanitize);
}
function strftime(offsetObject) {
return function(format) {
var directives = format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);
if (directives) {
for (var i = 0, len = directives.length; i < len; ++i) {
var directive = directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), regexp = escapedRegExp(directive[0]), modifier = directive[1] || "", plural = directive[3] || "", value = null;
directive = directive[2];
if (DIRECTIVE_KEY_MAP.hasOwnProperty(directive)) {
value = DIRECTIVE_KEY_MAP[directive];
value = Number(offsetObject[value]);
}
if (value !== null) {
if (modifier === "!") {
value = pluralize(plural, value);
}
if (modifier === "") {
if (value < 10) {
value = "0" + value.toString();
}
}
format = format.replace(regexp, value.toString());
}
}
}
format = format.replace(/%%/, "%");
return format;
};
}
function pluralize(format, count) {
var plural = "s", singular = "";
if (format) {
format = format.replace(/(:|;|\s)/gi, "").split(/\,/);
if (format.length === 1) {
plural = format[0];
} else {
singular = format[0];
plural = format[1];
}
}
if (Math.abs(count) === 1) {
return singular;
} else {
return plural;
}
}
var Countdown = function(el, finalDate, options) {
this.el = el;
this.$el = $(el);
this.interval = null;
this.offset = {};
this.options = $.extend({}, defaultOptions);
this.instanceNumber = instances.length;
instances.push(this);
this.$el.data("countdown-instance", this.instanceNumber);
if (options) {
if (typeof options === "function") {
this.$el.on("update.countdown", options);
this.$el.on("stoped.countdown", options);
this.$el.on("finish.countdown", options);
} else {
this.options = $.extend({}, defaultOptions, options);
}
}
this.setFinalDate(finalDate);
this.start();
};
$.extend(Countdown.prototype, {
start: function() {
if (this.interval !== null) {
clearInterval(this.interval);
}
var self = this;
this.update();
this.interval = setInterval(function() {
self.update.call(self);
}, this.options.precision);
},
stop: function() {
clearInterval(this.interval);
this.interval = null;
this.dispatchEvent("stoped");
},
toggle: function() {
if (this.interval) {
this.stop();
} else {
this.start();
}
},
pause: function() {
this.stop();
},
resume: function() {
this.start();
},
remove: function() {
this.stop.call(this);
instances[this.instanceNumber] = null;
delete this.$el.data().countdownInstance;
},
setFinalDate: function(value) {
this.finalDate = parseDateString(value);
},
update: function() {
if (this.$el.closest("html").length === 0) {
this.remove();
return;
}
var hasEventsAttached = $._data(this.el, "events") !== undefined, now = new Date(), newTotalSecsLeft;
newTotalSecsLeft = this.finalDate.getTime() - now.getTime();
newTotalSecsLeft = Math.ceil(newTotalSecsLeft / 1e3);
newTotalSecsLeft = !this.options.elapse && newTotalSecsLeft < 0 ? 0 : Math.abs(newTotalSecsLeft);
if (this.totalSecsLeft === newTotalSecsLeft || !hasEventsAttached) {
return;
} else {
this.totalSecsLeft = newTotalSecsLeft;
}
this.elapsed = now >= this.finalDate;
this.offset = {
seconds: this.totalSecsLeft % 60,
minutes: Math.floor(this.totalSecsLeft / 60) % 60,
hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24,
days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
daysToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 % 30.4368),
totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24),
weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7),
months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368),
years: Math.abs(this.finalDate.getFullYear() - now.getFullYear())
};
if (!this.options.elapse && this.totalSecsLeft === 0) {
this.stop();
this.dispatchEvent("finish");
} else {
this.dispatchEvent("update");
}
},
dispatchEvent: function(eventName) {
var event = $.Event(eventName + ".countdown");
event.finalDate = this.finalDate;
event.elapsed = this.elapsed;
event.offset = $.extend({}, this.offset);
event.strftime = strftime(this.offset);
this.$el.trigger(event);
}
});
$.fn.countdown = function() {
var argumentsArray = Array.prototype.slice.call(arguments, 0);
return this.each(function() {
var instanceNumber = $(this).data("countdown-instance");
if (instanceNumber !== undefined) {
var instance = instances[instanceNumber], method = argumentsArray[0];
if (Countdown.prototype.hasOwnProperty(method)) {
instance[method].apply(instance, argumentsArray.slice(1));
} else if (String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i) === null) {
instance.setFinalDate.call(instance, method);
instance.start();
} else {
$.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, method));
}
} else {
new Countdown(this, argumentsArray[0], argumentsArray[1]);
}
});
};
});

View File

@@ -0,0 +1,21 @@
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/

View File

@@ -0,0 +1,201 @@
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
function JXDayDealCheckbox() {
$('.daydeal-checkbox').click(function() {
if ($(this).prop('checked') == true) {
$('#module_form .form-wrapper .form-group').next().addClass('hidden');
} else if ($(this).prop('checked') == false) {
$('#module_form .form-wrapper .form-group').next().removeClass('hidden');
}
$('.daydeal-checkbox').not(this).prop('checked', false);
});
}
$(document).ready(function() {
$('select#reduction_type').bind('change', function(e) {
if ($('select#reduction_type').val() == 'percentage') {
$('select#reduction_tax').hide();
} else {
$('select#reduction_tax').show();
}
}).trigger('change');
$('.daydeal-alert-container').insertAfter('#divproducts');
JXDayDealCheckbox();
});
function updateProductInfo() {
$('.daydeal-prices').remove();
$('#module_form .form-wrapper .form-group').next().removeClass('hidden');
var product_id = $('input#inputproducts').val().replace(/\-/g, '');
$.ajax({
type : 'POST',
url : theme_url + '&ajax',
headers : {"cache-control" : "no-cache"},
dataType : 'json',
async : false,
data : {
action : 'getProductsSpecificPrice',
productId : product_id
},
success : function(response) {
if (response.status) {
displayJXDayDealWarning(response.data);
}
}
});
}
function displayJXDayDealWarning(data) {
jxdaydealWarningMessage = '';
for (i = 0; i < data.length; i++) {
jxdaydealWarningMessage += '<div class="daydeal-prices alert alert-warning">';
jxdaydealWarningMessage += '<div>';
jxdaydealWarningMessage += '<p>';
jxdaydealWarningMessage += jxdd_msg;
jxdaydealWarningMessage += '</p>';
jxdaydealWarningMessage += '<p>';
jxdaydealWarningMessage += jxdd_msg_period;
jxdaydealWarningMessage += '&nbsp;'
jxdaydealWarningMessage += data[i]['from'];
jxdaydealWarningMessage += ' - ';
jxdaydealWarningMessage += data[i]['to'];
jxdaydealWarningMessage += '</p>';
jxdaydealWarningMessage += '<p>';
jxdaydealWarningMessage += jxdd_msg_sale;
jxdaydealWarningMessage += '&nbsp;'
jxdaydealWarningMessage += data[i]['reduction'];
jxdaydealWarningMessage += '&nbsp;'
jxdaydealWarningMessage += data[i]['reduction_type'];
if (data[i]['reduction_type'] == 'amount') {
jxdaydealWarningMessage += ',';
jxdaydealWarningMessage += '&nbsp;'
if (data[i]['reduction_tax'] == 1) {
jxdaydealWarningMessage += jxdd_msg_included;
}
if (data[i]['reduction_tax'] == 0) {
jxdaydealWarningMessage += jxdd_msg_excluded;
}
}
jxdaydealWarningMessage += '</p>';
if (!data[i]['status']) {
id_specific_price = data[i]['id_specific_price'];
jxdaydealWarningMessage += '<label>';
jxdaydealWarningMessage += '<input class="daydeal-checkbox" type="checkbox" value="' + id_specific_price + '" name="specific_price_old" />';
jxdaydealWarningMessage += '&nbsp;'
jxdaydealWarningMessage += jxdd_msg_use;
jxdaydealWarningMessage += '</label>';
}
jxdaydealWarningMessage += '</div>';
jxdaydealWarningMessage += '</div>';
}
if (jxdaydealWarningMessage) {
$('#divproducts').parent().append(jxdaydealWarningMessage);
}
JXDayDealCheckbox();
}
$(document).ready(function() {
jxdaydeal.autocompleteInit($('#products_autocomplete_input'), 'ajax_products_list.php?exclude_packs=0&excludeVirtuals=0&token='+product_token);
$('#divproducts').delegate('.delproducts', 'click', function() {
jxdaydeal.delProduct($(this).attr('name'));
});
});
jxdaydeal = {
autocompleteInit : function(block, url) {
block.autocomplete(url, {
minChars : 3,
autoFill : true,
max : 100,
matchContains : true,
mustMatch : false,
scroll : false,
cacheLength : 0,
formatItem : function(item) {
if (typeof(item[1]) == 'undefined') {
return 'no result found';
}
return item[1] + ' - ' + item[0];
}
}).result(this.addProduct);
block.setOptions({
extraParams : {
excludeIds : this.getProductIds()
}
});
},
getProductIds : function() {
return $('#inputproducts').val().replace(/\-/g, ',');
},
addProduct : function(event, data, formatted) {
if (data == null) {
return false;
}
var productId = data[1];
var productName = data[0];
var $divProducts = $('#divproducts');
var $inputProducts = $('#inputproducts');
var $nameProducts = $('#nameproducts');
$divProducts.html($divProducts.html() + '<div class="form-control-static"><button type="button" class="delproducts btn btn-default" name="' + productId + '"><i class="icon-remove text-danger"></i></button>&nbsp;' + productName + '</div>');
$nameProducts.val($nameProducts.val() + productName + '¤');
$inputProducts.val($inputProducts.val() + productId + '-');
$('#products_autocomplete_input').val('');
$('#ajax_choose_products').hide();
updateProductInfo();
$('#products_autocomplete_input').setOptions({
extraParams : {excludeIds : jxdaydeal.getProductIds()}
});
},
delProduct : function(id) {
var div = getE('divproducts');
var input = getE('inputproducts');
var name = getE('nameproducts');
// Cut hidden fields in array
var inputCut = input.value.split('-');
var nameCut = name.value.split('¤');
if (inputCut.length != nameCut.length) {
return jAlert('Bad size');
}
// Reset all hidden fields
input.value = '';
name.value = '';
div.innerHTML = '';
for (i in inputCut) {
// If empty, error, next
if (!inputCut[i] || !nameCut[i]) {
continue;
}
// Add to hidden fields no selected products OR add to select field selected product
if (inputCut[i] != id) {
input.value += inputCut[i] + '-';
name.value += nameCut[i] + '¤';
div.innerHTML += '<div class="form-control-static"><button type="button" class="delproducts btn btn-default" name="' + inputCut[i] + '"><i class="icon-remove text-danger"></i></button>&nbsp;' + nameCut[i] + '</div>';
}
else {
input.value += '-';
name.value += '¤';
}
}
updateProductInfo();
$('#ajax_choose_products').show();
$('#products_autocomplete_input').setOptions({
extraParams : {excludeIds : jxdaydeal.getProductIds()}
});
}
};

View File

@@ -0,0 +1,9 @@
drwxr-xr-x 2 30094 users 9 Oct 6 10:16 .
drwxr-xr-x 6 30094 users 7 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 874 Aug 31 2021 index.php
-rw----r-- 1 30094 users 1297 Sep 5 07:45 jxdaydeal.css
-rw----r-- 1 30094 users 404 Sep 5 07:45 jxdaydeal.css.map
-rw-r--r-- 1 30094 users 1200 Aug 31 2021 jxdaydeal.scss
-rw----r-- 1 30094 users 767 Sep 5 07:45 jxdaydeal_admin.css
-rw----r-- 1 30094 users 216 Sep 5 07:45 jxdaydeal_admin.css.map
-rw-r--r-- 1 30094 users 732 Aug 31 2021 jxdaydeal_admin.scss

View File

@@ -0,0 +1,32 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,2 @@
.daydeal-box{padding:5px}.daydeal-box h3{color:red}.daydeal-box>div>span{display:inline-block;padding-right:7px}.daydeal-box>div>span>span{display:inline-block;padding-right:3px}#content .label-daydeal{position:absolute;right:5px;top:5px;display:inline-block;padding:5px 12px;background:#FF0;color:#333}#content .product-miniature .thumbnail-container .product-description{height:140px}#content .product-miniature .thumbnail-container:hover .highlighted-informations{bottom:10rem}#content .thumbnail-container{height:390px}#content .product-description{height:140px}
/*# sourceMappingURL=jxdaydeal.css.map */

View File

@@ -0,0 +1,9 @@
{
"version": 3,
"mappings": "AAsBA,AAAA,YAAY,AAAC,CACZ,OAAO,CAAE,GAAG,CAYZ,AAbD,AAEC,YAFW,CAEX,EAAE,AAAC,CACF,KAAK,CAAE,GAAG,CACV,AAJF,AAKC,YALW,CAKT,GAAG,CAAG,IAAI,AAAA,CACX,OAAO,CAAE,YAAY,CACrB,aAAa,CAAE,GAAG,CAClB,AARF,AASC,YATW,CAST,GAAG,CAAG,IAAI,CAAG,IAAI,AAAC,CACnB,OAAO,CAAE,YAAY,CACrB,aAAa,CAAE,GAAG,CAClB,AAEF,AACC,QADO,CACP,cAAc,AAAC,CACd,QAAQ,CAAE,QAAQ,CAClB,KAAK,CAAE,GAAG,CACV,GAAG,CAAE,GAAG,CACR,OAAO,CAAE,YAAY,CACrB,OAAO,CAAE,QAAQ,CACjB,UAAU,CAAE,IAAI,CAChB,KAAK,CAAE,IAAI,CACX,AATF,AAYG,QAZK,CAUP,kBAAkB,CACjB,oBAAoB,CACnB,oBAAoB,AAAC,CACpB,MAAM,CAAE,KAAK,CACb,AAdJ,AAgBI,QAhBI,CAUP,kBAAkB,CACjB,oBAAoB,AAIlB,MAAM,CACN,yBAAyB,AAAC,CACzB,MAAM,CAAE,KAAK,CACb,AAlBL,AAsBC,QAtBO,CAsBP,oBAAoB,AAAC,CACpB,MAAM,CAAE,KAAK,CACb,AAxBF,AAyBC,QAzBO,CAyBP,oBAAoB,AAAC,CACpB,MAAM,CAAE,KAAK,CACb",
"sources": [
"jxdaydeal.scss"
],
"names": [],
"file": "jxdaydeal.css"
}

View File

@@ -0,0 +1,65 @@
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
.daydeal-box {
padding: 5px;
h3 {
color: red;
}
> div > span{
display: inline-block;
padding-right: 7px;
}
> div > span > span {
display: inline-block;
padding-right: 3px;
}
}
#content {
.label-daydeal {
position: absolute;
right: 5px;
top: 5px;
display: inline-block;
padding: 5px 12px;
background: #FF0;
color: #333;
}
.product-miniature {
.thumbnail-container {
.product-description {
height: 140px;
}
&:hover {
.highlighted-informations {
bottom: 10rem;
}
}
}
}
.thumbnail-container {
height: 390px;
}
.product-description {
height: 140px;
}
}

View File

@@ -0,0 +1,2 @@
#form-jxdaydeal .panel-heading .badge{display:none}.daydeal-prices{margin:20px 0}.daydeal-checkbox{vertical-align:-2px}
/*# sourceMappingURL=jxdaydeal_admin.css.map */

View File

@@ -0,0 +1,9 @@
{
"version": 3,
"mappings": "AAsBA,AAEE,eAFa,CACd,cAAc,CACb,MAAM,AAAA,CACL,OAAO,CAAE,IAAI,CACb,AAIH,AAAA,eAAe,AAAC,CACf,MAAM,CAAE,MAAM,CACd,AACD,AAAA,iBAAiB,AAAC,CACjB,cAAc,CAAE,IAAI,CACpB",
"sources": [
"jxdaydeal_admin.scss"
],
"names": [],
"file": "jxdaydeal_admin.css"
}

View File

@@ -0,0 +1,36 @@
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
#form-jxdaydeal {
.panel-heading {
.badge{
display: none;
}
}
}
.daydeal-prices {
margin: 20px 0;
}
.daydeal-checkbox {
vertical-align: -2px;
}

View File

@@ -0,0 +1,5 @@
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 .
drwxr-xr-x 6 30094 users 7 Oct 6 10:16 ..
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 admin
drwxr-xr-x 2 30094 users 6 Oct 6 10:16 hook
-rw-r--r-- 1 30094 users 874 Aug 31 2021 index.php

View File

@@ -0,0 +1,3 @@
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 .
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 ..
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 _configure

View File

@@ -0,0 +1,3 @@
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 .
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 ..
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 helpers

View File

@@ -0,0 +1,3 @@
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 .
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 ..
drwxr-xr-x 2 30094 users 3 Oct 6 10:16 form

View File

@@ -0,0 +1,3 @@
drwxr-xr-x 2 30094 users 3 Oct 6 10:16 .
drwxr-xr-x 3 30094 users 3 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 3674 Aug 31 2021 form.tpl

View File

@@ -0,0 +1,81 @@
{*
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*}
{extends file="helpers/form/form.tpl"}
{block name="field"}
{if $input.type == 'block_specific'}
{addJsDefL name=jxdd_msg}{l s='This product has specific price' mod='jxdaydeal'}{/addJsDefL}
{addJsDefL name=jxdd_msg_period}{l s='Period:' mod='jxdaydeal'}{/addJsDefL}
{addJsDefL name=jxdd_msg_sale}{l s='Sale:' mod='jxdaydeal'}{/addJsDefL}
{addJsDefL name=jxdd_msg_use}{l s='use' mod='jxdaydeal'}{/addJsDefL}
{addJsDefL name=jxdd_msg_included}{l s='tax included' mod='jxdaydeal'}{/addJsDefL}
{addJsDefL name=jxdd_msg_excluded}{l s='tax excluded' mod='jxdaydeal'}{/addJsDefL}
<div class="daydeal-alert-container">
{foreach from=$specific_prices_data item=specific_prices name=specific_prices}
<div class="daydeal-prices alert alert-warning">
<p>{l s='This product has specific price' mod='jxdaydeal'}</p>
<p>{l s='Period:' mod='jxdaydeal'}&nbsp;{$specific_prices['from']|escape:'htmlall':'UTF-8'} - {$specific_prices['to']|escape:'htmlall':'UTF-8'}</p>
<p>{l s='Sale:' mod='jxdaydeal'}&nbsp;{$specific_prices['reduction']|escape:'htmlall':'UTF-8'}&nbsp;{$specific_prices['reduction_type']|escape:'htmlall':'UTF-8'}
{if $specific_prices['reduction_type'] == 'amount'},&nbsp;
{if $specific_prices['reduction_tax'] == 1}
{l s='tax included' mod='jxdaydeal'}
{else}
{l s='tax excluded' mod='jxdaydeal'}
{/if}
{/if}
</p>
{if !$specific_prices['status']}
<label>
<input type="checkbox" class="daydeal-checkbox" value="{$specific_prices['id_specific_price']|escape:'htmlall':'UTF-8'}" name="specific_price_old" />
{l s='use' mod='jxdaydeal'}
</label>
{/if}
</div>
{/foreach}
</div>
{/if}
{if $input.type == 'custom_autocomplete'}
<div class="col-lg-3">
{assign var="type" value="related_`$input.id`"}
<input id="input{$input.id}" name="{$input.name}" value="{if $fields_value['id_product']}{$fields_value['id_product']}{else}-{/if}" type="hidden">
<input id="name{$input.id}" name="name{$input.id}" value="{if $fields_value['id_product']}{Product::getProductName($fields_value['id_product'])}{else}¤{/if}" type="hidden">
<div id="ajax_choose_{$input.id}" {if $fields_value['id_product']}style="display: none;"{/if}>
<div class="input-group">
<input type="text" id="{$input.id}_autocomplete_input" name="{$input.id}_autocomplete_input"/>
<span class="input-group-addon"><i class="icon-search"></i></span>
</div>
</div>
<div id="div{$input.id}">
{if $fields_value['id_product']}
<div class="form-control-static">
<button type="button" class="btn btn-default del{$input.id}" name="{$fields_value['id_product']}">
<i class="icon-remove text-danger"></i>
</button>
{Product::getProductName($fields_value['id_product'])}
</div>
{/if}
</div>
</div>
{/if}
{$smarty.block.parent}
{/block}

View File

@@ -0,0 +1,6 @@
drwxr-xr-x 2 30094 users 6 Oct 6 10:16 .
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 4215 Aug 31 2021 jxdaydeal-home.tpl
-rw-r--r-- 1 30094 users 1055 Aug 31 2021 jxdaydeal-price-block.tpl
-rw-r--r-- 1 30094 users 1352 Aug 31 2021 jxdaydeal-script.tpl
-rw-r--r-- 1 30094 users 4202 Aug 31 2021 jxdaydeal-top-column.tpl

View File

@@ -0,0 +1,84 @@
{*
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*}
<section id="products" class="daydeal-products clearfix">
<h1 class="h1 products-section-title text-uppercase ">{l s='Deal of the day' mod='jxdaydeal'}</h1>
<div class="products">
{if isset($daydeal_products) && $daydeal_products}
{foreach from=$daydeal_products item=product name=product}
<article class="product-miniature js-product-miniature" data-id-product="{$product.info.id_product}" data-id-product-attribute="{$product.info.id_product_attribute}" itemscope itemtype="http://schema.org/Product">
<div class="thumbnail-container">
{block name='product_thumbnail'}
<a class="thumbnail product-thumbnail" href="{$product.info.url}">
<img class="replace-2x img-responsive" src="{$product.info.cover.bySize.home_default.url}" alt = "{$product.info.cover.legend}" data-full-size-image-url = "{$product.info.cover.large.url}" />
{if isset($daydeal_products_extra[$product.info.id_product]["label"]) && $daydeal_products_extra[$product.info.id_product]["label"]}
<span class="label-daydeal">{$daydeal_products_extra[$product.info.id_product]["label"]|escape:'htmlall':'UTF-8'}</span>
{/if}
</a>
{/block}
<div class="product-description">
{block name='product_name'}
<h1 class="h3 product-title" itemprop="name"><a href="{$product.info.url}">{$product.info.name|truncate:30:'...'}</a></h1>
{/block}
{block name='product_price_and_shipping'}
{if $product.info.show_price}
<div class="product-price-and-shipping">
{if $product.info.has_discount}
{hook h='displayProductPriceBlock' product=$product.info type="old_price"}
<span class="regular-price">{$product.info.regular_price}</span>
{if $product.info.discount_type === 'percentage'}
<span class="discount-percentage">{$product.info.discount_percentage}</span>
{/if}
{/if}
{hook h='displayProductPriceBlock' product=$product.info type="before_price"}
<span itemprop="price" class="price">{$product.info.price}</span>
{hook h='displayProductPriceBlock' product=$product.info type='unit_price'}
{hook h='displayProductPriceBlock' product=$product.info type='weight'}
</div>
{/if}
{/block}
</div>
{block name='product_flags'}
<ul class="product-flags">
{foreach from=$product.info.flags item=flag}
<li class="product-flag {$flag.type}">{$flag.label}</li>
{/foreach}
</ul>
{/block}
<div class="highlighted-informations{if !$product.info.main_variants} no-variants{/if} hidden-sm-down">
<a href="#" class="quick-view" data-link-action="quickview">
<i class="material-icons search">&#xE8B6;</i> Szybki pogląd
</a>
{block name='product_variants'}
{if $product.info.main_variants}
{include file='catalog/_partials/variant-links.tpl' variants=$product.info.main_variants}
{/if}
{/block}
</div>
</div>
</article>
{/foreach}
{else}
<p class="alert alert-info">{l s='No special products at this time.' mod='jxdaydeal'}</p>
{/if}
</div>
</section>

View File

@@ -0,0 +1,35 @@
{*
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*}
{if isset($daydeal_products_extra["data_end"]) && $daydeal_products_extra["data_end"]}
{assign var='data_end' value=$daydeal_products_extra["data_end"]}
<div class="block products_block daydeal-box">
<h3>{l s='Time left to buy' mod='jxdaydeal'}</h3>
<div data-countdown="{$data_end|escape:'htmlall':'UTF-8'}"></div>
</div>
<script type="text/javascript">
if (typeof(runJxDayDealCounter) != 'undefined') {
runJxDayDealCounter();
};
</script>
{/if}

View File

@@ -0,0 +1,37 @@
{*
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*}
<script type="text/javascript">
var jxdd_msg_days = "{l s='days' mod='jxdaydeal' js=1}";
var jxdd_msg_hr = "{l s='hr' mod='jxdaydeal' js=1}";
var jxdd_msg_min = "{l s='min' mod='jxdaydeal' js=1}";
var jxdd_msg_sec = "{l s='sec' mod='jxdaydeal' js=1}";
runJxDayDealCounter();
function runJxDayDealCounter() {
$("[data-countdown]").each(function() {
var $this = $(this), finalDate = $(this).data("countdown");
$this.countdown(finalDate, function(event) {
$this.html(event.strftime('<span><span>%D</span>'+jxdd_msg_days+'</span><span><span>%H</span>'+jxdd_msg_hr+'</span><span><span>%M</span>'+jxdd_msg_min+'</span><span><span>%S</span>'+jxdd_msg_sec+'</span>'));
});
});
}
</script>

View File

@@ -0,0 +1,84 @@
{*
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*}
<section id="products" class="daydeal-products clearfix">
<h1 class="h1 products-section-title text-uppercase ">{l s='Deal of the day' mod='jxdaydeal'}</h1>
<div class="products">
{if isset($daydeal_products) && $daydeal_products}
{foreach from=$daydeal_products item=product name=product}
<article class="product-miniature js-product-miniature" data-id-product="{$product.info.id_product}" data-id-product-attribute="{$product.info.id_product_attribute}" itemscope itemtype="http://schema.org/Product">
<div class="thumbnail-container">
{block name='product_thumbnail'}
<a class="thumbnail product-thumbnail" href="{$product.info.url}">
<img class="replace-2x img-responsive" src="{$product.info.cover.bySize.home_default.url}" alt = "{$product.info.cover.legend}" data-full-size-image-url = "{$product.info.cover.large.url}" />
{if isset($daydeal_products_extra[$product.info.id_product]["label"]) && $daydeal_products_extra[$product.info.id_product]["label"]}
<span class="label-daydeal">{$daydeal_products_extra[$product.info.id_product]["label"]|escape:'htmlall':'UTF-8'}</span>
{/if}
</a>
{/block}
<div class="product-description">
{block name='product_name'}
<h1 class="h3 product-title" itemprop="name"><a href="{$product.info.url}">{$product.info.name|truncate:30:'...'}</a></h1>
{/block}
{block name='product_price_and_shipping'}
{if $product.info.show_price}
<div class="product-price-and-shipping">
{if $product.info.has_discount}
{hook h='displayProductPriceBlock' product=$product.info type="old_price"}
<span class="regular-price">{$product.info.regular_price}</span>
{if $product.info.discount_type === 'percentage'}
<span class="discount-percentage">{$product.info.discount_percentage}</span>
{/if}
{/if}
{hook h='displayProductPriceBlock' product=$product.info type="before_price"}
<span itemprop="price" class="price">{$product.info.price}</span>
{hook h='displayProductPriceBlock' product=$product.info type='unit_price'}
{hook h='displayProductPriceBlock' product=$product.info type='weight'}
</div>
{/if}
{/block}
</div>
{block name='product_flags'}
<ul class="product-flags">
{foreach from=$product.info.flags item=flag}
<li class="{$flag.type}">{$flag.label}</li>
{/foreach}
</ul>
{/block}
<div class="highlighted-informations{if !$product.info.main_variants} no-variants{/if} hidden-sm-down">
<a href="#" class="quick-view" data-link-action="quickview">
<i class="material-icons search">&#xE8B6;</i> Szybki podgląd
</a>
{block name='product_variants'}
{if $product.info.main_variants}
{include file='catalog/_partials/variant-links.tpl' variants=$product.info.main_variants}
{/if}
{/block}
</div>
</div>
</article>
{/foreach}
{else}
<p class="alert alert-info">{l s='No special products at this time.' mod='jxdaydeal'}</p>
{/if}
</div>
</section>

View File

@@ -0,0 +1,32 @@
<?php
/**
* 2017-2019 Zemez
*
* JX Deal of Day
*
* NOTICE OF LICENSE
*
* This source file is subject to the General Public License (GPL 2.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/GPL-2.0
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade the module to newer
* versions in the future.
*
* @author Zemez (Sergiy Sakun)
* @copyright 2017-2019 Zemez
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;