diff --git a/plugins/lovata.zip b/plugins/lovata.zip new file mode 100644 index 000000000..759d87d43 Binary files /dev/null and b/plugins/lovata.zip differ diff --git a/plugins/lovata/shopaholic/.codeclimate.yml b/plugins/lovata/shopaholic/.codeclimate.yml deleted file mode 100644 index 79ce32be1..000000000 --- a/plugins/lovata/shopaholic/.codeclimate.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -plugins: - duplication: - enabled: true - config: - languages: - php: - mass_threshold: 45 - fixme: - enabled: true - phpmd: - enabled: true - config: - file_extensions: "php" - rulesets: "controversial,design,unusedcode,PHPMD_custom.xml" - phpcodesniffer: - enabled: true - config: - standard: "Symfony2" - sonar-php: - enabled: true -ratings: - paths: - - "**.php" -exclude_patterns: - - 'tests/' - - 'lang/' - - 'updates/' \ No newline at end of file diff --git a/plugins/lovata/shopaholic/.editorconfig b/plugins/lovata/shopaholic/.editorconfig deleted file mode 100644 index 483d42dff..000000000 --- a/plugins/lovata/shopaholic/.editorconfig +++ /dev/null @@ -1,27 +0,0 @@ -# Defining consistent coding styles between different editors and IDEs -# Support info @ http://editorconfig.org/#download -# editorconfig.org - -# Top-most EditorConfig file -root = true - -# General settings -[*] -charset = utf-8 -end_of_line = lf -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 4 - -# CSS settings -[*.css] -indent_size = 2 - -# YAML settings -[*.yml] -indent_size = 2 - -# Markdown settings -[*.md] -trim_trailing_whitespace = false diff --git a/plugins/lovata/shopaholic/.github/FUNDING.yml b/plugins/lovata/shopaholic/.github/FUNDING.yml deleted file mode 100644 index 671cba79c..000000000 --- a/plugins/lovata/shopaholic/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms - -open_collective: oc-shopaholic diff --git a/plugins/lovata/shopaholic/.gitignore b/plugins/lovata/shopaholic/.gitignore deleted file mode 100644 index 52a19c297..000000000 --- a/plugins/lovata/shopaholic/.gitignore +++ /dev/null @@ -1,92 +0,0 @@ -/node_modules -Homestead.yaml -/_ide_helper.php -build.sh - -#site -pdf/ -_backup/ -cgi-bin/ - -*.log -*.bin -*.komodoproject -/.komodotools/ - -# PhpStorm -.idea - -# Eclipse -*.pydevproject -.project -.metadata -bin/** -tmp/** -tmp/**/* -*.tmp -*.bak -*.swp -*~.nib -local.properties -.classpath -.settings/ -.loadpath -.externalToolBuilders/ -*.launch -.cproject -.buildpath - -# SublimeText -/*.sublime-project -*.sublime-workspace - -# NetBeans -nbproject/ -build/ -nbbuild/ -dist/ -nbdist/ -nbactions.xml -nb-configuration.xml - -# Windows system files -$RECYCLE.BIN/ -Thumbs.db -ehthumbs.db -Desktop.ini - -# OSX system files -.DS_store -.AppleDouble -.LSOverride -Icon -._* -.Spotlight-V100 -.Trashes - -# SVN/CVS -.svn -/CVS/* -*/CVS/* -.cvsignore -*/.cvsignore - -# temporary files/folders - -tmp* -~* -*.~* -*.bak -*.swp - -build/ -png/ -psd/ -doc/ -svg/ -vendors/ -pixelPerfect/ -node_modules/ -docs/ - -_ide_helper.php diff --git a/plugins/lovata/shopaholic/CONTRIBUTING.md b/plugins/lovata/shopaholic/CONTRIBUTING.md deleted file mode 100644 index 73fcc8f70..000000000 --- a/plugins/lovata/shopaholic/CONTRIBUTING.md +++ /dev/null @@ -1,60 +0,0 @@ -# Contributing - -When contributing to this repository, please first discuss the change you wish to make via issue with the owners of this repository before making a change. - -Please note we have a code of conduct, please follow it in all your interactions with the project. - -## Pull Request Process - -1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. -2. Cover your code contribution with unit tests and ensure your Pull Request passes all the tests. -3. Open a Pull Request to a `develop` branch. -4. Add to the Pull Request details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. -5. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. - -## Code of Conduct - -### Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -### Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language. -* Being respectful of differing viewpoints and experiences. -* Gracefully accepting constructive criticism. -* Focusing on what is best for the community. -* Showing empathy towards other community members. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances. -* Trolling, insulting/derogatory comments, and personal or political attacks. -* Public or private harassment. -* Publishing others' private information, such as a physical or electronic address, without explicit permission. -* Other conduct which could reasonably be considered inappropriate in a professional setting. - -### Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -### Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -### Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [support@lovata.com](mailto:support@lovata.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -### Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/plugins/lovata/shopaholic/LICENSE.md b/plugins/lovata/shopaholic/LICENSE.md deleted file mode 100644 index 9cecc1d46..000000000 --- a/plugins/lovata/shopaholic/LICENSE.md +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - 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. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -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. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - 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 -state 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 3 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, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program 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, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU 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 Lesser General -Public License instead of this License. But first, please read -. diff --git a/plugins/lovata/shopaholic/PHPMD_custom.xml b/plugins/lovata/shopaholic/PHPMD_custom.xml deleted file mode 100644 index a24b60992..000000000 --- a/plugins/lovata/shopaholic/PHPMD_custom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - Custom rules for checking project LOVATA Group - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/lovata/shopaholic/Plugin.php b/plugins/lovata/shopaholic/Plugin.php deleted file mode 100644 index 43826ec99..000000000 --- a/plugins/lovata/shopaholic/Plugin.php +++ /dev/null @@ -1,207 +0,0 @@ -registerConsoleCommand('shopaholic:check.table.integrity', CheckTableIntegrity::class); - $this->registerConsoleCommand('shopaholic:import_from_xml', ImportFromXML::class); - $this->registerConsoleCommand('shopaholic:preconfigure_import_from_xml', PreconfigureImportSettingsFromXML::class); - } - - /** - * @return array - */ - public function registerComponents() - { - return [ - 'Lovata\Shopaholic\Components\CategoryList' => 'CategoryList', - 'Lovata\Shopaholic\Components\CategoryPage' => 'CategoryPage', - 'Lovata\Shopaholic\Components\CategoryData' => 'CategoryData', - 'Lovata\Shopaholic\Components\Breadcrumbs' => 'CatalogBreadcrumbs', - 'Lovata\Shopaholic\Components\CurrencyList' => 'CurrencyList', - 'Lovata\Shopaholic\Components\ProductData' => 'ProductData', - 'Lovata\Shopaholic\Components\ProductPage' => 'ProductPage', - 'Lovata\Shopaholic\Components\ProductList' => 'ProductList', - 'Lovata\Shopaholic\Components\BrandData' => 'BrandData', - 'Lovata\Shopaholic\Components\BrandPage' => 'BrandPage', - 'Lovata\Shopaholic\Components\BrandList' => 'BrandList', - 'Lovata\Shopaholic\Components\PromoBlockData' => 'PromoBlockData', - 'Lovata\Shopaholic\Components\PromoBlockPage' => 'PromoBlockPage', - 'Lovata\Shopaholic\Components\PromoBlockList' => 'PromoBlockList', - ]; - } - - /** - * @return array - */ - public function registerSettings() - { - return [ - 'shopaholic-menu-main-settings' => [ - 'label' => 'lovata.shopaholic::lang.menu.main_settings', - 'description' => 'lovata.shopaholic::lang.menu.main_settings_description', - 'category' => 'lovata.shopaholic::lang.tab.settings', - 'icon' => 'oc-icon-book', - 'class' => 'Lovata\Shopaholic\Models\Settings', - 'order' => 100, - 'permissions' => [ - 'shopaholic-settings', - ], - ], - 'shopaholic-menu-currency' => [ - 'label' => 'lovata.shopaholic::lang.menu.currency', - 'description' => 'lovata.shopaholic::lang.menu.currency_description', - 'category' => 'lovata.shopaholic::lang.tab.settings', - 'icon' => 'oc-icon-usd', - 'url' => Backend::url('lovata/shopaholic/currencies'), - 'order' => 1800, - 'permissions' => [ - 'shopaholic-menu-currency', - ], - ], - 'shopaholic-menu-tax' => [ - 'label' => 'lovata.shopaholic::lang.menu.tax', - 'description' => 'lovata.shopaholic::lang.menu.tax_description', - 'category' => 'lovata.shopaholic::lang.tab.settings', - 'icon' => 'oc-icon-percent', - 'url' => Backend::url('lovata/shopaholic/taxes'), - 'order' => 1900, - 'permissions' => [ - 'shopaholic-menu-tax', - ], - ], - 'shopaholic-menu-price-types' => [ - 'label' => 'lovata.shopaholic::lang.menu.price_type', - 'description' => 'lovata.shopaholic::lang.menu.price_type_description', - 'category' => 'lovata.shopaholic::lang.tab.settings', - 'icon' => 'oc-icon-money', - 'url' => Backend::url('lovata/shopaholic/pricetypes'), - 'order' => 2000, - 'permissions' => [ - 'shopaholic-menu-price-type', - ], - ], - 'shopaholic-menu-import-xml-file' => [ - 'label' => 'lovata.shopaholic::lang.menu.import_xml_file', - 'description' => 'lovata.shopaholic::lang.menu.import_xml_file_description', - 'category' => 'lovata.shopaholic::lang.tab.settings', - 'icon' => 'oc-icon-download', - 'class' => 'Lovata\Shopaholic\Models\XmlImportSettings', - 'order' => 8000, - 'permissions' => [ - 'shopaholic-menu-import-xml-file', - ], - ], - 'shopaholic-menu-measure' => [ - 'label' => 'lovata.shopaholic::lang.menu.measure', - 'description' => 'lovata.shopaholic::lang.menu.measure_description', - 'category' => 'lovata.shopaholic::lang.tab.settings', - 'url' => Backend::url('lovata/shopaholic/measures'), - 'icon' => 'icon-balance-scale', - 'permissions' => ['shopaholic-menu-measure'], - 'order' => 1650, - ], - ]; - } - - /** - * Plugin boot method - */ - public function boot() - { - $this->addEventListener(); - } - - /** - * Add event listeners - */ - protected function addEventListener() - { - Event::subscribe(ExtendMenuHandler::class); - //Brand events - Event::subscribe(BrandModelHandler::class); - //Category events - Event::subscribe(CategoryModelHandler::class); - //Currency events - Event::subscribe(CurrencyModelHandler::class); - //Measure events - Event::subscribe(MeasureModelHandler::class); - //Offer events - Event::subscribe(OfferModelHandler::class); - Event::subscribe(ExtendOfferFieldsHandler::class); - //Price events - Event::subscribe(PriceModelHandler::class); - //Product events - Event::subscribe(ProductModelHandler::class); - Event::subscribe(ProductRelationHandler::class); - //Promo block events - Event::subscribe(PromoBlockModelHandler::class); - Event::subscribe(PromoBlockRelationHandler::class); - //Tax events - Event::subscribe(TaxModelHandler::class); - Event::subscribe(TaxRelationHandler::class); - Event::subscribe(ExtendTaxFieldsHandler::class); - } - - /** - * @return array - */ - public function registerReportWidgets() - { - return [ - 'Lovata\Shopaholic\Widgets\ImportFromXML' => [ - 'label' => 'lovata.shopaholic::lang.widget.import_from_xml_files', - ], - 'Lovata\Shopaholic\Widgets\ImportFromCSV' => [ - 'label' => 'lovata.shopaholic::lang.widget.import_from_csv_files', - ] - ]; - } -} diff --git a/plugins/lovata/shopaholic/README.md b/plugins/lovata/shopaholic/README.md deleted file mode 100644 index 77b52a513..000000000 --- a/plugins/lovata/shopaholic/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# Shopaholic - -[![Build Status](https://travis-ci.org/oc-shopaholic/oc-shopaholic-plugin.svg?branch=master)](https://travis-ci.org/oc-shopaholic/oc-shopaholic-plugin) -[![Coverage Status](https://coveralls.io/repos/github/oc-shopaholic/oc-shopaholic-plugin/badge.svg?branch=master)](https://coveralls.io/github/oc-shopaholic/oc-shopaholic-plugin?branch=master) -[![Maintainability](https://api.codeclimate.com/v1/badges/3d1cb11b6df3e444422f/maintainability)](https://codeclimate.com/github/oc-shopaholic/oc-shopaholic-plugin/maintainability) -[![Crowdin](https://d322cqt584bo4o.cloudfront.net/shopaholic-plugin-for-october/localized.svg)](https://crowdin.com/project/shopaholic-plugin-for-october) -[![Financial contributors](https://opencollective.com/oc-shopaholic/tiers/badge.svg)](https://opencollective.com/oc-shopaholic) -[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) - -E-Commerce plugin by [LOVATA](https://lovata.com) for October CMS. - -![Shopaholic Banner](assets/images/shopaholic-banner.png) - -## Overview - -Shopaholic is a scalable and highly flexible e-commerce ecosystem for [October CMS](https://octobercms.com). The core plugin is provided free of charge and includes the following set of features: - -* Products and trade offers management. -* Product image gallery management. -* Products grouping by categories and brands. -* Multi-currency, taxes and price types management. -* Data import (product, offers, categories, brands) from a CSV file. -* Basic products filtering (by category, brand etc.) and sorting (by price, new additions etc.) - -With the help of Shopaholic’s standard functions, combining them together it’s also possible to solve many other non-trivial tasks, such as displaying blocks of random products, displaying the cheapest and most expensive products, etc. - -In order to cater to the growing scalability demands of a project, the ecosystem provides [extra plugins](https://octobercms.com/plugin/lovata-shopaholic#extensions) to extend the basic functionality. With these plugins sellers can: - -* Manage multi-language content (via [RainLab.Translate](https://octobercms.com/plugin/rainlab-translate)). -* Sell online (via [Lovata.PayPalShopaholic](https://octobercms.com/plugin/lovata-paypalshopaholic)). -* Extend online payment options by adding additional payment providers (via [Lovata.OmnipayShopaholic](https://octobercms.com/plugin/lovata-omnipayshopaholic)). -* Create custom products filters by any essence (e.g. by _New additions_, _Discounts_, _In stock_ etc.) (via [Lovata.FilterShopaholic](https://octobercms.com/plugin/lovata-filtershopaholic)). -* Add custom properties to a product (via [Lovata.PropertiesShopaholic](https://octobercms.com/plugin/lovata-propertiesshopaholic)). -* Bind similar products to a certain one (via [Lovata.RelatedProductsShopaholic](https://octobercms.com/plugin/lovata-relatedproductsshopaholic)). -* Manage promo activities (via [Lovata.CouponsShopaholic](https://octobercms.com/plugin/lovata-couponsshopaholic), [Lovata.DiscountsShopaholic](https://octobercms.com/plugin/lovata-discountsshopaholic) and [Lovata.CampaignsShopaholic](https://octobercms.com/plugin/lovata-campaignsshopaholic)). -* Group products for SEO reasons (via [Lovata.TagsShopaholic](https://octobercms.com/plugin/lovata-tagsshopaholic)). -* Manage complex SEO issues (via [Lovata.MightySeo](https://octobercms.com/plugin/lovata-mightyseo)). -* Increase the revenue by assigning accessories to the products (via [Lovata.AccessoriesShopaholic](https://octobercms.com/plugin/lovata-accessoriesshopaholic)). -* Manage customers (via [Lovata.Buddies](https://octobercms.com/plugin/lovata-buddies) or [RainLab.User](https://octobercms.com/plugin/rainlab-user)). - -Besides you can provide a better UX for the customer with the ability to: -* See the popular products ( via [Lovata.PopularityShopaholic](https://octobercms.com/plugin/lovata-popularityshopaholic)). -* Search for the products (via [Lovata.SearchShopaholic](https://octobercms.com/plugin/lovata-searchshopaholic) or [Lovata.SphinxShopaholic](https://octobercms.com/plugin/lovata-sphinxshopaholic)). -* Compare the products (via [Lovata.CompareShopaholic](https://octobercms.com/plugin/lovata-compareshopaholic)). -* Find the products they viewed before (via [Lovata.ViewedProductsShopaholic](https://octobercms.com/plugin/lovata-viewedproductsshopaholic)). -* Leave and read the reviews for the products (via [Lovata.ReviewsShopaholic](https://octobercms.com/plugin/lovata-reviewsshopaholic)). -* Postpone the products for the future purchases (via [Lovata.WishListShopaholic](https://octobercms.com/plugin/lovata-wishlistshopaholic)). - -> Please note, the architecture of the plugins allows [extending](https://octobercms.com/docs/plugin/extending) the existing methods, fields and other data without interfering with original source code! - -The development of Shopaholic’s ecosystem is guided by the similar philosophies of October CMS and Unix like operating systems, where the main focus is to create simple microarchitecture solutions that communicate with each other through smart APIs. - -One one hand, this approach allows keeping performance, security, and functionality of the code to a high standard. On the other hand, it provides a clean and smooth back-end UI/UX that isn't over-bloated with the features. - -## Live demo - -Visit our [demo](http://demo.shopaholic.one/) website. Sign in to [backend](http://demo.shopaholic.one/backend) using the following credentials: -* user: manager -* password: manager - -You can run the demo site locally. To do so, you need to clone the [oc-shopaholic-demo-theme](https://github.com/lovata/oc-shopaholic-demo-theme) repository and follow the steps from the _Installation guide_ in the Readme file. As a result, you will receive a copy of the demo site with a full database. Having a ready-made demo site example, you can easily learn how to operate the plugins. - -## Installation - -Regardless of the installation type you choose, you must install [Toolbox plugin](https://octobercms.com/plugin/lovata-toolbox), which is a required dependency for Shopaholic. - -### Artisan - -Using the Laravel’s CLI is the fastest way to get started. Just run the following commands in a project’s root directory: - -```bash -php artisan plugin:install lovata.toolbox -php artisan plugin:install lovata.shopaholic -``` - -### Composer - -If you prefer Composer run following commands in a project’s root directory: - -``` -composer require lovata/oc-toolbox-plugin -composer require lovata/oc-shopaholic-plugin -php artisan october:up -``` - -> It's not recommended way because of possible collisions with the updating of the plugins. - -Once the plugins are installed take a look at the official documentation for the possible next steps. - -## Documentation - -The complete official documentation of the ecosystem can be found [here](https://github.com/lovata/oc-shopaholic-plugin/wiki). - -## Performance - -As an environment for a testing measurements was used simple Digital Ocean droplet with this configuration: -* Dual Core CPU -* 4 Gb RAM -* Ubuntu 18.04 -* PHP 7.2.0 -* Apache 2.4 -* MySQL 5.7 - -| Products number | Catalog page load time | Product list filtering time | -| ------------------: | ---------------------: | --------------------------: | -| 210 | 100-150 ms | 80-100 ms | -| 21 000 | 900-1100 ms | 500-600 ms | - -If you would like to know how our plugins perform with large catalogs of products, you can visit our [Large Catalog Demo](http://big-demo.shopaholic.one) website that has 21 000 products, 68 000 offers and 210 000 variations of property values. - -## Quality standards - -We ensure the high quality of our plugins and provide you with full support. All of our plugins have extensive documentation. The quality of our plugins goes through rigorous testing, we have launched automated testing for all of our plugins. Our code conforms with the best writing and structuring practices. All this guarantees the stable work of our plugins after they are updated with new functionality and ensures their smooth integration. - -## Get involved - -If you're interested in the improvement of this project you can help in the following ways: -* bug reporting and new feature requesting by creating issues on plugin [GitHub page](https://github.com/lovata/oc-shopaholic-plugin/issues); -* contribution to a project following these [instructions](https://github.com/lovata/oc-shopaholic-plugin/blob/master/CONTRIBUTING.md); -* localization to your language using [Crowdin](https://crowdin.com/project/shopaholic-plugin-for-october) service. - -Let us know if you have any other questions, ideas or suggestions! Just drop a line at shopaholic@lovata.com. - -## License - -© 2019, [LOVATA Group, LLC](https://github.com/lovata) under [GNU GPL v3](https://opensource.org/licenses/GPL-3.0). - -Developed by [Andrey Kharanenka](https://github.com/kharanenka). diff --git a/plugins/lovata/shopaholic/assets/images/icon.svg b/plugins/lovata/shopaholic/assets/images/icon.svg deleted file mode 100644 index 36b41fbeb..000000000 --- a/plugins/lovata/shopaholic/assets/images/icon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/plugins/lovata/shopaholic/assets/images/logo.png b/plugins/lovata/shopaholic/assets/images/logo.png deleted file mode 100644 index 88c2ad8a5..000000000 Binary files a/plugins/lovata/shopaholic/assets/images/logo.png and /dev/null differ diff --git a/plugins/lovata/shopaholic/assets/images/shopaholic-banner.png b/plugins/lovata/shopaholic/assets/images/shopaholic-banner.png deleted file mode 100644 index 710834578..000000000 Binary files a/plugins/lovata/shopaholic/assets/images/shopaholic-banner.png and /dev/null differ diff --git a/plugins/lovata/shopaholic/classes/collection/BrandCollection.php b/plugins/lovata/shopaholic/classes/collection/BrandCollection.php deleted file mode 100644 index 6cbe3da95..000000000 --- a/plugins/lovata/shopaholic/classes/collection/BrandCollection.php +++ /dev/null @@ -1,88 +0,0 @@ -sorting->get(); - - return $this->applySorting($arResultIDList); - } - - /** - * Apply filter by active brand list - * @return $this - */ - public function active() - { - $arResultIDList = BrandListStore::instance()->active->get(); - - return $this->intersect($arResultIDList); - } - - /** - * Filter brand list by category ID - * @param int|array $arCategoryIDList - * @param bool $bWithChildren - * @return $this - */ - public function category($arCategoryIDList, $bWithChildren = false) - { - if (!is_array($arCategoryIDList)) { - $arCategoryIDList = [$arCategoryIDList]; - } - - $arResultIDList = []; - foreach ($arCategoryIDList as $iCategoryID) { - $arResultIDList = array_merge($arResultIDList, (array) BrandListStore::instance()->category->get($iCategoryID)); - if ($bWithChildren) { - $arResultIDList = array_merge($arResultIDList, (array) $this->getIDListChildrenCategory($iCategoryID)); - } - } - - return $this->intersect($arResultIDList); - } - - /** - * Get brand ID list for children categories - * @param int $iCategoryID - * @return array - */ - protected function getIDListChildrenCategory($iCategoryID) : array - { - //Get category item - $obCategoryItem = CategoryItem::make($iCategoryID); - if ($obCategoryItem->isEmpty() || $obCategoryItem->children->isEmpty()) { - return []; - } - - $arResultIDList = []; - foreach ($obCategoryItem->children as $obChildCategoryItem) { - $arResultIDList = array_merge($arResultIDList, (array) BrandListStore::instance()->category->get($obChildCategoryItem->id)); - $arResultIDList = array_merge($arResultIDList, $this->getIDListChildrenCategory($obChildCategoryItem->id)); - } - - return $arResultIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/collection/CategoryCollection.php b/plugins/lovata/shopaholic/classes/collection/CategoryCollection.php deleted file mode 100644 index b0273b77d..000000000 --- a/plugins/lovata/shopaholic/classes/collection/CategoryCollection.php +++ /dev/null @@ -1,41 +0,0 @@ -top_level->get(); - - return $this->applySorting($arResultIDList); - } - - /** - * Apply filter by active field - * @return $this - */ - public function active() - { - $arResultIDList = CategoryListStore::instance()->active->get(); - - return $this->intersect($arResultIDList); - } -} diff --git a/plugins/lovata/shopaholic/classes/collection/CurrencyCollection.php b/plugins/lovata/shopaholic/classes/collection/CurrencyCollection.php deleted file mode 100644 index 8162d89f6..000000000 --- a/plugins/lovata/shopaholic/classes/collection/CurrencyCollection.php +++ /dev/null @@ -1,39 +0,0 @@ -sorting->get(); - - return $this->applySorting($arResultIDList); - } - - /** - * Apply filter by active currency list - * @return $this - */ - public function active() - { - $arResultIDList = CurrencyListStore::instance()->active->get(); - - return $this->intersect($arResultIDList); - } -} diff --git a/plugins/lovata/shopaholic/classes/collection/OfferCollection.php b/plugins/lovata/shopaholic/classes/collection/OfferCollection.php deleted file mode 100644 index 8bf337871..000000000 --- a/plugins/lovata/shopaholic/classes/collection/OfferCollection.php +++ /dev/null @@ -1,67 +0,0 @@ -sorting->get($sSorting); - - return $this->applySorting($arResultIDList); - } - - /** - * Apply filter by active field - * @see \Lovata\Shopaholic\Tests\Unit\Collection\OfferCollectionTest::testActiveList() - * @return $this - */ - public function active() - { - $arResultIDList = OfferListStore::instance()->active->get(); - - return $this->intersect($arResultIDList); - } - - /** - * Get the total count of all order positions - * @return int - */ - public function getTotalQuantity() - { - $iQuantityCount = 0; - - $arOfferList = $this->all(); - - /** @var \Lovata\Shopaholic\Classes\Item\OfferItem $arOfferItem */ - foreach ($arOfferList as $arOfferItem) { - $iQuantityCount += $arOfferItem->quantity; - } - - return $iQuantityCount; - } -} diff --git a/plugins/lovata/shopaholic/classes/collection/ProductCollection.php b/plugins/lovata/shopaholic/classes/collection/ProductCollection.php deleted file mode 100644 index 1f54075dd..000000000 --- a/plugins/lovata/shopaholic/classes/collection/ProductCollection.php +++ /dev/null @@ -1,258 +0,0 @@ -sorting->get($sSorting); - - return $this->applySorting($arResultIDList); - } - - /** - * Apply filter by active field - * @return $this - */ - public function active() - { - $arResultIDList = ProductListStore::instance()->active->get(); - - return $this->intersect($arResultIDList); - } - - /** - * Filter product list by category ID - * @param int|array $arCategoryIDList - * @param bool $bWithChildren - * @return $this - */ - public function category($arCategoryIDList, $bWithChildren = false) - { - if (!is_array($arCategoryIDList)) { - $arCategoryIDList = [$arCategoryIDList]; - } - - $arResultIDList = []; - foreach ($arCategoryIDList as $iCategoryID) { - $arResultIDList = array_merge($arResultIDList, (array) ProductListStore::instance()->category->get($iCategoryID)); - if ($bWithChildren) { - $arResultIDList = array_merge($arResultIDList, (array) $this->getIDListChildrenCategory($iCategoryID)); - } - } - - return $this->intersect($arResultIDList); - } - - /** - * Filter product list by brand ID - * @param int $iBrandID - * @return $this - */ - public function brand($iBrandID) - { - $arResultIDList = ProductListStore::instance()->brand->get($iBrandID); - - return $this->intersect($arResultIDList); - } - - /** - * Filter product list by promo block ID + different extensions - * @param int $iPromoBlockID - * @return $this - */ - public function promo($iPromoBlockID) - { - $arResultIDList = ProductListStore::instance()->promo_block->get($iPromoBlockID); - - //Fire event, get additional product ID list - $arEventDataList = Event::fire(PromoBlock::EVENT_GET_PRODUCT_LIST, $iPromoBlockID); - if (empty($arEventDataList)) { - return $this->intersect($arResultIDList); - } - - //Process event data - foreach ($arEventDataList as $arProductIDList) { - if (empty($arProductIDList) || !is_array($arProductIDList)) { - continue; - } - - $arResultIDList = array_merge($arResultIDList, $arProductIDList); - } - - $arResultIDList = array_unique($arResultIDList); - - return $this->intersect($arResultIDList); - } - - /** - * Filter product list by promo block ID - * @param int $iPromoBlockID - * @return $this - */ - public function promoBlock($iPromoBlockID) - { - $arResultIDList = ProductListStore::instance()->promo_block->get($iPromoBlockID); - - return $this->intersect($arResultIDList); - } - - /** - * Get offer with min price - * @param string $sPriceTypeCode - * @return OfferItem - */ - public function getOfferMinPrice($sPriceTypeCode = null) - { - $obProductList = clone $this; - - $sSorting = ProductListStore::SORT_PRICE_ASC; - if (!empty($sPriceTypeCode)) { - $sSorting .= '|'.$sPriceTypeCode; - } - - $obProductList->sort($sSorting); - - //Get product with min price - /** @var \Lovata\Shopaholic\Classes\Item\ProductItem $obProductItem */ - $obProductItem = $obProductList->first(); - - if ($obProductItem->isEmpty()) { - return OfferItem::make(null); - } - - //Get offer with min price - $obOfferCollection = $obProductItem->offer; - if ($obOfferCollection->isEmpty()) { - return OfferItem::make(null); - } - - $sSorting = OfferListStore::SORT_PRICE_ASC; - if (!empty($sPriceTypeCode)) { - $sSorting .= '|'.$sPriceTypeCode; - } - - /** @var OfferItem $obOfferItem */ - $obOfferItem = $obOfferCollection->sort($sSorting)->first(); - - return $obOfferItem; - } - - /** - * Get offer with max price - * @param string $sPriceTypeCode - * @return OfferItem - */ - public function getOfferMaxPrice($sPriceTypeCode = null) - { - $obProductList = clone $this; - - $sSorting = ProductListStore::SORT_PRICE_ASC; - if (!empty($sPriceTypeCode)) { - $sSorting .= '|'.$sPriceTypeCode; - } - - $obProductList->sort($sSorting); - - //Get product with min price - /** @var \Lovata\Shopaholic\Classes\Item\ProductItem $obProductItem */ - $obProductItem = $obProductList->last(); - - if ($obProductItem->isEmpty()) { - return OfferItem::make(null); - } - - //Get offer with min price - $obOfferCollection = $obProductItem->offer; - if ($obOfferCollection->isEmpty()) { - return OfferItem::make(null); - } - - $sSorting = OfferListStore::SORT_PRICE_ASC; - if (!empty($sPriceTypeCode)) { - $sSorting .= '|'.$sPriceTypeCode; - } - - /** @var OfferItem $obOfferItem */ - $obOfferItem = $obOfferCollection->sort($sSorting)->last(); - - return $obOfferItem; - } - - /** - * Get product ID list for children categories - * @param int $iCategoryID - * @return array - */ - protected function getIDListChildrenCategory($iCategoryID) : array - { - //Get category item - $obCategoryItem = CategoryItem::make($iCategoryID); - if ($obCategoryItem->isEmpty() || $obCategoryItem->children->isEmpty()) { - return []; - } - - $arResultIDList = []; - foreach ($obCategoryItem->children as $obChildCategoryItem) { - $arResultIDList = array_merge($arResultIDList, (array) ProductListStore::instance()->category->get($obChildCategoryItem->id)); - $arResultIDList = array_merge($arResultIDList, $this->getIDListChildrenCategory($obChildCategoryItem->id)); - } - - return $arResultIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/collection/PromoBlockCollection.php b/plugins/lovata/shopaholic/classes/collection/PromoBlockCollection.php deleted file mode 100644 index 795c64c6f..000000000 --- a/plugins/lovata/shopaholic/classes/collection/PromoBlockCollection.php +++ /dev/null @@ -1,62 +0,0 @@ -sorting->get($sSorting); - - return $this->applySorting($arResultIDList); - } - - /** - * Apply filter by active field - * @return $this - */ - public function active() - { - $arResultIDList = PromoBlockListStore::instance()->active->get(); - - return $this->intersect($arResultIDList); - } - - /** - * Apply filter by hidden field - * @return $this - */ - public function hidden() - { - $arResultIDList = PromoBlockListStore::instance()->hidden->get(); - - return $this->intersect($arResultIDList); - } - - /** - * Apply filter by hidden field - * @return $this - */ - public function notHidden() - { - $arResultIDList = PromoBlockListStore::instance()->not_hidden->get(); - - return $this->intersect($arResultIDList); - } -} diff --git a/plugins/lovata/shopaholic/classes/collection/TaxCollection.php b/plugins/lovata/shopaholic/classes/collection/TaxCollection.php deleted file mode 100644 index e89ec54dc..000000000 --- a/plugins/lovata/shopaholic/classes/collection/TaxCollection.php +++ /dev/null @@ -1,39 +0,0 @@ -sorting->get(); - - return $this->applySorting($arResultIDList); - } - - /** - * Apply filter by active tax list - * @return $this - */ - public function active() - { - $arResultIDList = TaxListStore::instance()->active->get(); - - return $this->intersect($arResultIDList); - } -} diff --git a/plugins/lovata/shopaholic/classes/console/CheckTableIntegrity.php b/plugins/lovata/shopaholic/classes/console/CheckTableIntegrity.php deleted file mode 100644 index 4047debfe..000000000 --- a/plugins/lovata/shopaholic/classes/console/CheckTableIntegrity.php +++ /dev/null @@ -1,56 +0,0 @@ - 'plugins/lovata/shopaholic/updates/update_table_users_add_currency_field.php', 'class' => '\Lovata\Shopaholic\Updates\UpdateTableUsersAddCurrencyField'], - ['path' => 'plugins/lovata/compareshopaholic/updates/update_table_users.php', 'class' => '\Lovata\CompareShopaholic\Updates\UpdateTableUsers'], - ['path' => 'plugins/lovata/ordersshopaholic/updates/table_update_taxes_add_applied_to_shipping_price.php', 'class' => '\Lovata\OrdersShopaholic\Updates\TableUpdateTaxesAddAppliedToShippingPrice'], - ['path' => 'plugins/lovata/searchshopaholic/updates/update_table_tag.php', 'class' => '\Lovata\SearchShopaholic\Updates\UpdateTableTag'], - ['path' => 'plugins/lovata/sphinxshopaholic/updates/update_table_tag.php', 'class' => '\Lovata\SphinxShopaholic\Updates\UpdateTableTag'], - ['path' => 'plugins/lovata/viewedproductsshopaholic/updates/update_table_users.php', 'class' => '\Lovata\ViewedProductsShopaholic\Updates\UpdateTableUsers'], - ['path' => 'plugins/lovata/wishlistshopaholic/updates/update_table_users.php', 'class' => '\Lovata\WishListShopaholic\Updates\UpdateTableUsers'], - ]; - - /** - * Execute the console command. - * @throws \Throwable - */ - public function handle() - { - foreach ($this->arMigrationList as $arMigrationData) { - $sClassName = $arMigrationData['class']; - $sFilePath = base_path($arMigrationData['path']); - if (!file_exists($sFilePath)) { - continue; - } - - include_once $sFilePath; - - if (!class_exists($sClassName)) { - continue; - } - - /** @var \October\Rain\Database\Updates\Migration $obMigration */ - $obMigration = new $sClassName(); - $obMigration->up(); - } - } -} diff --git a/plugins/lovata/shopaholic/classes/console/ImportFromXML.php b/plugins/lovata/shopaholic/classes/console/ImportFromXML.php deleted file mode 100644 index ebbb8bfe3..000000000 --- a/plugins/lovata/shopaholic/classes/console/ImportFromXML.php +++ /dev/null @@ -1,83 +0,0 @@ - ImportBrandModelFromXML::class, - 'category' => ImportCategoryModelFromXML::class, - 'property' => 'Lovata\PropertiesShopaholic\Classes\Import\ImportPropertyModelFromXML', - 'product' => ImportProductModelFromXML::class, - 'offer' => ImportOfferModelFromXML::class, - 'price' => ImportOfferPriceFromXML::class, - ]; - - /** - * Get the console command options. - * @return array - */ - protected function getOptions() - { - return [ - ['import', null, InputOption::VALUE_OPTIONAL, 'Available values: brand,category,property,product,offer.', null], - ]; - } - - /** - * Execute the console command. - * @throws \Throwable - */ - public function handle() - { - $arImportList = explode(',', $this->option('import')); - $arImportList = array_filter($arImportList); - - foreach ($this->arClassList as $sKey => $sImportClass) { - if (!class_exists($sImportClass) || (!empty($arImportList) && !in_array($sKey, $arImportList))) { - continue; - } - - /** @var \Lovata\Toolbox\Classes\Helper\AbstractImportModelFromXML $obImport */ - $obImport = new $sImportClass(); - $obImport->openMainFile(); - if (empty($obImport->getTotalCount())) { - continue; - } - - $this->info("Start import for \"$sKey\""); - - $obProgressBar = $this->output->createProgressBar($obImport->getTotalCount()); - $obImport->import($obProgressBar); - $obProgressBar->finish(); - - $this->info("\nFinish import for \"$sKey\"\n"); - $this->info("Created - {$obImport->getCreatedCount()}"); - $this->info("Updated - {$obImport->getUpdatedCount()}"); - $this->warn("Skipped - {$obImport->getSkippedCount()}"); - $this->info("Processed - {$obImport->getProcessedCount()}\n"); - } - } -} diff --git a/plugins/lovata/shopaholic/classes/console/PreconfigureImportSettingsFromXML.php b/plugins/lovata/shopaholic/classes/console/PreconfigureImportSettingsFromXML.php deleted file mode 100644 index 46ba68b1c..000000000 --- a/plugins/lovata/shopaholic/classes/console/PreconfigureImportSettingsFromXML.php +++ /dev/null @@ -1,58 +0,0 @@ - '1C:Enterprise', - 'config' => '{"file_list":[{"path":"temp\/import\/import.xml"},{"path":"temp\/import\/offers.xml"}],"image_folder":"temp\/import","product":[{"field":"external_id","path_to_field":"\u0418\u0434"},{"field":"name","path_to_field":"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435"},{"field":"code","path_to_field":"\u0428\u0442\u0440\u0438\u0445\u043a\u043e\u0434"},{"field":"category_id","path_to_field":"\u0413\u0440\u0443\u043f\u043f\u044b"},{"field":"additional_category","path_to_field":"\u0413\u0440\u0443\u043f\u043f\u044b"},{"field":"preview_image","path_to_field":"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430"},{"field":"images","path_to_field":"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430"}],"product_file_path":"0","product_path_to_list":"\u041a\u0430\u0442\u0430\u043b\u043e\u0433\/\u0422\u043e\u0432\u0430\u0440\u044b\/\u0422\u043e\u0432\u0430\u0440","brand_file_path":"","brand_path_to_list":"","brand":[],"brand_deactivate":"0","category_file_path":"0","category_path_to_list":"\u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\/\u0413\u0440\u0443\u043f\u043f\u044b\/\u0413\u0440\u0443\u043f\u043f\u0430","category_deactivate":"0","category":[{"field":"external_id","path_to_field":"\u0418\u0434"},{"field":"name","path_to_field":"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435"},{"field":"active","path_to_field":"\u0411\u0438\u0442\u0440\u0438\u043a\u0441\u0410\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c"},{"field":"children","path_to_field":"\u0413\u0440\u0443\u043f\u043f\u044b\/\u0413\u0440\u0443\u043f\u043f\u0430"}],"property_file_path":"0","property_path_to_list":"\u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\/\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430\/\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e","property_deactivate":"0","property":[{"field":"external_id","path_to_field":"\u0418\u0434"},{"field":"name","path_to_field":"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435"}],"property_import_enable":"1","brand_import_enable":"0","category_import_enable":"1","product_import_enable":"1","offer_import_enable":"1","offer_file_path":"1","offer_path_to_list":"\u041f\u0430\u043a\u0435\u0442\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439\/\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\/\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435","offer":[{"field":"external_id","path_to_field":"\u0418\u0434"},{"field":"product_id","path_to_field":"\u0418\u0434"},{"field":"code","path_to_field":"\u0428\u0442\u0440\u0438\u0445\u043a\u043e\u0434"},{"field":"name","path_to_field":"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435"},{"field":"preview_image","path_to_field":"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430"},{"field":"images","path_to_field":"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430"},{"field":"quantity","path_to_field":"\u041e\u0441\u0442\u0430\u0442\u043a\u0438\/\u041e\u0441\u0442\u0430\u0442\u043e\u043a\/\u0421\u043a\u043b\u0430\u0434\/\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e"},{"field":"price","path_to_field":"\u0426\u0435\u043d\u044b\/\u0426\u0435\u043d\u0430\/\u0426\u0435\u043d\u0430\u0417\u0430\u0415\u0434\u0438\u043d\u0438\u0446\u0443"}],"price_import_enable":"1","price_file_path":"1","price_path_to_list":"\u041f\u0430\u043a\u0435\u0442\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439\/\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\/\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435","price":[{"field":"external_id","path_to_field":"\u0418\u0434"},{"field":"quantity","path_to_field":"\u041e\u0441\u0442\u0430\u0442\u043a\u0438\/\u041e\u0441\u0442\u0430\u0442\u043e\u043a\/\u0421\u043a\u043b\u0430\u0434\/\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e"},{"field":"price","path_to_field":"\u0426\u0435\u043d\u044b\/\u0426\u0435\u043d\u0430\/\u0426\u0435\u043d\u0430\u0417\u0430\u0415\u0434\u0438\u043d\u0438\u0446\u0443"}],"product_property_list_path":"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0421\u0432\u043e\u0439\u0441\u0442\u0432\/\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430","product_property_id_path":"\u0418\u0434","product_property_value_path":"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435","offer_property_list_path":"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0421\u0432\u043e\u0439\u0441\u0442\u0432\/\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430","offer_property_id_path":"\u0418\u0434","offer_property_value_path":"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435"}', - ], - ]; - - /** - * Execute the console command. - * @throws \Throwable - */ - public function handle() - { - $arSettings = []; - $sPresetName = $this->choice('Select preset with import settings', array_pluck($this->arPresetList, 'label'), 0); - foreach ($this->arPresetList as $arPresetData) { - if ($arPresetData['label'] != $sPresetName) { - continue; - } - - $arSettings = $arPresetData['config']; - } - - if (empty($arSettings)) { - return; - } - - DB::table('system_settings')->where('item', 'lovata_shopaholic_xml_import_settings')->delete(); - DB::table('system_settings')->insert([ - 'value' => $arSettings, - 'item' => 'lovata_shopaholic_xml_import_settings', - ]); - - $this->call('cache:clear'); - } -} diff --git a/plugins/lovata/shopaholic/classes/event/ExtendMenuHandler.php b/plugins/lovata/shopaholic/classes/event/ExtendMenuHandler.php deleted file mode 100644 index 9bc181af8..000000000 --- a/plugins/lovata/shopaholic/classes/event/ExtendMenuHandler.php +++ /dev/null @@ -1,71 +0,0 @@ -listen('pages.menuitem.listTypes', function () { - - $arResult = [ - CatalogMenuType::MENU_TYPE => 'lovata.shopaholic::lang.menu.shop_catalog', - CategoryMenuType::MENU_TYPE => 'lovata.shopaholic::lang.menu.shop_category', - AllCategoriesMenuType::MENU_TYPE => 'lovata.shopaholic::lang.menu.all_shop_categories', - ]; - - return $arResult; - }); - - $obEvent->listen('pages.menuitem.getTypeInfo', function ($sType) { - - $obMenuType = $this->getMenuTypeObject($sType); - if (!empty($obMenuType)) { - return $obMenuType->getMenuTypeInfo(); - } - }); - - $obEvent->listen('pages.menuitem.resolveItem', function ($sType, $obItem, $sURL) { - - $obMenuType = $this->getMenuTypeObject($sType); - if (!empty($obMenuType)) { - return $obMenuType->resolveMenuItem($obItem, $sURL); - } - }); - } - - /** - * Get new menu object by type value - * @param string $sType - * @return \Lovata\Shopaholic\Classes\Helper\CommonMenuType - */ - protected function getMenuTypeObject($sType) - { - switch ($sType) { - case CategoryMenuType::MENU_TYPE: - return new CategoryMenuType(); - case CatalogMenuType::MENU_TYPE: - return new CatalogMenuType(); - case AllCategoriesMenuType::MENU_TYPE: - return new AllCategoriesMenuType(); - default: - return null; - } - } -} diff --git a/plugins/lovata/shopaholic/classes/event/brand/BrandModelHandler.php b/plugins/lovata/shopaholic/classes/event/brand/BrandModelHandler.php deleted file mode 100644 index 8e8895447..000000000 --- a/plugins/lovata/shopaholic/classes/event/brand/BrandModelHandler.php +++ /dev/null @@ -1,98 +0,0 @@ -translatable[] = ['slug', 'index' => true]; - } - }); - - $obEvent->listen('shopaholic.brand.update.sorting', function () { - $this->clearSortingList(); - }); - } - - /** - * After create event handler - */ - protected function afterCreate() - { - parent::afterCreate(); - $this->clearSortingList(); - } - - /** - * After save event handler - */ - protected function afterSave() - { - parent::afterSave(); - - $this->checkFieldChanges('active', BrandListStore::instance()->active); - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - parent::afterDelete(); - $this->clearSortingList(); - - if ($this->obElement->active) { - BrandListStore::instance()->active->clear(); - } - } - - /** - * Clear sorting list - */ - protected function clearSortingList() - { - BrandListStore::instance()->sorting->clear(); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() - { - return Brand::class; - } - - /** - * Get item class name - * @return string - */ - protected function getItemClass() - { - return BrandItem::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/category/CategoryModelHandler.php b/plugins/lovata/shopaholic/classes/event/category/CategoryModelHandler.php deleted file mode 100644 index 982ab8756..000000000 --- a/plugins/lovata/shopaholic/classes/event/category/CategoryModelHandler.php +++ /dev/null @@ -1,98 +0,0 @@ -translatable[] = ['slug', 'index' => true]; - } - }); - - $obEvent->listen('shopaholic.category.update.sorting', function () { - CategoryListStore::instance()->top_level->clear(); - - //Get category ID list - $arCategoryIDList = Category::lists('id'); - if (empty($arCategoryIDList)) { - return; - } - - //Clear cache for all categories - foreach ($arCategoryIDList as $iCategoryID) { - CategoryItem::clearCache($iCategoryID); - } - }); - } - - /** - * After save event handler - */ - protected function afterSave() - { - parent::afterSave(); - CategoryListStore::instance()->top_level->clear(); - - $this->checkFieldChanges('active', CategoryListStore::instance()->active); - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - parent::afterDelete(); - CategoryListStore::instance()->top_level->clear(); - - //Clear parent item cache - if (!empty($this->obElement->parent_id)) { - CategoryItem::clearCache($this->obElement->parent_id); - } - - if ($this->obElement->active) { - CategoryListStore::instance()->active->clear(); - } - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() - { - return Category::class; - } - - /** - * Get item class name - * @return string - */ - protected function getItemClass() - { - return CategoryItem::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/currency/CurrencyModelHandler.php b/plugins/lovata/shopaholic/classes/event/currency/CurrencyModelHandler.php deleted file mode 100644 index 5c567cfdf..000000000 --- a/plugins/lovata/shopaholic/classes/event/currency/CurrencyModelHandler.php +++ /dev/null @@ -1,89 +0,0 @@ -listen('shopaholic.currency.update.sorting', function () { - $this->clearSortingList(); - }); - } - - /** - * After create event handler - */ - protected function afterCreate() - { - parent::afterCreate(); - $this->clearSortingList(); - } - - /** - * After save event handler - */ - protected function afterSave() - { - parent::afterSave(); - - $this->checkFieldChanges('active', CurrencyListStore::instance()->active); - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - parent::afterDelete(); - $this->clearSortingList(); - - if ($this->obElement->active) { - CurrencyListStore::instance()->active->clear(); - } - } - - /** - * Clear sorting list - */ - protected function clearSortingList() - { - CurrencyListStore::instance()->sorting->clear(); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() - { - return Currency::class; - } - - /** - * Get item class name - * @return string - */ - protected function getItemClass() - { - return CurrencyItem::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/measure/MeasureModelHandler.php b/plugins/lovata/shopaholic/classes/event/measure/MeasureModelHandler.php deleted file mode 100644 index ca31aec9b..000000000 --- a/plugins/lovata/shopaholic/classes/event/measure/MeasureModelHandler.php +++ /dev/null @@ -1,35 +0,0 @@ - [ - 'label' => 'lovata.shopaholic::lang.field.measure', - 'type' => 'relation', - 'span' => 'left', - 'emptyOption' => 'lovata.toolbox::lang.field.empty', - 'tab' => 'lovata.shopaholic::lang.tab.dimensions', - ], - 'weight' => [ - 'label' => $this->getWeightFieldLabel(), - 'type' => 'number', - 'span' => 'left', - 'tab' => 'lovata.shopaholic::lang.tab.dimensions', - ], - 'height' => [ - 'label' => $this->getDimensionsFieldLabel('lovata.toolbox::lang.field.height'), - 'type' => 'number', - 'span' => 'left', - 'tab' => 'lovata.shopaholic::lang.tab.dimensions', - ], - 'length' => [ - 'label' => $this->getDimensionsFieldLabel('lovata.toolbox::lang.field.length'), - 'type' => 'number', - 'span' => 'left', - 'tab' => 'lovata.shopaholic::lang.tab.dimensions', - ], - 'width' => [ - 'label' => $this->getDimensionsFieldLabel('lovata.toolbox::lang.field.width'), - 'type' => 'number', - 'span' => 'left', - 'tab' => 'lovata.shopaholic::lang.tab.dimensions', - ], - 'quantity_in_unit' => [ - 'label' => 'lovata.shopaholic::lang.field.quantity_in_unit', - 'type' => 'number', - 'span' => 'left', - 'tab' => 'lovata.shopaholic::lang.tab.dimensions', - ], - 'measure_of_unit' => [ - 'label' => 'lovata.shopaholic::lang.field.measure_of_unit', - 'type' => 'relation', - 'span' => 'left', - 'emptyOption' => 'lovata.toolbox::lang.field.empty', - 'tab' => 'lovata.shopaholic::lang.tab.dimensions', - ], - ]; - - $obWidget->addTabFields($arAdditionFields); - } - - /** - * Get weight field label - * @return string - */ - protected function getWeightFieldLabel() - { - $sLabel = Lang::get('lovata.toolbox::lang.field.weight'); - $iMeasureID = Settings::getValue('weight_measure'); - if (empty($iMeasureID)) { - return $sLabel; - } - - $obMeasure = Measure::find($iMeasureID); - if (empty($obMeasure)) { - return $sLabel; - } - - $sLabel .= " ({$obMeasure->name})"; - - return $sLabel; - } - - /** - * Get dimensions field label - * @param string $sLangPath - * @return string - */ - protected function getDimensionsFieldLabel($sLangPath) - { - $sLabel = Lang::get($sLangPath); - $iMeasureID = Settings::getValue('dimensions_measure'); - if (empty($iMeasureID)) { - return $sLabel; - } - - $obMeasure = Measure::find($iMeasureID); - if (empty($obMeasure)) { - return $sLabel; - } - - $sLabel .= " ({$obMeasure->name})"; - - return $sLabel; - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() : string - { - return Offer::class; - } - - /** - * Get controller class name - * @return string - */ - protected function getControllerClass() : string - { - return Offers::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/offer/OfferModelHandler.php b/plugins/lovata/shopaholic/classes/event/offer/OfferModelHandler.php deleted file mode 100644 index 342a0ab2a..000000000 --- a/plugins/lovata/shopaholic/classes/event/offer/OfferModelHandler.php +++ /dev/null @@ -1,226 +0,0 @@ -sorting->clear(OfferListStore::SORT_NO); - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_NEW); - } - - /** - * After save event handler - */ - protected function afterSave() - { - parent::afterSave(); - - $this->checkProductIDField(); - - $this->checkActiveField(); - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - parent::afterDelete(); - - if ($this->obElement->active) { - $this->clearProductActiveList(); - $this->clearProductItemCache($this->obElement->product_id); - OfferListStore::instance()->active->clear(); - - $this->clearOfferSortingByPrice(); - - //Clear sorting product list by offer price - $this->clearProductSortingByPrice(); - } - - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_NO); - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_NEW); - } - - /** - * After restore event handler - */ - protected function afterRestore() - { - parent::afterRestore(); - - if ($this->obElement->active) { - $this->clearProductActiveList(); - $this->clearProductItemCache($this->obElement->product_id); - OfferListStore::instance()->active->clear(); - - $this->clearOfferSortingByPrice(); - - //Clear sorting product list by offer price - $this->clearProductSortingByPrice(); - } - - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_NO); - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_NEW); - } - - /** - * Clear product item cache - * @param int $iProductID - */ - protected function clearProductItemCache($iProductID) - { - ProductItem::clearCache($iProductID); - } - - /** - * Clear cache, if product ID field changed - */ - protected function checkProductIDField() - { - //Clear product cache - /** @var int $iOriginalProductID */ - $iOriginalProductID = $this->obElement->getOriginal('product_id'); - - /** @var int $iProductID */ - $iProductID = $this->obElement->getAttribute('product_id'); - - if ($iOriginalProductID == $iProductID) { - return; - } - - if (!empty($iOriginalProductID)) { - $this->clearProductItemCache($iOriginalProductID); - } - - if (!empty($iProductID)) { - $this->clearProductItemCache($iProductID); - } - } - - /** - * Check offer "active" field, if it was changed, then clear cache - */ - protected function checkActiveField() - { - //check offer "active" field - if ($this->obElement->getOriginal('active') == $this->obElement->active) { - return; - } - - $this->clearProductActiveList(); - OfferListStore::instance()->active->clear(); - - $this->clearProductSortingByPrice(); - - $obProduct = $this->obElement->product; - if (empty($obProduct)) { - return; - } - - $this->clearProductItemCache($this->obElement->product_id); - - $obCategoryItem = CategoryItem::make($obProduct->category_id); - if ($obCategoryItem->isEmpty()) { - return; - } - - $obCategoryItem->clearProductCount(); - } - - /** - * Clear cached active product ID list - */ - protected function clearProductActiveList() - { - if (!Settings::getValue('check_offer_active')) { - return; - } - - ProductListStore::instance()->active->clear(); - } - - /** - * Clear offer sorting cache by price - */ - protected function clearOfferSortingByPrice() - { - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_PRICE_ASC); - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_PRICE_DESC); - - //Get price types - $obPriceTypeList = PriceType::active()->get(); - if ($obPriceTypeList->isEmpty()) { - return; - } - - foreach ($obPriceTypeList as $obPriceType) { - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_PRICE_ASC.'|'.$obPriceType->code); - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_PRICE_DESC.'|'.$obPriceType->code); - } - } - - /** - * Clear offer sorting cache by price - */ - protected function clearProductSortingByPrice() - { - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_ASC); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_DESC); - - //Get price types - $obPriceTypeList = PriceType::active()->get(); - if ($obPriceTypeList->isEmpty()) { - return; - } - - foreach ($obPriceTypeList as $obPriceType) { - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_ASC.'|'.$obPriceType->code); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_DESC.'|'.$obPriceType->code); - } - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() - { - return Offer::class; - } - - /** - * Get item class name - * @return string - */ - protected function getItemClass() - { - return OfferItem::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/price/PriceModelHandler.php b/plugins/lovata/shopaholic/classes/event/price/PriceModelHandler.php deleted file mode 100644 index 27120e1ca..000000000 --- a/plugins/lovata/shopaholic/classes/event/price/PriceModelHandler.php +++ /dev/null @@ -1,97 +0,0 @@ -getModelClass(); - $sModelClass::extend(function ($obElement) { - - /** @var \Model $obElement */ - $obElement->bindEvent('model.afterSave', function () use ($obElement) { - $this->obElement = $obElement; - $this->afterSave(); - }, $this->iPriority); - - /** @var \Model $obElement */ - $obElement->bindEvent('model.afterDelete', function () use ($obElement) { - $this->obElement = $obElement; - $this->afterDelete(); - }, $this->iPriority); - }); - } - - /** - * After save event handler - */ - protected function afterSave() - { - if ($this->obElement->getOriginal('price') != $this->obElement->price_value) { - $this->clearPriceCache(); - } - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - $this->clearPriceCache(); - } - - /** - * Clear product/offer price cache - */ - protected function clearPriceCache() - { - $obItem = $this->obElement->item; - if (empty($obItem)) { - return; - } - - if ($obItem instanceof Offer) { - - $sSorting = !empty($this->obElement->price_type) ? '|'.$this->obElement->price_type->code : ''; - - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_PRICE_ASC.$sSorting); - OfferListStore::instance()->sorting->clear(OfferListStore::SORT_PRICE_DESC.$sSorting); - - if ($obItem->active) { - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_ASC.$sSorting); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_DESC.$sSorting); - } - } - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() - { - return Price::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/product/ProductModelHandler.php b/plugins/lovata/shopaholic/classes/event/product/ProductModelHandler.php deleted file mode 100644 index deb552dcf..000000000 --- a/plugins/lovata/shopaholic/classes/event/product/ProductModelHandler.php +++ /dev/null @@ -1,259 +0,0 @@ -translatable[] = ['slug', 'index' => true]; - } - }); - } - - /** - * After create event handler - */ - protected function afterCreate() - { - parent::afterCreate(); - - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_NEW); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_NO); - } - - /** - * After save event handler - */ - protected function afterSave() - { - parent::afterSave(); - - //Check "category_id" field - $this->checkCategoryIDField(); - - //Check "brand_id" field - $this->checkBrandIDField(); - - $this->checkActiveField(); - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - $this->processOfferAfterDelete(); - parent::afterDelete(); - - ProductListStore::instance()->category->clear($this->obElement->category_id); - BrandListStore::instance()->category->clear($this->obElement->category_id); - $this->clearCategoryProductCount($this->obElement->category_id); - - ProductListStore::instance()->brand->clear($this->obElement->brand_id); - - $this->clearProductSortingByPrice(); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_NEW); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_NO); - - if ($this->obElement->active) { - ProductListStore::instance()->active->clear(); - } - - $arAdditionalCategoryIDList = $this->obElement->additional_category->lists('id'); - if (empty($arAdditionalCategoryIDList)) { - return; - } - - foreach ($arAdditionalCategoryIDList as $iCategoryID) { - $this->clearCategoryProductCount($iCategoryID); - ProductListStore::instance()->category->clear($iCategoryID); - } - } - - /** - * After restore event handler - */ - protected function afterRestore() - { - parent::afterRestore(); - - ProductListStore::instance()->category->clear($this->obElement->category_id); - BrandListStore::instance()->category->clear($this->obElement->category_id); - $this->clearCategoryProductCount($this->obElement->category_id); - - ProductListStore::instance()->brand->clear($this->obElement->brand_id); - - $this->clearProductSortingByPrice(); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_NEW); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_NO); - - if ($this->obElement->active) { - ProductListStore::instance()->active->clear(); - } - - $arAdditionalCategoryIDList = $this->obElement->additional_category->lists('id'); - if (empty($arAdditionalCategoryIDList)) { - return; - } - - foreach ($arAdditionalCategoryIDList as $iCategoryID) { - $this->clearCategoryProductCount($iCategoryID); - ProductListStore::instance()->category->clear($iCategoryID); - } - } - - /** - * Set active = false in offer list, after product was removed - */ - protected function processOfferAfterDelete() - { - $obOfferList = $this->obElement->offer; - if ($obOfferList->isEmpty()) { - return; - } - - foreach ($obOfferList as $obOffer) { - $obOffer->active = false; - $obOffer->save(); - } - } - - /** - * Check offer "active" field, if it was changed, then clear cache - */ - protected function checkActiveField() - { - //check product "active" field - if (!$this->isFieldChanged('active')) { - return; - } - - ProductListStore::instance()->active->clear(); - - $this->clearCategoryProductCount($this->obElement->category_id); - - //Get additional category ID list - $arAdditionalCategoryIDList = $this->obElement->additional_category->lists('id'); - if (empty($arAdditionalCategoryIDList)) { - return; - } - - foreach ($arAdditionalCategoryIDList as $iCategoryID) { - $this->clearCategoryProductCount($iCategoryID); - } - } - - /** - * Check product "category_id" field, if it was changed, then clear cache - */ - protected function checkCategoryIDField() - { - //Check "category_id" field - if (!$this->isFieldChanged('category_id')) { - return; - } - - //Update product ID cache list for category - ProductListStore::instance()->category->clear($this->obElement->category_id); - ProductListStore::instance()->category->clear((int) $this->obElement->getOriginal('category_id')); - - BrandListStore::instance()->category->clear($this->obElement->category_id); - BrandListStore::instance()->category->clear((int) $this->obElement->getOriginal('category_id')); - - $this->clearCategoryProductCount($this->obElement->category_id); - $this->clearCategoryProductCount((int) $this->obElement->getOriginal('category_id')); - } - - /** - * Check product "brand_id" field, if it was changed, then clear cache - */ - protected function checkBrandIDField() - { - //Check "brand_id" field - if ($this->obElement->getOriginal('brand_id') == $this->obElement->brand_id) { - return; - } - - //Update product ID cache list for brand - ProductListStore::instance()->brand->clear($this->obElement->brand_id); - ProductListStore::instance()->brand->clear((int) $this->obElement->getOriginal('brand_id')); - } - - /** - * Clear product count cache in category item - * @param int $iCategoryID - */ - protected function clearCategoryProductCount($iCategoryID) - { - $obCategoryItem = CategoryItem::make($iCategoryID); - if ($obCategoryItem->isNotEmpty()) { - $obCategoryItem->clearProductCount(); - } - } - - /** - * Clear offer sorting cache by price - */ - protected function clearProductSortingByPrice() - { - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_ASC); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_DESC); - - //Get price types - $obPriceTypeList = PriceType::active()->get(); - if ($obPriceTypeList->isEmpty()) { - return; - } - - foreach ($obPriceTypeList as $obPriceType) { - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_ASC.'|'.$obPriceType->code); - ProductListStore::instance()->sorting->clear(ProductListStore::SORT_PRICE_DESC.'|'.$obPriceType->code); - } - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() - { - return Product::class; - } - - /** - * Get item class name - * @return string - */ - protected function getItemClass() - { - return ProductItem::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/product/ProductRelationHandler.php b/plugins/lovata/shopaholic/classes/event/product/ProductRelationHandler.php deleted file mode 100644 index 210314db7..000000000 --- a/plugins/lovata/shopaholic/classes/event/product/ProductRelationHandler.php +++ /dev/null @@ -1,95 +0,0 @@ -clearListByPromoBlock($arAttachedIDList); - $this->clearListByCategory($arAttachedIDList); - } - - /** - * After detach event handler - * @param \Model $obModel - * @param array $arAttachedIDList - */ - protected function afterDetach($obModel, $arAttachedIDList) - { - $this->clearListByPromoBlock($arAttachedIDList); - $this->clearListByCategory($arAttachedIDList); - } - - /** - * Clear cached product list by promo block ID - * @param array $arAttachedIDList - */ - protected function clearListByPromoBlock($arAttachedIDList) - { - if ($this->sRelationName != 'promo_block') { - return; - } - - foreach ($arAttachedIDList as $iPromoBlockID) { - ProductListStore::instance()->promo_block->clear($iPromoBlockID); - } - } - - /** - * Clear cached product list by category ID - * @param array $arAttachedIDList - */ - protected function clearListByCategory($arAttachedIDList) - { - if ($this->sRelationName != 'additional_category') { - return; - } - - foreach ($arAttachedIDList as $iCategoryID) { - BrandListStore::instance()->category->clear($iCategoryID); - ProductListStore::instance()->category->clear($iCategoryID); - - $obCategoryItem = CategoryItem::make($iCategoryID); - if ($obCategoryItem->isNotEmpty()) { - $obCategoryItem->clearProductCount(); - } - } - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() : string - { - return Product::class; - } - - /** - * Get relation name - * @return array - */ - protected function getRelationName() - { - return ['promo_block', 'additional_category']; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/promoblock/PromoBlockModelHandler.php b/plugins/lovata/shopaholic/classes/event/promoblock/PromoBlockModelHandler.php deleted file mode 100644 index 4ac54ac14..000000000 --- a/plugins/lovata/shopaholic/classes/event/promoblock/PromoBlockModelHandler.php +++ /dev/null @@ -1,119 +0,0 @@ -translatable[] = ['slug', 'index' => true]; - } - }); - - $obEvent->listen('shopaholic.promo_block.update.sorting', function () { - $this->clearSortingList(); - }); - } - - /** - * After create event handler - */ - protected function afterCreate() - { - parent::afterCreate(); - $this->clearSortingList(); - } - - /** - * After save event handler - */ - protected function afterSave() - { - parent::afterSave(); - - if ($this->isFieldChanged('date_begin')) { - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DATE_BEGIN_ASC); - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DATE_BEGIN_DESC); - } - - if ($this->isFieldChanged('date_end')) { - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DATE_END_ASC); - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DATE_END_DESC); - } - - $this->checkFieldChanges('hidden', PromoBlockListStore::instance()->hidden); - $this->checkFieldChanges('hidden', PromoBlockListStore::instance()->not_hidden); - - $this->checkFieldChanges('active', PromoBlockListStore::instance()->active); - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - parent::afterDelete(); - $this->clearSortingList(); - - ProductListStore::instance()->promo_block->clear($this->obElement->id); - - $this->clearCacheNotEmptyValue('hidden', PromoBlockListStore::instance()->hidden); - $this->clearCacheEmptyValue('hidden', PromoBlockListStore::instance()->not_hidden); - - $this->clearCacheNotEmptyValue('active', PromoBlockListStore::instance()->active); - } - - /** - * Clear sorting list - */ - protected function clearSortingList() - { - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DEFAULT); - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DATE_BEGIN_ASC); - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DATE_BEGIN_DESC); - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DATE_END_ASC); - PromoBlockListStore::instance()->sorting->clear(PromoBlockListStore::SORT_DATE_END_DESC); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() - { - return PromoBlock::class; - } - - /** - * Get item class name - * @return string - */ - protected function getItemClass() - { - return PromoBlockItem::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/promoblock/PromoBlockRelationHandler.php b/plugins/lovata/shopaholic/classes/event/promoblock/PromoBlockRelationHandler.php deleted file mode 100644 index 3552ead0f..000000000 --- a/plugins/lovata/shopaholic/classes/event/promoblock/PromoBlockRelationHandler.php +++ /dev/null @@ -1,64 +0,0 @@ -clearCachedList($obModel); - } - - /** - * After detach event handler - * @param PromoBlock $obModel - * @param array $arAttachedIDList - */ - protected function afterDetach($obModel, $arAttachedIDList) - { - $this->clearCachedList($obModel); - } - - /** - * Clear cached list - * @param PromoBlock $obModel - */ - protected function clearCachedList($obModel) - { - ProductListStore::instance()->promo_block->clear($obModel->id); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() : string - { - return PromoBlock::class; - } - - /** - * Get relation name - * @return array - */ - protected function getRelationName() - { - return ['product']; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/tax/ExtendTaxFieldsHandler.php b/plugins/lovata/shopaholic/classes/event/tax/ExtendTaxFieldsHandler.php deleted file mode 100644 index 75be4bce5..000000000 --- a/plugins/lovata/shopaholic/classes/event/tax/ExtendTaxFieldsHandler.php +++ /dev/null @@ -1,47 +0,0 @@ -hasPlugin('RainLab.Location')) { - return; - } - - $obWidget->removeField('country'); - $obWidget->removeField('state'); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() : string - { - return Tax::class; - } - - /** - * Get controller class name - * @return string - */ - protected function getControllerClass() : string - { - return Taxes::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/tax/TaxModelHandler.php b/plugins/lovata/shopaholic/classes/event/tax/TaxModelHandler.php deleted file mode 100644 index 9e7d30902..000000000 --- a/plugins/lovata/shopaholic/classes/event/tax/TaxModelHandler.php +++ /dev/null @@ -1,100 +0,0 @@ -listen('shopaholic.tax.update.sorting', function () { - $this->clearSortingList(); - }); - - if (PluginManager::instance()->hasPlugin('RainLab.Location')) { - return; - } - - Tax::extend(function ($obTax) { - /** @var Tax $obTax */ - unset($obTax->belongsToMany['country']); - unset($obTax->belongsToMany['state']); - }); - } - - /** - * After create event handler - */ - protected function afterCreate() - { - parent::afterCreate(); - $this->clearSortingList(); - } - - /** - * After save event handler - */ - protected function afterSave() - { - parent::afterSave(); - - $this->checkFieldChanges('active', TaxListStore::instance()->active); - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - parent::afterDelete(); - $this->clearSortingList(); - - if ($this->obElement->active) { - TaxListStore::instance()->active->clear(); - } - } - - /** - * Clear sorting list - */ - protected function clearSortingList() - { - TaxListStore::instance()->sorting->clear(); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() - { - return Tax::class; - } - - /** - * Get item class name - * @return string - */ - protected function getItemClass() - { - return TaxItem::class; - } -} diff --git a/plugins/lovata/shopaholic/classes/event/tax/TaxRelationHandler.php b/plugins/lovata/shopaholic/classes/event/tax/TaxRelationHandler.php deleted file mode 100644 index b87b1bb13..000000000 --- a/plugins/lovata/shopaholic/classes/event/tax/TaxRelationHandler.php +++ /dev/null @@ -1,55 +0,0 @@ -id); - } - - /** - * After detach event handler - * @param Tax $obModel - * @param array $arAttachedIDList - */ - protected function afterDetach($obModel, $arAttachedIDList) - { - TaxItem::clearCache($obModel->id); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() : string - { - return Tax::class; - } - - /** - * Get relation name - * @return array - */ - protected function getRelationName() - { - return ['category', 'product', 'country', 'state']; - } -} diff --git a/plugins/lovata/shopaholic/classes/helper/AllCategoriesMenuType.php b/plugins/lovata/shopaholic/classes/helper/AllCategoriesMenuType.php deleted file mode 100644 index f34d3551b..000000000 --- a/plugins/lovata/shopaholic/classes/helper/AllCategoriesMenuType.php +++ /dev/null @@ -1,57 +0,0 @@ - [], - ]; - - //Get category list with sorted by 'nest_left' - $obCategoryList = Category::active()->orderBy('nest_left', 'asc')->get(); - if ($obCategoryList->isEmpty()) { - return $arResult; - } - - /** @var Category $obCategory */ - foreach ($obCategoryList as $obCategory) { - $obCategoryItem = CategoryItem::make($obCategory->id, $obCategory); - - $arMenuItem = $this->getCategoryMenuData($obCategoryItem, $obMenuItem->cmsPage, $sURL); - $arResult['items'][] = $arMenuItem; - } - - return $arResult; - } - - /** - * Get default array for menu type - * @return array|null - */ - protected function getDefaultMenuTypeInfo() - { - $arResult = [ - 'dynamicItems' => true, - ]; - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/helper/CatalogMenuType.php b/plugins/lovata/shopaholic/classes/helper/CatalogMenuType.php deleted file mode 100644 index 2d547d9a2..000000000 --- a/plugins/lovata/shopaholic/classes/helper/CatalogMenuType.php +++ /dev/null @@ -1,60 +0,0 @@ - [], - ]; - - //Get category list with sorted by 'nest_left' - $obCategoryList = CategoryCollection::make()->tree(); - if ($obCategoryList->isEmpty()) { - return $arResult; - } - - /** @var \Lovata\Shopaholic\Classes\Item\CategoryItem $obCategoryItem */ - foreach ($obCategoryList as $obCategoryItem) { - $arMenuItem = $this->getCategoryMenuData($obCategoryItem, $obMenuItem->cmsPage, $sURL); - if ($obMenuItem->nesting) { - $arMenuItem['items'] = $this->getChildrenCategoryList($obCategoryItem, $obMenuItem->cmsPage, $sURL); - } - - $arResult['items'][] = $arMenuItem; - } - - return $arResult; - } - - /** - * Get default array for menu type - * @return array|null - */ - protected function getDefaultMenuTypeInfo() - { - $arResult = [ - 'dynamicItems' => true, - 'nesting' => true, - ]; - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/helper/CategoryMenuType.php b/plugins/lovata/shopaholic/classes/helper/CategoryMenuType.php deleted file mode 100644 index 650c425f4..000000000 --- a/plugins/lovata/shopaholic/classes/helper/CategoryMenuType.php +++ /dev/null @@ -1,59 +0,0 @@ -reference)) { - return $arResult; - } - - $obCategoryItem = CategoryItem::make($obMenuItem->reference); - if ($obCategoryItem->isEmpty()) { - return $arResult; - } - - $arResult = $this->getCategoryMenuData($obCategoryItem, $obMenuItem->cmsPage, $sURL); - if (!$obMenuItem->nesting || $obCategoryItem->children->isEmpty()) { - return $arResult; - } - - $arResult['items'] = $this->getChildrenCategoryList($obCategoryItem, $obMenuItem->cmsPage, $sURL); - - return $arResult; - } - - /** - * Get default array for menu type - * @return array|null - */ - protected function getDefaultMenuTypeInfo() - { - $arResult = [ - 'references' => $this->listSubCategoryOptions(), - 'nesting' => true, - 'dynamicItems' => true, - ]; - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/helper/CommonMenuType.php b/plugins/lovata/shopaholic/classes/helper/CommonMenuType.php deleted file mode 100644 index 98a95f960..000000000 --- a/plugins/lovata/shopaholic/classes/helper/CommonMenuType.php +++ /dev/null @@ -1,200 +0,0 @@ - "title" format for options that don't have sub-options, and in the format - * ["key"] => ["title"=>"Option title", "items"=>[...]] for options that have sub-options. Optional, - * required only if the menu item type requires references. - * - nesting - Boolean value indicating whether the item type supports nested items. Optional, - * false if omitted. - * - dynamicItems - Boolean value indicating whether the item type could generate new menu items. - * Optional, false if omitted. - * - cmsPages - a list of CMS pages (objects of the Cms\Classes\Page class), if the item type requires a CMS page reference to - * resolve the item URL. - * @return array Returns an array - */ - public function getMenuTypeInfo() - { - $arResult = $this->getDefaultMenuTypeInfo(); - if (empty($arResult)) { - return $arResult; - } - - $obTheme = Theme::getActiveTheme(); - $obPageList = CmsPage::listInTheme($obTheme, true); - - $arResult['cmsPages'] = $this->filterPageList($obPageList); - - return $arResult; - } - - /** - * Get default array for menu type - * @return array|null - */ - abstract protected function getDefaultMenuTypeInfo(); - - /** - * Filter page list, add pages with CategoryPage component to result - * @param \October\Rain\Support\Collection $obPageList - * @return array - */ - protected function filterPageList($obPageList) - { - $arCmsPageList = []; - if (empty($obPageList) || $obPageList->isEmpty()) { - return $arCmsPageList; - } - - /** @var CmsPage $obPage */ - foreach ($obPageList as $obPage) { - if (!$obPage->hasComponent('CategoryPage')) { - continue; - } - - /* - * Component must use a category filter with a routing parameter - * eg: categoryFilter = "{{ :somevalue }}" - */ - $arPropertyList = $obPage->getComponentProperties('CategoryPage'); - if (!isset($arPropertyList['slug']) || !preg_match('/{{\s*:/', $arPropertyList['slug'])) { - continue; - } - $arCmsPageList[] = $obPage; - } - - return $arCmsPageList; - } - - /** - * Get subcategories list - * @return array - */ - protected function listSubCategoryOptions() - { - $arResult = []; - $obCategoryList = CategoryCollection::make()->tree(); - if ($obCategoryList->isEmpty()) { - return $arResult; - } - - $arResult = $this->getCategoryMenuOptions($obCategoryList); - - return $arResult; - } - - /** - * Get option array for category - * @param CategoryCollection|\Lovata\Shopaholic\Classes\Item\CategoryItem[] $obCategoryList - * @return null|array|string - */ - protected function getCategoryMenuOptions($obCategoryList) - { - if (empty($obCategoryList) || $obCategoryList->isEmpty()) { - return null; - } - - $arResult = []; - foreach ($obCategoryList as $obCategory) { - if ($obCategory->children->isEmpty()) { - $arResult[$obCategory->id] = $obCategory->name; - } else { - $arResult[$obCategory->id] = [ - 'title' => $obCategory->name, - 'items' => $this->getCategoryMenuOptions($obCategory->children), - ]; - } - } - - return $arResult; - } - - /** - * Get array for menu item from category item - * @param \Lovata\Shopaholic\Classes\Item\CategoryItem $obCategoryItem - * @param string $sPageCode - * @param string $sURL - * - * @return array - */ - protected function getCategoryMenuData($obCategoryItem, $sPageCode, $sURL) - { - if (empty($obCategoryItem)) { - return []; - } - - $arMenuItem = [ - 'title' => $obCategoryItem->name, - 'url' => $obCategoryItem->getPageUrl($sPageCode), - 'mtime' => $obCategoryItem->updated_at, - 'viewBag' => ['object' => $obCategoryItem], - ]; - - $arMenuItem['isActive'] = $arMenuItem['url'] == $sURL; - - return $arMenuItem; - } - - /** - * Get list of children categories for menu items - * @param \Lovata\Shopaholic\Classes\Item\CategoryItem $obCategoryItem - * @param string $sPageCode - * @param string $sURL - * - * @return array - */ - protected function getChildrenCategoryList($obCategoryItem, $sPageCode, $sURL) - { - if (empty($obCategoryItem) || $obCategoryItem->children->isEmpty()) { - return []; - } - - $arResult = []; - foreach ($obCategoryItem->children as $obChildrenCategory) { - $arMenuItem = $this->getCategoryMenuData($obChildrenCategory, $sPageCode, $sURL); - if ($obChildrenCategory->children->isNotEmpty()) { - $arMenuItem['items'] = $this->getChildrenCategoryList($obChildrenCategory, $sPageCode, $sURL); - } - - $arResult[] = $arMenuItem; - } - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/helper/CurrencyHelper.php b/plugins/lovata/shopaholic/classes/helper/CurrencyHelper.php deleted file mode 100644 index daa90e826..000000000 --- a/plugins/lovata/shopaholic/classes/helper/CurrencyHelper.php +++ /dev/null @@ -1,221 +0,0 @@ -obActiveCurrency; - } - - /** - * Get default currency object - * @return Currency - */ - public function getDefault() - { - return $this->obDefaultCurrency; - } - - /** - * Set default currency as active - * Used in backend - */ - public function disableActiveCurrency() - { - if (empty($this->obDefaultCurrency)) { - return; - } - - $this->sActiveCurrencyCode = $this->obDefaultCurrency->code; - $this->obActiveCurrency = $this->obDefaultCurrency; - } - - /** - * Get active currency symbol - * @return null|string - */ - public function getActiveCurrencySymbol() - { - $obCurrency = $this->getActive(); - if (empty($obCurrency)) { - return null; - } - - return $obCurrency->symbol; - } - - /** - * Get active currency code - * @return null|string - */ - public function getActiveCurrencyCode() - { - $obCurrency = $this->getActive(); - if (empty($obCurrency)) { - return null; - } - - return $obCurrency->code; - } - - /** - * Get currency symbol - * @param string $sCurrencyCode - * @return null|string - */ - public function getCurrencySymbol($sCurrencyCode) - { - $obCurrency = $this->obCurrencyList->where('code', $sCurrencyCode)->first(); - if (empty($obCurrency)) { - return null; - } - - return $obCurrency->symbol; - } - - /** - * Get currency code - * @param string $sCurrencyCode - * @return null|string - */ - public function getCurrencyCode($sCurrencyCode) - { - $obCurrency = $this->obCurrencyList->where('code', $sCurrencyCode)->first(); - if (empty($obCurrency)) { - return null; - } - - return $obCurrency->code; - } - - /** - * Clear active currency value - * @param string $sCurrencyCode - */ - public function switchActive($sCurrencyCode) - { - $obUserStorage = $this->getUserStorage(); - $obUserStorage->put(self::FIELD_NAME, $sCurrencyCode); - $this->sActiveCurrencyCode = $sCurrencyCode; - - $this->initActiveCurrency(); - } - - /** - * Clear active currency value - */ - public function resetActive() - { - $obUserStorage = $this->getUserStorage(); - $obUserStorage->clear(self::FIELD_NAME); - - $this->obActiveCurrency = $this->obDefaultCurrency; - } - - /** - * @param float $fPrice - * @param string $sCurrencyTo - * @return float - */ - public function convert($fPrice, $sCurrencyTo = null) - { - if (empty($sCurrencyTo)) { - $obCurrencyTo = $this->obActiveCurrency; - } else { - $obCurrencyTo = $this->obCurrencyList->where('code', $sCurrencyTo)->first(); - } - - if (empty($obCurrencyTo) || empty($this->obDefaultCurrency) || $obCurrencyTo->id == $this->obDefaultCurrency->id) { - return $fPrice; - } - - $fResultPrice = PriceHelper::round(($this->obDefaultCurrency->rate * $fPrice) / $obCurrencyTo->rate); - - return $fResultPrice; - } - - /** - * Init currency data - */ - protected function init() - { - $this->obCurrencyList = Currency::active()->get(); - $this->obDefaultCurrency = $this->obCurrencyList->where('is_default', true)->first(); - - $this->sActiveCurrencyCode = $this->getActiveCurrencyFromStorage(); - $this->initActiveCurrency(); - } - - /** - * Get active currency code and find active currency object by code - */ - protected function initActiveCurrency() - { - $this->obActiveCurrency = null; - if (!empty($this->sActiveCurrencyCode)) { - $this->obActiveCurrency = $this->obCurrencyList->where('code', $this->sActiveCurrencyCode)->first(); - } - - if (empty($this->obActiveCurrency)) { - $this->obActiveCurrency = $this->obDefaultCurrency; - } - } - - /** - * Get active currency code from user storage - * @return array - */ - protected function getActiveCurrencyFromStorage() - { - $obUserStorage = $this->getUserStorage(); - $sActiveCurrencyCode = $obUserStorage->get(self::FIELD_NAME); - - return $sActiveCurrencyCode; - } - - /** - * Get user storage object (User model or cookie) - * @return UserStorage - */ - protected function getUserStorage() - { - /** @var UserStorage $obUserStorage */ - $obUserStorage = app(UserStorage::class); - $obUserStorage->setDefaultStorage(CookieUserStorage::class); - - return $obUserStorage; - } -} diff --git a/plugins/lovata/shopaholic/classes/helper/MeasureHelper.php b/plugins/lovata/shopaholic/classes/helper/MeasureHelper.php deleted file mode 100644 index 0dd889ad7..000000000 --- a/plugins/lovata/shopaholic/classes/helper/MeasureHelper.php +++ /dev/null @@ -1,40 +0,0 @@ -obPriceTypeList->where('code', $sPriceTypeCode)->first(); - - return $obPriceType; - } - - /** - * Get value of active price type - * @return PriceType - */ - public function getActive() - { - return $this->obActivePriceType; - } - - /** - * Get active price type code - * @return null|string - */ - public function getActivePriceTypeCode() - { - $obPriceType = $this->getActive(); - if (empty($obPriceType)) { - return null; - } - - return $obPriceType->code; - } - - /** - * Get active price type code - * @return null|string - */ - public function getActivePriceTypeID() - { - $obPriceType = $this->getActive(); - if (empty($obPriceType)) { - return null; - } - - return $obPriceType->id; - } - - /** - * Clear active currency value - * @param string $sPriceTypeCode - */ - public function switchActive($sPriceTypeCode) - { - $this->sActivePriceTypeCode = $sPriceTypeCode; - - $this->initActivePriceType(); - } - - /** - * Init price type data - */ - protected function init() - { - $this->obPriceTypeList = PriceType::active()->get(); - - $this->initActivePriceType(); - } - - /** - * Get active price type code and find active price type object by code - */ - protected function initActivePriceType() - { - $this->obActivePriceType = null; - if (!empty($this->sActivePriceTypeCode)) { - $this->obActivePriceType = $this->obPriceTypeList->where('code', $this->sActivePriceTypeCode)->first(); - } - } -} diff --git a/plugins/lovata/shopaholic/classes/helper/TaxHelper.php b/plugins/lovata/shopaholic/classes/helper/TaxHelper.php deleted file mode 100644 index f603be544..000000000 --- a/plugins/lovata/shopaholic/classes/helper/TaxHelper.php +++ /dev/null @@ -1,184 +0,0 @@ -bPriceIncludeTax; - } - - /** - * Switch active country by code - * @param string $sCountryCode - */ - public function switchCountry($sCountryCode) - { - if (empty($sCountryCode) || !PluginManager::instance()->hasPlugin('RainLab.Location')) { - return; - } - - $this->obActiveCountry = \RainLab\Location\Models\Country::whereCode($sCountryCode)->first(); - } - - /** - * Get active country object - * @return \RainLab\Location\Models\Country - */ - public function getActiveCountry() - { - return $this->obActiveCountry; - } - - /** - * Switch active state by code - * @param string $sStateCode - */ - public function switchState($sStateCode) - { - if (empty($sStateCode) || !PluginManager::instance()->hasPlugin('RainLab.Location')) { - return; - } - - $this->obActiveState = \RainLab\Location\Models\State::whereCode($sStateCode)->first(); - } - - /** - * Get active state object - * @return \RainLab\Location\Models\State - */ - public function getActiveState() - { - return $this->obActiveState; - } - - /** - * Get applied tax list - * @return \Lovata\Shopaholic\Classes\Collection\TaxCollection|\Lovata\Shopaholic\Classes\Item\TaxItem[] - */ - public function getTaxList() - { - return clone $this->obTaxList; - } - - /** - * Get price value without tax - * @param float $fPrice - * @param float $fPricePercent - * @return float - */ - public function getPriceWithoutTax($fPrice, $fPricePercent) - { - $fPriceResult = $fPrice; - if ($this->bPriceIncludeTax) { - $fPriceResult = $this->calculatePriceWithoutTax($fPrice, $fPricePercent); - } - - return $fPriceResult; - } - - /** - * Get price value with tax - * @param float $fPrice - * @param float $fPricePercent - * @return float - */ - public function getPriceWithTax($fPrice, $fPricePercent) - { - $fPriceResult = $fPrice; - if (!$this->bPriceIncludeTax) { - $fPriceResult = $this->calculatePriceWithTax($fPrice, $fPricePercent); - } - - return $fPriceResult; - } - - /** - * Calculate price + tax - * @param float $fPrice - * @param float $fTax - * @return float - */ - public function calculatePriceWithTax($fPrice, $fTax) - { - $fPrice = ($fPrice * (100 + $fTax)) / 100; - $fPrice = PriceHelper::round($fPrice); - - return $fPrice; - } - - /** - * Calculate price - tax - * @param float $fPrice - * @param float $fTax - * @return float - */ - public function calculatePriceWithoutTax($fPrice, $fTax) - { - $fPrice = ($fPrice * 100) / (100 + $fTax); - $fPrice = PriceHelper::round($fPrice); - - return $fPrice; - } - - /** - * Get tax percent - * @param \Lovata\Shopaholic\Classes\Collection\TaxCollection|\Lovata\Shopaholic\Classes\Item\TaxItem[] $obTaxList - * @return float - */ - public function getTaxPercent($obTaxList) - { - if (empty($obTaxList) || $obTaxList->isEmpty()) { - return 0; - } - - //Calculate tax percent - $fTaxPercent = 0; - foreach ($obTaxList as $obTaxItem) { - $fTaxPercent += $obTaxItem->percent; - } - - $fTaxPercent = PriceHelper::round($fTaxPercent); - - return $fTaxPercent; - } - - /** - * Init currency data - */ - protected function init() - { - $this->obTaxList = TaxCollection::make()->active()->sort(); - - $this->bPriceIncludeTax = (bool) Settings::getValue('price_include_tax'); - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportBrandModelFromCSV.php b/plugins/lovata/shopaholic/classes/import/ImportBrandModelFromCSV.php deleted file mode 100644 index 802f894b7..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportBrandModelFromCSV.php +++ /dev/null @@ -1,49 +0,0 @@ -arExistIDList = (array) Brand::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->setActiveField(); - - $this->initPreviewImage(); - $this->initImageList(); - - parent::prepareImportData(); - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - $this->importPreviewImage(); - $this->importImageList(); - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportBrandModelFromXML.php b/plugins/lovata/shopaholic/classes/import/ImportBrandModelFromXML.php deleted file mode 100644 index 0862d7564..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportBrandModelFromXML.php +++ /dev/null @@ -1,114 +0,0 @@ -arExistIDList = (array) Brand::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - - $this->prepareImportSettings(); - - parent::__construct(); - } - - /** - * Get import fields - * @return array - */ - public function getFields() : array - { - $this->arFieldList = [ - 'external_id' => Lang::get('lovata.toolbox::lang.field.external_id'), - 'active' => Lang::get('lovata.toolbox::lang.field.active'), - 'name' => Lang::get('lovata.toolbox::lang.field.name'), - 'code' => Lang::get('lovata.toolbox::lang.field.code'), - 'preview_text' => Lang::get('lovata.toolbox::lang.field.preview_text'), - 'description' => Lang::get('lovata.toolbox::lang.field.description'), - 'preview_image' => Lang::get('lovata.toolbox::lang.field.preview_image'), - 'images' => Lang::get('lovata.toolbox::lang.field.images'), - ]; - - return parent::getFields(); - } - - /** - * Start import - * @param $obProgressBar - * @throws - */ - public function import($obProgressBar = null) - { - parent::import($obProgressBar); - - $this->deactivateElements(); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->setActiveField(); - - $this->initPreviewImage(); - $this->initImageList(); - - parent::prepareImportData(); - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - $this->importPreviewImage(); - $this->importImageList(); - - parent::processModelObject(); - } - - /** - * Prepare import settings - */ - protected function prepareImportSettings() - { - $this->arXMLFileList = XmlImportSettings::getValue('file_list'); - $this->sImageFolderPath = XmlImportSettings::getValue('image_folder'); - $this->sImageFolderPath = trim($this->sImageFolderPath, '/'); - - $this->bDeactivate = (bool) XmlImportSettings::getValue('brand_deactivate'); - $this->arImportSettings = XmlImportSettings::getValue('brand'); - $this->sElementListPath = XmlImportSettings::getValue('brand_path_to_list'); - - $iFileNumber = XmlImportSettings::getValue('brand_file_path'); - if ($iFileNumber !== null) { - $this->sMainFilePath = array_get($this->arXMLFileList, $iFileNumber.'.path'); - $this->sPrefix = array_get($this->arXMLFileList, $iFileNumber.'.path_prefix'); - $this->sNamespace = array_get($this->arXMLFileList, $iFileNumber.'.file_namespace'); - $this->sMainFilePath = trim($this->sMainFilePath, '/'); - } - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportCategoryModelFromCSV.php b/plugins/lovata/shopaholic/classes/import/ImportCategoryModelFromCSV.php deleted file mode 100644 index 43fa585b2..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportCategoryModelFromCSV.php +++ /dev/null @@ -1,81 +0,0 @@ -arExistIDList = (array) Category::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->initParentCategory(); - $this->setActiveField(); - - $this->initPreviewImage(); - $this->initImageList(); - - parent::prepareImportData(); - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - if ($this->obParentCategory === false) { - $this->obModel->parent_id = null; - $this->obModel->save(); - } elseif (!empty($this->obParentCategory)) { - $this->obModel->makeChildOf($this->obParentCategory); - } - - $this->importPreviewImage(); - $this->importImageList(); - } - - /** - * Find parent category by external ID and set parent_id - */ - protected function initParentCategory() - { - if (!array_key_exists('parent_id', $this->arImportData)) { - return; - } - - $iParentID = array_get($this->arImportData, 'parent_id'); - array_forget($this->arImportData, 'parent_id'); - if (empty($iParentID)) { - $this->obParentCategory = false; - - return; - } - - //Find parent category - $this->obParentCategory = Category::getByExternalID($iParentID)->first(); - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportCategoryModelFromXML.php b/plugins/lovata/shopaholic/classes/import/ImportCategoryModelFromXML.php deleted file mode 100644 index ec5d3b9b2..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportCategoryModelFromXML.php +++ /dev/null @@ -1,194 +0,0 @@ -arExistIDList = (array) Category::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - - $this->prepareImportSettings(); - - parent::__construct(); - } - - /** - * Get import fields - * @return array - */ - public function getFields() : array - { - $this->arFieldList = [ - 'external_id' => Lang::get('lovata.toolbox::lang.field.external_id'), - 'active' => Lang::get('lovata.toolbox::lang.field.active'), - 'name' => Lang::get('lovata.toolbox::lang.field.name'), - 'code' => Lang::get('lovata.toolbox::lang.field.code'), - 'preview_text' => Lang::get('lovata.toolbox::lang.field.preview_text'), - 'description' => Lang::get('lovata.toolbox::lang.field.description'), - 'preview_image' => Lang::get('lovata.toolbox::lang.field.preview_image'), - 'images' => Lang::get('lovata.toolbox::lang.field.images'), - 'parent_id' => Lang::get('lovata.toolbox::lang.field.category_parent_id'), - 'children' => Lang::get('lovata.toolbox::lang.field.children_category'), - ]; - - return parent::getFields(); - } - - /** - * Start import - * @param $obProgressBar - * @throws - */ - public function import($obProgressBar = null) - { - parent::import($obProgressBar); - - $this->deactivateElements(); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->initParentCategory(); - $this->setActiveField(); - - $this->initPreviewImage(); - $this->initImageList(); - - $this->initChildrenCategoryList(); - - parent::prepareImportData(); - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - if ($this->obParentCategory === false || ($this->bHasChildrenField && empty($this->obParentCategory))) { - $this->obModel->parent_id = null; - $this->obModel->save(); - } elseif (!empty($this->obParentCategory)) { - $this->obModel->makeChildOf($this->obParentCategory); - } - - $this->importPreviewImage(); - $this->importImageList(); - - parent::processModelObject(); - - $this->importChildrenCategoryList(); - } - - /** - * Find parent category by external ID and set parent_id - */ - protected function initParentCategory() - { - if (!array_key_exists('parent_id', $this->arImportData) && !$this->bHasChildrenField) { - return; - } - - $iParentID = array_get($this->arImportData, 'parent_id'); - array_forget($this->arImportData, 'parent_id'); - if (empty($iParentID)) { - $this->obParentCategory = false; - - return; - } - - //Find parent category - $this->obParentCategory = Category::getByExternalID($iParentID)->first(); - } - - /** - * Init children category list - */ - protected function initChildrenCategoryList() - { - if (!array_key_exists('children', $this->arImportData)) { - return; - } - - $this->arChildrenCategoryList = array_get($this->arImportData, 'children'); - array_forget($this->arImportData, 'children'); - } - - /** - * Import children category list - */ - protected function importChildrenCategoryList() - { - if (empty($this->arChildrenCategoryList)) { - return; - } - - $iExternalID = $this->obModel->external_id; - foreach ($this->arChildrenCategoryList as $arCategoryData) { - $arCategoryData['parent_id'] = $iExternalID; - $this->importRow($arCategoryData); - } - } - - /** - * Prepare import settings - */ - protected function prepareImportSettings() - { - $this->arXMLFileList = XmlImportSettings::getValue('file_list'); - $this->sImageFolderPath = XmlImportSettings::getValue('image_folder'); - $this->sImageFolderPath = trim($this->sImageFolderPath, '/'); - - $this->bDeactivate = (bool) XmlImportSettings::getValue('category_deactivate'); - $this->arImportSettings = (array) XmlImportSettings::getValue('category'); - $this->sElementListPath = XmlImportSettings::getValue('category_path_to_list'); - - $iFileNumber = XmlImportSettings::getValue('category_file_path'); - if ($iFileNumber !== null) { - $this->sMainFilePath = array_get($this->arXMLFileList, $iFileNumber.'.path'); - $this->sPrefix = array_get($this->arXMLFileList, $iFileNumber.'.path_prefix'); - $this->sNamespace = array_get($this->arXMLFileList, $iFileNumber.'.file_namespace'); - $this->sMainFilePath = trim($this->sMainFilePath, '/'); - } - - foreach ($this->arImportSettings as $arFieldData) { - if (array_get($arFieldData, 'field') == 'children') { - $this->bHasChildrenField = true; - break; - } - } - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportOfferModelFromCSV.php b/plugins/lovata/shopaholic/classes/import/ImportOfferModelFromCSV.php deleted file mode 100644 index cf2951f39..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportOfferModelFromCSV.php +++ /dev/null @@ -1,152 +0,0 @@ -arExistIDList = (array) Offer::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->setActiveField(); - $this->setProductField(); - $this->setQuantityField(); - $this->setMeasureField(); - $this->setMeasureOfUnitField(); - - $this->initPreviewImage(); - $this->initImageList(); - - parent::prepareImportData(); - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - $this->importPreviewImage(); - $this->importImageList(); - } - - /** - * Set product_id filed value - */ - protected function setProductField() - { - $sProductID = array_get($this->arImportData, 'product_id'); - if ($sProductID === null) { - return; - } - - if (empty($sProductID)) { - $this->arImportData['product_id'] = null; - - return; - } - - //Find product by external ID - $obProduct = Product::withTrashed()->getByExternalID($sProductID)->first(); - if (empty($obProduct)) { - $this->arImportData['product_id'] = null; - } else { - $this->arImportData['product_id'] = $obProduct->id; - } - } - - /** - * Set quantity field value - */ - protected function setQuantityField() - { - $iQuantity = array_get($this->arImportData, 'quantity'); - if ($iQuantity === null) { - return; - } - - $iQuantity = (int) $iQuantity; - if ($iQuantity < 0) { - $iQuantity = 0; - } - - $this->arImportData['quantity'] = $iQuantity; - } - - /** - * Set measure filed value - */ - protected function setMeasureOfUnitField() - { - $sMeasure = array_get($this->arImportData, 'measure_of_unit'); - array_forget($this->arImportData, 'measure_of_unit'); - if ($sMeasure === null) { - return; - } - - if (empty($sMeasure)) { - $this->arImportData['measure_of_unit_id'] = null; - return; - } - - $obMeasure = Measure::getByName($sMeasure)->first(); - if (empty($obMeasure)) { - $obMeasure = Measure::create([ - 'name' => $sMeasure, - ]); - } - - $this->arImportData['measure_of_unit_id'] = $obMeasure->id; - } - - /** - * Set measure filed value - */ - protected function setMeasureField() - { - $sMeasure = array_get($this->arImportData, 'measure_id'); - array_forget($this->arImportData, 'measure_id'); - if ($sMeasure === null) { - return; - } - - if (empty($sMeasure)) { - $this->arImportData['measure_id'] = null; - return; - } - - $obMeasure = Measure::getByName($sMeasure)->first(); - if (empty($obMeasure)) { - $obMeasure = Measure::create([ - 'name' => $sMeasure, - ]); - } - - $this->arImportData['measure_id'] = $obMeasure->id; - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportOfferModelFromXML.php b/plugins/lovata/shopaholic/classes/import/ImportOfferModelFromXML.php deleted file mode 100644 index 035e92260..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportOfferModelFromXML.php +++ /dev/null @@ -1,212 +0,0 @@ -arExistIDList = (array) Offer::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - - $this->prepareImportSettings(); - - parent::__construct(); - } - - /** - * Get import fields - * @return array - */ - public function getFields() : array - { - $this->arFieldList = [ - 'external_id' => Lang::get('lovata.toolbox::lang.field.external_id'), - 'product_id' => Lang::get('lovata.shopaholic::lang.field.product_id'), - 'active' => Lang::get('lovata.toolbox::lang.field.active'), - 'name' => Lang::get('lovata.toolbox::lang.field.name'), - 'code' => Lang::get('lovata.toolbox::lang.field.code'), - 'price' => Lang::get('lovata.shopaholic::lang.field.price'), - 'old_price' => Lang::get('lovata.shopaholic::lang.field.old_price'), - 'quantity' => Lang::get('lovata.shopaholic::lang.field.quantity'), - 'weight' => Lang::get('lovata.toolbox::lang.field.weight'), - 'height' => Lang::get('lovata.toolbox::lang.field.height'), - 'length' => Lang::get('lovata.toolbox::lang.field.length'), - 'width' => Lang::get('lovata.toolbox::lang.field.width'), - 'measure_id' => Lang::get('lovata.shopaholic::lang.field.measure'), - 'quantity_in_unit' => Lang::get('lovata.shopaholic::lang.field.quantity_in_unit'), - 'measure_of_unit' => Lang::get('lovata.shopaholic::lang.field.measure_of_unit'), - 'preview_text' => Lang::get('lovata.toolbox::lang.field.preview_text'), - 'description' => Lang::get('lovata.toolbox::lang.field.description'), - 'preview_image' => Lang::get('lovata.toolbox::lang.field.preview_image'), - 'images' => Lang::get('lovata.toolbox::lang.field.images'), - ]; - - //Get price types - $arPriceTypeList = (array) PriceType::lists('name', 'id'); - if (!empty($arPriceTypeList)) { - foreach ($arPriceTypeList as $iPriceTypeID => $sName) { - $sKey = 'price_list.'.$iPriceTypeID; - $this->arFieldList[$sKey.'.price'] = Lang::get('lovata.shopaholic::lang.field.price')." ($sName)"; - $this->arFieldList[$sKey.'.old_price'] = Lang::get('lovata.shopaholic::lang.field.old_price')." ($sName)"; - } - } - - return parent::getFields(); - } - - /** - * Start import - * @param $obProgressBar - * @throws - */ - public function import($obProgressBar = null) - { - parent::import($obProgressBar); - - $this->deactivateElements(); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->setActiveField(); - $this->setProductField(); - $this->setQuantityField(); - $this->setMeasureField(); - - $this->initPreviewImage(); - $this->initImageList(); - - parent::prepareImportData(); - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - $this->importPreviewImage(); - $this->importImageList(); - - parent::processModelObject(); - } - - /** - * Set product_id filed value - */ - protected function setProductField() - { - $sProductID = array_get($this->arImportData, 'product_id'); - if ($sProductID === null) { - return; - } - - if (empty($sProductID)) { - $this->arImportData['product_id'] = null; - - return; - } - - //Find product by external ID - $obProduct = Product::withTrashed()->getByExternalID($sProductID)->first(); - if (empty($obProduct)) { - $this->arImportData['product_id'] = null; - } else { - $this->arImportData['product_id'] = $obProduct->id; - } - } - - /** - * Set quantity field value - */ - protected function setQuantityField() - { - $iQuantity = array_get($this->arImportData, 'quantity'); - if ($iQuantity === null) { - return; - } - - $iQuantity = (int) $iQuantity; - if ($iQuantity < 0) { - $iQuantity = 0; - } - - $this->arImportData['quantity'] = $iQuantity; - } - - /** - * Set measure filed value - */ - protected function setMeasureField() - { - $sMeasure = array_get($this->arImportData, 'measure_of_unit'); - array_forget($this->arImportData, 'measure_of_unit'); - if ($sMeasure === null) { - return; - } - - if (empty($sMeasure)) { - $this->arImportData['measure_of_unit_id'] = null; - return; - } - - $obMeasure = Measure::getByName($sMeasure)->first(); - if (empty($obMeasure)) { - $obMeasure = Measure::create([ - 'name' => $sMeasure, - ]); - } - - $this->arImportData['measure_of_unit_id'] = $obMeasure->id; - } - - /** - * Prepare import settings - */ - protected function prepareImportSettings() - { - $this->arXMLFileList = XmlImportSettings::getValue('file_list'); - $this->sImageFolderPath = XmlImportSettings::getValue('image_folder'); - $this->sImageFolderPath = trim($this->sImageFolderPath, '/'); - - $this->bDeactivate = (bool) XmlImportSettings::getValue('offer_deactivate'); - $this->arImportSettings = XmlImportSettings::getValue('offer'); - $this->sElementListPath = XmlImportSettings::getValue('offer_path_to_list'); - - $iFileNumber = XmlImportSettings::getValue('offer_file_path'); - if ($iFileNumber !== null) { - $this->sMainFilePath = array_get($this->arXMLFileList, $iFileNumber.'.path'); - $this->sPrefix = array_get($this->arXMLFileList, $iFileNumber.'.path_prefix'); - $this->sNamespace = array_get($this->arXMLFileList, $iFileNumber.'.file_namespace'); - $this->sMainFilePath = trim($this->sMainFilePath, '/'); - } - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportOfferPriceFromXML.php b/plugins/lovata/shopaholic/classes/import/ImportOfferPriceFromXML.php deleted file mode 100644 index d89bcf4a3..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportOfferPriceFromXML.php +++ /dev/null @@ -1,127 +0,0 @@ -arExistIDList = (array) Offer::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - - $this->prepareImportSettings(); - - parent::__construct(); - } - - /** - * Get import fields - * @return array - */ - public function getFields() : array - { - $this->arFieldList = [ - 'external_id' => Lang::get('lovata.toolbox::lang.field.external_id'), - 'active' => Lang::get('lovata.toolbox::lang.field.active'), - 'price' => Lang::get('lovata.shopaholic::lang.field.price'), - 'old_price' => Lang::get('lovata.shopaholic::lang.field.old_price'), - 'quantity' => Lang::get('lovata.shopaholic::lang.field.quantity'), - ]; - - //Get price types - $arPriceTypeList = (array) PriceType::lists('name', 'id'); - if (!empty($arPriceTypeList)) { - foreach ($arPriceTypeList as $iPriceTypeID => $sName) { - $sKey = 'price_list.'.$iPriceTypeID; - $this->arFieldList[$sKey.'.price'] = Lang::get('lovata.shopaholic::lang.field.price')." ($sName)"; - $this->arFieldList[$sKey.'.old_price'] = Lang::get('lovata.shopaholic::lang.field.old_price')." ($sName)"; - } - } - - return parent::getFields(); - } - - /** - * Start import - * @param $obProgressBar - * @throws - */ - public function import($obProgressBar = null) - { - parent::import($obProgressBar); - - $this->deactivateElements(); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->setActiveField(); - $this->setQuantityField(); - - parent::prepareImportData(); - } - - /** - * Set quantity field value - */ - protected function setQuantityField() - { - $iQuantity = array_get($this->arImportData, 'quantity'); - if ($iQuantity === null) { - return; - } - - $iQuantity = (int) $iQuantity; - if ($iQuantity < 0) { - $iQuantity = 0; - } - - $this->arImportData['quantity'] = $iQuantity; - } - - /** - * Prepare import settings - */ - protected function prepareImportSettings() - { - $this->arXMLFileList = XmlImportSettings::getValue('file_list'); - $this->sImageFolderPath = XmlImportSettings::getValue('image_folder'); - $this->sImageFolderPath = trim($this->sImageFolderPath, '/'); - - $this->bDeactivate = (bool) XmlImportSettings::getValue('price_deactivate'); - $this->arImportSettings = XmlImportSettings::getValue('price'); - $this->sElementListPath = XmlImportSettings::getValue('price_path_to_list'); - - $iFileNumber = XmlImportSettings::getValue('price_file_path'); - if ($iFileNumber !== null) { - $this->sMainFilePath = array_get($this->arXMLFileList, $iFileNumber.'.path'); - $this->sMainFilePath = trim($this->sMainFilePath, '/'); - } - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportProductModelFromCSV.php b/plugins/lovata/shopaholic/classes/import/ImportProductModelFromCSV.php deleted file mode 100644 index 78f0fcea3..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportProductModelFromCSV.php +++ /dev/null @@ -1,148 +0,0 @@ -arExistIDList = (array) Product::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->setActiveField(); - $this->setBrandField(); - $this->setCategoryField(); - - $this->initPreviewImage(); - $this->initImageList(); - $this->initAdditionalCategoryField(); - - parent::prepareImportData(); - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - $this->importPreviewImage(); - $this->importImageList(); - - $this->syncAdditionalCategoryList(); - } - - /** - * Set brand_id filed value - */ - protected function setBrandField() - { - $sBrandID = array_get($this->arImportData, 'brand_id'); - if ($sBrandID === null) { - return; - } - - if (empty($sBrandID)) { - $this->arImportData['brand_id'] = null; - - return; - } - - //Find brand by external ID - $obBrand = Brand::getByExternalID($sBrandID)->first(); - if (empty($obBrand)) { - $this->arImportData['brand_id'] = null; - } else { - $this->arImportData['brand_id'] = $obBrand->id; - } - } - - /** - * Set category_id filed value - */ - protected function setCategoryField() - { - $sCategoryID = array_get($this->arImportData, 'category_id'); - if ($sCategoryID === null) { - return; - } - - if (empty($sCategoryID)) { - $this->arImportData['category_id'] = null; - - return; - } - - //Find category by external ID - $obCategory = Category::getByExternalID($sCategoryID)->first(); - if (empty($obCategory)) { - $this->arImportData['category_id'] = null; - } else { - $this->arImportData['category_id'] = $obCategory->id; - } - } - - /** - * Init additional category ID list - */ - protected function initAdditionalCategoryField() - { - $sCategoryList = array_get($this->arImportData, 'additional_category'); - if ($sCategoryList === null) { - return; - } - - $arCategoryIDList = explode(',', $sCategoryList); - foreach ($arCategoryIDList as $iKey => &$iCategoryID) { - $iCategoryID = trim($iCategoryID); - if (empty($iCategoryID)) { - unset($arCategoryIDList[$iKey]); - } - } - - if (empty($arCategoryIDList)) { - $this->arAdditionalCategoryList = []; - - return; - } - - $this->arAdditionalCategoryList = (array) Category::whereIn('external_id', $arCategoryIDList)->lists('id'); - } - - /** - * Sync link product with additional categories - */ - protected function syncAdditionalCategoryList() - { - if ($this->arAdditionalCategoryList === null) { - return; - } - - $this->obModel->additional_category()->sync($this->arAdditionalCategoryList); - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ImportProductModelFromXML.php b/plugins/lovata/shopaholic/classes/import/ImportProductModelFromXML.php deleted file mode 100644 index 187f2aaba..000000000 --- a/plugins/lovata/shopaholic/classes/import/ImportProductModelFromXML.php +++ /dev/null @@ -1,224 +0,0 @@ -arExistIDList = (array) Product::whereNotNull('external_id')->lists('external_id', 'id'); - $this->arExistIDList = array_filter($this->arExistIDList); - - $this->prepareImportSettings(); - - parent::__construct(); - } - - /** - * Get import fields - * @return array - */ - public function getFields() : array - { - $this->arFieldList = [ - 'external_id' => Lang::get('lovata.toolbox::lang.field.external_id'), - 'active' => Lang::get('lovata.toolbox::lang.field.active'), - 'name' => Lang::get('lovata.toolbox::lang.field.name'), - 'code' => Lang::get('lovata.toolbox::lang.field.code'), - 'preview_text' => Lang::get('lovata.toolbox::lang.field.preview_text'), - 'description' => Lang::get('lovata.toolbox::lang.field.description'), - 'preview_image' => Lang::get('lovata.toolbox::lang.field.preview_image'), - 'images' => Lang::get('lovata.toolbox::lang.field.images'), - 'brand_id' => Lang::get('lovata.shopaholic::lang.field.brand'), - 'category_id' => Lang::get('lovata.toolbox::lang.field.category'), - 'additional_category' => Lang::get('lovata.shopaholic::lang.field.additional_category'), - ]; - - return parent::getFields(); - } - - /** - * Start import - * @param $obProgressBar - * @throws - */ - public function import($obProgressBar = null) - { - parent::import($obProgressBar); - - $this->deactivateElements(); - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - $this->setActiveField(); - $this->setBrandField(); - $this->setCategoryField(); - - $this->initPreviewImage(); - $this->initImageList(); - $this->initAdditionalCategoryField(); - - parent::prepareImportData(); - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - $this->importPreviewImage(); - $this->importImageList(); - - $this->syncAdditionalCategoryList(); - - parent::processModelObject(); - } - - /** - * Set brand_id filed value - */ - protected function setBrandField() - { - $sBrandID = array_get($this->arImportData, 'brand_id'); - if ($sBrandID === null) { - return; - } - - if (empty($sBrandID)) { - $this->arImportData['brand_id'] = null; - - return; - } - - //Find brand by external ID - $obBrand = Brand::getByExternalID($sBrandID)->first(); - if (empty($obBrand)) { - $this->arImportData['brand_id'] = null; - } else { - $this->arImportData['brand_id'] = $obBrand->id; - } - } - - /** - * Set category_id filed value - */ - protected function setCategoryField() - { - $sCategoryID = array_get($this->arImportData, 'category_id'); - if ($sCategoryID === null) { - return; - } - - if (empty($sCategoryID)) { - $this->arImportData['category_id'] = null; - - return; - } - - if (is_array($sCategoryID)) { - $sCategoryID = array_shift($sCategoryID); - } - - //Find category by external ID - $obCategory = Category::getByExternalID($sCategoryID)->first(); - if (empty($obCategory)) { - $this->arImportData['category_id'] = null; - } else { - $this->arImportData['category_id'] = $obCategory->id; - } - } - - /** - * Init additional category ID list - */ - protected function initAdditionalCategoryField() - { - $arCategoryIDList = (array) array_get($this->arImportData, 'additional_category'); - $arCategoryIDList = array_filter($arCategoryIDList); - if (empty($arCategoryIDList)) { - return; - } - - $iMainCategoryID = array_get($this->arImportData, 'category_id'); - - array_forget($this->arImportData, 'additional_category'); - foreach ($arCategoryIDList as $iKey => &$iCategoryID) { - $iCategoryID = trim($iCategoryID); - if (empty($iCategoryID)) { - unset($arCategoryIDList[$iKey]); - } - } - - if (empty($arCategoryIDList)) { - $this->arAdditionalCategoryList = []; - - return; - } - - $this->arAdditionalCategoryList = (array) Category::whereIn('external_id', $arCategoryIDList)->where('id', '!=', $iMainCategoryID)->lists('id'); - } - - /** - * Sync link product with additional categories - */ - protected function syncAdditionalCategoryList() - { - if ($this->arAdditionalCategoryList === null) { - return; - } - - $this->obModel->additional_category()->sync($this->arAdditionalCategoryList); - } - - /** - * Prepare import settings - */ - protected function prepareImportSettings() - { - $this->arXMLFileList = XmlImportSettings::getValue('file_list'); - $this->sImageFolderPath = XmlImportSettings::getValue('image_folder'); - $this->sImageFolderPath = trim($this->sImageFolderPath, '/'); - - $this->bDeactivate = (bool) XmlImportSettings::getValue('product_deactivate'); - $this->arImportSettings = XmlImportSettings::getValue('product'); - $this->sElementListPath = XmlImportSettings::getValue('product_path_to_list'); - - $iFileNumber = XmlImportSettings::getValue('product_file_path'); - if ($iFileNumber !== null) { - $this->sMainFilePath = array_get($this->arXMLFileList, $iFileNumber.'.path'); - $this->sPrefix = array_get($this->arXMLFileList, $iFileNumber.'.path_prefix'); - $this->sNamespace = array_get($this->arXMLFileList, $iFileNumber.'.file_namespace'); - $this->sMainFilePath = trim($this->sMainFilePath, '/'); - } - } -} diff --git a/plugins/lovata/shopaholic/classes/import/ParseCategoryXMLNode.php b/plugins/lovata/shopaholic/classes/import/ParseCategoryXMLNode.php deleted file mode 100644 index c3a60f5a3..000000000 --- a/plugins/lovata/shopaholic/classes/import/ParseCategoryXMLNode.php +++ /dev/null @@ -1,34 +0,0 @@ -obElementNode->findListByPath($sFieldPath); - if (empty($arNodeList)) { - return $arResult; - } - - foreach ($arNodeList as $obCategoryNode) { - $obParseNode = new ParseCategoryXMLNode($obCategoryNode, $this->arImportSettings); - $arResult[] = $obParseNode->get(); - } - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/item/BrandItem.php b/plugins/lovata/shopaholic/classes/item/BrandItem.php deleted file mode 100644 index 0910ef403..000000000 --- a/plugins/lovata/shopaholic/classes/item/BrandItem.php +++ /dev/null @@ -1,84 +0,0 @@ -getPageParamList($sPageCode, $arRemoveParamList); - - //Generate page URL - $sURL = CmsPage::url($sPageCode, $arParamList); - - return $sURL; - } - - /** - * Get URL param list by page code - * @param string $sPageCode - * @param array $arRemoveParamList - * @return array - */ - public function getPageParamList($sPageCode, $arRemoveParamList = []) : array - { - $arResult = []; - if (!empty($arRemoveParamList)) { - foreach ($arRemoveParamList as $sParamName) { - $arResult[$sParamName] = null; - } - } - - //Get URL params for page - $arParamList = PageHelper::instance()->getUrlParamList($sPageCode, 'BrandPage'); - if (!empty($arParamList)) { - $sPageParam = array_shift($arParamList); - $arResult[$sPageParam] = $this->slug; - } - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/item/CategoryItem.php b/plugins/lovata/shopaholic/classes/item/CategoryItem.php deleted file mode 100644 index cf28b068a..000000000 --- a/plugins/lovata/shopaholic/classes/item/CategoryItem.php +++ /dev/null @@ -1,259 +0,0 @@ - [ - 'class' => CategoryItem::class, - 'field' => 'parent_id', - ], - 'children' => [ - 'class' => CategoryCollection::class, - 'field' => 'children_id_list', - ], - ]; - - /** - * Clear product count cache - */ - public function clearProductCount() - { - $arCacheTag = [static::class]; - $sCacheKey = 'product_count_'.$this->id; - - CCache::clear($arCacheTag, $sCacheKey); - ItemStorage::clear(static::class, $this->id); - - $obParentItem = $this->parent; - if ($obParentItem->isEmpty()) { - return; - } - - $obParentItem->clearProductCount(); - } - - /** - * Returns URL of a category page. - * - * @param string|null $sPageCode - * @param array $arRemoveParamList - * - * @return string - */ - public function getPageUrl($sPageCode = null, $arRemoveParamList = []) - { - if (empty($sPageCode)) { - $sPageCode = Settings::getValue('default_category_page_id', 'catalog'); - } - - //Get URL params - $arParamList = $this->getPageParamList($sPageCode, $arRemoveParamList); - - //Generate page URL - $sURL = CmsPage::url($sPageCode, $arParamList); - - return $sURL; - } - - /** - * Get URL param list by page code - * @param string $sPageCode - * @param array $arRemoveParamList - * @return array - */ - public function getPageParamList($sPageCode, $arRemoveParamList = []) : array - { - $arResult = []; - if (!empty($arRemoveParamList)) { - foreach ($arRemoveParamList as $sParamName) { - $arResult[$sParamName] = null; - } - } - - //Get all slug params - $arParamList = PageHelper::instance()->getUrlParamList($sPageCode, null); - if (!empty($arParamList)) { - foreach ($arParamList as $sParamName) { - $arResult[$sParamName] = null; - } - } - - //Get URL params for page - $arParamList = PageHelper::instance()->getUrlParamList($sPageCode, 'CategoryPage'); - if (empty($arParamList)) { - return []; - } - - //Get slug list - $arSlugList = $this->getSlugList(); - - $arWildcardParamList = PageHelper::instance()->getUrlParamList($sPageCode, 'CategoryPage', 'slug', true); - if (!empty($arWildcardParamList)) { - $arSlugList = array_reverse($arSlugList); - $arResult[array_shift($arWildcardParamList)] = implode('/', $arSlugList); - - return $arResult; - } elseif (count($arParamList) == 1) { - $sParamName = array_shift($arParamList); - $arResult[$sParamName] = array_shift($arSlugList); - - return $arResult; - } - - //Prepare page property list - $arSlugList = array_reverse($arSlugList); - $arParamList = array_reverse($arParamList); - foreach ($arParamList as $sParamName) { - if (!empty($arSlugList)) { - $arResult[$sParamName] = array_shift($arSlugList); - } - } - - return $arResult; - } - - /** - * Get array with categories slugs - * @return array - */ - protected function getSlugList() : array - { - $arResult = [$this->slug]; - - $obParentCategory = $this->parent; - while ($obParentCategory->isNotEmpty()) { - $arResult[] = $obParentCategory->slug; - $obParentCategory = $obParentCategory->parent; - } - - return $arResult; - } - - /** - * Set element data from model object - * - * @return array - */ - protected function getElementData() - { - $arResult = [ - 'nest_depth' => $this->obElement->getDepth(), - ]; - - $arResult['children_id_list'] = $this->obElement->children() - ->active() - ->orderBy('nest_left', 'asc') - ->lists('id'); - - return $arResult; - } - - /** - * Get product count for category - * @return int - */ - protected function getProductCountAttribute() - { - $iProductCount = $this->getAttribute('product_count'); - if ($iProductCount !== null) { - return $iProductCount; - } - - //Get product count from cache - $arCacheTag = [static::class]; - $sCacheKey = 'product_count_'.$this->id; - - $iProductCount = CCache::get($arCacheTag, $sCacheKey); - if ($iProductCount !== null) { - return $iProductCount; - } - - //Calculate product count from child categories - $iProductCount = 0; - $obChildCategoryCollect = $this->children; - if ($obChildCategoryCollect->isNotEmpty()) { - /** @var CategoryItem $obChildCategoryItem */ - foreach ($obChildCategoryCollect as $obChildCategoryItem) { - if ($obChildCategoryItem->isEmpty()) { - continue; - } - - $iProductCount += $obChildCategoryItem->product_count; - } - } - - $iProductCount += ProductCollection::make()->active()->category($this->id)->count(); - - CCache::forever($arCacheTag, $sCacheKey, $iProductCount); - $this->setAttribute('product_count', $iProductCount); - - return $iProductCount; - } -} diff --git a/plugins/lovata/shopaholic/classes/item/CurrencyItem.php b/plugins/lovata/shopaholic/classes/item/CurrencyItem.php deleted file mode 100644 index 1a54163c6..000000000 --- a/plugins/lovata/shopaholic/classes/item/CurrencyItem.php +++ /dev/null @@ -1,37 +0,0 @@ -code == CurrencyHelper::instance()->getActiveCurrencyCode(); - - return $bResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/item/MeasureItem.php b/plugins/lovata/shopaholic/classes/item/MeasureItem.php deleted file mode 100644 index c64cbae72..000000000 --- a/plugins/lovata/shopaholic/classes/item/MeasureItem.php +++ /dev/null @@ -1,24 +0,0 @@ - [ - 'class' => ProductItem::class, - 'field' => 'product_id', - ], - 'measure' => [ - 'class' => MeasureItem::class, - 'field' => 'measure_id', - ], - ]; - - public $arPriceField = [ - 'price', - 'tax_price', - 'price_without_tax', - 'price_with_tax', - 'old_price', - 'tax_old_price', - 'old_price_without_tax', - 'old_price_with_tax', - 'discount_price', - 'tax_discount_price', - 'discount_price_without_tax', - 'discount_price_with_tax', - ]; - - protected $iActivePriceType = null; - protected $sActiveCurrency = null; - - /** - * Check element, active == true, trashed == false - * @return bool - */ - public function isActive() - { - return $this->active && !$this->trashed; - } - - /** - * Set active price type - * @param int $iPriceTypeID - * @return OfferItem - */ - public function setActivePriceType($iPriceTypeID) - { - $this->iActivePriceType = $iPriceTypeID; - - return $this; - } - - /** - * Set active currency code - * @param string $sActiveCurrencyCode - * @return OfferItem - */ - public function setActiveCurrency($sActiveCurrencyCode) - { - $this->sActiveCurrency = $sActiveCurrencyCode; - - return $this; - } - - /** - * Get active price type - * @return int|null - */ - public function getActivePriceType() - { - if (empty($this->iActivePriceType)) { - $this->iActivePriceType = PriceTypeHelper::instance()->getActivePriceTypeID(); - } - - return $this->iActivePriceType; - } - - /** - * Get active currency code - * @return int|null - */ - public function getActiveCurrency() - { - if (!empty($this->sActiveCurrency)) { - return $this->sActiveCurrency; - } - - return CurrencyHelper::instance()->getActiveCurrencyCode(); - } - - /** - * Get price_value attribute - * @return float - */ - protected function getPriceValueAttribute() - { - $iActivePriceType = $this->getActivePriceType(); - if (empty($iActivePriceType)) { - $fPrice = $this->getAttribute('price_value'); - } else { - $fPrice = array_get($this->price_list, $iActivePriceType.'.price'); - } - - $fPrice = CurrencyHelper::instance()->convert($fPrice, $this->getActiveCurrency()); - - return $fPrice; - } - - /** - * Get old_price_value attribute - * @return float - */ - protected function getOldPriceValueAttribute() - { - $iActivePriceType = $this->getActivePriceType(); - if (empty($iActivePriceType)) { - $fPrice = $this->getAttribute('old_price_value'); - } else { - $fPrice = array_get($this->price_list, $iActivePriceType.'.old_price'); - } - - $fPrice = CurrencyHelper::instance()->convert($fPrice, $this->getActiveCurrency()); - - return $fPrice; - } - - /** - * Get discount_price_value attribute - * @return float - */ - protected function getDiscountPriceValueAttribute() - { - $fOldPrice = $this->old_price_value; - $fPrice = $this->price_value; - - $fDiscountPrice = 0; - if ($fOldPrice > 0) { - $fDiscountPrice = PriceHelper::round($fOldPrice - $fPrice); - } - - $fPrice = CurrencyHelper::instance()->convert($fDiscountPrice, $this->getActiveCurrency()); - - return $fPrice; - } - - /** - * Get currency value - * @return null|string - */ - protected function getCurrencyAttribute() - { - if (empty($this->sActiveCurrency)) { - return CurrencyHelper::instance()->getActiveCurrencySymbol(); - } - - $sResult = CurrencyHelper::instance()->getCurrencySymbol($this->sActiveCurrency); - $this->sActiveCurrency = null; - - return $sResult; - } - - /** - * Get currency code value - * @return null|string - */ - protected function getCurrencyCodeAttribute() - { - if (empty($this->sActiveCurrency)) { - return CurrencyHelper::instance()->getActiveCurrencyCode(); - } - - $sResult = CurrencyHelper::instance()->getCurrencyCode($this->sActiveCurrency); - $this->sActiveCurrency = null; - - return $sResult; - } - - /** - * Get tax_price_value attribute value - * @return float - */ - protected function getTaxPriceValueAttribute() - { - $fPrice = PriceHelper::round($this->price_with_tax_value - $this->price_without_tax_value); - - return $fPrice; - } - - /** - * Get tax_old_price_value attribute value - * @return float - */ - protected function getTaxOldPriceValueAttribute() - { - $fPrice = PriceHelper::round($this->old_price_with_tax_value - $this->old_price_without_tax_value); - - return $fPrice; - } - - /** - * Get tax_discount_price_value attribute value - * @return float - */ - protected function getTaxDiscountPriceValueAttribute() - { - $fPrice = PriceHelper::round($this->discount_price_with_tax_value - $this->discount_price_without_tax_value); - - return $fPrice; - } - - /** - * Get price_with_tax_value attribute value - * @return float - */ - protected function getPriceWithTaxValueAttribute() - { - $fPrice = TaxHelper::instance()->getPriceWithTax($this->price_value, $this->tax_percent); - - return $fPrice; - } - - /** - * Get old_price_with_tax_value attribute value - * @return float - */ - protected function getOldPriceWithTaxValueAttribute() - { - $fPrice = TaxHelper::instance()->getPriceWithTax($this->old_price_value, $this->tax_percent); - - return $fPrice; - } - - /** - * Get discount_price_with_tax_value attribute value - * @return float - */ - protected function getDiscountPriceWithTaxValueAttribute() - { - $fPrice = TaxHelper::instance()->getPriceWithTax($this->discount_price_value, $this->tax_percent); - - return $fPrice; - } - - /** - * Get price_without_tax_value attribute value - * @return float - */ - protected function getPriceWithoutTaxValueAttribute() - { - $fPrice = TaxHelper::instance()->getPriceWithoutTax($this->price_value, $this->tax_percent); - - return $fPrice; - } - - /** - * Get old_price_without_tax_value attribute value - * @return float - */ - protected function getOldPriceWithoutTaxValueAttribute() - { - $fPrice = TaxHelper::instance()->getPriceWithoutTax($this->old_price_value, $this->tax_percent); - - return $fPrice; - } - - /** - * Get discount_price_without_tax_value attribute value - * @return float - */ - protected function getDiscountPriceWithoutTaxValueAttribute() - { - $fPrice = TaxHelper::instance()->getPriceWithoutTax($this->discount_price_value, $this->tax_percent); - - return $fPrice; - } - - /** - * Get tax_percent attribute value - * @return float - */ - protected function getTaxPercentAttribute() - { - $fTaxPercent = $this->getAttribute('tax_percent'); - if ($fTaxPercent === null) { - $fTaxPercent = TaxHelper::instance()->getTaxPercent($this->tax_list); - $this->setAttribute('tax_percent', $fTaxPercent); - } - - return $fTaxPercent; - } - - /** - * Get tax_list attribute value - * @return \Lovata\Shopaholic\Classes\Collection\TaxCollection|TaxItem[] - */ - protected function getTaxListAttribute() - { - $obTaxList = $this->getAttribute('tax_list'); - if ($obTaxList === null) { - $obTaxList = $this->getAppliedTaxList(); - $this->setAttribute('tax_list', $obTaxList); - } - - return $obTaxList; - } - - /** - * Get measure of one unit - * @return \Lovata\Shopaholic\Classes\Item\MeasureItem - */ - protected function getMeasureOfUnitAttribute() - { - $iMeasureID = $this->measure_of_unit_id; - if (empty($iMeasureID)) { - $iMeasureID = Settings::getValue('measure_of_unit'); - } - - $obMeasureItem = MeasureItem::make($iMeasureID); - - return $obMeasureItem; - } - - /** - * Get dimensions unit measure - * @return \Lovata\Shopaholic\Classes\Item\MeasureItem - */ - protected function getDimensionsMeasureAttribute() - { - $obMeasureItem = MeasureHelper::instance()->getDimensionsMeasureItem(); - - return $obMeasureItem; - } - - /** - * Get weight unit measure - * @return \Lovata\Shopaholic\Classes\Item\MeasureItem - */ - protected function getWeightMeasureAttribute() - { - $obMeasureItem = MeasureHelper::instance()->getWeightMeasureItem(); - - return $obMeasureItem; - } - - /** - * Get applied tax list - * @return \Lovata\Shopaholic\Classes\Collection\TaxCollection|\Lovata\Shopaholic\Classes\Item\TaxItem[] - */ - protected function getAppliedTaxList() - { - $obResultTaxList = TaxHelper::instance()->getTaxList(); - if ($obResultTaxList->isEmpty()) { - return $obResultTaxList; - } - - foreach ($obResultTaxList as $obTaxItem) { - $bSkipTax = !$obTaxItem->is_global - && !$obTaxItem->isAvailableForCategory($this->product->category) - && !$obTaxItem->isAvailableForProduct($this->product) - && !$obTaxItem->isAvailableForCountry(TaxHelper::instance()->getActiveCountry()) - && !$obTaxItem->isAvailableForState(TaxHelper::instance()->getActiveState()); - - if ($bSkipTax) { - $obResultTaxList->exclude($obTaxItem->id); - } - } - - return $obResultTaxList; - } - - /** - * Set element data from model object - * - * @return array - */ - protected function getElementData() - { - $obDefaultCurrency = CurrencyHelper::instance()->getDefault(); - $sCurrencyCode = !empty($obDefaultCurrency) ? $obDefaultCurrency->code : null; - - $arResult = [ - 'price_value' => $this->obElement->setActiveCurrency($sCurrencyCode)->setActivePriceType(null)->price_value, - 'old_price_value' => $this->obElement->setActiveCurrency($sCurrencyCode)->setActivePriceType(null)->old_price_value, - 'trashed' => $this->obElement->trashed(), - ]; - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/item/ProductItem.php b/plugins/lovata/shopaholic/classes/item/ProductItem.php deleted file mode 100644 index 97fc63035..000000000 --- a/plugins/lovata/shopaholic/classes/item/ProductItem.php +++ /dev/null @@ -1,208 +0,0 @@ - 0, 2 => 4, 3 => 7, 4 => 21, 5 => 48] - * @property \Lovata\ReviewsShopaholic\Classes\Collection\ReviewCollection|\Lovata\ReviewsShopaholic\Classes\Item\ReviewItem[] $review - * - * @method int getRatingCount(int $iRating) - * @method int getRatingPercent(int $iRating) - * @method int getRatingTotalCount() - * - * Related products for Shopaholic - * @property \Lovata\Shopaholic\Classes\Collection\ProductCollection|ProductItem[] $related - * - * Accessories for Shopaholic - * @property \Lovata\Shopaholic\Classes\Collection\ProductCollection|ProductItem[] $accessory - * - * Labels for Shopaholic - * @property \Lovata\LabelsShopaholic\Classes\Collection\LabelCollection|\Lovata\LabelsShopaholic\Classes\Item\LabelItem[] $label - * - * Compare for Shopaholic - * @method bool inCompare() - * - * Wish list for Shopaholic - * @method bool inWishList() - * - * YandexMarket for Shopaholic - * @property \System\Models\File $preview_image_yandex - * @property \October\Rain\Database\Collection|\System\Models\File[] $images_yandex - * - * Facebook for Shopaholic - * @property \System\Models\File $preview_image_facebook - * @property \October\Rain\Database\Collection|\System\Models\File[] $images_facebook - * - * VKontakte for Shopaholic - * @property bool $active_vk - * @property int $external_vk_id - * @property \System\Models\File $preview_image_vkontakte - * @property \October\Rain\Database\Collection|\System\Models\File[] $images_vkontakte - * - * Downloadable file for Shopaholic - * @property bool $is_file_access - */ -class ProductItem extends ElementItem -{ - const MODEL_CLASS = Product::class; - - public static $arQueryWith = [ - 'preview_image', - 'images', - 'additional_category', - 'offer', - 'offer.preview_image', - 'offer.images', - 'offer.main_price', - 'offer.price_link' - ]; - - /** @var Product */ - protected $obElement = null; - - public $arRelationList = [ - 'offer' => [ - 'class' => OfferCollection::class, - 'field' => 'offer_id_list', - ], - 'category' => [ - 'class' => CategoryItem::class, - 'field' => 'category_id', - ], - 'additional_category' => [ - 'class' => CategoryCollection::class, - 'field' => 'additional_category_id', - ], - 'brand' => [ - 'class' => BrandItem::class, - 'field' => 'brand_id', - ], - ]; - - /** - * Check element, active == true, trashed == false - * @return bool - */ - public function isActive() - { - return $this->active && !$this->trashed; - } - - /** - * Returns URL of a category page. - * - * @param string|null $sPageCode - * @param array $arRemoveParamList - * - * @return string - */ - public function getPageUrl($sPageCode = null, $arRemoveParamList = []) - { - if (empty($sPageCode)) { - $sPageCode = Settings::getValue('default_product_page_id', 'product'); - } - - //Get URL params - $arParamList = $this->getPageParamList($sPageCode, $arRemoveParamList); - - //Generate page URL - $sURL = CmsPage::url($sPageCode, $arParamList); - - return $sURL; - } - - /** - * Get URL param list by page code - * @param string $sPageCode - * @param array $arRemoveParamList - * @return array - */ - public function getPageParamList($sPageCode, $arRemoveParamList = []) : array - { - $arResult = []; - $arPageParamList = []; - if (!empty($arRemoveParamList)) { - foreach ($arRemoveParamList as $sParamName) { - $arResult[$sParamName] = null; - } - } - - //Get URL params for categories - $aCategoryParamList = $this->category->getPageParamList($sPageCode); - $aBrandParamList = $this->brand->getPageParamList($sPageCode); - - //Get URL params for page - $arParamList = (array) PageHelper::instance()->getUrlParamList($sPageCode, 'ProductPage'); - if (!empty($arParamList)) { - $sPageParam = array_shift($arParamList); - $arPageParamList[$sPageParam] = $this->slug; - } - - $arResult = array_merge($arResult, $aCategoryParamList, $aBrandParamList, $arPageParamList); - - return $arResult; - } - - /** - * Set element data from model object - * @return array - */ - protected function getElementData() - { - $arResult = [ - 'offer_id_list' => $this->obElement->offer->where('active', true)->pluck('id')->all(), - 'additional_category_id' => $this->obElement->additional_category->pluck('id')->all(), - 'trashed' => $this->obElement->trashed(), - ]; - - foreach ($this->obElement->offer as $obOffer) { - OfferItem::make($obOffer->id, $obOffer); - } - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/item/PromoBlockItem.php b/plugins/lovata/shopaholic/classes/item/PromoBlockItem.php deleted file mode 100644 index 89110768c..000000000 --- a/plugins/lovata/shopaholic/classes/item/PromoBlockItem.php +++ /dev/null @@ -1,93 +0,0 @@ -getPageParamList($sPageCode); - - //Generate page URL - $sURL = CmsPage::url($sPageCode, $arParamList); - - return $sURL; - } - - /** - * Get URL param list by page code - * @param string $sPageCode - * @return array - */ - public function getPageParamList($sPageCode) : array - { - $arPageParamList = []; - - //Get URL params for page - $arParamList = PageHelper::instance()->getUrlParamList($sPageCode, 'PromoBlockPage'); - if (!empty($arParamList)) { - $sPageParam = array_shift($arParamList); - $arPageParamList[$sPageParam] = $this->slug; - } - - return $arPageParamList; - } - - /** - * Get product collection attribute - * @return ProductCollection - */ - protected function getProductAttribute() : ProductCollection - { - $obProductList = ProductCollection::make()->promo($this->id); - - return $obProductList; - } -} diff --git a/plugins/lovata/shopaholic/classes/item/TaxItem.php b/plugins/lovata/shopaholic/classes/item/TaxItem.php deleted file mode 100644 index 8a027ef59..000000000 --- a/plugins/lovata/shopaholic/classes/item/TaxItem.php +++ /dev/null @@ -1,116 +0,0 @@ -category_id_list; - if (empty($arCategoryIDList) || empty($obCategoryItem)) { - return false; - } - - if (in_array($obCategoryItem->id, $arCategoryIDList)) { - return true; - } - - if ($obCategoryItem->parent->isNotEmpty()) { - return $this->isAvailableForCategory($obCategoryItem->parent); - } - - return false; - } - - /** - * Check tax is available for product - * @param \Lovata\Shopaholic\Classes\Item\ProductItem $obProductItem - * @return bool - */ - public function isAvailableForProduct($obProductItem) : bool - { - $arProductIDList = (array) $this->product_id_list; - - $bResult = !empty($arProductIDList) && !empty($obProductItem) && in_array($obProductItem->id, $arProductIDList); - - return $bResult; - } - - /** - * Check tax is available for country - * @param \RainLab\Location\Models\Country $obCountry - * @return bool - */ - public function isAvailableForCountry($obCountry) : bool - { - $arCountryIDList = (array) $this->country_id_list; - - $bResult = !empty($arCountryIDList) && !empty($obCountry) && in_array($obCountry->id, $arCountryIDList); - - return $bResult; - } - - /** - * Check tax is available for state - * @param \RainLab\Location\Models\State $obState - * @return bool - */ - public function isAvailableForState($obState) : bool - { - $arStateIDList = (array) $this->state_id_list; - - $bResult = !empty($arStateIDList) && !empty($obState) && in_array($obState->id, $arStateIDList); - - return $bResult; - } - - /** - * Set model data from object - * @return mixed - */ - protected function getElementData() - { - $arResult = [ - 'category_id_list' => $this->obElement->category()->lists('id'), - 'product_id_list' => $this->obElement->product()->lists('id'), - ]; - - if (PluginManager::instance()->hasPlugin('RainLab.Location')) { - $arResult['country_id_list'] = $this->obElement->country()->lists('id'); - $arResult['state_id_list'] = $this->obElement->state()->lists('id'); - } - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/BrandListStore.php b/plugins/lovata/shopaholic/classes/store/BrandListStore.php deleted file mode 100644 index ba3fdd524..000000000 --- a/plugins/lovata/shopaholic/classes/store/BrandListStore.php +++ /dev/null @@ -1,30 +0,0 @@ -addToStoreList('sorting', SortingListStore::class); - $this->addToStoreList('category', ListByCategoryStore::class); - $this->addToStoreList('active', ActiveListStore::class); - } -} diff --git a/plugins/lovata/shopaholic/classes/store/CategoryListStore.php b/plugins/lovata/shopaholic/classes/store/CategoryListStore.php deleted file mode 100644 index bb26aa47c..000000000 --- a/plugins/lovata/shopaholic/classes/store/CategoryListStore.php +++ /dev/null @@ -1,28 +0,0 @@ -addToStoreList('top_level', TopLevelListStore::class); - $this->addToStoreList('active', ActiveListStore::class); - } -} diff --git a/plugins/lovata/shopaholic/classes/store/CurrencyListStore.php b/plugins/lovata/shopaholic/classes/store/CurrencyListStore.php deleted file mode 100644 index 3496db850..000000000 --- a/plugins/lovata/shopaholic/classes/store/CurrencyListStore.php +++ /dev/null @@ -1,27 +0,0 @@ -addToStoreList('active', ActiveListStore::class); - $this->addToStoreList('sorting', SortingListStore::class); - } -} diff --git a/plugins/lovata/shopaholic/classes/store/OfferListStore.php b/plugins/lovata/shopaholic/classes/store/OfferListStore.php deleted file mode 100644 index 009c134b2..000000000 --- a/plugins/lovata/shopaholic/classes/store/OfferListStore.php +++ /dev/null @@ -1,33 +0,0 @@ -addToStoreList('sorting', SortingListStore::class); - $this->addToStoreList('active', ActiveListStore::class); - } -} diff --git a/plugins/lovata/shopaholic/classes/store/ProductListStore.php b/plugins/lovata/shopaholic/classes/store/ProductListStore.php deleted file mode 100644 index ba4705a71..000000000 --- a/plugins/lovata/shopaholic/classes/store/ProductListStore.php +++ /dev/null @@ -1,45 +0,0 @@ -addToStoreList('sorting', SortingListStore::class); - $this->addToStoreList('category', ListByCategoryStore::class); - $this->addToStoreList('brand', ListByBrandStore::class); - $this->addToStoreList('active', ActiveListStore::class); - $this->addToStoreList('promo_block', ListByPromoBlockStore::class); - } -} diff --git a/plugins/lovata/shopaholic/classes/store/PromoBlockListStore.php b/plugins/lovata/shopaholic/classes/store/PromoBlockListStore.php deleted file mode 100644 index 14f40c479..000000000 --- a/plugins/lovata/shopaholic/classes/store/PromoBlockListStore.php +++ /dev/null @@ -1,39 +0,0 @@ -addToStoreList('active', ActiveListStore::class); - $this->addToStoreList('sorting', SortingListStore::class); - $this->addToStoreList('hidden', HiddenListStore::class); - $this->addToStoreList('not_hidden', NotHiddenListStore::class); - } -} diff --git a/plugins/lovata/shopaholic/classes/store/TaxListStore.php b/plugins/lovata/shopaholic/classes/store/TaxListStore.php deleted file mode 100644 index 6d61ee3d6..000000000 --- a/plugins/lovata/shopaholic/classes/store/TaxListStore.php +++ /dev/null @@ -1,27 +0,0 @@ -addToStoreList('active', ActiveListStore::class); - $this->addToStoreList('sorting', SortingListStore::class); - } -} diff --git a/plugins/lovata/shopaholic/classes/store/brand/ActiveListStore.php b/plugins/lovata/shopaholic/classes/store/brand/ActiveListStore.php deleted file mode 100644 index e06ebf721..000000000 --- a/plugins/lovata/shopaholic/classes/store/brand/ActiveListStore.php +++ /dev/null @@ -1,26 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/brand/ListByCategoryStore.php b/plugins/lovata/shopaholic/classes/store/brand/ListByCategoryStore.php deleted file mode 100644 index 0f9ff44c5..000000000 --- a/plugins/lovata/shopaholic/classes/store/brand/ListByCategoryStore.php +++ /dev/null @@ -1,67 +0,0 @@ -sValue) - ->where('brand_id', '>', 0) - ->lists('brand_id', 'id'); - - $obCategory = Category::find($this->sValue); - if (!empty($obCategory)) { - $arAdditionalElementIDList = (array) $obCategory->product_link() - ->where('brand_id', '>', 0) - ->lists('brand_id', 'id'); - - $arElementIDList = $arElementIDList + $arAdditionalElementIDList; - } - - return $arElementIDList; - } - - /** - * Get ID list from cache - * @return array - */ - protected function getIDListFromCache() : array - { - $arElementIDList = parent::getIDListFromCache(); - - //Get active product list - $arActiveProductIDList = ProductListStore::instance()->active->get(); - if (empty($arActiveProductIDList) || empty($arElementIDList)) { - return []; - } - - $arResult = []; - foreach ($arElementIDList as $iProductID => $iBrandID) { - if (!in_array($iProductID, $arActiveProductIDList)) { - continue; - } - - $arResult[] = $iBrandID; - } - - $arResult = array_unique($arResult); - - return $arResult; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/brand/SortingListStore.php b/plugins/lovata/shopaholic/classes/store/brand/SortingListStore.php deleted file mode 100644 index 159a1f24c..000000000 --- a/plugins/lovata/shopaholic/classes/store/brand/SortingListStore.php +++ /dev/null @@ -1,26 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/category/ActiveListStore.php b/plugins/lovata/shopaholic/classes/store/category/ActiveListStore.php deleted file mode 100644 index c369261da..000000000 --- a/plugins/lovata/shopaholic/classes/store/category/ActiveListStore.php +++ /dev/null @@ -1,26 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/category/TopLevelListStore.php b/plugins/lovata/shopaholic/classes/store/category/TopLevelListStore.php deleted file mode 100644 index ee9c46c0f..000000000 --- a/plugins/lovata/shopaholic/classes/store/category/TopLevelListStore.php +++ /dev/null @@ -1,29 +0,0 @@ -where('nest_depth', 0) - ->orderBy('nest_left', 'asc') - ->lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/currency/ActiveListStore.php b/plugins/lovata/shopaholic/classes/store/currency/ActiveListStore.php deleted file mode 100644 index d0ccf40f8..000000000 --- a/plugins/lovata/shopaholic/classes/store/currency/ActiveListStore.php +++ /dev/null @@ -1,26 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/currency/SortingListStore.php b/plugins/lovata/shopaholic/classes/store/currency/SortingListStore.php deleted file mode 100644 index f29eef267..000000000 --- a/plugins/lovata/shopaholic/classes/store/currency/SortingListStore.php +++ /dev/null @@ -1,26 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/offer/ActiveListStore.php b/plugins/lovata/shopaholic/classes/store/offer/ActiveListStore.php deleted file mode 100644 index d0a74606c..000000000 --- a/plugins/lovata/shopaholic/classes/store/offer/ActiveListStore.php +++ /dev/null @@ -1,26 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/offer/SortingListStore.php b/plugins/lovata/shopaholic/classes/store/offer/SortingListStore.php deleted file mode 100644 index e5de58d24..000000000 --- a/plugins/lovata/shopaholic/classes/store/offer/SortingListStore.php +++ /dev/null @@ -1,181 +0,0 @@ -sValue == OfferListStore::SORT_PRICE_ASC) { - $arElementIDList = $this->getByPriceASC(); - } elseif ($this->sValue == OfferListStore::SORT_PRICE_DESC) { - $arElementIDList = $this->getByPriceDESC(); - } elseif ($this->sValue == OfferListStore::SORT_NEW) { - $arElementIDList = $this->getNewOfferList(); - } elseif ($this->sValue == OfferListStore::SORT_NO) { - $arElementIDList = $this->getOfferList(); - } elseif (preg_match('%^'.OfferListStore::SORT_PRICE_ASC.'\|.+%', $this->sValue)) { - $arElementIDList = $this->getByPriceTypeASC(); - } elseif (preg_match('%^'.OfferListStore::SORT_PRICE_DESC.'\|.+%', $this->sValue)) { - $arElementIDList = $this->getByPriceTypeDESC(); - } else { - $arElementIDList = $this->getCustomSortingList(); - } - - return $arElementIDList; - } - - /** - * Get product list with custom sorting - * @return array - */ - protected function getCustomSortingList() : array - { - $arEventResult = Event::fire('shopaholic.sorting.offer.get.list', [$this->sValue]); - if (empty($arEventResult)) { - return []; - } - - $arElementIDList = []; - foreach ($arEventResult as $arEventOfferIDList) { - if (empty($arEventOfferIDList) || !is_array($arEventOfferIDList)) { - continue; - } - - $arElementIDList = $arEventOfferIDList; - break; - } - - return $arElementIDList; - } - - /** - * Get sorting ID list by offer price (ASC) - * @return array - */ - protected function getByPriceASC() : array - { - $arElementIDList = (array) DB::table('lovata_shopaholic_prices') - ->select('lovata_shopaholic_offers.id') - ->whereNull('lovata_shopaholic_prices.price_type_id') - ->where('lovata_shopaholic_offers.active', true) - ->whereNull('lovata_shopaholic_offers.deleted_at') - ->where('lovata_shopaholic_prices.item_type', Offer::class) - ->orderBy('lovata_shopaholic_prices.price', 'asc') - ->join('lovata_shopaholic_offers', 'lovata_shopaholic_offers.id', '=', 'lovata_shopaholic_prices.item_id') - ->lists('id'); - - return $arElementIDList; - } - - /** - * Get sorting ID list by offer price (DESC) - * @return array - */ - protected function getByPriceDESC() : array - { - $arElementIDList = (array) DB::table('lovata_shopaholic_prices') - ->select('lovata_shopaholic_offers.id') - ->whereNull('lovata_shopaholic_prices.price_type_id') - ->where('lovata_shopaholic_offers.active', true) - ->whereNull('lovata_shopaholic_offers.deleted_at') - ->where('lovata_shopaholic_prices.item_type', Offer::class) - ->orderBy('lovata_shopaholic_prices.price', 'desc') - ->join('lovata_shopaholic_offers', 'lovata_shopaholic_offers.id', '=', 'lovata_shopaholic_prices.item_id') - ->lists('id'); - - return $arElementIDList; - } - - /** - * Get sorting ID list by offer price (ASC) - * @return array - */ - protected function getByPriceTypeASC() : array - { - $obPriceType = $this->getPriceTypeObject(); - if (empty($obPriceType)) { - return $this->getByPriceASC(); - } - - $arElementIDList = (array) Price::getByItemType(Offer::class) - ->getByPriceType($obPriceType->id) - ->orderBy('price', 'asc') - ->lists('item_id'); - - return $arElementIDList; - } - - /** - * Get sorting ID list by offer price (DESC) - * @return array - */ - protected function getByPriceTypeDESC() : array - { - $obPriceType = $this->getPriceTypeObject(); - if (empty($obPriceType)) { - return $this->getByPriceDESC(); - } - - $arElementIDList = (array) Price::getByItemType(Offer::class) - ->getByPriceType($obPriceType->id) - ->orderBy('price', 'desc') - ->lists('item_id'); - - return $arElementIDList; - } - - /** - * Get new products - * @return array - */ - protected function getNewOfferList() : array - { - $arElementIDList = (array) Offer::orderBy('id', 'desc')->lists('id'); - - return $arElementIDList; - } - - /** - * Get new products - * @return array - */ - protected function getOfferList() : array - { - $arElementIDList = (array) Offer::lists('id'); - - return $arElementIDList; - } - - /** - * Get price type object - * @return \Lovata\Shopaholic\Models\PriceType - */ - protected function getPriceTypeObject() - { - $arValuePartList = explode('|', $this->sValue); - $sPriceTypeCode = array_pop($arValuePartList); - - $obPriceType = PriceTypeHelper::instance()->findByCode($sPriceTypeCode); - - return $obPriceType; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/product/ActiveListStore.php b/plugins/lovata/shopaholic/classes/store/product/ActiveListStore.php deleted file mode 100644 index 581893d2a..000000000 --- a/plugins/lovata/shopaholic/classes/store/product/ActiveListStore.php +++ /dev/null @@ -1,43 +0,0 @@ -lists('id'); - if (empty($arProductIDList)) { - return []; - } - - //Check active offers - if (Settings::getValue('check_offer_active')) { - //Get product list with active offers - $arProductIDListWithOffers = (array) Offer::active()->groupBy('product_id')->lists('product_id'); - if (empty($arProductIDListWithOffers)) { - return []; - } - - $arProductIDList = array_intersect($arProductIDList, $arProductIDListWithOffers); - } - - return $arProductIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/product/ListByBrandStore.php b/plugins/lovata/shopaholic/classes/store/product/ListByBrandStore.php deleted file mode 100644 index 6e1047a6e..000000000 --- a/plugins/lovata/shopaholic/classes/store/product/ListByBrandStore.php +++ /dev/null @@ -1,26 +0,0 @@ -sValue)->lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/product/ListByCategoryStore.php b/plugins/lovata/shopaholic/classes/store/product/ListByCategoryStore.php deleted file mode 100644 index 4a61989e4..000000000 --- a/plugins/lovata/shopaholic/classes/store/product/ListByCategoryStore.php +++ /dev/null @@ -1,44 +0,0 @@ -sValue)->lists('id'); - - //Get product ID list for additional category relation - $arAdditionalElementIDList = (array) DB::table('lovata_shopaholic_additional_categories')->where('category_id', $this->sValue)->lists('product_id'); - $arElementIDList = array_merge($arElementIDList, $arAdditionalElementIDList); - $arElementIDList = array_unique($arElementIDList); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/product/ListByPromoBlockStore.php b/plugins/lovata/shopaholic/classes/store/product/ListByPromoBlockStore.php deleted file mode 100644 index f82bf8efb..000000000 --- a/plugins/lovata/shopaholic/classes/store/product/ListByPromoBlockStore.php +++ /dev/null @@ -1,25 +0,0 @@ -where('promo_id', $this->sValue)->lists('product_id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/product/SortingListStore.php b/plugins/lovata/shopaholic/classes/store/product/SortingListStore.php deleted file mode 100644 index e42bae6d5..000000000 --- a/plugins/lovata/shopaholic/classes/store/product/SortingListStore.php +++ /dev/null @@ -1,201 +0,0 @@ -sValue == ProductListStore::SORT_PRICE_ASC) { - $arElementIDList = $this->getByPriceASC(); - } elseif ($this->sValue == ProductListStore::SORT_PRICE_DESC) { - $arElementIDList = $this->getByPriceDESC(); - } elseif ($this->sValue == ProductListStore::SORT_NEW) { - $arElementIDList = $this->getNewProductList(); - } elseif ($this->sValue == ProductListStore::SORT_NO) { - $arElementIDList = $this->getProductList(); - } elseif (preg_match('%^'.ProductListStore::SORT_PRICE_ASC.'\|.+%', $this->sValue)) { - $arElementIDList = $this->getByPriceTypeASC(); - } elseif (preg_match('%^'.ProductListStore::SORT_PRICE_DESC.'\|.+%', $this->sValue)) { - $arElementIDList = $this->getByPriceTypeDESC(); - } else { - $arElementIDList = $this->getCustomSortingList(); - } - - return $arElementIDList; - } - - /** - * Get product list with custom sorting - * @return array - */ - protected function getCustomSortingList() : array - { - $arEventResult = Event::fire('shopaholic.sorting.get.list', [$this->sValue]); - if (empty($arEventResult)) { - return []; - } - - $arElementIDList = []; - foreach ($arEventResult as $arEventProductIDList) { - if (empty($arEventProductIDList) || !is_array($arEventProductIDList)) { - continue; - } - - $arElementIDList = $arEventProductIDList; - break; - } - - return $arElementIDList; - } - - /** - * Get sorting ID list by offer price (ASC) - * @return array - */ - protected function getByPriceASC() : array - { - //Get product ID list (sort by offer price) - //We can not use groupBy() in this place - $arElementIDList = (array) DB::table('lovata_shopaholic_prices') - ->select('lovata_shopaholic_offers.product_id') - ->whereNull('lovata_shopaholic_prices.price_type_id') - ->where('lovata_shopaholic_offers.active', true) - ->whereNull('lovata_shopaholic_offers.deleted_at') - ->where('lovata_shopaholic_prices.item_type', Offer::class) - ->orderBy('lovata_shopaholic_prices.price', 'asc') - ->join('lovata_shopaholic_offers', 'lovata_shopaholic_offers.id', '=', 'lovata_shopaholic_prices.item_id') - ->lists('product_id'); - $arElementIDList = array_unique($arElementIDList); - - return $arElementIDList; - } - - /** - * Get sorting ID list by offer price (DESC) - * @return array - */ - protected function getByPriceDESC() : array - { - //Get product ID list (sort by offer price) - //We can not use groupBy() in this place - $arElementIDList = (array) DB::table('lovata_shopaholic_prices') - ->select('lovata_shopaholic_offers.product_id') - ->whereNull('lovata_shopaholic_prices.price_type_id') - ->where('lovata_shopaholic_offers.active', true) - ->whereNull('lovata_shopaholic_offers.deleted_at') - ->where('lovata_shopaholic_prices.item_type', Offer::class) - ->orderBy('lovata_shopaholic_prices.price', 'desc') - ->join('lovata_shopaholic_offers', 'lovata_shopaholic_offers.id', '=', 'lovata_shopaholic_prices.item_id') - ->lists('product_id'); - $arElementIDList = array_unique($arElementIDList); - - return $arElementIDList; - } - - /** - * Get sorting ID list by offer price with filter by price type (ASC) - * @return array - */ - protected function getByPriceTypeASC() : array - { - $obPriceType = $this->getPriceTypeObject(); - if (empty($obPriceType)) { - return $this->getByPriceASC(); - } - - //Get product ID list (sort by offer price) - //We can not use groupBy() in this place - $arElementIDList = (array) DB::table('lovata_shopaholic_prices') - ->select('lovata_shopaholic_offers.product_id') - ->where('lovata_shopaholic_prices.price_type_id', $obPriceType->id) - ->where('lovata_shopaholic_offers.active', true) - ->where('lovata_shopaholic_prices.item_type', Offer::class) - ->orderBy('lovata_shopaholic_prices.price', 'asc') - ->join('lovata_shopaholic_offers', 'lovata_shopaholic_offers.id', '=', 'lovata_shopaholic_prices.item_id') - ->lists('product_id'); - $arElementIDList = array_unique($arElementIDList); - - return $arElementIDList; - } - - /** - * Get sorting ID list by offer price with filter by price type (DESC) - * @return array - */ - protected function getByPriceTypeDESC() : array - { - $obPriceType = $this->getPriceTypeObject(); - if (empty($obPriceType)) { - return $this->getByPriceDESC(); - } - - //Get product ID list (sort by offer price) - //We can not use groupBy() in this place - $arElementIDList = (array) DB::table('lovata_shopaholic_prices') - ->select('lovata_shopaholic_offers.product_id') - ->where('lovata_shopaholic_prices.price_type_id', $obPriceType->id) - ->where('lovata_shopaholic_offers.active', true) - ->where('lovata_shopaholic_prices.item_type', Offer::class) - ->orderBy('lovata_shopaholic_prices.price', 'desc') - ->join('lovata_shopaholic_offers', 'lovata_shopaholic_offers.id', '=', 'lovata_shopaholic_prices.item_id') - ->lists('product_id'); - $arElementIDList = array_unique($arElementIDList); - - return $arElementIDList; - } - - /** - * Get new products - * @return array - */ - protected function getNewProductList() : array - { - $arElementIDList = (array) Product::orderBy('id', 'desc')->lists('id'); - - return $arElementIDList; - } - - /** - * Get new products - * @return array - */ - protected function getProductList() : array - { - $arElementIDList = (array) Product::lists('id'); - - return $arElementIDList; - } - - /** - * Get price type object - * @return \Lovata\Shopaholic\Models\PriceType - */ - protected function getPriceTypeObject() - { - $arValuePartList = explode('|', $this->sValue); - $sPriceTypeCode = array_pop($arValuePartList); - - $obPriceType = PriceTypeHelper::instance()->findByCode($sPriceTypeCode); - - return $obPriceType; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/promoblock/ActiveListStore.php b/plugins/lovata/shopaholic/classes/store/promoblock/ActiveListStore.php deleted file mode 100644 index 48e9fca03..000000000 --- a/plugins/lovata/shopaholic/classes/store/promoblock/ActiveListStore.php +++ /dev/null @@ -1,36 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/promoblock/HiddenListStore.php b/plugins/lovata/shopaholic/classes/store/promoblock/HiddenListStore.php deleted file mode 100644 index 2fba4f2f2..000000000 --- a/plugins/lovata/shopaholic/classes/store/promoblock/HiddenListStore.php +++ /dev/null @@ -1,35 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/promoblock/NotHiddenListStore.php b/plugins/lovata/shopaholic/classes/store/promoblock/NotHiddenListStore.php deleted file mode 100644 index 3bc0782a1..000000000 --- a/plugins/lovata/shopaholic/classes/store/promoblock/NotHiddenListStore.php +++ /dev/null @@ -1,35 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/promoblock/SortingListStore.php b/plugins/lovata/shopaholic/classes/store/promoblock/SortingListStore.php deleted file mode 100644 index 82857c64b..000000000 --- a/plugins/lovata/shopaholic/classes/store/promoblock/SortingListStore.php +++ /dev/null @@ -1,161 +0,0 @@ -sValue) { - case PromoBlockListStore::SORT_DATE_BEGIN_ASC: - $arElementIDList = $this->getByDateBeginASC(); - break; - case PromoBlockListStore::SORT_DATE_BEGIN_DESC: - $arElementIDList = $this->getByDateBeginDESC(); - break; - case PromoBlockListStore::SORT_DATE_END_ASC: - $arElementIDList = $this->getByDateEndASC(); - break; - case PromoBlockListStore::SORT_DATE_END_DESC: - $arElementIDList = $this->getByDateEndDESC(); - break; - case PromoBlockListStore::SORT_DEFAULT: - $arElementIDList = $this->getBySortOrder(); - break; - default: - $arElementIDList = $this->getCustomSortingList(); - break; - } - - return $arElementIDList; - } - - /** - * Get element list with custom sorting - * @return array - */ - protected function getCustomSortingList() : array - { - $arEventResult = Event::fire('shopaholic.promo_block.sorting.get.list', [$this->sValue]); - if (empty($arEventResult)) { - return []; - } - - $arElementIDList = []; - foreach ($arEventResult as $arEventPromoBlockIDList) { - if (empty($arEventPromoBlockIDList) || !is_array($arEventPromoBlockIDList)) { - continue; - } - - $arElementIDList = $arEventPromoBlockIDList; - break; - } - - return $arElementIDList; - } - - /** - * Get discount list with sorting by "date_begin" (asc) - * @return array - */ - protected function getByDateBeginASC() : array - { - $arElementIDList = (array) PromoBlock::orderBy('date_begin', 'asc')->lists('id'); - - return $arElementIDList; - } - - /** - * Get discount list with sorting by "date_begin" (desc) - * @return array - */ - protected function getByDateBeginDESC() : array - { - $arElementIDList = (array) PromoBlock::orderBy('date_begin', 'desc')->lists('id'); - - return $arElementIDList; - } - - /** - * Get discount list with sorting by "date_end" (asc) - * @return array - */ - protected function getByDateEndASC() : array - { - $arElementIDList = (array) PromoBlock::orderBy('date_end', 'asc')->lists('id'); - - return $arElementIDList; - } - - /** - * Get discount list with sorting by "date_end" (desc) - * @return array - */ - protected function getByDateEndDESC() : array - { - $arElementIDList = (array) PromoBlock::orderBy('date_end', 'desc')->lists('id'); - - return $arElementIDList; - } - - /** - * Get discount list with sorting by "sort_order" (asc) - * @return array - */ - protected function getBySortOrder() :array - { - $arElementIDList = (array) PromoBlock::orderBy('sort_order', 'asc')->lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/tax/ActiveListStore.php b/plugins/lovata/shopaholic/classes/store/tax/ActiveListStore.php deleted file mode 100644 index 0a233a174..000000000 --- a/plugins/lovata/shopaholic/classes/store/tax/ActiveListStore.php +++ /dev/null @@ -1,26 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/classes/store/tax/SortingListStore.php b/plugins/lovata/shopaholic/classes/store/tax/SortingListStore.php deleted file mode 100644 index b180fecc0..000000000 --- a/plugins/lovata/shopaholic/classes/store/tax/SortingListStore.php +++ /dev/null @@ -1,26 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/shopaholic/components/BrandData.php b/plugins/lovata/shopaholic/components/BrandData.php deleted file mode 100644 index b2acb1da6..000000000 --- a/plugins/lovata/shopaholic/components/BrandData.php +++ /dev/null @@ -1,34 +0,0 @@ - 'lovata.shopaholic::lang.component.brand_data_name', - 'description' => 'lovata.shopaholic::lang.component.brand_data_description', - ]; - } - - /** - * Make new element item - * @param int $iElementID - * @return BrandItem - */ - protected function makeItem($iElementID) - { - return BrandItem::make($iElementID); - } -} diff --git a/plugins/lovata/shopaholic/components/BrandList.php b/plugins/lovata/shopaholic/components/BrandList.php deleted file mode 100644 index bc03ac52b..000000000 --- a/plugins/lovata/shopaholic/components/BrandList.php +++ /dev/null @@ -1,44 +0,0 @@ - 'lovata.shopaholic::lang.component.brand_list_name', - 'description' => 'lovata.shopaholic::lang.component.brand_list_description', - ]; - } - - /** - * Make element collection - * @param array $arElementIDList - * - * @return BrandCollection - */ - public function make($arElementIDList = null) - { - return BrandCollection::make($arElementIDList); - } - - /** - * Method for ajax request with empty response - * @deprecated - * @return bool - */ - public function onAjaxRequest() - { - return true; - } -} diff --git a/plugins/lovata/shopaholic/components/BrandPage.php b/plugins/lovata/shopaholic/components/BrandPage.php deleted file mode 100644 index c73ec92dc..000000000 --- a/plugins/lovata/shopaholic/components/BrandPage.php +++ /dev/null @@ -1,71 +0,0 @@ - 'lovata.shopaholic::lang.component.brand_page_name', - 'description' => 'lovata.shopaholic::lang.component.brand_page_description', - ]; - } - - /** - * Get element object - * @param string $sElementSlug - * @return Brand - */ - protected function getElementObject($sElementSlug) - { - if (empty($sElementSlug)) { - return null; - } - - if ($this->isSlugTranslatable()) { - $obElement = Brand::active()->transWhere('slug', $sElementSlug)->first(); - if (!$this->checkTransSlug($obElement, $sElementSlug)) { - $obElement = null; - } - } else { - $obElement = Brand::active()->getBySlug($sElementSlug)->first(); - } - if (!empty($obElement)) { - Event::fire('shopaholic.brand.open', [$obElement]); - } - - return $obElement; - } - - /** - * Make new element item - * @param int $iElementID - * @param Brand $obElement - * @return BrandItem - */ - protected function makeItem($iElementID, $obElement) - { - return BrandItem::make($iElementID, $obElement); - } -} diff --git a/plugins/lovata/shopaholic/components/Breadcrumbs.php b/plugins/lovata/shopaholic/components/Breadcrumbs.php deleted file mode 100644 index edf1bd625..000000000 --- a/plugins/lovata/shopaholic/components/Breadcrumbs.php +++ /dev/null @@ -1,135 +0,0 @@ - 'lovata.shopaholic::lang.component.breadcrumbs_name', - 'description' => 'lovata.shopaholic::lang.component.breadcrumbs_description', - ]; - } - - /** - * Get breadcrumbs for category page by category id - * @param int $iCategoryID - * @return array - */ - public function getByCategoryID($iCategoryID) - { - if (empty($iCategoryID)) { - return []; - } - - //Get category data - $this->addCategoryData($iCategoryID, true); - $this->arResult = array_reverse($this->arResult); - - return $this->arResult; - } - - /** - * Get breadcrumbs for tag page by tag ID - * @param int $iTagID - * @return array - */ - public function getByTagID($iTagID) - { - //Get tag element - if (!PluginManager::instance()->hasPlugin('Lovata.TagsShopaholic') || empty($iTagID)) { - return $this->arResult; - } - - $obTagItem = \Lovata\TagsShopaholic\Classes\Item\TagItem::make($iTagID); - if ($obTagItem->isEmpty()) { - return $this->arResult; - } - - $arTagData = $obTagItem->toArray(); - $arTagData['active'] = true; - $arTagData['item'] = $obTagItem; - - $this->arResult[] = $arTagData; - - //Get category data - $this->addCategoryData($obTagItem->category_id); - $this->arResult = array_reverse($this->arResult); - - return $this->arResult; - } - - /** - * Get breadcrumbs by product ID - * @param int $iProductID - * @return array - */ - public function getByProductID($iProductID) - { - if (empty($iProductID)) { - return $this->arResult; - } - - //Get product data - $obProductItem = ProductItem::make($iProductID); - if ($obProductItem->isEmpty()) { - return $this->arResult; - } - - //Add product data to list - $this->arResult[] = [ - 'id' => $obProductItem->id, - 'name' => $obProductItem->name, - 'slug' => $obProductItem->slug, - 'active' => true, - 'item' => $obProductItem, - ]; - - //Get category data - $this->addCategoryData($obProductItem->category_id); - $this->arResult = array_reverse($this->arResult); - - return $this->arResult; - } - - /** - * Add category data - * @param int $iCategoryID - * @param bool $bActiveCategory - */ - protected function addCategoryData($iCategoryID, $bActiveCategory = false) - { - $obCategoryItem = CategoryItem::make($iCategoryID); - if ($obCategoryItem->isEmpty()) { - return; - } - - $this->arResult[] = [ - 'id' => $obCategoryItem->id, - 'name' => $obCategoryItem->name, - 'slug' => $obCategoryItem->slug, - 'active' => $bActiveCategory, - 'item' => $obCategoryItem, - ]; - - if (!empty($obCategoryItem->parent_id)) { - $this->addCategoryData($obCategoryItem->parent_id); - } - } -} diff --git a/plugins/lovata/shopaholic/components/CategoryData.php b/plugins/lovata/shopaholic/components/CategoryData.php deleted file mode 100644 index a2e75e821..000000000 --- a/plugins/lovata/shopaholic/components/CategoryData.php +++ /dev/null @@ -1,34 +0,0 @@ - 'lovata.shopaholic::lang.component.category_data_name', - 'description' => 'lovata.shopaholic::lang.component.category_data_description', - ]; - } - - /** - * Make new element item - * @param int $iElementID - * @return CategoryItem - */ - protected function makeItem($iElementID) - { - return CategoryItem::make($iElementID); - } -} diff --git a/plugins/lovata/shopaholic/components/CategoryList.php b/plugins/lovata/shopaholic/components/CategoryList.php deleted file mode 100644 index 5244be889..000000000 --- a/plugins/lovata/shopaholic/components/CategoryList.php +++ /dev/null @@ -1,44 +0,0 @@ - 'lovata.shopaholic::lang.component.category_list_name', - 'description' => 'lovata.shopaholic::lang.component.category_list_description', - ]; - } - - /** - * Make element collection - * @param array $arElementIDList - * - * @return CategoryCollection - */ - public function make($arElementIDList = null) - { - return CategoryCollection::make($arElementIDList); - } - - /** - * Method for ajax request with empty response - * @deprecated - * @return bool - */ - public function onAjaxRequest() - { - return true; - } -} diff --git a/plugins/lovata/shopaholic/components/CategoryPage.php b/plugins/lovata/shopaholic/components/CategoryPage.php deleted file mode 100644 index 37690fe03..000000000 --- a/plugins/lovata/shopaholic/components/CategoryPage.php +++ /dev/null @@ -1,150 +0,0 @@ - 'lovata.shopaholic::lang.component.category_page_name', - 'description' => 'lovata.shopaholic::lang.component.category_page_description', - ]; - } - - /** - * Get element object - * @param string $sElementSlug - * @return Category - */ - protected function getElementObject($sElementSlug) - { - if (empty($sElementSlug)) { - return null; - } - - if (!$this->property('has_wildcard')) { - $obElement = $this->getElementBySlug($sElementSlug); - } else { - $obElement = $this->getElementByWildcard($sElementSlug); - } - - if (!empty($obElement)) { - Event::fire('shopaholic.category.open', [$obElement]); - } - - return $obElement; - } - - /** - * Get category by default - * @param string $sElementSlug - * @return Category|null - */ - protected function getElementBySlug($sElementSlug) - { - if ($this->isSlugTranslatable()) { - $obElement = Category::active()->transWhere('slug', $sElementSlug)->first(); - if (!$this->checkTransSlug($obElement, $sElementSlug)) { - $obElement = null; - } - } else { - $obElement = Category::active()->getBySlug($sElementSlug)->first(); - } - - return $obElement; - } - - /** - * Get category by wildcard - * @param string $sElementSlug - * @return Category|null - */ - protected function getElementByWildcard($sElementSlug) - { - $arSlugList = explode('/', $sElementSlug); - if (empty($arSlugList)) { - return null; - } - - $arSlugList = array_reverse($arSlugList); - $sElementSlug = array_shift($arSlugList); - - $obElement = $this->getElementBySlug($sElementSlug); - if (empty($obElement)) { - return null; - } - - if (empty($arSlugList) && empty($obElement->parent)) { - return $obElement; - } - - $obNestingElement = $obElement; - - foreach ($arSlugList as $sSlug) { - $obNestingElement = $this->getNestingElement($sSlug, $obNestingElement); - if (empty($obNestingElement)) { - return null; - } - } - - if (!empty($obNestingElement->parent)) { - return null; - } - - return $obElement; - } - - /** - * Get nesting element - * @param string $sElementSlug - * @param Category $obNestingElement - * @return Category - */ - protected function getNestingElement($sElementSlug, $obNestingElement) - { - if (empty($obNestingElement) || empty($sElementSlug)) { - return null; - } - - $obElement = $obNestingElement->parent; - - if (empty($obElement) || $obElement->slug != $sElementSlug) { - return null; - } - - return $obElement; - } - - /** - * Make new element item - * @param int $iElementID - * @param Category $obElement - * @return CategoryItem - */ - protected function makeItem($iElementID, $obElement) - { - return CategoryItem::make($iElementID, $obElement); - } -} diff --git a/plugins/lovata/shopaholic/components/CurrencyList.php b/plugins/lovata/shopaholic/components/CurrencyList.php deleted file mode 100644 index ffd30707d..000000000 --- a/plugins/lovata/shopaholic/components/CurrencyList.php +++ /dev/null @@ -1,65 +0,0 @@ - 'lovata.shopaholic::lang.component.currency_list_name', - 'description' => 'lovata.shopaholic::lang.component.currency_list_description', - ]; - } - - /** - * Make element collection - * @param array $arElementIDList - * - * @return CurrencyCollection - */ - public function make($arElementIDList = null) - { - return CurrencyCollection::make($arElementIDList); - } - - /** - * Axax request, switch active currency - */ - public function onSwitch() - { - $sActiveCurrency = Input::get('currency'); - - $this->switch($sActiveCurrency); - } - - /** - * switch active currency - * @param string $sCurrencyCode - */ - public function switch($sCurrencyCode = null) - { - CurrencyHelper::instance()->switchActive($sCurrencyCode); - } - - /** - * Method for ajax request with empty response - * @deprecated - * @return bool - */ - public function onAjaxRequest() - { - return true; - } -} diff --git a/plugins/lovata/shopaholic/components/ProductData.php b/plugins/lovata/shopaholic/components/ProductData.php deleted file mode 100644 index 5e3f8084d..000000000 --- a/plugins/lovata/shopaholic/components/ProductData.php +++ /dev/null @@ -1,47 +0,0 @@ - 'lovata.shopaholic::lang.component.product_data_name', - 'description' => 'lovata.shopaholic::lang.component.product_data_description', - ]; - } - - /** - * Make new element item - * @param int $iElementID - * @return ProductItem - */ - protected function makeItem($iElementID) - { - return ProductItem::make($iElementID); - } -} diff --git a/plugins/lovata/shopaholic/components/ProductList.php b/plugins/lovata/shopaholic/components/ProductList.php deleted file mode 100644 index 968a715aa..000000000 --- a/plugins/lovata/shopaholic/components/ProductList.php +++ /dev/null @@ -1,99 +0,0 @@ - 'lovata.shopaholic::lang.component.product_list_name', - 'description' => 'lovata.shopaholic::lang.component.product_list_description', - ]; - } - - /** - * @return array - */ - public function defineProperties() - { - $this->arPropertyList = [ - 'sorting' => [ - 'title' => 'lovata.shopaholic::lang.component.product_list_sorting', - 'type' => 'dropdown', - 'default' => ProductListStore::SORT_NO, - 'options' => [ - ProductListStore::SORT_NO => Lang::get('lovata.shopaholic::lang.component.sorting_no'), - ProductListStore::SORT_PRICE_ASC => Lang::get('lovata.shopaholic::lang.component.sorting_price_asc'), - ProductListStore::SORT_PRICE_DESC => Lang::get('lovata.shopaholic::lang.component.sorting_price_desc'), - ProductListStore::SORT_NEW => Lang::get('lovata.shopaholic::lang.component.sorting_new'), - ], - ], - ]; - - if (PluginManager::instance()->hasPlugin('Lovata.PopularityShopaholic')) { - $this->arPropertyList['sorting']['options'][ProductListStore::SORT_POPULARITY_DESC] = - Lang::get('lovata.shopaholic::lang.component.sorting_popularity_desc'); - } - - if (PluginManager::instance()->hasPlugin('Lovata.ReviewsShopaholic')) { - $this->arPropertyList['sorting']['options'][ProductListStore::SORT_RATING_DESC] = - Lang::get('lovata.shopaholic::lang.component.sorting_rating_desc'); - $this->arPropertyList['sorting']['options'][ProductListStore::SORT_RATING_ASC] = - Lang::get('lovata.shopaholic::lang.component.sorting_rating_asc'); - } - - return $this->arPropertyList; - } - - /** - * Make element collection - * @param array $arElementIDList - * - * @return ProductCollection - */ - public function make($arElementIDList = null) - { - return ProductCollection::make($arElementIDList); - } - - /** - * Method for ajax request with empty response - * @deprecated - * @return bool - */ - public function onAjaxRequest() - { - return true; - } -} diff --git a/plugins/lovata/shopaholic/components/ProductPage.php b/plugins/lovata/shopaholic/components/ProductPage.php deleted file mode 100644 index 680c1ec83..000000000 --- a/plugins/lovata/shopaholic/components/ProductPage.php +++ /dev/null @@ -1,85 +0,0 @@ - 'lovata.shopaholic::lang.component.product_page_name', - 'description' => 'lovata.shopaholic::lang.component.product_page_description', - ]; - } - - /** - * Get element object - * @param string $sElementSlug - * @return Product - */ - protected function getElementObject($sElementSlug) - { - if (empty($sElementSlug)) { - return null; - } - - if ($this->isSlugTranslatable()) { - $obElement = Product::active()->transWhere('slug', $sElementSlug)->first(); - if (!$this->checkTransSlug($obElement, $sElementSlug)) { - $obElement = null; - } - } else { - $obElement = Product::active()->getBySlug($sElementSlug)->first(); - } - if (!empty($obElement)) { - Event::fire('shopaholic.product.open', [$obElement]); - } - - return $obElement; - } - - /** - * Make new element item - * @param int $iElementID - * @param Product $obElement - * @return ProductItem - */ - protected function makeItem($iElementID, $obElement) - { - return ProductItem::make($iElementID, $obElement); - } -} diff --git a/plugins/lovata/shopaholic/components/PromoBlockData.php b/plugins/lovata/shopaholic/components/PromoBlockData.php deleted file mode 100644 index 8e23db542..000000000 --- a/plugins/lovata/shopaholic/components/PromoBlockData.php +++ /dev/null @@ -1,34 +0,0 @@ - 'lovata.shopaholic::lang.component.promo_block_data_name', - 'description' => 'lovata.shopaholic::lang.component.promo_block_data_description', - ]; - } - - /** - * Make new element item - * @param int $iElementID - * @return PromoBlockItem - */ - protected function makeItem($iElementID) - { - return PromoBlockItem::make($iElementID); - } -} diff --git a/plugins/lovata/shopaholic/components/PromoBlockList.php b/plugins/lovata/shopaholic/components/PromoBlockList.php deleted file mode 100644 index 8e852a318..000000000 --- a/plugins/lovata/shopaholic/components/PromoBlockList.php +++ /dev/null @@ -1,73 +0,0 @@ - 'lovata.shopaholic::lang.component.promo_block_list_name', - 'description' => 'lovata.shopaholic::lang.component.promo_block_list_description', - ]; - } - - /** - * @return array - */ - public function defineProperties() - { - $this->arPropertyList = [ - 'sorting' => [ - 'title' => 'lovata.shopaholic::lang.component.product_list_sorting', - 'type' => 'dropdown', - 'default' => PromoBlockListStore::SORT_DEFAULT, - 'options' => [ - PromoBlockListStore::SORT_DEFAULT => Lang::get('lovata.shopaholic::lang.component.sorting_no'), - PromoBlockListStore::SORT_DATE_BEGIN_ASC => Lang::get('lovata.shopaholic::lang.component.sorting_date_begin_asc'), - PromoBlockListStore::SORT_DATE_BEGIN_DESC => Lang::get('lovata.shopaholic::lang.component.sorting_date_begin_desc'), - PromoBlockListStore::SORT_DATE_END_ASC => Lang::get('lovata.shopaholic::lang.component.sorting_date_end_asc'), - PromoBlockListStore::SORT_DATE_END_DESC => Lang::get('lovata.shopaholic::lang.component.sorting_date_end_desc'), - ], - ], - ]; - - return $this->arPropertyList; - } - - /** - * Make element collection - * @param array $arElementIDList - * - * @return PromoBlockCollection - */ - public function make($arElementIDList = null) - { - return PromoBlockCollection::make($arElementIDList); - } - - /** - * Method for ajax request with empty response - * @deprecated - * @return bool - */ - public function onAjaxRequest() - { - return true; - } -} diff --git a/plugins/lovata/shopaholic/components/PromoBlockPage.php b/plugins/lovata/shopaholic/components/PromoBlockPage.php deleted file mode 100644 index 7d58b0f18..000000000 --- a/plugins/lovata/shopaholic/components/PromoBlockPage.php +++ /dev/null @@ -1,72 +0,0 @@ - 'lovata.shopaholic::lang.component.promo_block_page_name', - 'description' => 'lovata.shopaholic::lang.component.promo_block_page_description', - ]; - } - - /** - * Get element object - * @param string $sElementSlug - * @return PromoBlock - */ - protected function getElementObject($sElementSlug) - { - if (empty($sElementSlug)) { - return null; - } - - if ($this->isSlugTranslatable()) { - $obElement = PromoBlock::active()->transWhere('slug', $sElementSlug)->first(); - if (!$this->checkTransSlug($obElement, $sElementSlug)) { - $obElement = null; - } - } else { - $obElement = PromoBlock::active()->getBySlug($sElementSlug)->first(); - } - - if (!empty($obElement)) { - Event::fire('shopaholic.promo_block.open', [$obElement]); - } - - return $obElement; - } - - /** - * Make new element item - * @param int $iElementID - * @param PromoBlock $obElement - * @return PromoBlockItem - */ - protected function makeItem($iElementID, $obElement) - { - return PromoBlockItem::make($iElementID, $obElement); - } -} diff --git a/plugins/lovata/shopaholic/composer.json b/plugins/lovata/shopaholic/composer.json deleted file mode 100644 index 639133f47..000000000 --- a/plugins/lovata/shopaholic/composer.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "lovata/shopaholic-plugin", - "type": "october-plugin", - "description": "eCommerce plugin for October CMS", - "require": { - "composer/installers": "~1.0" - } -} diff --git a/plugins/lovata/shopaholic/controllers/Brands.php b/plugins/lovata/shopaholic/controllers/Brands.php deleted file mode 100644 index ec77bf766..000000000 --- a/plugins/lovata/shopaholic/controllers/Brands.php +++ /dev/null @@ -1,79 +0,0 @@ -rules['external_id'] = 'required'; - }); - } - - parent::__construct(); - BackendMenu::setContext('Lovata.Shopaholic', 'shopaholic-menu-main', 'shopaholic-menu-brands'); - } - - /** - * Ajax handler onReorder event - * - * @return mixed - */ - public function onReorder() - { - $obResult = parent::onReorder(); - Event::fire('shopaholic.brand.update.sorting'); - - return $obResult; - } - - /** - * Start import from XML - */ - public function onImportFromXML() - { - $obImport = new ImportBrandModelFromXML(); - $obImport->import(); - - $arReportData = [ - 'created' => $obImport->getCreatedCount(), - 'updated' => $obImport->getUpdatedCount(), - 'skipped' => $obImport->getSkippedCount(), - 'processed' => $obImport->getProcessedCount(), - ]; - - Flash::info(Lang::get('lovata.toolbox::lang.message.import_from_xml_report', $arReportData)); - - return $this->listRefresh(); - } -} diff --git a/plugins/lovata/shopaholic/controllers/Categories.php b/plugins/lovata/shopaholic/controllers/Categories.php deleted file mode 100644 index 86aaebc00..000000000 --- a/plugins/lovata/shopaholic/controllers/Categories.php +++ /dev/null @@ -1,81 +0,0 @@ -rules['external_id'] = 'required'; - }); - } - - parent::__construct(); - BackendMenu::setContext('Lovata.Shopaholic', 'shopaholic-menu-main', 'shopaholic-menu-categories'); - } - - /** - * Ajax handler onReorder event - * - * @return mixed - */ - public function onReorder() - { - $obResult = parent::onReorder(); - Event::fire('shopaholic.category.update.sorting'); - - return $obResult; - } - - /** - * Start import from XML - */ - public function onImportFromXML() - { - $obImport = new ImportCategoryModelFromXML(); - $obImport->import(); - - $arReportData = [ - 'created' => $obImport->getCreatedCount(), - 'updated' => $obImport->getUpdatedCount(), - 'skipped' => $obImport->getSkippedCount(), - 'processed' => $obImport->getProcessedCount(), - ]; - - Flash::info(Lang::get('lovata.toolbox::lang.message.import_from_xml_report', $arReportData)); - - return $this->listRefresh(); - } -} diff --git a/plugins/lovata/shopaholic/controllers/Currencies.php b/plugins/lovata/shopaholic/controllers/Currencies.php deleted file mode 100644 index 3c321b028..000000000 --- a/plugins/lovata/shopaholic/controllers/Currencies.php +++ /dev/null @@ -1,47 +0,0 @@ -disableActiveCurrency(); - - if (BackendController::$action == 'import') { - Offer::extend(function ($obModel) { - $obModel->rules['external_id'] = 'required'; - }); - } - - parent::__construct(); - BackendMenu::setContext('Lovata.Shopaholic', 'shopaholic-menu-main', 'shopaholic-menu-products'); - } -} diff --git a/plugins/lovata/shopaholic/controllers/PriceTypes.php b/plugins/lovata/shopaholic/controllers/PriceTypes.php deleted file mode 100644 index c0d19144f..000000000 --- a/plugins/lovata/shopaholic/controllers/PriceTypes.php +++ /dev/null @@ -1,47 +0,0 @@ -disableActiveCurrency(); - - if (BackendController::$action == 'import') { - Product::extend(function ($obModel) { - $obModel->rules['external_id'] = 'required'; - }); - } - - parent::__construct(); - BackendMenu::setContext('Lovata.Shopaholic', 'shopaholic-menu-main', 'shopaholic-menu-products'); - } - - /** - * Start import from XML - */ - public function onImportFromXML() - { - $obImport = new ImportProductModelFromXML(); - $obImport->import(); - - $arReportData = [ - 'created' => $obImport->getCreatedCount(), - 'updated' => $obImport->getUpdatedCount(), - 'skipped' => $obImport->getSkippedCount(), - 'processed' => $obImport->getProcessedCount(), - ]; - - Flash::info(Lang::get('lovata.toolbox::lang.message.import_from_xml_report', $arReportData)); - - return $this->listRefresh(); - } - - /** - * Start import from XML - */ - public function onImportOffersFromXML() - { - $obImport = new ImportOfferModelFromXML(); - $obImport->import(); - - $arReportData = [ - 'created' => $obImport->getCreatedCount(), - 'updated' => $obImport->getUpdatedCount(), - 'skipped' => $obImport->getSkippedCount(), - 'processed' => $obImport->getProcessedCount(), - ]; - - Flash::info(Lang::get('lovata.toolbox::lang.message.import_from_xml_report', $arReportData)); - - return $this->listRefresh(); - } - - /** - * Start import from XML - */ - public function onImportPricesFromXML() - { - $obImport = new ImportOfferPriceFromXML(); - $obImport->import(); - - $arReportData = [ - 'created' => $obImport->getCreatedCount(), - 'updated' => $obImport->getUpdatedCount(), - 'skipped' => $obImport->getSkippedCount(), - 'processed' => $obImport->getProcessedCount(), - ]; - - Flash::info(Lang::get('lovata.toolbox::lang.message.import_from_xml_report', $arReportData)); - - return $this->listRefresh(); - } -} diff --git a/plugins/lovata/shopaholic/controllers/PromoBlocks.php b/plugins/lovata/shopaholic/controllers/PromoBlocks.php deleted file mode 100644 index de9418889..000000000 --- a/plugins/lovata/shopaholic/controllers/PromoBlocks.php +++ /dev/null @@ -1,47 +0,0 @@ - true - - active = true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/brands/_list_toolbar.htm b/plugins/lovata/shopaholic/controllers/brands/_list_toolbar.htm deleted file mode 100644 index a59865db3..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/_list_toolbar.htm +++ /dev/null @@ -1,38 +0,0 @@ -
- - - - - - - - - - - - - - - - fireViewEvent('lovata.backend.extend_list_toolbar', [$this]) ?> -
diff --git a/plugins/lovata/shopaholic/controllers/brands/config_form.yaml b/plugins/lovata/shopaholic/controllers/brands/config_form.yaml deleted file mode 100644 index 0e4bd4d11..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/config_form.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'lovata.shopaholic::lang.brand.name' -modelClass: Lovata\Shopaholic\Models\Brand -form: $/lovata/shopaholic/models/brand/fields.yaml -defaultRedirect: lovata/shopaholic/brands -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/brands/update/:id' - redirectClose: lovata/shopaholic/brands - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: lovata/shopaholic/brands - redirectClose: lovata/shopaholic/brands - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -preview: { } diff --git a/plugins/lovata/shopaholic/controllers/brands/config_import_export.yaml b/plugins/lovata/shopaholic/controllers/brands/config_import_export.yaml deleted file mode 100644 index 274fd41c6..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/config_import_export.yaml +++ /dev/null @@ -1,28 +0,0 @@ -import: - title: 'lovata.shopaholic::lang.brand.import_title' - modelClass: Lovata\Shopaholic\Models\Brand - redirect: lovata/shopaholic/brands - list: - columns: - external_id: - label: 'lovata.toolbox::lang.field.external_id' - active: - label: 'lovata.toolbox::lang.field.active' - name: - label: 'lovata.toolbox::lang.field.name' - code: - label: 'lovata.toolbox::lang.field.code' - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - description: - label: 'lovata.toolbox::lang.field.description' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - images: - label: 'lovata.toolbox::lang.field.images' - form: - fields: - deactivate: - label: 'lovata.toolbox::lang.field.import_deactivate' - comment: 'lovata.toolbox::lang.field.import_deactivate_description' - type: checkbox \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/brands/config_list.yaml b/plugins/lovata/shopaholic/controllers/brands/config_list.yaml deleted file mode 100644 index 4459751dc..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/config_list.yaml +++ /dev/null @@ -1,17 +0,0 @@ -title: 'lovata.shopaholic::lang.brand.list_title' -modelClass: Lovata\Shopaholic\Models\Brand -list: $/lovata/shopaholic/models/brand/columns.yaml -recordUrl: 'lovata/shopaholic/brands/update/:id' -noRecordsMessage: 'backend::lang.list.no_records' -recordsPerPage: '10' -showSetup: true -showCheckboxes: true -showSorting: 1 -defaultSort: - column: sort_order - direction: asc -toolbar: - buttons: list_toolbar - search: - prompt: 'backend::lang.list.search_prompt' -filter: _config_filter.yaml diff --git a/plugins/lovata/shopaholic/controllers/brands/config_reorder.yaml b/plugins/lovata/shopaholic/controllers/brands/config_reorder.yaml deleted file mode 100644 index 702f7f45d..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/config_reorder.yaml +++ /dev/null @@ -1,3 +0,0 @@ -title: 'backend::lang.reorder.default_title' -modelClass: Lovata\Shopaholic\Models\Brand -nameFrom: name diff --git a/plugins/lovata/shopaholic/controllers/brands/create.htm b/plugins/lovata/shopaholic/controllers/brands/create.htm deleted file mode 100644 index 4c063f221..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/brands/import.htm b/plugins/lovata/shopaholic/controllers/brands/import.htm deleted file mode 100644 index e1aa7fc15..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/import.htm +++ /dev/null @@ -1,36 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - - 'layout']) ?> - -
-
- -

-
    -
  • -
  • -
  • -
-
-
-
- importRender() ?> -
- -
- -
- - \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/brands/index.htm b/plugins/lovata/shopaholic/controllers/brands/index.htm deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/index.htm +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/shopaholic/controllers/brands/preview.htm b/plugins/lovata/shopaholic/controllers/brands/preview.htm deleted file mode 100644 index d6145ccc8..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/brands/reorder.htm b/plugins/lovata/shopaholic/controllers/brands/reorder.htm deleted file mode 100644 index fa6a5daf9..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -reorderRender() ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/brands/update.htm b/plugins/lovata/shopaholic/controllers/brands/update.htm deleted file mode 100644 index 1282f8618..000000000 --- a/plugins/lovata/shopaholic/controllers/brands/update.htm +++ /dev/null @@ -1,54 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - - -
-
- - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/categories/_config_filter.yaml b/plugins/lovata/shopaholic/controllers/categories/_config_filter.yaml deleted file mode 100644 index e48ef8269..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/_config_filter.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# =================================== -# Filter Scope Definitions -# =================================== - -scopes: - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - conditions: - - active <> true - - active = true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/categories/_list_toolbar.htm b/plugins/lovata/shopaholic/controllers/categories/_list_toolbar.htm deleted file mode 100644 index a7cdb6d54..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/_list_toolbar.htm +++ /dev/null @@ -1,38 +0,0 @@ -
- - - - - - - - - - - - - - - - fireViewEvent('lovata.backend.extend_list_toolbar', [$this]) ?> -
diff --git a/plugins/lovata/shopaholic/controllers/categories/config_form.yaml b/plugins/lovata/shopaholic/controllers/categories/config_form.yaml deleted file mode 100644 index fff83fa34..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/config_form.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'lovata.shopaholic::lang.category.name' -modelClass: Lovata\Shopaholic\Models\Category -form: $/lovata/shopaholic/models/category/fields.yaml -defaultRedirect: lovata/shopaholic/categories -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/categories/update/:id' - redirectClose: lovata/shopaholic/categories - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: lovata/shopaholic/categories - redirectClose: lovata/shopaholic/categories - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -preview: { } diff --git a/plugins/lovata/shopaholic/controllers/categories/config_import_export.yaml b/plugins/lovata/shopaholic/controllers/categories/config_import_export.yaml deleted file mode 100644 index 66099647b..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/config_import_export.yaml +++ /dev/null @@ -1,30 +0,0 @@ -import: - title: 'lovata.shopaholic::lang.category.import_title' - modelClass: Lovata\Shopaholic\Models\Category - redirect: lovata/shopaholic/categories - list: - columns: - external_id: - label: 'lovata.toolbox::lang.field.external_id' - active: - label: 'lovata.toolbox::lang.field.active' - name: - label: 'lovata.toolbox::lang.field.name' - code: - label: 'lovata.toolbox::lang.field.code' - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - description: - label: 'lovata.toolbox::lang.field.description' - parent_id: - label: 'lovata.toolbox::lang.field.category_parent_id' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - images: - label: 'lovata.toolbox::lang.field.images' - form: - fields: - deactivate: - label: 'lovata.toolbox::lang.field.import_deactivate' - comment: 'lovata.toolbox::lang.field.import_deactivate_description' - type: checkbox \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/categories/config_list.yaml b/plugins/lovata/shopaholic/controllers/categories/config_list.yaml deleted file mode 100644 index 8fa83e32c..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/config_list.yaml +++ /dev/null @@ -1,14 +0,0 @@ -title: 'lovata.shopaholic::lang.category.list_title' -modelClass: Lovata\Shopaholic\Models\Category -list: $/lovata/shopaholic/models/category/columns.yaml -recordUrl: 'lovata/shopaholic/categories/update/:id' -noRecordsMessage: 'backend::lang.list.no_records' -showSetup: true -showCheckboxes: true -showSorting: 1 -toolbar: - buttons: list_toolbar - search: - prompt: 'backend::lang.list.search_prompt' -showTree: 1 -filter: _config_filter.yaml diff --git a/plugins/lovata/shopaholic/controllers/categories/config_relation.yaml b/plugins/lovata/shopaholic/controllers/categories/config_relation.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/plugins/lovata/shopaholic/controllers/categories/config_reorder.yaml b/plugins/lovata/shopaholic/controllers/categories/config_reorder.yaml deleted file mode 100644 index e189f5d09..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/config_reorder.yaml +++ /dev/null @@ -1,3 +0,0 @@ -title: 'backend::lang.reorder.default_title' -modelClass: Lovata\Shopaholic\Models\Category -nameFrom: name diff --git a/plugins/lovata/shopaholic/controllers/categories/create.htm b/plugins/lovata/shopaholic/controllers/categories/create.htm deleted file mode 100644 index 5bc403acd..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/categories/import.htm b/plugins/lovata/shopaholic/controllers/categories/import.htm deleted file mode 100644 index ea5dd03df..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/import.htm +++ /dev/null @@ -1,36 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - - 'layout']) ?> - -
-
- -

-
    -
  • -
  • -
  • -
-
-
-
- importRender() ?> -
- -
- -
- - \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/categories/index.htm b/plugins/lovata/shopaholic/controllers/categories/index.htm deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/index.htm +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/shopaholic/controllers/categories/preview.htm b/plugins/lovata/shopaholic/controllers/categories/preview.htm deleted file mode 100644 index d574031c3..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/categories/reorder.htm b/plugins/lovata/shopaholic/controllers/categories/reorder.htm deleted file mode 100644 index 3e8423c20..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -reorderRender() ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/categories/update.htm b/plugins/lovata/shopaholic/controllers/categories/update.htm deleted file mode 100644 index 073066fe7..000000000 --- a/plugins/lovata/shopaholic/controllers/categories/update.htm +++ /dev/null @@ -1,54 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - - -
-
- - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/currencies/_config_filter.yaml b/plugins/lovata/shopaholic/controllers/currencies/_config_filter.yaml deleted file mode 100644 index e48ef8269..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/_config_filter.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# =================================== -# Filter Scope Definitions -# =================================== - -scopes: - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - conditions: - - active <> true - - active = true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/currencies/_list_toolbar.htm b/plugins/lovata/shopaholic/controllers/currencies/_list_toolbar.htm deleted file mode 100644 index 31241930a..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/_list_toolbar.htm +++ /dev/null @@ -1,24 +0,0 @@ -
- - - - - - - - fireViewEvent('lovata.backend.extend_list_toolbar', [$this]) ?> -
diff --git a/plugins/lovata/shopaholic/controllers/currencies/config_form.yaml b/plugins/lovata/shopaholic/controllers/currencies/config_form.yaml deleted file mode 100644 index ce58805ff..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/config_form.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'lovata.shopaholic::lang.currency.name' -modelClass: Lovata\Shopaholic\Models\Currency -form: $/lovata/shopaholic/models/currency/fields.yaml -defaultRedirect: lovata/shopaholic/currencies -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/currencies/update/:id' - redirectClose: lovata/shopaholic/currencies - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: lovata/shopaholic/currencies - redirectClose: lovata/shopaholic/currencies - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -preview: { } diff --git a/plugins/lovata/shopaholic/controllers/currencies/config_list.yaml b/plugins/lovata/shopaholic/controllers/currencies/config_list.yaml deleted file mode 100644 index 578b46690..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/config_list.yaml +++ /dev/null @@ -1,17 +0,0 @@ -title: 'lovata.shopaholic::lang.currency.list_title' -modelClass: Lovata\Shopaholic\Models\Currency -list: $/lovata/shopaholic/models/currency/columns.yaml -recordUrl: 'lovata/shopaholic/currencies/update/:id' -noRecordsMessage: 'backend::lang.list.no_records' -recordsPerPage: '10' -showSetup: true -showCheckboxes: true -showSorting: 1 -defaultSort: - column: sort_order - direction: asc -toolbar: - buttons: list_toolbar - search: - prompt: 'backend::lang.list.search_prompt' -filter: _config_filter.yaml diff --git a/plugins/lovata/shopaholic/controllers/currencies/config_reorder.yaml b/plugins/lovata/shopaholic/controllers/currencies/config_reorder.yaml deleted file mode 100644 index c2a13593a..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/config_reorder.yaml +++ /dev/null @@ -1,3 +0,0 @@ -title: 'backend::lang.reorder.default_title' -modelClass: Lovata\Shopaholic\Models\Currency -nameFrom: name diff --git a/plugins/lovata/shopaholic/controllers/currencies/create.htm b/plugins/lovata/shopaholic/controllers/currencies/create.htm deleted file mode 100644 index 3fc2704e8..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/currencies/index.htm b/plugins/lovata/shopaholic/controllers/currencies/index.htm deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/index.htm +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/shopaholic/controllers/currencies/preview.htm b/plugins/lovata/shopaholic/controllers/currencies/preview.htm deleted file mode 100644 index e699105dc..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/currencies/reorder.htm b/plugins/lovata/shopaholic/controllers/currencies/reorder.htm deleted file mode 100644 index 7bea491f0..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -reorderRender() ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/currencies/update.htm b/plugins/lovata/shopaholic/controllers/currencies/update.htm deleted file mode 100644 index e1646b5e1..000000000 --- a/plugins/lovata/shopaholic/controllers/currencies/update.htm +++ /dev/null @@ -1,53 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - -
-
- - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/measures/_list_toolbar.htm b/plugins/lovata/shopaholic/controllers/measures/_list_toolbar.htm deleted file mode 100644 index 83dbc4dba..000000000 --- a/plugins/lovata/shopaholic/controllers/measures/_list_toolbar.htm +++ /dev/null @@ -1,21 +0,0 @@ -
- - - - - fireViewEvent('lovata.backend.extend_list_toolbar', [$this]) ?> -
diff --git a/plugins/lovata/shopaholic/controllers/measures/config_form.yaml b/plugins/lovata/shopaholic/controllers/measures/config_form.yaml deleted file mode 100644 index 73b5eea4d..000000000 --- a/plugins/lovata/shopaholic/controllers/measures/config_form.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: 'lovata.shopaholic::lang.measure.name' -modelClass: Lovata\Shopaholic\Models\Measure -form: $/lovata/shopaholic/models/measure/fields.yaml -defaultRedirect: lovata/shopaholic/measures -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/measures/update/:id' - redirectClose: lovata/shopaholic/measures - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: lovata/shopaholic/measures - redirectClose: lovata/shopaholic/measures - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' diff --git a/plugins/lovata/shopaholic/controllers/measures/config_list.yaml b/plugins/lovata/shopaholic/controllers/measures/config_list.yaml deleted file mode 100644 index de019a2fa..000000000 --- a/plugins/lovata/shopaholic/controllers/measures/config_list.yaml +++ /dev/null @@ -1,13 +0,0 @@ -title: 'lovata.shopaholic::lang.measure.list_title' -modelClass: Lovata\Shopaholic\Models\Measure -list: $/lovata/shopaholic/models/measure/columns.yaml -recordUrl: 'lovata/shopaholic/measures/update/:id' -noRecordsMessage: 'backend::lang.list.no_records' -recordsPerPage: 10 -showSetup: true -showCheckboxes: 1 -showSorting: 1 -toolbar: - buttons: list_toolbar - search: - prompt: 'backend::lang.list.search_prompt' diff --git a/plugins/lovata/shopaholic/controllers/measures/create.htm b/plugins/lovata/shopaholic/controllers/measures/create.htm deleted file mode 100644 index 45bb9eae9..000000000 --- a/plugins/lovata/shopaholic/controllers/measures/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/measures/index.htm b/plugins/lovata/shopaholic/controllers/measures/index.htm deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/shopaholic/controllers/measures/index.htm +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/shopaholic/controllers/measures/preview.htm b/plugins/lovata/shopaholic/controllers/measures/preview.htm deleted file mode 100644 index 09f8ff3eb..000000000 --- a/plugins/lovata/shopaholic/controllers/measures/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/measures/update.htm b/plugins/lovata/shopaholic/controllers/measures/update.htm deleted file mode 100644 index 37c7e094c..000000000 --- a/plugins/lovata/shopaholic/controllers/measures/update.htm +++ /dev/null @@ -1,54 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - - -
-
- - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/offers/config_form.yaml b/plugins/lovata/shopaholic/controllers/offers/config_form.yaml deleted file mode 100644 index f3011019c..000000000 --- a/plugins/lovata/shopaholic/controllers/offers/config_form.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'lovata.shopaholic::lang.offer.name' -modelClass: Lovata\Shopaholic\Models\Offer -form: $/lovata/shopaholic/models/offer/fields.yaml -defaultRedirect: 'lovata/shopaholic/products/update/:product_id' -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/offers/update/:id' - redirectClose: 'lovata/shopaholic/products/update/:product_id' - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: 'lovata/shopaholic/products/update/:product_id' - redirectClose: 'lovata/shopaholic/products/update/:product_id' - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -preview: { } diff --git a/plugins/lovata/shopaholic/controllers/offers/config_import_export.yaml b/plugins/lovata/shopaholic/controllers/offers/config_import_export.yaml deleted file mode 100644 index 2d0a548d5..000000000 --- a/plugins/lovata/shopaholic/controllers/offers/config_import_export.yaml +++ /dev/null @@ -1,50 +0,0 @@ -import: - title: 'lovata.shopaholic::lang.offer.import_title' - modelClass: Lovata\Shopaholic\Models\Offer - redirect: lovata/shopaholic/products - list: - columns: - external_id: - label: 'lovata.toolbox::lang.field.external_id' - product_id: - label: 'lovata.shopaholic::lang.field.product_id' - active: - label: 'lovata.toolbox::lang.field.active' - name: - label: 'lovata.toolbox::lang.field.name' - code: - label: 'lovata.toolbox::lang.field.code' - price: - label: 'lovata.shopaholic::lang.field.price' - old_price: - label: 'lovata.shopaholic::lang.field.old_price' - quantity: - label: 'lovata.shopaholic::lang.field.quantity' - weight: - label: 'lovata.toolbox::lang.field.weight' - height: - label: 'lovata.toolbox::lang.field.height' - length: - label: 'lovata.toolbox::lang.field.length' - width: - label: 'lovata.toolbox::lang.field.width' - measure_id: - label: 'lovata.shopaholic::lang.field.measure' - quantity_in_unit: - label: 'lovata.shopaholic::lang.field.quantity_in_unit' - measure_of_unit: - label: 'lovata.shopaholic::lang.field.measure_of_unit' - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - description: - label: 'lovata.toolbox::lang.field.description' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - images: - label: 'lovata.toolbox::lang.field.images' - form: - fields: - deactivate: - label: 'lovata.toolbox::lang.field.import_deactivate' - comment: 'lovata.toolbox::lang.field.import_deactivate_description' - type: checkbox diff --git a/plugins/lovata/shopaholic/controllers/offers/config_relation.yaml b/plugins/lovata/shopaholic/controllers/offers/config_relation.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/plugins/lovata/shopaholic/controllers/offers/create.htm b/plugins/lovata/shopaholic/controllers/offers/create.htm deleted file mode 100644 index b4ca0ee7a..000000000 --- a/plugins/lovata/shopaholic/controllers/offers/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/offers/import.htm b/plugins/lovata/shopaholic/controllers/offers/import.htm deleted file mode 100644 index 35fcb0ba9..000000000 --- a/plugins/lovata/shopaholic/controllers/offers/import.htm +++ /dev/null @@ -1,39 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - - 'layout']) ?> - -
-
- -

-
    -
  • -
  • -
  • - hasPlugin('Lovata.PropertiesShopaholic')) {?> -
  • - -
-
-
-
- importRender() ?> -
- -
- -
- - \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/offers/preview.htm b/plugins/lovata/shopaholic/controllers/offers/preview.htm deleted file mode 100644 index 29547819a..000000000 --- a/plugins/lovata/shopaholic/controllers/offers/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/offers/update.htm b/plugins/lovata/shopaholic/controllers/offers/update.htm deleted file mode 100644 index 92af6cc4a..000000000 --- a/plugins/lovata/shopaholic/controllers/offers/update.htm +++ /dev/null @@ -1,60 +0,0 @@ - -
    -
  • - product)) { - $obProduct = $formModel->product; - ?> -
  • name ?>
  • - -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - - -
-
- - - -

fatalError)) ?>

-

- diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/_config_filter.yaml b/plugins/lovata/shopaholic/controllers/pricetypes/_config_filter.yaml deleted file mode 100644 index e48ef8269..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/_config_filter.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# =================================== -# Filter Scope Definitions -# =================================== - -scopes: - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - conditions: - - active <> true - - active = true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/_list_toolbar.htm b/plugins/lovata/shopaholic/controllers/pricetypes/_list_toolbar.htm deleted file mode 100644 index 41bbba5a3..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/_list_toolbar.htm +++ /dev/null @@ -1,24 +0,0 @@ -
- - - - - - - - fireViewEvent('lovata.backend.extend_list_toolbar', [$this]) ?> -
diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/config_form.yaml b/plugins/lovata/shopaholic/controllers/pricetypes/config_form.yaml deleted file mode 100644 index 959e76731..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/config_form.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'lovata.shopaholic::lang.price_type.name' -modelClass: Lovata\Shopaholic\Models\PriceType -form: $/lovata/shopaholic/models/pricetype/fields.yaml -defaultRedirect: lovata/shopaholic/pricetypes -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/pricetypes/update/:id' - redirectClose: lovata/shopaholic/pricetypes - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: lovata/shopaholic/pricetypes - redirectClose: lovata/shopaholic/pricetypes - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -preview: { } diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/config_list.yaml b/plugins/lovata/shopaholic/controllers/pricetypes/config_list.yaml deleted file mode 100644 index 9d5dee1fc..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/config_list.yaml +++ /dev/null @@ -1,17 +0,0 @@ -title: 'lovata.shopaholic::lang.price_type.list_title' -modelClass: Lovata\Shopaholic\Models\PriceType -list: $/lovata/shopaholic/models/pricetype/columns.yaml -recordUrl: 'lovata/shopaholic/pricetypes/update/:id' -noRecordsMessage: 'backend::lang.list.no_records' -recordsPerPage: '10' -showSetup: true -showCheckboxes: true -showSorting: 1 -defaultSort: - column: sort_order - direction: asc -toolbar: - buttons: list_toolbar - search: - prompt: 'backend::lang.list.search_prompt' -filter: _config_filter.yaml diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/config_reorder.yaml b/plugins/lovata/shopaholic/controllers/pricetypes/config_reorder.yaml deleted file mode 100644 index d00047914..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/config_reorder.yaml +++ /dev/null @@ -1,3 +0,0 @@ -title: 'backend::lang.reorder.default_title' -modelClass: Lovata\Shopaholic\Models\PriceType -nameFrom: name diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/create.htm b/plugins/lovata/shopaholic/controllers/pricetypes/create.htm deleted file mode 100644 index 1ddf6b8bf..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/index.htm b/plugins/lovata/shopaholic/controllers/pricetypes/index.htm deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/index.htm +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/preview.htm b/plugins/lovata/shopaholic/controllers/pricetypes/preview.htm deleted file mode 100644 index 5c3096e2a..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/reorder.htm b/plugins/lovata/shopaholic/controllers/pricetypes/reorder.htm deleted file mode 100644 index f685d10e3..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -reorderRender() ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/pricetypes/update.htm b/plugins/lovata/shopaholic/controllers/pricetypes/update.htm deleted file mode 100644 index b49f26e67..000000000 --- a/plugins/lovata/shopaholic/controllers/pricetypes/update.htm +++ /dev/null @@ -1,53 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - -
-
- - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/products/_config_filter.yaml b/plugins/lovata/shopaholic/controllers/products/_config_filter.yaml deleted file mode 100644 index a265e0bc1..000000000 --- a/plugins/lovata/shopaholic/controllers/products/_config_filter.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# =================================== -# Filter Scope Definitions -# =================================== - -scopes: - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - conditions: - - active <> true - - active = true - category: - label: 'lovata.toolbox::lang.field.category' - modelClass: Lovata\Shopaholic\Models\Category - nameFrom: name - scope: getByCategories - brand: - label: 'lovata.shopaholic::lang.field.brand' - modelClass: Lovata\Shopaholic\Models\Brand - nameFrom: name - conditions: brand_id in (:filtered) diff --git a/plugins/lovata/shopaholic/controllers/products/_list_toolbar.htm b/plugins/lovata/shopaholic/controllers/products/_list_toolbar.htm deleted file mode 100644 index 03bff1fdf..000000000 --- a/plugins/lovata/shopaholic/controllers/products/_list_toolbar.htm +++ /dev/null @@ -1,58 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - fireViewEvent('lovata.backend.extend_list_toolbar', [$this]) ?> -
diff --git a/plugins/lovata/shopaholic/controllers/products/_offer.htm b/plugins/lovata/shopaholic/controllers/products/_offer.htm deleted file mode 100644 index bc4366057..000000000 --- a/plugins/lovata/shopaholic/controllers/products/_offer.htm +++ /dev/null @@ -1 +0,0 @@ -relationRender('offer') ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/products/config_form.yaml b/plugins/lovata/shopaholic/controllers/products/config_form.yaml deleted file mode 100644 index f90963454..000000000 --- a/plugins/lovata/shopaholic/controllers/products/config_form.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'lovata.shopaholic::lang.product.name' -modelClass: Lovata\Shopaholic\Models\Product -form: $/lovata/shopaholic/models/product/fields.yaml -defaultRedirect: lovata/shopaholic/products -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/products/update/:id' - redirectClose: lovata/shopaholic/products - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: lovata/shopaholic/products - redirectClose: lovata/shopaholic/products - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -preview: { } diff --git a/plugins/lovata/shopaholic/controllers/products/config_import_export.yaml b/plugins/lovata/shopaholic/controllers/products/config_import_export.yaml deleted file mode 100644 index 053ede306..000000000 --- a/plugins/lovata/shopaholic/controllers/products/config_import_export.yaml +++ /dev/null @@ -1,34 +0,0 @@ -import: - title: 'lovata.shopaholic::lang.product.import_title' - modelClass: Lovata\Shopaholic\Models\Product - redirect: lovata/shopaholic/products - list: - columns: - external_id: - label: 'lovata.toolbox::lang.field.external_id' - active: - label: 'lovata.toolbox::lang.field.active' - name: - label: 'lovata.toolbox::lang.field.name' - code: - label: 'lovata.toolbox::lang.field.code' - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - description: - label: 'lovata.toolbox::lang.field.description' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - images: - label: 'lovata.toolbox::lang.field.images' - brand_id: - label: 'lovata.shopaholic::lang.field.brand' - category_id: - label: 'lovata.toolbox::lang.field.category' - additional_category: - label: 'lovata.shopaholic::lang.field.additional_category' - form: - fields: - deactivate: - label: 'lovata.toolbox::lang.field.import_deactivate' - comment: 'lovata.toolbox::lang.field.import_deactivate_description' - type: checkbox \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/products/config_list.yaml b/plugins/lovata/shopaholic/controllers/products/config_list.yaml deleted file mode 100644 index 34e78c5aa..000000000 --- a/plugins/lovata/shopaholic/controllers/products/config_list.yaml +++ /dev/null @@ -1,14 +0,0 @@ -title: 'lovata.shopaholic::lang.product.list_title' -modelClass: Lovata\Shopaholic\Models\Product -list: $/lovata/shopaholic/models/product/columns.yaml -recordUrl: 'lovata/shopaholic/products/update/:id' -noRecordsMessage: 'backend::lang.list.no_records' -recordsPerPage: '10' -showSetup: true -showCheckboxes: true -showSorting: 1 -toolbar: - buttons: list_toolbar - search: - prompt: 'backend::lang.list.search_prompt' -filter: _config_filter.yaml diff --git a/plugins/lovata/shopaholic/controllers/products/config_relation.yaml b/plugins/lovata/shopaholic/controllers/products/config_relation.yaml deleted file mode 100644 index b1ff200ec..000000000 --- a/plugins/lovata/shopaholic/controllers/products/config_relation.yaml +++ /dev/null @@ -1,15 +0,0 @@ -offer: - label: 'lovata.shopaholic::lang.offer.name' - manage: - list: $/lovata/shopaholic/models/offer/columns.yaml - form: $/lovata/shopaholic/models/offer/fields.yaml - showSearch: true - showSorting: true - recordsPerPage: 10 - view: - list: $/lovata/shopaholic/models/offer/columns.yaml - recordUrl: lovata/shopaholic/offers/update/:id - toolbarButtons: 'create|delete' - showSearch: true - showSorting: true - recordsPerPage: 10 \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/products/create.htm b/plugins/lovata/shopaholic/controllers/products/create.htm deleted file mode 100644 index b4ca0ee7a..000000000 --- a/plugins/lovata/shopaholic/controllers/products/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/products/import.htm b/plugins/lovata/shopaholic/controllers/products/import.htm deleted file mode 100644 index 1194a9fed..000000000 --- a/plugins/lovata/shopaholic/controllers/products/import.htm +++ /dev/null @@ -1,40 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - - 'layout']) ?> - -
-
- -

-
    -
  • -
  • -
  • -
  • - hasPlugin('Lovata.PropertiesShopaholic')) {?> -
  • - -
-
-
-
- importRender() ?> -
- -
- -
- - \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/products/index.htm b/plugins/lovata/shopaholic/controllers/products/index.htm deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/shopaholic/controllers/products/index.htm +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/shopaholic/controllers/products/preview.htm b/plugins/lovata/shopaholic/controllers/products/preview.htm deleted file mode 100644 index 29547819a..000000000 --- a/plugins/lovata/shopaholic/controllers/products/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/products/reorder.htm b/plugins/lovata/shopaholic/controllers/products/reorder.htm deleted file mode 100644 index 6c10fa800..000000000 --- a/plugins/lovata/shopaholic/controllers/products/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -reorderRender() ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/products/update.htm b/plugins/lovata/shopaholic/controllers/products/update.htm deleted file mode 100644 index 86c48d943..000000000 --- a/plugins/lovata/shopaholic/controllers/products/update.htm +++ /dev/null @@ -1,54 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - - -
-
- - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/_config_filter.yaml b/plugins/lovata/shopaholic/controllers/promoblocks/_config_filter.yaml deleted file mode 100644 index 252431f96..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/_config_filter.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# =================================== -# Filter Scope Definitions -# =================================== - -scopes: - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - conditions: - - active <> true - - active = true - date_begin: - label: 'lovata.toolbox::lang.field.date_begin' - type: daterange - conditions: date_begin >= ':after' AND date_begin <= ':before' - date_end: - label: 'lovata.toolbox::lang.field.date_end' - type: daterange - conditions: date_end >= ':after' AND date_end <= ':before' \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/_list_toolbar.htm b/plugins/lovata/shopaholic/controllers/promoblocks/_list_toolbar.htm deleted file mode 100644 index 1b1eb494b..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/_list_toolbar.htm +++ /dev/null @@ -1,24 +0,0 @@ -
- - - - - - - - fireViewEvent('lovata.backend.extend_list_toolbar', [$this]) ?> -
diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/_product.htm b/plugins/lovata/shopaholic/controllers/promoblocks/_product.htm deleted file mode 100644 index ab8f51b26..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/_product.htm +++ /dev/null @@ -1 +0,0 @@ -relationRender('product') ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/config_form.yaml b/plugins/lovata/shopaholic/controllers/promoblocks/config_form.yaml deleted file mode 100644 index c8dae6ba8..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/config_form.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'lovata.shopaholic::lang.promo_block.name' -modelClass: Lovata\Shopaholic\Models\PromoBlock -form: $/lovata/shopaholic/models/promoblock/fields.yaml -defaultRedirect: lovata/shopaholic/promoblocks -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/promoblocks/update/:id' - redirectClose: lovata/shopaholic/promoblocks - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: lovata/shopaholic/promoblocks - redirectClose: lovata/shopaholic/promoblocks - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -preview: { } diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/config_list.yaml b/plugins/lovata/shopaholic/controllers/promoblocks/config_list.yaml deleted file mode 100644 index 4b2ff065f..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/config_list.yaml +++ /dev/null @@ -1,17 +0,0 @@ -title: 'lovata.shopaholic::lang.promo_block.list_title' -modelClass: Lovata\Shopaholic\Models\PromoBlock -list: $/lovata/shopaholic/models/promoblock/columns.yaml -recordUrl: 'lovata/shopaholic/promoblocks/update/:id' -noRecordsMessage: 'backend::lang.list.no_records' -recordsPerPage: '10' -showSetup: true -showCheckboxes: true -showSorting: 1 -defaultSort: - column: sort_order - direction: asc -toolbar: - buttons: list_toolbar - search: - prompt: 'backend::lang.list.search_prompt' -filter: _config_filter.yaml diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/config_relation.yaml b/plugins/lovata/shopaholic/controllers/promoblocks/config_relation.yaml deleted file mode 100644 index be522819a..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/config_relation.yaml +++ /dev/null @@ -1,14 +0,0 @@ -product: - label: 'lovata.shopaholic::lang.product.name' - manage: - list: $/lovata/shopaholic/models/product/relation_columns.yaml - showSearch: true - showSorting: true - recordsPerPage: 10 - view: - list: $/lovata/shopaholic/models/product/relation_columns.yaml - recordUrl: lovata/shopaholic/products/update/:id - toolbarButtons: 'add|remove' - showSearch: true - showSorting: true - recordsPerPage: 10 \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/config_reorder.yaml b/plugins/lovata/shopaholic/controllers/promoblocks/config_reorder.yaml deleted file mode 100644 index 3a67ca854..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/config_reorder.yaml +++ /dev/null @@ -1,3 +0,0 @@ -title: 'backend::lang.reorder.default_title' -modelClass: Lovata\Shopaholic\Models\PromoBlock -nameFrom: name diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/create.htm b/plugins/lovata/shopaholic/controllers/promoblocks/create.htm deleted file mode 100644 index 2adcf7c7b..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/index.htm b/plugins/lovata/shopaholic/controllers/promoblocks/index.htm deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/index.htm +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/preview.htm b/plugins/lovata/shopaholic/controllers/promoblocks/preview.htm deleted file mode 100644 index 1de4f6825..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/reorder.htm b/plugins/lovata/shopaholic/controllers/promoblocks/reorder.htm deleted file mode 100644 index f47d2c42b..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -reorderRender() ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/promoblocks/update.htm b/plugins/lovata/shopaholic/controllers/promoblocks/update.htm deleted file mode 100644 index 8c9d86108..000000000 --- a/plugins/lovata/shopaholic/controllers/promoblocks/update.htm +++ /dev/null @@ -1,54 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - - -
-
- - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/_category.htm b/plugins/lovata/shopaholic/controllers/taxes/_category.htm deleted file mode 100644 index 12bcf3cce..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/_category.htm +++ /dev/null @@ -1 +0,0 @@ -relationRender('category') ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/_config_filter.yaml b/plugins/lovata/shopaholic/controllers/taxes/_config_filter.yaml deleted file mode 100644 index e48ef8269..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/_config_filter.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# =================================== -# Filter Scope Definitions -# =================================== - -scopes: - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - conditions: - - active <> true - - active = true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/_country.htm b/plugins/lovata/shopaholic/controllers/taxes/_country.htm deleted file mode 100644 index 774b3975b..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/_country.htm +++ /dev/null @@ -1 +0,0 @@ -relationRender('country') ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/_list_toolbar.htm b/plugins/lovata/shopaholic/controllers/taxes/_list_toolbar.htm deleted file mode 100644 index c55e26a87..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/_list_toolbar.htm +++ /dev/null @@ -1,24 +0,0 @@ -
- - - - - - - - fireViewEvent('lovata.backend.extend_list_toolbar', [$this]) ?> -
diff --git a/plugins/lovata/shopaholic/controllers/taxes/_product.htm b/plugins/lovata/shopaholic/controllers/taxes/_product.htm deleted file mode 100644 index ab8f51b26..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/_product.htm +++ /dev/null @@ -1 +0,0 @@ -relationRender('product') ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/_state.htm b/plugins/lovata/shopaholic/controllers/taxes/_state.htm deleted file mode 100644 index 377171747..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/_state.htm +++ /dev/null @@ -1 +0,0 @@ -relationRender('state') ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/config_form.yaml b/plugins/lovata/shopaholic/controllers/taxes/config_form.yaml deleted file mode 100644 index d9f0f1c10..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/config_form.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'lovata.shopaholic::lang.tax.name' -modelClass: Lovata\Shopaholic\Models\Tax -form: $/lovata/shopaholic/models/tax/fields.yaml -defaultRedirect: lovata/shopaholic/taxes -create: - title: 'backend::lang.form.create_title' - redirect: 'lovata/shopaholic/taxes/update/:id' - redirectClose: lovata/shopaholic/taxes - flashSave: 'lovata.toolbox::lang.message.create_success' -update: - title: 'backend::lang.form.update_title' - redirect: lovata/shopaholic/taxes - redirectClose: lovata/shopaholic/taxes - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -preview: { } diff --git a/plugins/lovata/shopaholic/controllers/taxes/config_list.yaml b/plugins/lovata/shopaholic/controllers/taxes/config_list.yaml deleted file mode 100644 index 23b5e7ed1..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/config_list.yaml +++ /dev/null @@ -1,17 +0,0 @@ -title: 'lovata.shopaholic::lang.tax.list_title' -modelClass: Lovata\Shopaholic\Models\Tax -list: $/lovata/shopaholic/models/tax/columns.yaml -recordUrl: 'lovata/shopaholic/taxes/update/:id' -noRecordsMessage: 'backend::lang.list.no_records' -recordsPerPage: '10' -showSetup: true -showCheckboxes: true -showSorting: 1 -defaultSort: - column: sort_order - direction: asc -toolbar: - buttons: list_toolbar - search: - prompt: 'backend::lang.list.search_prompt' -filter: _config_filter.yaml diff --git a/plugins/lovata/shopaholic/controllers/taxes/config_relation.yaml b/plugins/lovata/shopaholic/controllers/taxes/config_relation.yaml deleted file mode 100644 index 34bc2cef4..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/config_relation.yaml +++ /dev/null @@ -1,54 +0,0 @@ -category: - label: 'lovata.shopaholic::lang.category.name' - manage: - list: $/lovata/shopaholic/models/category/columns.yaml - showSearch: true - showSorting: true - recordsPerPage: 10 - view: - list: $/lovata/shopaholic/models/category/columns.yaml - recordUrl: lovata/shopaholic/categories/update/:id - toolbarButtons: 'add|remove' - showSearch: true - showSorting: true - recordsPerPage: 10 -product: - label: 'lovata.shopaholic::lang.product.name' - manage: - list: $/lovata/shopaholic/models/product/columns.yaml - showSearch: true - showSorting: true - recordsPerPage: 10 - view: - list: $/lovata/shopaholic/models/product/columns.yaml - recordUrl: lovata/shopaholic/products/update/:id - toolbarButtons: 'add|remove' - showSearch: true - showSorting: true - recordsPerPage: 10 -country: - label: 'lovata.shopaholic::lang.country.name' - manage: - list: $/rainlab/location/models/country/columns.yaml - showSearch: true - showSorting: true - recordsPerPage: 10 - view: - list: $/rainlab/location/models/country/columns.yaml - toolbarButtons: 'add|remove' - showSearch: true - showSorting: true - recordsPerPage: 10 -state: - label: 'lovata.shopaholic::lang.state.name' - manage: - list: $/rainlab/location/models/state/columns.yaml - showSearch: true - showSorting: true - recordsPerPage: 10 - view: - list: $/rainlab/location/models/state/columns.yaml - toolbarButtons: 'add|remove' - showSearch: true - showSorting: true - recordsPerPage: 10 \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/config_reorder.yaml b/plugins/lovata/shopaholic/controllers/taxes/config_reorder.yaml deleted file mode 100644 index 5606ffef2..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/config_reorder.yaml +++ /dev/null @@ -1,3 +0,0 @@ -title: 'backend::lang.reorder.default_title' -modelClass: Lovata\Shopaholic\Models\Tax -nameFrom: name diff --git a/plugins/lovata/shopaholic/controllers/taxes/create.htm b/plugins/lovata/shopaholic/controllers/taxes/create.htm deleted file mode 100644 index ed256235a..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/create.htm +++ /dev/null @@ -1,46 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - -
-
- - - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/index.htm b/plugins/lovata/shopaholic/controllers/taxes/index.htm deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/index.htm +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/shopaholic/controllers/taxes/preview.htm b/plugins/lovata/shopaholic/controllers/taxes/preview.htm deleted file mode 100644 index 706b2936e..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/preview.htm +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - -

fatalError) ?>

- - -

- - - -

\ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/reorder.htm b/plugins/lovata/shopaholic/controllers/taxes/reorder.htm deleted file mode 100644 index 44dd4d347..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -reorderRender() ?> \ No newline at end of file diff --git a/plugins/lovata/shopaholic/controllers/taxes/update.htm b/plugins/lovata/shopaholic/controllers/taxes/update.htm deleted file mode 100644 index 4e5745d05..000000000 --- a/plugins/lovata/shopaholic/controllers/taxes/update.htm +++ /dev/null @@ -1,53 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - - -
-
- - - -

fatalError)) ?>

-

- \ No newline at end of file diff --git a/plugins/lovata/shopaholic/crowdin.yml b/plugins/lovata/shopaholic/crowdin.yml deleted file mode 100644 index 535152bcc..000000000 --- a/plugins/lovata/shopaholic/crowdin.yml +++ /dev/null @@ -1,3 +0,0 @@ -files: - - source: /lang/en/*php - translation: /lang/%two_letters_code%/%original_file_name% diff --git a/plugins/lovata/shopaholic/lang/ar/lang.php b/plugins/lovata/shopaholic/lang/ar/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/ar/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/be/lang.php b/plugins/lovata/shopaholic/lang/be/lang.php deleted file mode 100644 index b955c69f4..000000000 --- a/plugins/lovata/shopaholic/lang/be/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Бясплатны eCommerce-плагін з вялікім наборам пашырэнняў.', - ], - 'field' => [ - 'vendor_code' => 'Артыкул', - 'price' => 'Цана', - 'old_price' => 'Старая цана', - 'quantity' => 'Колькасць', - 'brand' => 'Брэнд', - 'offer' => 'Таварныя прапановы', - 'currency' => 'Валюта', - 'check_offer_active' => 'Правяраць наяўнасць актыўных гандлёвых прапаноў пры атрыманні спісу актыўных тавараў.', - 'additional_category' => 'Дадатковыя катэгорыі', - 'promo_block_type' => 'Промо-блок со списком товаров', - 'promo_block' => 'Прома-блок', - 'product_id' => 'ID тавару', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Каталог', - 'categories' => 'Катэгорыі', - 'product' => 'Тавары', - 'brands' => 'Брэнды', - 'shop_catalog' => 'Каталог тавараў', - 'shop_category' => 'Катэгорыя тавараў', - 'all_shop_categories' => 'Усе катэгорыі тавараў', - 'promo_block' => 'Прома-блокі', - 'promo' => 'Прома-акцыі', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Гандлёвыя прапановы', - 'price' => 'Цэны', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'катэгорыі', - 'list_title' => 'Cпіс катэгорый', - 'import_title' => 'Iмпарт катэгорый', - 'export_title' => 'Экспарт катэгорый', - ], - 'brand' => [ - 'name' => 'брэнду', - 'list_title' => 'Спіс брэндаў', - 'import_title' => 'Iмпарт брэндаў', - 'export_title' => 'Экспарт брэндаў', - ], - 'product' => [ - 'name' => 'тавару', - 'list_title' => 'Спіс тавараў', - 'import_title' => 'Iмпарт тавараў', - 'export_title' => 'Экспарт тавараў', - ], - 'offer' => [ - 'name' => 'гандлёвай прапановы', - 'list_title' => 'Спіс гандлёвых прапаноў', - 'import_title' => 'Імпарт гандлёвых прапаноў', - 'export_title' => 'Экспарт гандлёвых прапаноў', - ], - 'promo_block' => [ - 'name' => 'прома-блоку', - 'list_title' => 'Спіс прома-блокаў', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Старонка тавару', - 'product_page_description' => 'Атрымаць даныя для старонкі тавару', - 'product_data_name' => 'Дадзеныя тавару', - 'product_data_description' => 'Атрымаць даныя тавару па ID', - 'product_list_name' => 'Спіс тавараў', - 'product_list_description' => 'Атрымаць спіс тавараў', - - //Brand components - 'brand_page_name' => 'Старонка брэнду', - 'brand_page_description' => 'Атрымаць даныя для старонкі брэнду', - 'brand_data_name' => 'Дадзеныя брэнду', - 'brand_data_description' => 'Атрымаць дадзеныя брэнду па ID', - 'brand_list_name' => 'Спіс брэндаў', - 'brand_list_description' => 'Атрымаць спіс брэндаў', - - //Promo block components - 'promo_block_page_name' => 'Страница промо-блока', - 'promo_block_page_description' => 'Атрымаць даныя для старонкі прома-блоку', - 'promo_block_data_name' => 'Дадзеныя прома-блоку', - 'promo_block_data_description' => 'Атрымаць даныя прома-блоку па ID', - 'promo_block_list_name' => 'Спіс прома-блокаў', - 'promo_block_list_description' => 'Атрымаць спіс прома-блокаў', - - //Category components - 'category_page_name' => 'Старонка катэгорыі', - 'category_page_description' => 'Атрымаць даныя для старонкі катэгорыі', - 'category_data_name' => 'Дадзеныя катэгорыі', - 'category_data_description' => 'Атрымаць даныя катэгорыі па ID', - 'category_list_name' => 'Спіс катэгорый', - 'category_list_description' => 'Атрымаць дрэва катэгорый', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Хлебныя крошкі', - 'breadcrumbs_description' => 'Атрымаць даныя для фарміравання хлебных крошак каталогу', - - //Components settings - 'product_list_sorting' => 'Сартаванне па змаўчанні', - 'sorting_no' => 'Без сартавання', - 'sorting_price_desc' => 'Дарагiя', - 'sorting_price_asc' => 'Танныя', - 'sorting_new' => 'Новыя', - 'sorting_popularity_desc' => 'Папулярныя', - 'sorting_rating_desc' => 'Высокі рэйтынг', - 'sorting_rating_asc' => 'Нізкі рэйтынг', - 'sorting_date_begin_asc' => 'Дата пачатку (ASC)', - 'sorting_date_begin_desc' => 'Дата пачатку (DESC)', - 'sorting_date_end_asc' => 'Дата заканчэння (ASC)', - 'sorting_date_end_desc' => 'Дата заканчэння (DESC)', - ], - 'permission' => [ - 'category' => 'Кіраванне катэгорыямі', - 'brand' => 'Кіраванне брэндамi', - 'product' => 'Кіраванне таварамі', - 'settings' => 'Кіраванне наладамі', - 'promo_block' => 'Кіраванне прома-блокамі', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Пазначце праз коску спіс дадатковых катэгорый тавараў.', - ], - 'button' => [ - 'import_offer_button' => 'Імпартаваць прапановы з CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/bg/lang.php b/plugins/lovata/shopaholic/lang/bg/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/bg/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/ca/lang.php b/plugins/lovata/shopaholic/lang/ca/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/ca/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/cs/lang.php b/plugins/lovata/shopaholic/lang/cs/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/cs/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/da/lang.php b/plugins/lovata/shopaholic/lang/da/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/da/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/de/lang.php b/plugins/lovata/shopaholic/lang/de/lang.php deleted file mode 100644 index d86e2c0d0..000000000 --- a/plugins/lovata/shopaholic/lang/de/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Kostenlose E-Commerce-Plugin mit einer großen Reihe von Erweiterungen.', - ], - 'field' => [ - 'vendor_code' => 'Herstellerkürzel', - 'price' => 'Preis', - 'old_price' => 'Alter Preis', - 'quantity' => 'Menge', - 'brand' => 'Marke', - 'offer' => 'Produktangebote', - 'currency' => 'Währung', - 'check_offer_active' => 'Wenn Sie eine Liste aktiver Produkte erhalten, prüfen Sie nach aktive Produktangeboten.', - 'additional_category' => 'Zusätzliche Kategorien', - 'promo_block_type' => 'Promoblock mit Produktliste', - 'promo_block' => 'Promoblock', - 'product_id' => 'Produkt ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Katalog', - 'categories' => 'Kategorien', - 'product' => 'Produkte', - 'brands' => 'Marken', - 'shop_catalog' => 'Produktkatalog', - 'shop_category' => 'Produktkategorie', - 'all_shop_categories' => 'Alle Produktkategorien', - 'promo_block' => 'Promoblöcke', - 'promo' => 'Beförderungen', - 'price_type' => 'Preistypen', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Preise', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'Kategorie', - 'list_title' => 'Kategorienliste', - 'import_title' => 'Importiere Kategorien', - 'export_title' => 'Exportiere Kategorien', - ], - 'brand' => [ - 'name' => 'Marke', - 'list_title' => 'Markenliste', - 'import_title' => 'Importiere Marken', - 'export_title' => 'Exportiere Marken', - ], - 'product' => [ - 'name' => 'Produktes', - 'list_title' => 'Produktliste', - 'import_title' => 'Importiere Produkte', - 'export_title' => 'Exportiere Produkte', - ], - 'offer' => [ - 'name' => 'Produktangebotes', - 'list_title' => 'Produktangeboteliste', - 'import_title' => 'Importiere Produktangebote', - 'export_title' => 'Exportiere Produktangebote', - ], - 'promo_block' => [ - 'name' => 'Promoblockes', - 'list_title' => 'Promoblöckeliste', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Länderliste', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Produktseite', - 'product_page_description' => 'Daten für die Produktseite abrufen', - 'product_data_name' => 'Produktdaten', - 'product_data_description' => 'Produktdaten nach ID abrufen', - 'product_list_name' => 'Produktliste', - 'product_list_description' => 'Produktliste abrufen', - - //Brand components - 'brand_page_name' => 'Markenseite', - 'brand_page_description' => 'Daten für Markenseite abrufen', - 'brand_data_name' => 'Markendaten', - 'brand_data_description' => 'Markendaten nach ID abrufen', - 'brand_list_name' => 'Markenliste', - 'brand_list_description' => 'Markenübersicht abrufen', - - //Promo block components - 'promo_block_page_name' => 'Promoblockseite', - 'promo_block_page_description' => 'Daten für Promoblockseite abrufen', - 'promo_block_data_name' => 'Promoblockdaten', - 'promo_block_data_description' => 'Promoblöckeliste nach ID abrufen', - 'promo_block_list_name' => 'Promoblöckeliste', - 'promo_block_list_description' => 'Promoblockeliste abrufen', - - //Category components - 'category_page_name' => 'Kategorieseite', - 'category_page_description' => 'Daten für Kategorieseite abrufen', - 'category_data_name' => 'Kategoriedaten', - 'category_data_description' => 'Kategoriedaten nach ID abrufen', - 'category_list_name' => 'Kategorienliste', - 'category_list_description' => 'Kategoriebaum abrufen', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Daten für Brotkrümel abrufen', - - //Components settings - 'product_list_sorting' => 'Standardsortierung', - 'sorting_no' => 'Ohne Sortierung', - 'sorting_price_desc' => 'Teuer', - 'sorting_price_asc' => 'Billig', - 'sorting_new' => 'Neu', - 'sorting_popularity_desc' => 'Populär', - 'sorting_rating_desc' => 'Hohe Bewertung', - 'sorting_rating_asc' => 'Niedrige Bewertung', - 'sorting_date_begin_asc' => 'Datumsanfang (ASC)', - 'sorting_date_begin_desc' => 'Datumsanfang (DESC)', - 'sorting_date_end_asc' => 'Datumsende (ASC)', - 'sorting_date_end_desc' => 'Datumsende (DESC)', - ], - 'permission' => [ - 'category' => 'Kategorien verwalten', - 'brand' => 'Marken verwalten', - 'product' => 'Produkte verwalten', - 'settings' => 'Einstellungen verwalten', - 'promo_block' => 'Werbeblöcke verwalten', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Importiere Angebote mit CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/el/lang.php b/plugins/lovata/shopaholic/lang/el/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/el/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/en/lang.php b/plugins/lovata/shopaholic/lang/en/lang.php deleted file mode 100644 index 711f21a33..000000000 --- a/plugins/lovata/shopaholic/lang/en/lang.php +++ /dev/null @@ -1,226 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers.', - 'allow_negative_offer_quantity' => 'Allow negative offer quantity', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - 'measure' => 'Unit measure', - 'measure_of_unit' => 'Unit measure of one unit', - 'quantity_in_unit' => 'Quantity in one unit', - 'dimensions_measure' => 'Unit measure of dimensions', - 'weight_measure' => 'Unit measure of weight', - - 'hide_brand_import_from_csv' => 'Hide "Import from CSV" button for brands', - 'hide_brand_import_from_xml' => 'Hide "Import from XML" button for brands', - 'hide_category_import_from_csv' => 'Hide "Import from CSV" button for categories', - 'hide_category_import_from_xml' => 'Hide "Import from XML" button for categories', - 'hide_product_import_from_csv' => 'Hide "Import from CSV" button for products', - 'hide_product_import_from_xml' => 'Hide "Import from XML" button for products', - 'hide_offer_import_from_csv' => 'Hide "Import from CSV" button for offers', - 'hide_offer_import_from_xml' => 'Hide "Import from XML" button for offers', - 'hide_price_import_from_xml' => 'Hide "Import from XML" button for prices', - - 'default_product_page' => 'Choose the default product page', - 'default_category_page' => 'Choose the default category page', - 'default_brand_page' => 'Choose the default brand page', - 'default_promo_block_page' => 'Choose the default promo block page', - ], - 'settings' => [ - 'formula_calculate_discount_from_price' => 'Formula of calculating discounts on prices with taxes', - 'formula_calculation_from_backend_price' => 'Discount is deducted from backend price (default)', - 'formula_calculation_from_price_without_tax' => 'Discount is deducted from price without taxes', - 'formula_calculation_from_price_with_tax' => 'Discount is deducted from price with taxes', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - 'import_xml_file' => 'Import from XML', - 'import_xml_file_description' => 'Settings of import from XML file', - 'measure' => 'Unit measure', - 'measure_description' => 'Manage unit measure', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - 'import_setting' => 'Import', - 'dimensions' => 'Dimensions and weight', - 'page_settings' => 'Page settings' - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'measure' => [ - 'name' => 'Unit measure', - 'list_title' => 'Unit measure list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - 'import_xml_file' => 'Manage settings of import from XML file', - 'measure' => 'Manage unit measure list', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - 'import_from_xml_files_is_disabled' => 'Import from XML files is disabled.', - 'import_from_xml_info' => '

You can use XPath syntax to set path to elements.

', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - 'import_offer_from_xml' => 'Import offers from XML', - 'import_price_from_xml' => 'Import prices from XML', - ], - 'widget' => [ - 'import_from_xml_files' => 'Import from XML', - 'import_from_csv_files' => 'Import from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/es/lang.php b/plugins/lovata/shopaholic/lang/es/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/es/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/et/lang.php b/plugins/lovata/shopaholic/lang/et/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/et/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/fa/lang.php b/plugins/lovata/shopaholic/lang/fa/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/fa/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/fi/lang.php b/plugins/lovata/shopaholic/lang/fi/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/fi/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/fr/lang.php b/plugins/lovata/shopaholic/lang/fr/lang.php deleted file mode 100644 index 16eb73386..000000000 --- a/plugins/lovata/shopaholic/lang/fr/lang.php +++ /dev/null @@ -1,93 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Code vendeur', - 'price' => 'Prix', - 'old_price' => 'Ancien prix', - 'quantity' => 'Quantité', - 'brand' => 'Marque', - 'offer' => 'Offres', - 'currency' => 'Devise', - 'check_offer_active' => 'Lorsque vous recevez une liste de produits actifs, recherchez des offres actives', - 'additional_category' => 'Catégories supplémentaires', - ], - 'menu' => [ - 'main' => 'Catalogue', - 'categories' => 'Catégories', - 'product' => 'Produits', - 'brands' => 'Marques', - 'shop_catalog' => 'Catalogue de produits', - 'shop_category' => 'Catégorie des produits', - 'all_shop_categories' => 'Toutes les catégories de produits', - ], - 'tab' => [ - 'offer' => 'Offres', - 'price' => 'Des prix', - 'permissions' => 'Shopaholic', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Liste des catégories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Liste des marques', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Liste des produits', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Liste des offres', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Page du produit', - 'product_page_description' => 'Obtenir les données pour la page du produit', - 'product_data_name' => 'Données du produit', - 'product_data_description' => 'Obtenir les données du produit par ID', - 'product_list_name' => 'Liste des produits', - 'product_list_description' => 'Récupérer la liste des produits', - - //Brand components - 'brand_page_name' => 'Page de la marque', - 'brand_page_description' => 'Obtenir les données pour la page de la marque', - 'brand_data_name' => 'Données de la marque', - 'brand_data_description' => 'Obtenir les données de la marque par ID', - 'brand_list_name' => 'Liste des marques', - 'brand_list_description' => 'Récupérer la liste des marques', - - //Category components - 'category_page_name' => 'Page de la catégorie', - 'category_page_description' => 'Obtenir les données pour la page de catégorie', - 'category_data_name' => 'Données de la catégorie', - 'category_data_description' => 'Obtenir les données de la catégorie par ID', - 'category_list_name' => 'Liste des catégories', - 'category_list_description' => 'Récupérer la liste des catégories', - - //Common components - 'breadcrumbs_name' => "Fil d'Ariane", - 'breadcrumbs_description' => "Récupérer les données pour le fil d'Ariane du catalogue", - - //Components settings - 'product_list_sorting' => 'Tri par défaut', - 'sorting_no' => 'Sans tri', - 'sorting_price_desc' => 'Coûteux', - 'sorting_price_asc' => 'Pas cher', - 'sorting_new' => 'Nouveau', - 'sorting_popularity_desc' => 'Le plus populaire', - 'sorting_rating_desc' => 'Note élevée', - 'sorting_rating_asc' => 'Note basse', - ], - 'permission' => [ - 'category' => 'Gérer les catégories', - 'brand' => 'Gérer les marques', - 'product' => 'Gérer les produits', - 'settings' => 'Gérer les paramètres', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/hu/lang.php b/plugins/lovata/shopaholic/lang/hu/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/hu/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/id/lang.php b/plugins/lovata/shopaholic/lang/id/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/id/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/it/lang.php b/plugins/lovata/shopaholic/lang/it/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/it/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/ja/lang.php b/plugins/lovata/shopaholic/lang/ja/lang.php deleted file mode 100644 index 197f5cf83..000000000 --- a/plugins/lovata/shopaholic/lang/ja/lang.php +++ /dev/null @@ -1,129 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'ベンダーコード', - 'price' => '価格', - 'old_price' => '通常価格', - 'quantity' => '数量', - 'brand' => 'ブランド', - 'offer' => 'オファー', - 'currency' => '通貨', - 'check_offer_active' => '有効な製品のリストを取得する際、有効なオファーを持つものに限定する', - 'additional_category' => '追加のカテゴリ', - 'promo_block_type' => '製品リストを含む販促ブロック', - 'promo_block' => '販促ブロック', - 'product_id' => '製品ID', - ], - 'menu' => [ - 'main' => 'カタログ', - 'categories' => 'カテゴリ', - 'product' => '製品', - 'brands' => 'ブランド', - 'shop_catalog' => '製品カタログ', - 'shop_category' => '製品カテゴリ', - 'all_shop_categories' => '全ての製品カテゴリ', - 'promo_block' => '販促ブロック', - 'promo' => '販促', - ], - 'tab' => [ - 'offer' => 'オファー', - 'price' => '価格', - 'permissions' => 'Shopaholic', - ], - 'category' => [ - 'name' => 'カテゴリ', - 'list_title' => 'カテゴリリスト', - 'import_title' => 'カテゴリデータのインポート', - 'export_title' => 'カテゴリデータのエクスポート', - ], - 'brand' => [ - 'name' => 'ブランド', - 'list_title' => 'ブランドリスト', - 'import_title' => 'ブランドデータのインポート', - 'export_title' => 'ブランドデータのエクスポート', - ], - 'product' => [ - 'name' => '製品', - 'list_title' => '製品リスト', - 'import_title' => '製品データのインポート', - 'export_title' => '製品データのエクスポート', - ], - 'offer' => [ - 'name' => 'オファー', - 'list_title' => 'オファーリスト', - 'import_title' => 'オファーデータのインポート', - 'export_title' => 'オファーデータのエクスポート', - ], - 'promo_block' => [ - 'name' => '販促ブロック', - 'list_title' => '販促ブロックリスト', - ], - 'component' => [ - - //Product components - 'product_page_name' => '製品ページ', - 'product_page_description' => '製品データをURL slugで取得します', - 'product_data_name' => '製品データ', - 'product_data_description' => '製品データをIDで取得します', - 'product_list_name' => '製品リスト', - 'product_list_description' => '製品リストを取得します', - - //Brand components - 'brand_page_name' => 'ブランドページ', - 'brand_page_description' => 'ブランドデータをURL slugで取得します', - 'brand_data_name' => 'ブランドデータ', - 'brand_data_description' => 'ブランドデータをIDで取得します', - 'brand_list_name' => 'ブランドリスト', - 'brand_list_description' => 'ブランドリストを取得します', - - //Promo block components - 'promo_block_page_name' => '販促ブロックページ', - 'promo_block_page_description' => '販促ブロックデータをURL slugで取得します', - 'promo_block_data_name' => '販促ブロックデータ', - 'promo_block_data_description' => '販促ブロックデータをIDで取得します', - 'promo_block_list_name' => '販促ブロックリスト', - 'promo_block_list_description' => '販促ブロックリストを取得します', - - //Category components - 'category_page_name' => 'カテゴリページ', - 'category_page_description' => 'カテゴリデータをURL slugで取得します', - 'category_data_name' => 'カテゴリデータ', - 'category_data_description' => 'カテゴリデータをIDで取得します', - 'category_list_name' => 'カテゴリリスト', - 'category_list_description' => 'カテゴリリストを取得します', - - //Common components - 'breadcrumbs_name' => 'パンくずリスト', - 'breadcrumbs_description' => 'カタログパンくずリストのためのデータを取得します', - - //Components settings - 'product_list_sorting' => 'デフォルトソート方法', - 'sorting_no' => 'ソートしない', - 'sorting_price_desc' => '価格高い順', - 'sorting_price_asc' => '価格安い順', - 'sorting_new' => '新しい順', - 'sorting_popularity_desc' => '人気順', - 'sorting_rating_desc' => '評価の高い順', - 'sorting_rating_asc' => '評価の低い順', - 'sorting_date_begin_asc' => '開始日早い順', - 'sorting_date_begin_desc' => '開始日遅い順', - 'sorting_date_end_asc' => '終了日早い順', - 'sorting_date_end_desc' => '終了日遅い順', - ], - 'permission' => [ - 'category' => 'カテゴリ管理', - 'brand' => 'ブランド管理', - 'product' => '製品管理', - 'settings' => '設定管理', - 'promo_block' => '販促ブロック管理', - ], - 'message' => [ - 'import_additional_category_info' => '追加の製品カテゴリはカンマ区切りで入力してください', - ], - 'button' => [ - 'import_offer_button' => 'オファーをCSVから読み込む', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/kk/lang.php b/plugins/lovata/shopaholic/lang/kk/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/kk/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/ko/lang.php b/plugins/lovata/shopaholic/lang/ko/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/ko/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/ky/lang.php b/plugins/lovata/shopaholic/lang/ky/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/ky/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/lt/lang.php b/plugins/lovata/shopaholic/lang/lt/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/lt/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/lv/lang.php b/plugins/lovata/shopaholic/lang/lv/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/lv/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/nb/lang.php b/plugins/lovata/shopaholic/lang/nb/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/nb/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/nl/lang.php b/plugins/lovata/shopaholic/lang/nl/lang.php deleted file mode 100644 index a1d55b1e8..000000000 --- a/plugins/lovata/shopaholic/lang/nl/lang.php +++ /dev/null @@ -1,179 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'allow_negative_offer_quantity' => 'Allow negative offer quantity', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/pl/lang.php b/plugins/lovata/shopaholic/lang/pl/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/pl/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/pt/lang.php b/plugins/lovata/shopaholic/lang/pt/lang.php deleted file mode 100644 index 5d8184154..000000000 --- a/plugins/lovata/shopaholic/lang/pt/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Baratos', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/ro/lang.php b/plugins/lovata/shopaholic/lang/ro/lang.php deleted file mode 100644 index dad5278fa..000000000 --- a/plugins/lovata/shopaholic/lang/ro/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => 'Plugin gratuit de comerț electronic cu un set mare de extensii.', - ], - 'field' => [ - 'vendor_code' => 'Cod furnizor', - 'price' => 'Pret', - 'old_price' => 'Pret Vechi', - 'quantity' => 'Cantitate', - 'brand' => 'Marca', - 'offer' => 'Oferte', - 'currency' => 'Valuta', - 'check_offer_active' => 'Când primiți o listă de produse active, verificați dacă există oferte active', - 'additional_category' => 'Categorii aditionale', - 'promo_block_type' => 'Bloc promotional cu listă de produse', - 'promo_block' => 'Bloc promotional', - 'product_id' => 'Id produs', - 'rate' => 'Taxa', - 'tax_is_global' => 'Taxa se va aplica tuturor produselor', - 'tax_percent' => 'Procentul de impozitare', - 'tax' => 'Taxa', - 'without_tax' => 'Fara taxa', - 'with_tax' => 'Cu taxa', - 'countries' => 'Tari', - 'states' => 'Judete', - 'main_price_type' => 'Pretul principal', - 'price_include_tax' => 'Pretul include taxe', - 'discount_price' => 'Pret redus', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categorii', - 'product' => 'Produse', - 'brands' => 'Branduri', - 'shop_catalog' => 'Catalog produse', - 'shop_category' => 'Categoria produsului', - 'all_shop_categories' => 'Toate categoriile produselor', - 'promo_block' => 'Blocuri promotionale', - 'promo' => 'Promotii', - 'price_type' => 'Tipuri preturi', - 'price_type_description' => 'Gestionați tipurile de pret', - 'currency' => 'Valuta', - 'currency_description' => 'Gestionati monedele', - 'tax' => 'Taxe', - 'tax_description' => 'Gestionati taxe', - 'configuration' => 'Catalog setari', - 'main_settings' => 'Setari de baza', - 'main_settings_description' => 'Setările de baza ale catalogului dvs.', - ], - 'tab' => [ - 'offer' => 'Oferte comerciale', - 'price' => 'Preturi', - 'permissions' => 'Shopaholic', - 'settings' => 'Configurare catalog', - 'taxes' => 'Taxe', - ], - 'category' => [ - 'name' => 'categorie', - 'list_title' => 'Lista categorii', - 'import_title' => 'Importeaza categorii', - 'export_title' => 'Exporteaza categorii', - ], - 'brand' => [ - 'name' => 'marca', - 'list_title' => 'Lista marci', - 'import_title' => 'Importeaza marci', - 'export_title' => 'Exporteaza marci', - ], - 'product' => [ - 'name' => 'produs', - 'list_title' => 'Lista produse', - 'import_title' => 'Importeaza produse', - 'export_title' => 'Exporteaza produse', - ], - 'offer' => [ - 'name' => 'oferta', - 'list_title' => 'Lista oferte', - 'import_title' => 'Importeaza oferte', - 'export_title' => 'Exporteaza oferte', - ], - 'promo_block' => [ - 'name' => 'bloc promotonal', - 'list_title' => 'Lista blocuri promotionale', - ], - 'price_type' => [ - 'name' => 'tip pret', - 'list_title' => 'Lista tipuri pret', - ], - 'currency' => [ - 'name' => 'valuta', - 'list_title' => 'Lista valuta', - ], - 'tax' => [ - 'name' => 'taxa', - 'list_title' => 'Lista taxe', - ], - 'country' => [ - 'name' => 'tara', - 'list_title' => 'Lista tari', - ], - 'state' => [ - 'name' => 'judet', - 'list_title' => 'Lista judete', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Pagina produs', - 'product_page_description' => 'Obțineti date pentru pagina produsului', - 'product_data_name' => 'Datele produselor', - 'product_data_description' => 'Obțineti date despre produs după ID', - 'product_list_name' => 'Lista produse', - 'product_list_description' => 'Obtineti lista de produse', - - //Brand components - 'brand_page_name' => 'Pagina marca', - 'brand_page_description' => 'Obtineti date pentru pagina marcii', - 'brand_data_name' => 'Data marci', - 'brand_data_description' => 'Obtineti date despre marca după ID', - 'brand_list_name' => 'Lista marcilor', - 'brand_list_description' => 'Obtineti lista de marci', - - //Promo block components - 'promo_block_page_name' => 'Pagina blocului promotional', - 'promo_block_page_description' => 'Obtineti date pentru pagina de bloc promotional', - 'promo_block_data_name' => 'Datele blocului promotional', - 'promo_block_data_description' => 'Obtineti date de blocare promotionala prin ID', - 'promo_block_list_name' => 'Lista blocurilor promotionale', - 'promo_block_list_description' => 'Obtineti lista de blocuri promotionale', - - //Category components - 'category_page_name' => 'Pagina categoriei', - 'category_page_description' => 'Obtineti date pentru pagina categoriei', - 'category_data_name' => 'Date de categorie', - 'category_data_description' => 'Obtineti date de categorie după ID', - 'category_list_name' => 'Lista categoriilor', - 'category_list_description' => 'Obtineti arborele categoriilor', - - //Currency components - 'currency_list_name' => 'Lista valute', - 'currency_list_description' => 'Descriere lista valute', - - //Common components - 'breadcrumbs_name' => 'Url-urile breadcrumbs', - 'breadcrumbs_description' => 'Gestioneaza data pentru catalog-ul url-urilor breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Sortare default', - 'sorting_no' => 'Fara sortare', - 'sorting_price_desc' => 'Scump', - 'sorting_price_asc' => 'Ieftin', - 'sorting_new' => 'Nou', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'Bine cotate', - 'sorting_rating_asc' => 'Prost cotate', - 'sorting_date_begin_asc' => 'Data de incepere (ASC)', - 'sorting_date_begin_desc' => 'Data de incepere (DESC)', - 'sorting_date_end_asc' => 'Data de sfarsit (ASC)', - 'sorting_date_end_desc' => 'Data de sfarsit (DESC)', - ], - 'permission' => [ - 'category' => 'Gestionați categorii', - 'brand' => 'Gestionați marci', - 'product' => 'Gestionați produse', - 'settings' => 'Gestionați setarile', - 'promo_block' => 'Gestionați blocurile promotionale', - 'currency' => 'Gestionați tipurile de valuta', - 'tax' => 'Gestionați tipurile de taxe', - 'price_type' => 'Gestionați tipurile de pret', - ], - 'message' => [ - 'import_additional_category_info' => 'Setati lista de categorii de produse suplimentare separate prin virgule.', - ], - 'button' => [ - 'import_offer_button' => 'Importeaza oferte din fiser CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/ru/lang.php b/plugins/lovata/shopaholic/lang/ru/lang.php deleted file mode 100644 index 359416798..000000000 --- a/plugins/lovata/shopaholic/lang/ru/lang.php +++ /dev/null @@ -1,221 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Бесплатный eCommerce-плагин с большим набором расширений.', - ], - 'field' => [ - 'vendor_code' => 'Артикул', - 'price' => 'Цена', - 'old_price' => 'Старая цена', - 'quantity' => 'Количество', - 'brand' => 'Бренд', - 'offer' => 'Товарные предложения', - 'currency' => 'Валюта', - 'check_offer_active' => 'Проверять наличие активных торговых предложений при получении списка активных товаров.', - 'allow_negative_offer_quantity' => 'Разрешить отрицательное количество предложений', - 'additional_category' => 'Дополнительные категории', - 'promo_block_type' => 'Промо-блок со списком товаров', - 'promo_block' => 'Промо-блок', - 'product_id' => 'ID товара', - 'rate' => 'Курс', - 'tax_is_global' => 'Налог будет применяться ко всем товарам', - 'tax_percent' => 'Процент налога', - 'tax' => 'Налог', - 'without_tax' => 'Без налога', - 'with_tax' => 'С налогом', - 'countries' => 'Страны', - 'states' => 'Регионы', - 'main_price_type' => 'Основная цена', - 'price_include_tax' => 'Цена включает в себя налоги', - 'discount_price' => 'Значение скидки', - 'measure' => 'Ед. измерения', - 'measure_of_unit' => 'Ед. измерения одной штуки', - 'quantity_in_unit' => 'Количество в одной штуке', - 'weight_measure' => 'Ед. измерения веса', - - 'hide_brand_import_from_csv' => 'Скрыть кнопку "Импорт из CSV" для брендов', - 'hide_brand_import_from_xml' => 'Скрыть кнопку "Импорт из XML" для брендов', - 'hide_category_import_from_csv' => 'Скрыть кнопку "Импорт из CSV" для категорий', - 'hide_category_import_from_xml' => 'Скрыть кнопку "Импорт из XML" для категорий', - 'hide_product_import_from_csv' => 'Скрыть кнопку "Импорт из CSV" для товаров', - 'hide_product_import_from_xml' => 'Скрыть кнопку "Импорт из XML" для товаров', - 'hide_offer_import_from_csv' => 'Скрыть кнопку "Импорт из CSV" для товарных предложений', - 'hide_offer_import_from_xml' => 'Скрыть кнопку "Импорт из XML" для товарных предложений', - 'hide_price_import_from_xml' => 'Скрыть кнопку "Импорт из XML" для цен', - ], - 'settings' => [ - 'formula_calculate_discount_from_price' => 'Формула подсчета скидки для цен с налогами', - 'formula_calculation_from_backend_price' => 'Скидка вычитается из заданной цены (по-умолчанию)', - 'formula_calculation_from_price_without_tax' => 'Скидка вычитается из цены без налога', - 'formula_calculation_from_price_with_tax' => 'Скидка вычитается из цены с налогом', - ], - 'menu' => [ - 'main' => 'Каталог', - 'categories' => 'Категории', - 'product' => 'Товары', - 'brands' => 'Бренды', - 'shop_catalog' => 'Каталог товаров', - 'shop_category' => 'Категория товаров', - 'all_shop_categories' => 'Все категории товаров', - 'promo_block' => 'Промо-блоки', - 'promo' => 'Промо-акции', - 'price_type' => 'Типы цен', - 'price_type_description' => 'Управление типами цен', - 'currency' => 'Валюта', - 'currency_description' => 'Управление валютами', - 'tax' => 'Налоги', - 'tax_description' => 'Управление налогами', - 'configuration' => 'Настройки каталога', - 'main_settings' => 'Основные параметры', - 'main_settings_description' => 'Основные параметры вашего каталога', - 'import_xml_file' => 'Импорт из XML', - 'import_xml_file_description' => 'Настройки импорта из XML файла', - 'measure' => 'Единицы измерения', - 'measure_description' => 'Управление единицами измерения', - 'measure_of_unit' => 'Ед. измерения одной штуки', - 'quantity_in_unit' => 'Количество в одной штуке', - ], - 'tab' => [ - 'offer' => 'Торговые предложения', - 'price' => 'Цены', - 'permissions' => 'Shopaholic', - 'settings' => 'Конфигурация каталога', - 'taxes' => 'Налоги', - 'import_from_xml' => 'Импорт из XML', - 'dimensions' => 'Габариты и вес', - ], - 'category' => [ - 'name' => 'категории', - 'list_title' => 'Список категорий', - 'import_title' => 'Импорт категорий', - 'export_title' => 'Экспорт категорий', - ], - 'brand' => [ - 'name' => 'бренда', - 'list_title' => 'Список брендов', - 'import_title' => 'Импорт брендов', - 'export_title' => 'Экспорт брендов', - ], - 'product' => [ - 'name' => 'товара', - 'list_title' => 'Список товаров', - 'import_title' => 'Импорт товаров', - 'export_title' => 'Экспорт товаров', - ], - 'offer' => [ - 'name' => 'торгового предложения', - 'list_title' => 'Список торговых предложений', - 'import_title' => 'Импорт торговых предложений', - 'export_title' => 'Экспорт торговых предложений', - ], - 'promo_block' => [ - 'name' => 'промо-блока', - 'list_title' => 'Список промо-блоков', - ], - 'price_type' => [ - 'name' => 'типа цен', - 'list_title' => 'Список типов цен', - ], - 'currency' => [ - 'name' => 'валюты', - 'list_title' => 'Список валют', - ], - 'tax' => [ - 'name' => 'налога', - 'list_title' => 'Список налогов', - ], - 'country' => [ - 'name' => 'страны', - 'list_title' => 'Список стран', - ], - 'state' => [ - 'name' => 'региона', - 'list_title' => 'Список регионов', - ], - 'measure' => [ - 'name' => 'ед. измерения', - 'list_title' => 'Список ед. измерения', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Страница товара', - 'product_page_description' => 'Получить данные для страницы товара', - 'product_data_name' => 'Данные товара', - 'product_data_description' => 'Получить данные товара по ID', - 'product_list_name' => 'Список товаров', - 'product_list_description' => 'Получить список товаров', - - //Brand components - 'brand_page_name' => 'Страница бренда', - 'brand_page_description' => 'Получить данные для страницы бренда', - 'brand_data_name' => 'Данные бренда', - 'brand_data_description' => 'Получить данные бренда по ID', - 'brand_list_name' => 'Список брендов', - 'brand_list_description' => 'Получить список брендов', - - //Promo block components - 'promo_block_page_name' => 'Страница промо-блока', - 'promo_block_page_description' => 'Получить данные для страницы промо-блока', - 'promo_block_data_name' => 'Данные промо-блока', - 'promo_block_data_description' => 'Получить данные промо-блока по ID', - 'promo_block_list_name' => 'Список промо-блоков', - 'promo_block_list_description' => 'Получить список промо-блоков', - - //Category components - 'category_page_name' => 'Страница категории', - 'category_page_description' => 'Получить данные для страницы категории', - 'category_data_name' => 'Данные категории', - 'category_data_description' => 'Получить данные категории по ID', - 'category_list_name' => 'Список категорий', - 'category_list_description' => 'Получить дерево категорий', - - //Currency components - 'currency_list_name' => 'Список валют', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Хлебные крошки', - 'breadcrumbs_description' => 'Получить данные для формирования хлебных крошек каталога', - - //Components settings - 'product_list_sorting' => 'Сортировка по умолчанию', - 'sorting_no' => 'Без сортировки', - 'sorting_price_desc' => 'Дорогие', - 'sorting_price_asc' => 'Дешёвые', - 'sorting_new' => 'Новые', - 'sorting_popularity_desc' => 'Популярные', - 'sorting_rating_desc' => 'Высокий рейтинг', - 'sorting_rating_asc' => 'Низкий рейтинг', - 'sorting_date_begin_asc' => 'Дата начала (ASC)', - 'sorting_date_begin_desc' => 'Дата начала (DESC)', - 'sorting_date_end_asc' => 'Дата окончания (ASC)', - 'sorting_date_end_desc' => 'Дата окончания (DESC)', - ], - 'permission' => [ - 'category' => 'Управление категориями', - 'brand' => 'Управление брендами', - 'product' => 'Управление товарами', - 'settings' => 'Управление настройками', - 'promo_block' => 'Управление промо-блоками', - 'currency' => 'Управление валютами', - 'tax' => 'Управление налогами', - 'price_type' => 'Управление типами цен', - 'import_xml_file' => 'Управление настройками импорта из XML файла', - 'measure' => 'Управление ед. измерения', - ], - 'message' => [ - 'import_additional_category_info' => 'Укажите через запятую список дополнительных категорий товаров.', - 'import_from_xml_files_is_disabled' => 'Импорт из XML файлов отключен.', - 'import_from_xml_info' => '

Вы можите использовать синтаксис XPath для задания пути к элементам.

', - ], - 'button' => [ - 'import_offer_button' => 'Импортировать предложения из CSV', - 'import_offer_from_xml' => 'Импортировать предложения из XML', - 'import_price_from_xml' => 'Импортировать цены из XML', - ], - 'widget' => [ - 'import_from_xml_files' => 'Импорт из XML файла', - 'import_from_csv_files' => 'Импорт из CSV файла', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/sk/lang.php b/plugins/lovata/shopaholic/lang/sk/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/sk/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/sv/lang.php b/plugins/lovata/shopaholic/lang/sv/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/sv/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/tr/lang.php b/plugins/lovata/shopaholic/lang/tr/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/tr/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/uk/lang.php b/plugins/lovata/shopaholic/lang/uk/lang.php deleted file mode 100644 index a6c6d327a..000000000 --- a/plugins/lovata/shopaholic/lang/uk/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Безкоштовний eCommerce-плагін з великим набором розширень.', - ], - 'field' => [ - 'vendor_code' => 'Артикул', - 'price' => 'Ціна', - 'old_price' => 'Стара ціна', - 'quantity' => 'Кількість', - 'brand' => 'Бренд', - 'offer' => 'Торгові пропозиції', - 'currency' => 'Валюта', - 'check_offer_active' => 'Перевіряти наявність активних пропозицій при отриманні списку активних товарів', - 'additional_category' => 'Додаткові категорії', - 'promo_block_type' => 'Промо-блок зі списком товарів', - 'promo_block' => 'Промо-блок', - 'product_id' => 'ID товару', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Каталог', - 'categories' => 'Категорії', - 'product' => 'Товари', - 'brands' => 'Бренди', - 'shop_catalog' => 'Каталог товарів', - 'shop_category' => 'Категорія товарів', - 'all_shop_categories' => 'Всі категорії товарів', - 'promo_block' => 'Промо-блоки', - 'promo' => 'Промо-акції', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Торгові пропозиції', - 'price' => 'Ціни', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'категорії', - 'list_title' => 'Список категорій', - 'import_title' => 'Імпорт категорій', - 'export_title' => 'Експорт категорій', - ], - 'brand' => [ - 'name' => 'бренду', - 'list_title' => 'Список брендів', - 'import_title' => 'Імпорт брендів', - 'export_title' => 'Експорт брендів', - ], - 'product' => [ - 'name' => 'товару', - 'list_title' => 'Список товарів', - 'import_title' => 'Імпорт товарів', - 'export_title' => 'Експорт товарів', - ], - 'offer' => [ - 'name' => 'торгової пропозиції', - 'list_title' => 'Список торгових пропозицій', - 'import_title' => 'Імпорт торгових пропозицій', - 'export_title' => 'Експорт торгових пропозицій', - ], - 'promo_block' => [ - 'name' => 'промо-блоку', - 'list_title' => 'Список промо-блоків', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Сторінка товару', - 'product_page_description' => 'Отримати дані для сторінки товару', - 'product_data_name' => 'Дані товару', - 'product_data_description' => 'Отримати дані товару по ID', - 'product_list_name' => 'Список товарів', - 'product_list_description' => 'Отримати список товарів', - - //Brand components - 'brand_page_name' => 'Сторінка бренда', - 'brand_page_description' => 'Отримати дані для сторінки бренда', - 'brand_data_name' => 'Дані бренда', - 'brand_data_description' => 'Отримати дані бренду за ID', - 'brand_list_name' => 'Список брендів', - 'brand_list_description' => 'Отримати список брендів', - - //Promo block components - 'promo_block_page_name' => 'Сторінка промо-блоку', - 'promo_block_page_description' => 'Отримати дані для сторінки промо-блоку', - 'promo_block_data_name' => 'Дані промо-блоку', - 'promo_block_data_description' => 'Отримати дані промо-блоку за ID', - 'promo_block_list_name' => 'Список промо-блоків', - 'promo_block_list_description' => 'Отримати список промо-блоків', - - //Category components - 'category_page_name' => 'Сторінка категорії', - 'category_page_description' => 'Отримати дані для сторінки категорії', - 'category_data_name' => 'Дані категорії', - 'category_data_description' => 'Отримати дані категорії по ID', - 'category_list_name' => 'Список категорій', - 'category_list_description' => 'Отримати дерево категорій', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Хлібні крихти', - 'breadcrumbs_description' => 'Отримати дані для формування хлібних крихт каталогу', - - //Components settings - 'product_list_sorting' => 'Сортування за замовчуванням', - 'sorting_no' => 'Без сортування', - 'sorting_price_desc' => 'Дорогі', - 'sorting_price_asc' => 'Дешеві', - 'sorting_new' => 'Нові', - 'sorting_popularity_desc' => 'Популярні', - 'sorting_rating_desc' => 'Високий рейтинг', - 'sorting_rating_asc' => 'Низький рейтинг', - 'sorting_date_begin_asc' => 'Дата початку (ASC)', - 'sorting_date_begin_desc' => 'Дата початку (DESC)', - 'sorting_date_end_asc' => 'Дата завершення (ASC)', - 'sorting_date_end_desc' => 'Дата завершення (DESC)', - ], - 'permission' => [ - 'category' => 'Управління категоріями', - 'brand' => 'Управління брендами', - 'product' => 'Управління товарами', - 'settings' => 'Управління налаштуваннями', - 'promo_block' => 'Управління промо-блоками', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Вкажіть через кому список додаткових категорій товарів.', - ], - 'button' => [ - 'import_offer_button' => 'Імпортувати пропозиції з CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/vi/lang.php b/plugins/lovata/shopaholic/lang/vi/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/vi/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/lang/zh/lang.php b/plugins/lovata/shopaholic/lang/zh/lang.php deleted file mode 100644 index ca3031f60..000000000 --- a/plugins/lovata/shopaholic/lang/zh/lang.php +++ /dev/null @@ -1,178 +0,0 @@ - [ - 'name' => 'Shopaholic', - 'description' => '🛍️ Free eCommerce plugin with a large set of extensions.', - ], - 'field' => [ - 'vendor_code' => 'Vendor code', - 'price' => 'Price', - 'old_price' => 'Old price', - 'quantity' => 'Quantity', - 'brand' => 'Brand', - 'offer' => 'Offers', - 'currency' => 'Currency', - 'check_offer_active' => 'When you receive a list of active products, check for active offers', - 'additional_category' => 'Additional categories', - 'promo_block_type' => 'Promo block with product list', - 'promo_block' => 'Promo block', - 'product_id' => 'Product ID', - 'rate' => 'Rate', - 'tax_is_global' => 'Tax will apply to all products', - 'tax_percent' => 'Tax percent', - 'tax' => 'Tax', - 'without_tax' => 'Without tax', - 'with_tax' => 'With tax', - 'countries' => 'Countries', - 'states' => 'States', - 'main_price_type' => 'Main price', - 'price_include_tax' => 'Price includes taxes', - 'discount_price' => 'Discount price', - ], - 'menu' => [ - 'main' => 'Catalog', - 'categories' => 'Categories', - 'product' => 'Products', - 'brands' => 'Brands', - 'shop_catalog' => 'Product catalog', - 'shop_category' => 'Product category', - 'all_shop_categories' => 'All categories of products', - 'promo_block' => 'Promo blocks', - 'promo' => 'Promotions', - 'price_type' => 'Price types', - 'price_type_description' => 'Manage price types', - 'currency' => 'Currency', - 'currency_description' => 'Manage currencies', - 'tax' => 'Taxes', - 'tax_description' => 'Manage taxes', - 'configuration' => 'Catalog settings', - 'main_settings' => 'Basic settings', - 'main_settings_description' => 'Basic settings of your catalog', - ], - 'tab' => [ - 'offer' => 'Trade offers', - 'price' => 'Prices', - 'permissions' => 'Shopaholic', - 'settings' => 'Catalog configuration', - 'taxes' => 'Taxes', - ], - 'category' => [ - 'name' => 'category', - 'list_title' => 'Category list', - 'import_title' => 'Import categories', - 'export_title' => 'Export categories', - ], - 'brand' => [ - 'name' => 'brand', - 'list_title' => 'Brand list', - 'import_title' => 'Import brands', - 'export_title' => 'Export brands', - ], - 'product' => [ - 'name' => 'product', - 'list_title' => 'Product list', - 'import_title' => 'Import products', - 'export_title' => 'Export products', - ], - 'offer' => [ - 'name' => 'offer', - 'list_title' => 'Offer list', - 'import_title' => 'Import offers', - 'export_title' => 'Export offers', - ], - 'promo_block' => [ - 'name' => 'promo block', - 'list_title' => 'Promo block list', - ], - 'price_type' => [ - 'name' => 'price type', - 'list_title' => 'Price type list', - ], - 'currency' => [ - 'name' => 'currency', - 'list_title' => 'Currency list', - ], - 'tax' => [ - 'name' => 'tax', - 'list_title' => 'Tax list', - ], - 'country' => [ - 'name' => 'country', - 'list_title' => 'Country list', - ], - 'state' => [ - 'name' => 'state', - 'list_title' => 'State list', - ], - 'component' => [ - - //Product components - 'product_page_name' => 'Product page', - 'product_page_description' => 'Get data for product page', - 'product_data_name' => 'Product data', - 'product_data_description' => 'Get product data by ID', - 'product_list_name' => 'Product list', - 'product_list_description' => 'Get product list', - - //Brand components - 'brand_page_name' => 'Brand page', - 'brand_page_description' => 'Get data for brand page', - 'brand_data_name' => 'Brand data', - 'brand_data_description' => 'Get brand data by ID', - 'brand_list_name' => 'Brand list', - 'brand_list_description' => 'Get brand list', - - //Promo block components - 'promo_block_page_name' => 'Promo block page', - 'promo_block_page_description' => 'Get data for promo block page', - 'promo_block_data_name' => 'Promo block data', - 'promo_block_data_description' => 'Get promo block data by ID', - 'promo_block_list_name' => 'Promo block list', - 'promo_block_list_description' => 'Get promo block list', - - //Category components - 'category_page_name' => 'Category page', - 'category_page_description' => 'Get data for category page', - 'category_data_name' => 'Category data', - 'category_data_description' => 'Get category data by ID', - 'category_list_name' => 'Category list', - 'category_list_description' => 'Get category tree', - - //Currency components - 'currency_list_name' => 'Currency list', - 'currency_list_description' => '', - - //Common components - 'breadcrumbs_name' => 'Breadcrumbs', - 'breadcrumbs_description' => 'Get data for catalog breadcrumbs', - - //Components settings - 'product_list_sorting' => 'Default sorting', - 'sorting_no' => 'Without sorting', - 'sorting_price_desc' => 'Expensive', - 'sorting_price_asc' => 'Cheap', - 'sorting_new' => 'New', - 'sorting_popularity_desc' => 'Popular', - 'sorting_rating_desc' => 'High rating', - 'sorting_rating_asc' => 'Low rating', - 'sorting_date_begin_asc' => 'Date begin (ASC)', - 'sorting_date_begin_desc' => 'Date begin (DESC)', - 'sorting_date_end_asc' => 'Date end (ASC)', - 'sorting_date_end_desc' => 'Date end (DESC)', - ], - 'permission' => [ - 'category' => 'Manage categories', - 'brand' => 'Manage brands', - 'product' => 'Manage products', - 'settings' => 'Manage settings', - 'promo_block' => 'Manage promo blocks', - 'currency' => 'Manage currencies', - 'tax' => 'Manage taxes', - 'price_type' => 'Manage price types', - ], - 'message' => [ - 'import_additional_category_info' => 'Set the list of additional product categories separated by commas.', - ], - 'button' => [ - 'import_offer_button' => 'Import offers from CSV', - ], -]; diff --git a/plugins/lovata/shopaholic/models/Brand.php b/plugins/lovata/shopaholic/models/Brand.php deleted file mode 100644 index 8bf1f3841..000000000 --- a/plugins/lovata/shopaholic/models/Brand.php +++ /dev/null @@ -1,173 +0,0 @@ - 'required', - 'slug' => 'required|unique:lovata_shopaholic_brands', - ]; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - 'slug' => 'lovata.toolbox::lang.field.slug', - ]; - - public $slugs = ['slug' => 'name']; - - public $attachOne = [ - 'preview_image' => 'System\Models\File', - 'icon' => 'System\Models\File', - 'import_file' => [\System\Models\File::class, 'public' => false], - ]; - public $attachMany = ['images' => 'System\Models\File']; - public $hasMany = ['product' => Product::class]; - public $belongsToMany = []; - public $morphMany = []; - public $belongsTo = []; - - public $dates = ['created_at', 'updated_at']; - - public $appends = []; - public $purgeable = []; - - public $fillable = [ - 'active', - 'name', - 'slug', - 'code', - 'external_id', - 'preview_text', - 'description', - ]; - - public $cached = [ - 'id', - 'name', - 'slug', - 'code', - 'preview_text', - 'preview_image', - 'icon', - 'description', - 'images', - ]; - - public $visible = []; - public $hidden = []; - - /** - * Before validate event handler - */ - public function beforeValidate() - { - if (empty($this->slug)) { - $this->slugAttributes(); - } - } - - /** - * Import item list from CSV file - * @param array $arElementList - * @param null $sSessionKey - * @throws \Throwable - */ - public function importData($arElementList, $sSessionKey = null) - { - if (empty($arElementList)) { - return; - } - - $obImport = new ImportBrandModelFromCSV(); - $obImport->setDeactivateFlag(); - - foreach ($arElementList as $iKey => $arImportData) { - $obImport->import($arImportData); - $sResultMethod = $obImport->getResultMethod(); - if (in_array($sResultMethod, ['logUpdated', 'logCreated'])) { - $this->$sResultMethod(); - } else { - $sErrorMessage = $obImport->getResultError(); - $this->$sResultMethod($iKey, $sErrorMessage); - } - } - - $obImport->deactivateElements(); - } -} diff --git a/plugins/lovata/shopaholic/models/Category.php b/plugins/lovata/shopaholic/models/Category.php deleted file mode 100644 index 555f7b2d1..000000000 --- a/plugins/lovata/shopaholic/models/Category.php +++ /dev/null @@ -1,217 +0,0 @@ - 'required', - 'slug' => 'required|unique:lovata_shopaholic_categories', - ]; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - 'slug' => 'lovata.toolbox::lang.field.slug', - ]; - - public $slugs = ['slug' => 'name']; - - public $attachOne = [ - 'preview_image' => 'System\Models\File', - 'icon' => 'System\Models\File', - 'import_file' => [\System\Models\File::class, 'public' => false], - ]; - public $attachMany = ['images' => 'System\Models\File']; - - public $belongsTo = []; - public $belongsToMany = [ - 'product_link' => [ - Product::class, - 'table' => 'lovata_shopaholic_additional_categories', - ], - ]; - public $hasMany = ['product' => Product::class]; - - public $appends = []; - public $purgeable = []; - public $fillable = [ - 'active', - 'name', - 'slug', - 'code', - 'external_id', - 'preview_text', - 'description', - ]; - - public $cached = [ - 'id', - 'name', - 'slug', - 'code', - 'preview_text', - 'description', - 'parent_id', - 'preview_image', - 'icon', - 'images', - 'updated_at', - ]; - - public $dates = ['created_at', 'updated_at']; - public $casts = []; - - public $visible = []; - public $hidden = []; - - /** - * Before validate event handler - */ - public function beforeValidate() - { - if (empty($this->slug)) { - $this->slugAttributes(); - } - } - - /** - * Get by parent ID - * @param Category $obQuery - * @param string $sData - * @return Category - */ - public function scopeGetByParentID($obQuery, $sData) - { - return $obQuery->where('parent_id', $sData); - } - - /** - * Import item list from CSV file - * @param array $arElementList - * @param null $sSessionKey - * @throws \Throwable - */ - public function importData($arElementList, $sSessionKey = null) - { - if (empty($arElementList)) { - return; - } - - $obImport = new ImportCategoryModelFromCSV(); - $obImport->setDeactivateFlag(); - - foreach ($arElementList as $iKey => $arImportData) { - $obImport->import($arImportData); - $sResultMethod = $obImport->getResultMethod(); - if (in_array($sResultMethod, ['logUpdated', 'logCreated'])) { - $this->$sResultMethod(); - } else { - $sErrorMessage = $obImport->getResultError(); - $this->$sResultMethod($iKey, $sErrorMessage); - } - } - - $obImport->deactivateElements(); - } -} diff --git a/plugins/lovata/shopaholic/models/Currency.php b/plugins/lovata/shopaholic/models/Currency.php deleted file mode 100644 index 744c9909f..000000000 --- a/plugins/lovata/shopaholic/models/Currency.php +++ /dev/null @@ -1,162 +0,0 @@ - 'required', - 'symbol' => 'required', - 'code' => 'required|unique:lovata_shopaholic_currency', - ]; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - 'code' => 'lovata.toolbox::lang.field.code', - 'symbol' => 'lovata.shopaholic::lang.field.currency_symbol', - ]; - - public $attachOne = []; - public $attachMany = []; - public $hasMany = []; - public $belongsTo = []; - public $belongsToMany = []; - public $morphMany = []; - - public $dates = ['created_at', 'updated_at', 'deleted_at']; - - public $appends = []; - public $purgeable = []; - - public $fillable = [ - 'active', - 'is_default', - 'name', - 'code', - 'symbol', - 'rate', - 'external_id', - 'sort_order', - ]; - - public $cached = [ - 'id', - 'is_default', - 'name', - 'code', - 'rate', - 'symbol', - ]; - - public $visible = []; - public $hidden = []; - - /** - * Check, currency is active - * @return bool - */ - public function isActive() - { - $bResult = $this->code == CurrencyHelper::instance()->getActiveCurrencyCode(); - - return $bResult; - } - - /** - * After save model event - */ - public function afterSave() - { - if ($this->is_default && !$this->getOriginal('is_default')) { - $this->disableDefaultCurrency(); - } - } - - /** - * Get element with is_default flag == true - * @param Currency $obQuery - * @return Currency - */ - public function scopeIsDefault($obQuery) - { - return $obQuery->where('is_default', true); - } - - /** - * Set rate attribute - * @param string $sValue - */ - protected function setRateAttribute($sValue) - { - $this->attributes['rate'] = PriceHelper::toFloat($sValue); - } - - /** - * Disable default currency, because only one can be an active currency - */ - protected function disableDefaultCurrency() - { - $obCurrencyList = Currency::isDefault()->get(); - if ($obCurrencyList->isEmpty()) { - return; - } - - /** @var Currency $obCurrency */ - foreach ($obCurrencyList as $obCurrency) { - if ($obCurrency->id == $this->id) { - continue; - } - - $obCurrency->is_default = false; - $obCurrency->save(); - } - } -} diff --git a/plugins/lovata/shopaholic/models/Measure.php b/plugins/lovata/shopaholic/models/Measure.php deleted file mode 100644 index 809e1154b..000000000 --- a/plugins/lovata/shopaholic/models/Measure.php +++ /dev/null @@ -1,59 +0,0 @@ - 'required', - ]; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - ]; - - public $dates = ['created_at', 'updated_at']; - - public $hasMany = []; - - public $fillable = [ - 'name', - 'code', - ]; - - public $cached = [ - 'id', - 'name', - 'code', - ]; -} diff --git a/plugins/lovata/shopaholic/models/Offer.php b/plugins/lovata/shopaholic/models/Offer.php deleted file mode 100644 index 400166742..000000000 --- a/plugins/lovata/shopaholic/models/Offer.php +++ /dev/null @@ -1,598 +0,0 @@ - 'required']; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - ]; - - public $attachOne = [ - 'preview_image' => 'System\Models\File', - 'import_file' => [\System\Models\File::class, 'public' => false], - ]; - public $attachMany = ['images' => 'System\Models\File']; - public $belongsTo = [ - 'product' => [Product::class], - 'measure_of_unit' => [Measure::class, 'key' => 'measure_of_unit_id', 'order' => 'name asc'], - 'measure' => [Measure::class, 'order' => 'name asc'], - ]; - public $morphMany = [ - 'price_link' => [ - Price::class, - 'name' => 'item', - 'conditions' => 'price_type_id is NOT NULL', - ], - ]; - public $morphOne = [ - 'main_price' => [ - Price::class, - 'name' => 'item', - 'conditions' => 'price_type_id is NULL', - ], - ]; - public $belongsToMany = []; - - public $fillable = [ - 'active', - 'name', - 'code', - 'product_id', - 'external_id', - 'price', - 'old_price', - 'price_list', - 'quantity', - 'preview_text', - 'description', - 'weight', - 'height', - 'length', - 'width', - 'measure_of_unit_id', - 'measure_id', - 'quantity_in_unit', - ]; - - public $cached = [ - 'id', - 'active', - 'product_id', - 'name', - 'code', - 'preview_text', - 'preview_image', - 'description', - 'images', - 'price_list', - 'quantity', - 'weight', - 'height', - 'length', - 'width', - 'measure_of_unit_id', - 'measure_id', - 'quantity_in_unit', - ]; - - public $dates = ['created_at', 'updated_at', 'deleted_at']; - public $appends = [ - 'price', - 'price_value', - 'old_price', - 'old_price_value', - 'discount_price', - 'discount_price_value', - 'price_list', - ]; - public $purgeable = []; - public $casts = []; - - public $arPriceField = ['price', 'old_price', 'discount_price']; - - public $visible = []; - public $hidden = []; - - protected $fSavedPrice = null; - protected $fSavedOldPrice = null; - protected $arSavedPriceList = []; - protected $iActivePriceType = null; - protected $sActiveCurrency = null; - - /** - * Set active price type - * @param int $iPriceTypeID - * @return Offer - */ - public function setActivePriceType($iPriceTypeID) - { - $this->iActivePriceType = $iPriceTypeID; - - return $this; - } - - /** - * Set active currency code - * @param string $sActiveCurrencyCode - * @return Offer - */ - public function setActiveCurrency($sActiveCurrencyCode) - { - $this->sActiveCurrency = $sActiveCurrencyCode; - - return $this; - } - - /** - * Get price object - * @param int $iPriceTypeID - * @return \Illuminate\Database\Eloquent\Model|Price|null - */ - public function getPriceObject($iPriceTypeID = null) - { - if (empty($iPriceTypeID)) { - $obPriceModel = $this->main_price; - } else { - $obPriceModel = $this->price_link->where('price_type_id', $iPriceTypeID)->first(); - } - - return $obPriceModel; - } - - /** - * After save model event - */ - public function afterSave() - { - $this->savePriceValue(null, $this->fSavedPrice, $this->fSavedOldPrice); - $this->savePriceListValue(); - - //Clear relations with old prices and saved values - $this->reloadRelations('main_price'); - $this->reloadRelations('price_link'); - $this->fSavedPrice = null; - $this->fSavedOldPrice = null; - } - - /** - * Get element by product ID - * @param Offer $obQuery - * @param string $sData - * - * @return Offer - */ - public function scopeGetByProduct($obQuery, $sData) - { - if (!empty($sData)) { - $obQuery->where('product_id', $sData); - } - - return $obQuery; - } - - /** - * Get by quantity - * @param Offer $obQuery - * @param string $sData - * @param string $sCondition - * - * @return Offer - */ - public function scopeGetByQuantity($obQuery, $sData, $sCondition = '=') - { - if (empty($sData)) { - $sData = 0; - } - - if (!empty($sCondition)) { - $obQuery->where('quantity', $sCondition, $sData); - } - - return $obQuery; - } - - /** - * Import item list from CSV file - * @param array $arElementList - * @param null $sSessionKey - * @throws \Throwable - */ - public function importData($arElementList, $sSessionKey = null) - { - if (empty($arElementList)) { - return; - } - - $obImport = new ImportOfferModelFromCSV(); - $obImport->setDeactivateFlag(); - - foreach ($arElementList as $iKey => $arImportData) { - $obImport->import($arImportData); - $sResultMethod = $obImport->getResultMethod(); - if (in_array($sResultMethod, ['logUpdated', 'logCreated'])) { - $this->$sResultMethod(); - } else { - $sErrorMessage = $obImport->getResultError(); - $this->$sResultMethod($iKey, $sErrorMessage); - } - } - - $obImport->deactivateElements(); - } - - /** - * Get active price type - * @return int|null - */ - public function getActivePriceType() - { - return $this->iActivePriceType; - } - - /** - * Get active currency code - * @return int|null - */ - public function getActiveCurrency() - { - return $this->sActiveCurrency; - } - - /** - * Get price_value attribute - * @return float - */ - protected function getPriceValueAttribute() - { - if ($this->fSavedPrice !== null) { - $fPrice = $this->fSavedPrice; - } else { - $obPriceModel = $this->getPriceObject($this->getActivePriceType()); - $this->setActivePriceType(null); - - if (empty($obPriceModel)) { - return 0; - } - - $fPrice = $obPriceModel->price_value; - } - - $fPrice = CurrencyHelper::instance()->convert($fPrice, $this->getActiveCurrency()); - - return $fPrice; - } - - /** - * Get old_price_value attribute - * @return float - */ - protected function getOldPriceValueAttribute() - { - if ($this->fSavedOldPrice !== null) { - $fPrice = $this->fSavedOldPrice; - } else { - $obPriceModel = $this->getPriceObject($this->getActivePriceType()); - $this->setActivePriceType(null); - - if (empty($obPriceModel)) { - return 0; - } - - $fPrice = $obPriceModel->old_price_value; - } - - $fPrice = CurrencyHelper::instance()->convert($fPrice, $this->getActiveCurrency()); - $this->setActiveCurrency(null); - - return $fPrice; - } - - /** - * Get discount_price_value attribute - * @return float - */ - protected function getDiscountPriceValueAttribute() - { - $obPriceModel = $this->getPriceObject($this->getActivePriceType()); - $this->setActivePriceType(null); - - if (empty($obPriceModel)) { - return 0; - } - - $fPrice = $obPriceModel->discount_price_value; - $fPrice = CurrencyHelper::instance()->convert($fPrice, $this->getActiveCurrency()); - - return $fPrice; - } - - /** - * Get price_list attribute - * @return array - */ - protected function getPriceListAttribute() - { - $arResult = []; - - foreach ($this->price_link as $obPrice) { - $arResult[$obPrice->price_type_id] = [ - 'price' => $obPrice->price_value, - 'old_price' => $obPrice->old_price_value, - ]; - } - - return $arResult; - } - - /** - * Set price attribute - * Create or update Price model object - * @param string|float $sValue - */ - protected function setPriceAttribute($sValue) - { - $this->fSavedPrice = PriceHelper::toFloat($sValue); - } - - /** - * Set old price attribute - * Create or update Price model object - * @param string|float $sValue - */ - protected function setOldPriceAttribute($sValue) - { - $this->fSavedOldPrice = PriceHelper::toFloat($sValue); - } - - /** - * Set price list attribute - * Create or update Price model object - * @param string|float $arPriceList - */ - protected function setPriceListAttribute($arPriceList) - { - if (empty($arPriceList) || !is_array($arPriceList)) { - return; - } - - if (isset($arPriceList[0])) { - $this->fSavedPrice = PriceHelper::toFloat(array_get($arPriceList[0], 'price')); - $this->fSavedOldPrice = PriceHelper::toFloat(array_get($arPriceList[0], 'old_price')); - unset($arPriceList[0]); - } - - $this->arSavedPriceList = $arPriceList; - } - - /** - * Get tax_percent attribute value - * @return float - */ - protected function getTaxPercentAttribute() - { - $obOfferItem = OfferItem::make($this->id, $this); - - return $obOfferItem->tax_percent; - } - - /** - * Set quantity attribute value - * @param int $iQuantity - */ - protected function setQuantityAttribute($iQuantity) - { - $bAllowNegativeOfferQuantity = (bool) Settings::getValue('allow_negative_offer_quantity'); - - $iQuantity = (int) $iQuantity; - if (empty($iQuantity) || ($iQuantity < 0 && !$bAllowNegativeOfferQuantity)) { - $iQuantity = 0; - } - - $this->attributes['quantity'] = $iQuantity; - } - - /** - * Set quantity_in_unit attribute value - * @param int $iQuantity - */ - protected function setQuantityInUnitAttribute($sQuantity) - { - $fQuantity = (float) PriceHelper::toFloat($sQuantity); - if (empty($fQuantity) || $fQuantity < 0) { - $fQuantity = 0; - } - - $this->attributes['quantity_in_unit'] = $fQuantity; - } - - /** - * Create or update main price object - * @param int|null $iPriceTypeID - * @param float $fPrice - * @param float $fOldPrice - */ - protected function savePriceValue($iPriceTypeID, $fPrice, $fOldPrice) - { - $obPriceModel = $this->getPriceObject($iPriceTypeID); - if (empty($obPriceModel)) { - $obPriceModel = Price::create([ - 'item_id' => $this->id, - 'item_type' => static::class, - 'price' => $fPrice, - 'old_price' => $fOldPrice, - 'price_type_id' => $iPriceTypeID, - ]); - - if (empty($iPriceTypeID)) { - $this->main_price = $obPriceModel; - } else { - $this->price_link()->add($obPriceModel); - } - } else { - $obPriceModel->price = $fPrice !== null ? $fPrice : $obPriceModel->price; - $obPriceModel->old_price = $fOldPrice !== null ? $fOldPrice : $obPriceModel->old_price; - $obPriceModel->save(); - } - } - - /** - * Save additional price list - */ - protected function savePriceListValue() - { - if (empty($this->arSavedPriceList)) { - return; - } - - foreach ($this->arSavedPriceList as $iPriceTypeID => $arPriceData) { - if (empty($iPriceTypeID)) { - continue; - } - - $this->savePriceValue($iPriceTypeID, array_get($arPriceData, 'price'), array_get($arPriceData, 'old_price')); - } - } -} diff --git a/plugins/lovata/shopaholic/models/Price.php b/plugins/lovata/shopaholic/models/Price.php deleted file mode 100644 index 8dadd1853..000000000 --- a/plugins/lovata/shopaholic/models/Price.php +++ /dev/null @@ -1,146 +0,0 @@ - 'required', - 'item_type' => 'required', - ]; - - public $attributeNames = []; - - public $attachOne = []; - public $attachMany = []; - public $hasMany = []; - public $belongsTo = [ - 'price_type' => [PriceType::class], - ]; - public $belongsToMany = []; - public $morphTo = [ - 'item' => [], - ]; - public $morphMany = []; - - public $dates = ['created_at', 'updated_at']; - - public $appends = []; - public $purgeable = []; - - public $arPriceField = ['price', 'old_price', 'discount_price']; - - public $fillable = [ - 'item_id', - 'item_type', - 'price', - 'discount_price', - 'old_price', - 'price_type_id', - ]; - - public $visible = []; - public $hidden = []; - - /** - * Get by item id - * @param Offer $obQuery - * @param int $sData - * - * @return Offer - */ - public function scopeGetByItemID($obQuery, $sData) - { - if (!empty($sData)) { - $obQuery->where('item_id', $sData); - } - - return $obQuery; - } - - /** - * Get by item type - * @param Offer $obQuery - * @param int $sData - * - * @return Offer - */ - public function scopeGetByItemType($obQuery, $sData) - { - if (!empty($sData)) { - $obQuery->where('item_type', $sData); - } - - return $obQuery; - } - - /** - * Get by price type ID - * @param Offer $obQuery - * @param int $sData - * - * @return Offer - */ - public function scopeGetByPriceType($obQuery, $sData) - { - if (!empty($sData)) { - $obQuery->where('price_type_id', $sData); - } else { - $obQuery->whereNull('price_type_id'); - } - - return $obQuery; - } - - /** - * Get discount_price_value attribute - * @return float - */ - protected function getDiscountPriceValueAttribute() - { - $fPrice = 0; - if ($this->old_price_value > 0) { - $fPrice = PriceHelper::round($this->old_price_value - $this->price_value); - } - - return $fPrice; - } -} diff --git a/plugins/lovata/shopaholic/models/PriceType.php b/plugins/lovata/shopaholic/models/PriceType.php deleted file mode 100644 index c0e3277cd..000000000 --- a/plugins/lovata/shopaholic/models/PriceType.php +++ /dev/null @@ -1,91 +0,0 @@ - 'required', - 'code' => 'required|unique:lovata_shopaholic_price_types', - ]; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - 'code' => 'lovata.toolbox::lang.field.code', - ]; - - public $attachOne = []; - public $attachMany = []; - public $hasMany = []; - public $belongsTo = [ - 'currency' => [Currency::class], - ]; - public $belongsToMany = []; - public $morphMany = []; - - public $dates = ['created_at', 'updated_at', 'deleted_at']; - - public $appends = []; - public $purgeable = []; - - public $fillable = [ - 'active', - 'name', - 'code', - 'external_id', - 'sort_order', - ]; - - public $cached = [ - 'id', - 'name', - 'code', - ]; - - public $visible = []; - public $hidden = []; -} diff --git a/plugins/lovata/shopaholic/models/Product.php b/plugins/lovata/shopaholic/models/Product.php deleted file mode 100644 index 7a99f2a73..000000000 --- a/plugins/lovata/shopaholic/models/Product.php +++ /dev/null @@ -1,296 +0,0 @@ - 'required', - 'slug' => 'required|unique:lovata_shopaholic_products', - ]; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - 'slug' => 'lovata.toolbox::lang.field.slug', - ]; - - public $slugs = ['slug' => 'name']; - - public $attachOne = [ - 'preview_image' => 'System\Models\File', - 'import_file' => [\System\Models\File::class, 'public' => false], - ]; - public $attachMany = ['images' => 'System\Models\File']; - public $hasMany = ['offer' => [Offer::class]]; - public $belongsTo = [ - 'category' => [Category::class], - 'brand' => [Brand::class], - ]; - public $belongsToMany = [ - 'additional_category' => [ - Category::class, - 'table' => 'lovata_shopaholic_additional_categories', - ], - 'promo_block' => [ - PromoBlock::class, - 'table' => 'lovata_shopaholic_promo_block_relation', - 'otherKey' => 'promo_id', - ], - ]; - - public $morphMany = []; - - public $appends = []; - public $purgeable = []; - public $nullable = []; - public $fillable = [ - 'active', - 'name', - 'slug', - 'code', - 'external_id', - 'preview_text', - 'description', - 'brand_id', - 'category_id', - ]; - - public $cached = [ - 'id', - 'active', - 'name', - 'slug', - 'code', - 'category_id', - 'brand_id', - 'preview_text', - 'preview_image', - 'description', - 'images', - ]; - - public $dates = ['created_at', 'updated_at', 'deleted_at']; - - public $jsonable = []; - - public $visible = []; - public $hidden = []; - - /** - * Get element by brand ID - * @param Product $obQuery - * @param string $sData - * @return $this - */ - public function scopeGetByBrand($obQuery, $sData) - { - if (!empty($sData)) { - $obQuery->where('brand_id', $sData); - } - - return $obQuery; - } - - /** - * Get element by categories - * @param Product $obQuery - * @param string $sData - * @return $this - */ - public function scopeGetByCategories($obQuery, $sData) - { - if (!empty($sData)) { - foreach ($sData as $category) { - $obQuery->orWhere('category_id', $category)->orWhereHas('additional_category', function ($obQuery) use ($category) { - $obQuery->where('category_id', $category); - }); - } - } - - return $obQuery; - } - - /** - * Before validate event handler - */ - public function beforeValidate() - { - if (empty($this->slug)) { - $this->slugAttributes(); - } - } - - /** - * Import item list from CSV file - * @param array $arElementList - * @param null $sSessionKey - * @throws \Throwable - */ - public function importData($arElementList, $sSessionKey = null) - { - if (empty($arElementList)) { - return; - } - - $obImport = new ImportProductModelFromCSV(); - $obImport->setDeactivateFlag(); - - foreach ($arElementList as $iKey => $arImportData) { - $obImport->import($arImportData); - $sResultMethod = $obImport->getResultMethod(); - if (in_array($sResultMethod, ['logUpdated', 'logCreated'])) { - $this->$sResultMethod(); - } else { - $sErrorMessage = $obImport->getResultError(); - $this->$sResultMethod($iKey, $sErrorMessage); - } - } - - $obImport->deactivateElements(); - } -} diff --git a/plugins/lovata/shopaholic/models/PromoBlock.php b/plugins/lovata/shopaholic/models/PromoBlock.php deleted file mode 100644 index 41511e8e5..000000000 --- a/plugins/lovata/shopaholic/models/PromoBlock.php +++ /dev/null @@ -1,192 +0,0 @@ - 'required', - 'type' => 'required', - 'date_begin' => 'required', - 'slug' => 'required|unique:lovata_shopaholic_promo_block', - ]; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - 'type' => 'lovata.toolbox::lang.field.type', - 'slug' => 'lovata.toolbox::lang.field.slug', - 'date_begin' => 'lovata.toolbox::lang.field.date_begin', - ]; - - public $slugs = ['slug' => 'name']; - - public $attachOne = [ - 'preview_image' => 'System\Models\File', - 'icon' => 'System\Models\File', - ]; - public $attachMany = ['images' => 'System\Models\File']; - public $belongsTo = []; - public $hasMany = []; - public $belongsToMany = [ - 'product' => [ - Product::class, - 'table' => 'lovata_shopaholic_promo_block_relation', - 'key' => 'promo_id', - ], - ]; - public $morphMany = []; - - public $appends = []; - public $purgeable = []; - - public $dates = ['created_at', 'updated_at', 'date_begin', 'date_end']; - - public $fillable = [ - 'active', - 'name', - 'slug', - 'type', - 'code', - 'preview_text', - 'description', - 'sort_order', - 'date_begin', - 'date_end', - ]; - - public $cached = [ - 'id', - 'name', - 'slug', - 'type', - 'code', - 'preview_text', - 'preview_image', - 'icon', - 'description', - 'images', - 'date_begin', - 'date_end', - ]; - - public $visible = []; - public $hidden = []; - - /** - * Fire event and get promo content type list - * @return array - */ - public static function getTypeList(): array - { - $arResult = [ - self::PROMO_BLOCK_TYPE => Lang::get('lovata.shopaholic::lang.field.promo_block_type'), - ]; - - $arEventDataList = Event::fire(self::EVENT_GET_TYPE_LIST); - if (empty($arEventDataList)) { - return $arResult; - } - - foreach ($arEventDataList as $arEventData) { - if (empty($arEventData) || !is_array($arEventData)) { - continue; - } - - $arResult = array_merge($arResult, $arEventData); - } - - return $arResult; - } - - /** - * Get type list for backend fields - * @return array - */ - public function getTypeOptions(): array - { - return self::getTypeList(); - } -} diff --git a/plugins/lovata/shopaholic/models/Settings.php b/plugins/lovata/shopaholic/models/Settings.php deleted file mode 100644 index 29ccd081c..000000000 --- a/plugins/lovata/shopaholic/models/Settings.php +++ /dev/null @@ -1,62 +0,0 @@ -lists('name', 'id'); - - return $arResult; - } - - /** - * Get measure list - * @return array - */ - public function getWeightMeasureOptions() - { - $arResult = (array) Measure::orderBy('name', 'asc')->lists('name', 'id'); - - return $arResult; - } - - /** - * Get measure list - * @return array - */ - public function getMeasureOfUnitOptions() - { - $arResult = (array) Measure::orderBy('name', 'asc')->lists('name', 'id'); - - return $arResult; - } - - /** - * Get page id list. - * @return array|\Cms\Classes\Page[] - */ - public function getPageIdListOptions() - { - return PageHelper::instance()->getPageNameList(); - } -} diff --git a/plugins/lovata/shopaholic/models/Tax.php b/plugins/lovata/shopaholic/models/Tax.php deleted file mode 100644 index 9ed894321..000000000 --- a/plugins/lovata/shopaholic/models/Tax.php +++ /dev/null @@ -1,128 +0,0 @@ - 'required', - 'percent' => 'required', - ]; - - public $attributeNames = [ - 'name' => 'lovata.toolbox::lang.field.name', - 'percent' => 'lovata.shopaholic::lang.field.tax_percent', - ]; - - public $attachOne = []; - public $attachMany = []; - public $hasMany = []; - public $belongsTo = []; - public $belongsToMany = [ - 'category' => [ - Category::class, - 'table' => 'lovata_shopaholic_tax_category_link', - ], - 'product' => [ - Product::class, - 'table' => 'lovata_shopaholic_tax_product_link', - ], - 'country' => [ - 'RainLab\Location\Models\Country', - 'table' => 'lovata_shopaholic_tax_country_link', - ], - 'state' => [ - 'RainLab\Location\Models\State', - 'table' => 'lovata_shopaholic_tax_state_link', - ], - ]; - public $morphMany = []; - - public $dates = ['created_at', 'updated_at', 'deleted_at']; - - public $appends = []; - public $purgeable = []; - - public $fillable = [ - 'active', - 'is_global', - 'name', - 'description', - 'percent', - 'sort_order', - ]; - - public $cached = [ - 'id', - 'is_global', - 'name', - 'description', - 'percent', - ]; - - public $visible = []; - public $hidden = []; - - /** - * Set percent attribute - * @param string $sValue - */ - protected function setPercentAttribute($sValue) - { - $this->attributes['percent'] = PriceHelper::toFloat($sValue); - } -} diff --git a/plugins/lovata/shopaholic/models/XmlImportSettings.php b/plugins/lovata/shopaholic/models/XmlImportSettings.php deleted file mode 100644 index b964e3d2b..000000000 --- a/plugins/lovata/shopaholic/models/XmlImportSettings.php +++ /dev/null @@ -1,97 +0,0 @@ -get('file_list'); - $arFileList = array_pluck($arFileList, 'path'); - - return $arFileList; - } - - /** - * Get product field list - * @return array - */ - public function getProductFields() - { - $obParser = new ImportProductModelFromXML(); - $arFileList = $obParser->getFields(); - - return $arFileList; - } - - /** - * Get offer field list - * @return array - */ - public function getOfferFields() - { - $obParser = new ImportOfferModelFromXML(); - $arFileList = $obParser->getFields(); - - return $arFileList; - } - - /** - * Get offer price field list - * @return array - */ - public function getPriceFields() - { - $obParser = new ImportOfferPriceFromXML(); - $arFileList = $obParser->getFields(); - - return $arFileList; - } - - /** - * Get brand field list - * @return array - */ - public function getBrandFields() - { - $obParser = new ImportBrandModelFromXML(); - $arFileList = $obParser->getFields(); - - return $arFileList; - } - - /** - * Get category field list - * @return array - */ - public function getCategoryFields() - { - $obParser = new ImportCategoryModelFromXML(); - $arFileList = $obParser->getFields(); - - return $arFileList; - } -} diff --git a/plugins/lovata/shopaholic/models/brand/columns.yaml b/plugins/lovata/shopaholic/models/brand/columns.yaml deleted file mode 100644 index ad2bf5a53..000000000 --- a/plugins/lovata/shopaholic/models/brand/columns.yaml +++ /dev/null @@ -1,48 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - code: - label: 'lovata.toolbox::lang.field.code' - type: text - searchable: true - sortable: true - slug: - label: 'lovata.toolbox::lang.field.slug' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true - sort_order: - label: 'lovata.toolbox::lang.field.sort_order' - type: text - searchable: false - sortable: true - width: 150px - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true diff --git a/plugins/lovata/shopaholic/models/brand/fields.yaml b/plugins/lovata/shopaholic/models/brand/fields.yaml deleted file mode 100644 index dbe4bf756..000000000 --- a/plugins/lovata/shopaholic/models/brand/fields.yaml +++ /dev/null @@ -1,76 +0,0 @@ -fields: - active: - label: 'lovata.toolbox::lang.field.active' - span: left - default: 1 - type: switch - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text - slug: - label: 'lovata.toolbox::lang.field.slug' - span: right - required: 1 - preset: - field: name - type: slug - type: text -tabs: - fields: - code: - label: 'lovata.toolbox::lang.field.code' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - external_id: - label: 'lovata.toolbox::lang.field.external_id' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - size: large - span: full - type: textarea - tab: 'lovata.toolbox::lang.tab.description' - description: - label: 'lovata.toolbox::lang.field.description' - size: giant - span: full - type: richeditor - tab: 'lovata.toolbox::lang.tab.description' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - icon: - label: 'lovata.toolbox::lang.field.icon' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: right - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - images: - label: 'lovata.toolbox::lang.field.images' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' diff --git a/plugins/lovata/shopaholic/models/category/columns.yaml b/plugins/lovata/shopaholic/models/category/columns.yaml deleted file mode 100644 index ff975c4a9..000000000 --- a/plugins/lovata/shopaholic/models/category/columns.yaml +++ /dev/null @@ -1,42 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - code: - label: 'lovata.toolbox::lang.field.code' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - slug: - label: 'lovata.toolbox::lang.field.slug' - type: text - searchable: true - sortable: true - external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/category/fields.yaml b/plugins/lovata/shopaholic/models/category/fields.yaml deleted file mode 100644 index e40bfbe83..000000000 --- a/plugins/lovata/shopaholic/models/category/fields.yaml +++ /dev/null @@ -1,83 +0,0 @@ -fields: - active: - label: 'lovata.toolbox::lang.field.active' - span: left - default: 1 - type: switch - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text - slug: - label: 'lovata.toolbox::lang.field.slug' - span: auto - required: 1 - preset: - field: name - type: slug - type: text -tabs: - fields: - parent: - label: 'lovata.toolbox::lang.field.category_parent' - span: left - type: relation - nameFrom: name - emptyOption: 'lovata.toolbox::lang.field.empty' - tab: 'lovata.toolbox::lang.tab.settings' - code: - label: 'lovata.toolbox::lang.field.code' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - external_id: - label: 'lovata.toolbox::lang.field.external_id' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - size: large - span: full - type: textarea - tab: 'lovata.toolbox::lang.tab.description' - description: - label: 'lovata.toolbox::lang.field.description' - size: giant - span: full - type: richeditor - tab: 'lovata.toolbox::lang.tab.description' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - icon: - label: 'lovata.toolbox::lang.field.icon' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: right - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - images: - label: 'lovata.toolbox::lang.field.images' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' diff --git a/plugins/lovata/shopaholic/models/currency/columns.yaml b/plugins/lovata/shopaholic/models/currency/columns.yaml deleted file mode 100644 index 704132933..000000000 --- a/plugins/lovata/shopaholic/models/currency/columns.yaml +++ /dev/null @@ -1,53 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - is_default: - label: 'lovata.toolbox::lang.field.is_default' - type: switch - searchable: false - sortable: true - code: - label: 'lovata.toolbox::lang.field.code' - type: text - searchable: true - sortable: true - symbol: - label: 'lovata.toolbox::lang.field.symbol' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true - sort_order: - label: 'lovata.toolbox::lang.field.sort_order' - type: text - searchable: false - sortable: true - width: 150px - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true diff --git a/plugins/lovata/shopaholic/models/currency/fields.yaml b/plugins/lovata/shopaholic/models/currency/fields.yaml deleted file mode 100644 index 408879c2d..000000000 --- a/plugins/lovata/shopaholic/models/currency/fields.yaml +++ /dev/null @@ -1,32 +0,0 @@ -fields: - active: - label: 'lovata.toolbox::lang.field.active' - span: left - default: 1 - type: switch - is_default: - label: 'lovata.toolbox::lang.field.is_default' - span: right - default: 0 - type: switch - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text - code: - label: 'lovata.toolbox::lang.field.code' - span: right - type: text - symbol: - label: 'lovata.toolbox::lang.field.symbol' - span: left - type: text - rate: - label: 'lovata.shopaholic::lang.field.rate' - span: right - type: number - external_id: - label: 'lovata.toolbox::lang.field.external_id' - span: left - type: text \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/measure/columns.yaml b/plugins/lovata/shopaholic/models/measure/columns.yaml deleted file mode 100644 index 8d40171e1..000000000 --- a/plugins/lovata/shopaholic/models/measure/columns.yaml +++ /dev/null @@ -1,22 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: number - sortable: true - searchable: true - width: 100px - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - invisible: true - sortable: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - invisible: true - sortable: true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/measure/fields.yaml b/plugins/lovata/shopaholic/models/measure/fields.yaml deleted file mode 100644 index e06715533..000000000 --- a/plugins/lovata/shopaholic/models/measure/fields.yaml +++ /dev/null @@ -1,10 +0,0 @@ -fields: - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text - code: - label: 'lovata.toolbox::lang.field.code' - span: right - type: text diff --git a/plugins/lovata/shopaholic/models/offer/columns.yaml b/plugins/lovata/shopaholic/models/offer/columns.yaml deleted file mode 100644 index 5b4f3a62f..000000000 --- a/plugins/lovata/shopaholic/models/offer/columns.yaml +++ /dev/null @@ -1,52 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - code: - label: 'lovata.shopaholic::lang.field.vendor_code' - type: text - searchable: true - sortable: true - price: - label: 'lovata.shopaholic::lang.field.price' - type: text - searchable: false - sortable: false - old_price: - label: 'lovata.shopaholic::lang.field.old_price' - type: text - searchable: false - sortable: false - quantity: - label: 'lovata.shopaholic::lang.field.quantity' - type: text - searchable: false - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/offer/fields.yaml b/plugins/lovata/shopaholic/models/offer/fields.yaml deleted file mode 100644 index 76a5c21e6..000000000 --- a/plugins/lovata/shopaholic/models/offer/fields.yaml +++ /dev/null @@ -1,66 +0,0 @@ -fields: - active: - label: 'lovata.toolbox::lang.field.active' - span: left - default: 1 - type: switch - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text -tabs: - fields: - quantity: - label: 'lovata.shopaholic::lang.field.quantity' - span: left - type: number - default: 0 - tab: 'lovata.toolbox::lang.tab.settings' - code: - label: 'lovata.shopaholic::lang.field.vendor_code' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - external_id: - label: 'lovata.toolbox::lang.field.external_id' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - price_list: - span: left - type: partial - path: ~/plugins/lovata/shopaholic/views/offer_price_list.htm - tab: 'lovata.shopaholic::lang.tab.price' - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - size: large - span: full - type: textarea - tab: 'lovata.toolbox::lang.tab.description' - description: - label: 'lovata.toolbox::lang.field.description' - size: giant - span: full - type: richeditor - tab: 'lovata.toolbox::lang.tab.description' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - mode: image - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: full - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - images: - label: 'lovata.toolbox::lang.field.images' - mode: image - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: full - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' diff --git a/plugins/lovata/shopaholic/models/offer/relation_columns.yaml b/plugins/lovata/shopaholic/models/offer/relation_columns.yaml deleted file mode 100644 index 89c6aded5..000000000 --- a/plugins/lovata/shopaholic/models/offer/relation_columns.yaml +++ /dev/null @@ -1,43 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - product: - label: 'lovata.toolbox::lang.field.product' - relation: product - select: name - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - code: - label: 'lovata.shopaholic::lang.field.vendor_code' - type: text - searchable: true - sortable: true - price: - label: 'lovata.shopaholic::lang.field.price' - type: text - searchable: false - sortable: false - old_price: - label: 'lovata.shopaholic::lang.field.old_price' - type: text - searchable: false - sortable: false - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/pricetype/columns.yaml b/plugins/lovata/shopaholic/models/pricetype/columns.yaml deleted file mode 100644 index 87c5abb3e..000000000 --- a/plugins/lovata/shopaholic/models/pricetype/columns.yaml +++ /dev/null @@ -1,43 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - code: - label: 'lovata.toolbox::lang.field.code' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true - sort_order: - label: 'lovata.toolbox::lang.field.sort_order' - type: text - searchable: false - sortable: true - width: 150px - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true diff --git a/plugins/lovata/shopaholic/models/pricetype/fields.yaml b/plugins/lovata/shopaholic/models/pricetype/fields.yaml deleted file mode 100644 index 2e7b86c4c..000000000 --- a/plugins/lovata/shopaholic/models/pricetype/fields.yaml +++ /dev/null @@ -1,21 +0,0 @@ -fields: - active: - label: 'lovata.toolbox::lang.field.active' - span: left - default: 1 - type: switch - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text - code: - label: 'lovata.toolbox::lang.field.code' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - external_id: - label: 'lovata.toolbox::lang.field.external_id' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/product/columns.yaml b/plugins/lovata/shopaholic/models/product/columns.yaml deleted file mode 100644 index b73ae90d8..000000000 --- a/plugins/lovata/shopaholic/models/product/columns.yaml +++ /dev/null @@ -1,55 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - category_name: - label: 'lovata.toolbox::lang.field.category' - type: text - searchable: true - sortable: true - relation: category - select: name - brand_name: - label: 'lovata.shopaholic::lang.field.brand' - type: text - sortable: true - relation: brand - select: name - code: - label: 'lovata.shopaholic::lang.field.vendor_code' - type: text - searchable: true - sortable: true - slug: - label: 'lovata.toolbox::lang.field.slug' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/product/fields.yaml b/plugins/lovata/shopaholic/models/product/fields.yaml deleted file mode 100644 index 5000145e2..000000000 --- a/plugins/lovata/shopaholic/models/product/fields.yaml +++ /dev/null @@ -1,106 +0,0 @@ -fields: - active: - label: 'lovata.toolbox::lang.field.active' - span: left - default: 0 - type: switch - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text - slug: - label: 'lovata.toolbox::lang.field.slug' - span: right - required: 1 - preset: - field: name - type: slug - type: text -tabs: - lazy: - - 'lovata.toolbox::lang.tab.settings' - - 'lovata.toolbox::lang.tab.description' - - 'lovata.toolbox::lang.tab.images' - - 'lovata.shopaholic::lang.tab.offer' - - 'lovata.toolbox::lang.tab.properties' - - 'lovata.discountsshopaholic::lang.menu.discount' - - 'lovata.couponsshopaholic::lang.menu.coupon_group' - - 'lovata.relatedproductsshopaholic::lang.tab.related' - - 'lovata.reviewsshopaholic::lang.field.reviews' - fields: - category: - label: 'lovata.toolbox::lang.field.category' - nameFrom: name - descriptionFrom: description - span: left - type: relation - tab: 'lovata.toolbox::lang.tab.settings' - additional_category: - label: 'lovata.shopaholic::lang.field.additional_category' - type: relation - span: right - nameFrom: name - context: - - update - - preview - tab: 'lovata.toolbox::lang.tab.settings' - brand: - label: 'lovata.shopaholic::lang.field.brand' - span: left - type: relation - tab: 'lovata.toolbox::lang.tab.settings' - emptyOption: 'lovata.toolbox::lang.field.empty' - code: - label: 'lovata.shopaholic::lang.field.vendor_code' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - external_id: - label: 'lovata.toolbox::lang.field.external_id' - span: left - type: text - tab: 'lovata.toolbox::lang.tab.settings' - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - size: large - span: full - type: textarea - tab: 'lovata.toolbox::lang.tab.description' - description: - label: 'lovata.toolbox::lang.field.description' - size: giant - span: full - type: richeditor - tab: 'lovata.toolbox::lang.tab.description' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - images: - label: 'lovata.toolbox::lang.field.images' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - offer: - label: 'lovata.shopaholic::lang.field.offer' - span: full - context: - - update - - preview - type: partial - path: ~/plugins/lovata/shopaholic/controllers/products/_offer.htm - tab: 'lovata.shopaholic::lang.tab.offer' diff --git a/plugins/lovata/shopaholic/models/product/relation_columns.yaml b/plugins/lovata/shopaholic/models/product/relation_columns.yaml deleted file mode 100644 index e0d133a5f..000000000 --- a/plugins/lovata/shopaholic/models/product/relation_columns.yaml +++ /dev/null @@ -1,40 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - category_name: - label: 'lovata.toolbox::lang.field.category' - type: text - searchable: true - sortable: true - relation: category - select: name - brand_name: - label: 'lovata.shopaholic::lang.field.brand' - type: text - sortable: true - relation: brand - select: name - code: - label: 'lovata.shopaholic::lang.field.vendor_code' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/promoblock/columns.yaml b/plugins/lovata/shopaholic/models/promoblock/columns.yaml deleted file mode 100644 index 9de3fff1b..000000000 --- a/plugins/lovata/shopaholic/models/promoblock/columns.yaml +++ /dev/null @@ -1,53 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - code: - label: 'lovata.toolbox::lang.field.code' - type: text - searchable: true - sortable: true - date_begin: - label: 'lovata.toolbox::lang.field.date_begin' - type: datetime - sortable: true - searchable: false - date_end: - label: 'lovata.toolbox::lang.field.date_end' - type: datetime - sortable: true - searchable: false - slug: - label: 'lovata.toolbox::lang.field.slug' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - sort_order: - label: 'lovata.toolbox::lang.field.sort_order' - type: text - searchable: false - sortable: true - width: 150px - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true diff --git a/plugins/lovata/shopaholic/models/promoblock/fields.yaml b/plugins/lovata/shopaholic/models/promoblock/fields.yaml deleted file mode 100644 index a58670f0b..000000000 --- a/plugins/lovata/shopaholic/models/promoblock/fields.yaml +++ /dev/null @@ -1,94 +0,0 @@ -fields: - active: - label: 'lovata.toolbox::lang.field.active' - span: left - default: 1 - type: switch - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text - slug: - label: 'lovata.toolbox::lang.field.slug' - span: right - required: 1 - preset: - field: name - type: slug - type: text -tabs: - fields: - type: - label: 'lovata.toolbox::lang.field.type' - tab: 'lovata.toolbox::lang.tab.settings' - span: left - type: dropdown - code: - label: 'lovata.toolbox::lang.field.code' - tab: 'lovata.toolbox::lang.tab.settings' - span: right - type: text - date_begin: - label: 'lovata.toolbox::lang.field.date_begin' - tab: 'lovata.toolbox::lang.tab.settings' - span: left - type: datepicker - date_end: - label: 'lovata.toolbox::lang.field.date_end' - tab: 'lovata.toolbox::lang.tab.settings' - span: right - type: datepicker - preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - size: large - span: full - type: textarea - tab: 'lovata.toolbox::lang.tab.description' - description: - label: 'lovata.toolbox::lang.field.description' - size: giant - span: full - type: richeditor - tab: 'lovata.toolbox::lang.tab.description' - preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - icon: - label: 'lovata.toolbox::lang.field.icon' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: right - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - images: - label: 'lovata.toolbox::lang.field.images' - mode: image - fileTypes: jpg,jpeg,bmp,png,webp,gif,svg - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' - product: - span: full - context: - - update - - preview - type: partial - path: ~/plugins/lovata/shopaholic/controllers/promoblocks/_product.htm - tab: 'lovata.shopaholic::lang.menu.product' diff --git a/plugins/lovata/shopaholic/models/settings/fields.yaml b/plugins/lovata/shopaholic/models/settings/fields.yaml deleted file mode 100644 index 589875e61..000000000 --- a/plugins/lovata/shopaholic/models/settings/fields.yaml +++ /dev/null @@ -1,117 +0,0 @@ -tabs: - fields: - check_offer_active: - tab: lovata.toolbox::lang.tab.settings - span: left - label: lovata.shopaholic::lang.field.check_offer_active - type: checkbox - allow_negative_offer_quantity: - tab: lovata.toolbox::lang.tab.settings - span: left - label: lovata.shopaholic::lang.field.allow_negative_offer_quantity - type: checkbox - price_include_tax: - tab: lovata.shopaholic::lang.tab.taxes - span: left - type: checkbox - label: lovata.shopaholic::lang.field.price_include_tax - formula_calculate_discount_from_price: - tab: lovata.shopaholic::lang.tab.taxes - label: lovata.shopaholic::lang.settings.formula_calculate_discount_from_price - span: left - type: radio - options: - discount_from_backend_price: lovata.shopaholic::lang.settings.formula_calculation_from_backend_price - discount_from_price_without_tax: lovata.shopaholic::lang.settings.formula_calculation_from_price_without_tax - discount_from_price_with_tax: lovata.shopaholic::lang.settings.formula_calculation_from_price_with_tax - dimensions_measure: - label: lovata.shopaholic::lang.field.dimensions_measure - tab: lovata.shopaholic::lang.tab.dimensions - type: dropdown - emptyOption: lovata.toolbox::lang.field.empty - span: left - weight_measure: - label: lovata.shopaholic::lang.field.weight_measure - tab: lovata.shopaholic::lang.tab.dimensions - type: dropdown - emptyOption: lovata.toolbox::lang.field.empty - span: left - measure_of_unit: - label: lovata.shopaholic::lang.field.measure_of_unit - tab: lovata.shopaholic::lang.tab.dimensions - type: dropdown - emptyOption: lovata.toolbox::lang.field.empty - span: left - hide_brand_import_from_csv: - label: lovata.shopaholic::lang.field.hide_brand_import_from_csv - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: left - hide_brand_import_from_xml: - label: lovata.shopaholic::lang.field.hide_brand_import_from_xml - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: right - hide_category_import_from_csv: - label: lovata.shopaholic::lang.field.hide_category_import_from_csv - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: left - hide_category_import_from_xml: - label: lovata.shopaholic::lang.field.hide_category_import_from_xml - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: right - hide_product_import_from_csv: - label: lovata.shopaholic::lang.field.hide_product_import_from_csv - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: left - hide_product_import_from_xml: - label: lovata.shopaholic::lang.field.hide_product_import_from_xml - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: right - hide_offer_import_from_csv: - label: lovata.shopaholic::lang.field.hide_offer_import_from_csv - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: left - hide_offer_import_from_xml: - label: lovata.shopaholic::lang.field.hide_offer_import_from_xml - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: right - hide_price_import_from_xml: - label: lovata.shopaholic::lang.field.hide_price_import_from_xml - tab: lovata.shopaholic::lang.tab.import_setting - type: checkbox - span: right - default_product_page_id: - label: lovata.shopaholic::lang.field.default_product_page - tab: lovata.shopaholic::lang.tab.page_settings - type: dropdown - span: left - emptyOption: lovata.toolbox::lang.field.empty - options: getPageIdListOptions - default_category_page_id: - label: lovata.shopaholic::lang.field.default_category_page - tab: lovata.shopaholic::lang.tab.page_settings - type: dropdown - span: left - emptyOption: lovata.toolbox::lang.field.empty - options: getPageIdListOptions - default_brand_page_id: - label: lovata.shopaholic::lang.field.default_brand_page - tab: lovata.shopaholic::lang.tab.page_settings - type: dropdown - span: left - emptyOption: lovata.toolbox::lang.field.empty - options: getPageIdListOptions - default_promo_block_page_id: - label: lovata.shopaholic::lang.field.default_promo_block_page - tab: lovata.shopaholic::lang.tab.page_settings - type: dropdown - span: left - emptyOption: lovata.toolbox::lang.field.empty - options: getPageIdListOptions diff --git a/plugins/lovata/shopaholic/models/tax/columns.yaml b/plugins/lovata/shopaholic/models/tax/columns.yaml deleted file mode 100644 index 6fe4bc5f3..000000000 --- a/plugins/lovata/shopaholic/models/tax/columns.yaml +++ /dev/null @@ -1,43 +0,0 @@ -columns: - name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true - active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true - is_global: - label: 'lovata.shopaholic::lang.field.tax_is_global' - type: switch - searchable: false - sortable: true - percent: - label: 'lovata.shopaholic::lang.field.tax_percent' - type: text - searchable: true - sortable: true - id: - label: 'lovata.toolbox::lang.field.id' - type: text - searchable: true - sortable: true - width: 100px - sort_order: - label: 'lovata.toolbox::lang.field.sort_order' - type: text - searchable: false - sortable: true - width: 150px - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true diff --git a/plugins/lovata/shopaholic/models/tax/fields.yaml b/plugins/lovata/shopaholic/models/tax/fields.yaml deleted file mode 100644 index 6612ee6a7..000000000 --- a/plugins/lovata/shopaholic/models/tax/fields.yaml +++ /dev/null @@ -1,75 +0,0 @@ -fields: - active: - label: 'lovata.toolbox::lang.field.active' - span: left - default: 1 - type: switch - is_global: - label: 'lovata.shopaholic::lang.field.tax_is_global' - span: right - default: 1 - type: switch - name: - label: 'lovata.toolbox::lang.field.name' - span: left - required: 1 - type: text - percent: - label: 'lovata.shopaholic::lang.field.tax_percent' - span: right - type: number -tabs: - fields: - description: - label: 'lovata.toolbox::lang.field.description' - span: left - type: textarea - tab: 'lovata.toolbox::lang.tab.settings' - category: - span: full - context: - - update - - preview - type: partial - path: ~/plugins/lovata/shopaholic/controllers/taxes/_category.htm - tab: 'lovata.shopaholic::lang.menu.categories' - trigger: - action: hide - field: is_global - condition: checked - product: - span: full - context: - - update - - preview - type: partial - path: ~/plugins/lovata/shopaholic/controllers/taxes/_product.htm - tab: 'lovata.shopaholic::lang.menu.product' - trigger: - action: hide - field: is_global - condition: checked - country: - span: full - context: - - update - - preview - type: partial - path: ~/plugins/lovata/shopaholic/controllers/taxes/_country.htm - tab: 'lovata.shopaholic::lang.field.countries' - trigger: - action: hide - field: is_global - condition: checked - state: - span: full - context: - - update - - preview - type: partial - path: ~/plugins/lovata/shopaholic/controllers/taxes/_state.htm - tab: 'lovata.shopaholic::lang.field.states' - trigger: - action: hide - field: is_global - condition: checked \ No newline at end of file diff --git a/plugins/lovata/shopaholic/models/xmlimportsettings/fields.yaml b/plugins/lovata/shopaholic/models/xmlimportsettings/fields.yaml deleted file mode 100644 index 0c613fea2..000000000 --- a/plugins/lovata/shopaholic/models/xmlimportsettings/fields.yaml +++ /dev/null @@ -1,228 +0,0 @@ -fields: - offer_info: - path: $/lovata/shopaholic/views/import_from_xml_info.htm - tab: lovata.shopaholic::lang.field.offer - type: partial - span: full -tabs: - fields: - file_list: - label: lovata.toolbox::lang.field.import_file_list - tab: lovata.toolbox::lang.tab.settings - type: repeater - span: left - form: - fields: - path: - label: lovata.toolbox::lang.field.import_file_path - placeholder: temp/import/import.xml - type: text - span: full - path_prefix: - label: lovata.toolbox::lang.field.import_path_prefix - tab: lovata.toolbox::lang.tab.settings - placeholder: m - type: text - span: auto - file_namespace: - label: lovata.toolbox::lang.field.import_file_namespace - tab: lovata.toolbox::lang.tab.settings - placeholder: urn:1C.ru:commerceml_210 - type: text - span: auto - image_folder: - label: lovata.toolbox::lang.field.import_image_folder - placeholder: temp/import - tab: lovata.toolbox::lang.tab.settings - type: text - span: right - product_file_path: - label: lovata.toolbox::lang.field.import_from_file - tab: lovata.shopaholic::lang.menu.product - type: dropdown - emptyOption: lovata.toolbox::lang.field.empty - options: getFileList - dependsOn: file_list - span: full - product_path_to_list: - label: lovata.toolbox::lang.field.import_path_to_list - placeholder: lovata.toolbox::lang.field.import_path_to_list_example - tab: lovata.shopaholic::lang.menu.product - type: text - span: full - product_deactivate: - label: lovata.toolbox::lang.field.import_deactivate - comment: lovata.toolbox::lang.field.import_deactivate_description - tab: lovata.shopaholic::lang.menu.product - type: checkbox - span: full - product: - label: lovata.toolbox::lang.field.import_field_list - tab: lovata.shopaholic::lang.menu.product - span: full - type: repeater - form: - fields: - field: - label: lovata.toolbox::lang.field.field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: dropdown - options: getProductFields - span: full - path_to_field: - label: lovata.toolbox::lang.field.import_path_to_field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: text - span: full - offer_file_path: - label: lovata.toolbox::lang.field.import_from_file - tab: lovata.shopaholic::lang.field.offer - type: dropdown - emptyOption: lovata.toolbox::lang.field.empty - options: getFileList - dependsOn: file_list - span: full - offer_path_to_list: - label: lovata.toolbox::lang.field.import_path_to_list - placeholder: lovata.toolbox::lang.field.import_path_to_list_example - tab: lovata.shopaholic::lang.field.offer - type: text - span: full - offer_deactivate: - label: lovata.toolbox::lang.field.import_deactivate - comment: lovata.toolbox::lang.field.import_deactivate_description - tab: lovata.shopaholic::lang.field.offer - type: checkbox - span: full - offer: - label: lovata.toolbox::lang.field.import_field_list - tab: lovata.shopaholic::lang.field.offer - span: full - type: repeater - form: - fields: - field: - label: lovata.toolbox::lang.field.field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: dropdown - options: getOfferFields - span: full - path_to_field: - label: lovata.toolbox::lang.field.import_path_to_field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: text - span: full - price_file_path: - label: lovata.toolbox::lang.field.import_from_file - tab: lovata.shopaholic::lang.tab.price - type: dropdown - emptyOption: lovata.toolbox::lang.field.empty - options: getFileList - dependsOn: file_list - span: full - price_path_to_list: - label: lovata.toolbox::lang.field.import_path_to_list - placeholder: lovata.toolbox::lang.field.import_path_to_list_example - tab: lovata.shopaholic::lang.tab.price - type: text - span: full - price_deactivate: - label: lovata.toolbox::lang.field.import_deactivate - comment: lovata.toolbox::lang.field.import_deactivate_description - tab: lovata.shopaholic::lang.tab.price - type: checkbox - span: full - price: - label: lovata.toolbox::lang.field.import_field_list - tab: lovata.shopaholic::lang.tab.price - span: full - type: repeater - form: - fields: - field: - label: lovata.toolbox::lang.field.field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: dropdown - options: getPriceFields - span: full - path_to_field: - label: lovata.toolbox::lang.field.import_path_to_field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: text - span: full - brand_file_path: - label: lovata.toolbox::lang.field.import_from_file - tab: lovata.shopaholic::lang.menu.brands - type: dropdown - emptyOption: lovata.toolbox::lang.field.empty - options: getFileList - dependsOn: file_list - span: full - brand_path_to_list: - label: lovata.toolbox::lang.field.import_path_to_list - placeholder: lovata.toolbox::lang.field.import_path_to_list_example - tab: lovata.shopaholic::lang.menu.brands - type: text - span: full - brand_deactivate: - label: lovata.toolbox::lang.field.import_deactivate - comment: lovata.toolbox::lang.field.import_deactivate_description - tab: lovata.shopaholic::lang.menu.brands - type: checkbox - span: full - brand: - label: lovata.toolbox::lang.field.import_field_list - tab: lovata.shopaholic::lang.menu.brands - span: full - type: repeater - form: - fields: - field: - label: lovata.toolbox::lang.field.field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: dropdown - options: getBrandFields - span: full - path_to_field: - label: lovata.toolbox::lang.field.import_path_to_field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: text - span: full - category_file_path: - label: lovata.toolbox::lang.field.import_from_file - tab: lovata.shopaholic::lang.menu.categories - type: dropdown - emptyOption: lovata.toolbox::lang.field.empty - options: getFileList - dependsOn: file_list - span: full - category_path_to_list: - label: lovata.toolbox::lang.field.import_path_to_list - placeholder: lovata.toolbox::lang.field.import_path_to_list_example - tab: lovata.shopaholic::lang.menu.categories - type: text - span: full - category_deactivate: - label: lovata.toolbox::lang.field.import_deactivate - comment: lovata.toolbox::lang.field.import_deactivate_description - tab: lovata.shopaholic::lang.menu.categories - type: checkbox - span: full - category: - label: lovata.toolbox::lang.field.import_field_list - tab: lovata.shopaholic::lang.menu.categories - span: full - type: repeater - form: - fields: - field: - label: lovata.toolbox::lang.field.field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: dropdown - options: getCategoryFields - span: full - path_to_field: - label: lovata.toolbox::lang.field.import_path_to_field - placeholder: lovata.toolbox::lang.field.import_path_to_field_example - type: text - span: full diff --git a/plugins/lovata/shopaholic/phpunit.xml b/plugins/lovata/shopaholic/phpunit.xml deleted file mode 100644 index 158ab6818..000000000 --- a/plugins/lovata/shopaholic/phpunit.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - ./tests/unit - ./../toolbox/tests/unit - - - -         -            ./classes -            ./components -         -     - - - - - - diff --git a/plugins/lovata/shopaholic/plugin.yaml b/plugins/lovata/shopaholic/plugin.yaml deleted file mode 100644 index b7c220fa5..000000000 --- a/plugins/lovata/shopaholic/plugin.yaml +++ /dev/null @@ -1,80 +0,0 @@ -plugin: - name: 'lovata.shopaholic::lang.plugin.name' - description: 'lovata.shopaholic::lang.plugin.description' - author: Lovata - icon: oc-icon-book - homepage: '' -navigation: - shopaholic-menu-main: - label: 'lovata.shopaholic::lang.menu.main' - url: lovata/shopaholic/products - icon: icon-th-large - permissions: - - 'shopaholic-menu-*' - sideMenu: - shopaholic-menu-products: - label: 'lovata.shopaholic::lang.menu.product' - url: lovata/shopaholic/products - icon: icon-book - order: 100 - permissions: - - shopaholic-menu-product - shopaholic-menu-categories: - label: 'lovata.shopaholic::lang.menu.categories' - url: lovata/shopaholic/categories - icon: icon-sitemap - order: 200 - permissions: - - shopaholic-menu-category - shopaholic-menu-brands: - label: 'lovata.shopaholic::lang.menu.brands' - url: lovata/shopaholic/brands - icon: icon-star-o - order: 300 - permissions: - - shopaholic-menu-brand - shopaholic-menu-promo: - label: 'lovata.shopaholic::lang.menu.promo' - url: lovata/shopaholic/promoblocks - icon: oc-icon-money - permissions: - - 'shopaholic-menu-promo-block' - sideMenu: - shopaholic-menu-promo-block: - label: 'lovata.shopaholic::lang.menu.promo_block' - url: lovata/shopaholic/promoblocks - icon: oc-icon-line-chart - order: 100 - permissions: - - shopaholic-menu-promo-block -permissions: - shopaholic-menu-category: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.category' - shopaholic-menu-brand: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.brand' - shopaholic-menu-product: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.product' - shopaholic-settings: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.settings' - shopaholic-menu-promo-block: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.promo_block' - shopaholic-menu-currency: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.currency' - shopaholic-menu-tax: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.tax' - shopaholic-menu-price-type: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.price_type' - shopaholic-menu-measure: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.measure' - shopaholic-menu-import-xml-file: - tab: 'lovata.shopaholic::lang.tab.permissions' - label: 'lovata.shopaholic::lang.permission.import_xml_file' diff --git a/plugins/lovata/shopaholic/tests/unit/collection/BrandCollectionTest.php b/plugins/lovata/shopaholic/tests/unit/collection/BrandCollectionTest.php deleted file mode 100644 index 24da7f4e9..000000000 --- a/plugins/lovata/shopaholic/tests/unit/collection/BrandCollectionTest.php +++ /dev/null @@ -1,214 +0,0 @@ - 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - protected $arProductData = [ - 'name' => 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - protected $arOfferData = [ - 'active' => true, - 'name' => 'name', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - 'price' => 10.50, - 'old_price' => 11.50, - 'quantity' => 5, - ]; - - protected $arCategoryData = [ - 'active' => true, - 'name' => 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - 'nest_depth' => 0, - 'parent_id' => 0, - ]; - - /** - * Check item collection - */ - public function testCollectionItem() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Brand collection item data is not correct'; - - //Check item collection - $obCollection = BrandCollection::make([$this->obElement->id]); - - /** @var BrandItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(BrandItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - } - - /** - * Check item collection "active" method - */ - public function testActiveList() - { - BrandCollection::make()->active(); - - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Brand collection "active" method is not correct'; - - //Check item collection after create - $obCollection = BrandCollection::make()->active(); - - /** @var BrandItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(BrandItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->active = false; - $this->obElement->save(); - - //Check item collection, after active = false - $obCollection = BrandCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - $this->obElement->active = true; - $this->obElement->save(); - - //Check item collection, after active = true - $obCollection = BrandCollection::make()->active(); - - /** @var BrandItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(BrandItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = BrandCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - } - - /** - * Check item collection "category" method - */ - public function testCategoryFilter() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - BrandCollection::make()->category($this->obCategory->id); - - $sErrorMessage = 'Brand collection "category" method is not correct'; - - //Check item collection after create - $obCollection = BrandCollection::make()->category($this->obCategory->id); - - /** @var BrandItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(BrandItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obProduct->category_id = $this->obCategory->id + 1; - $this->obProduct->save(); - - //Check item collection, after change category_id field - $obCollection = BrandCollection::make()->category($this->obCategory->id); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - $this->obProduct->category_id = $this->obCategory->id; - $this->obProduct->save(); - - //Check item collection, after change category_id field - $obCollection = BrandCollection::make()->category($this->obCategory->id); - - /** @var BrandItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(BrandItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obProduct->delete(); - - //Check item collection, after element remove - $obCollection = BrandCollection::make()->category($this->obCategory->id); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - } - - /** - * Create brand object for test - */ - protected function createTestData() - { - //Create new element data - $arCreateData = $this->arCreateData; - $arCreateData['active'] = true; - - $this->obElement = Brand::create($arCreateData); - - - //Create category data - $arCreateData = $this->arCategoryData; - $this->obCategory = Category::create($arCreateData); - - //Create product data - $arCreateData = $this->arCreateData; - $arCreateData['active'] = true; - $arCreateData['category_id'] = $this->obCategory->id; - $arCreateData['brand_id'] = $this->obElement->id; - $this->obProduct = Product::create($arCreateData); - - //Create offer data - $arCreateData = $this->arOfferData; - $arCreateData['product_id'] = $this->obProduct->id; - $this->obOffer = Offer::create($arCreateData); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/collection/CategoryCollectionTest.php b/plugins/lovata/shopaholic/tests/unit/collection/CategoryCollectionTest.php deleted file mode 100644 index 1906e480e..000000000 --- a/plugins/lovata/shopaholic/tests/unit/collection/CategoryCollectionTest.php +++ /dev/null @@ -1,148 +0,0 @@ - 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - /** - * Check item collection - */ - public function testCollectionItem() - { - $this->createTestData(); - if (empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Category collection item data is not correct'; - - //Check item collection - $obCollection = CategoryCollection::make([$this->obElement->id]); - - /** @var CategoryItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(CategoryItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - } - - /** - * Check item collection "tree" method - */ - public function testTreeMethod() - { - $this->createTestData(); - if (empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Category collection "tree" method is not correct'; - - //Check item collection - $obCollection = CategoryCollection::make()->tree(); - - /** @var CategoryItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(CategoryItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - self::assertEquals(1, $obCollection->count(), $sErrorMessage); - } - - /** - * Check item collection "active" method - */ - public function testActiveList() - { - CategoryCollection::make()->active(); - - $this->createTestData(); - if (empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Category collection "active" method is not correct'; - - //Check item collection after create - $obCollection = CategoryCollection::make()->active(); - - /** @var CategoryItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(CategoryItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->active = false; - $this->obElement->save(); - - - //Check item collection, after active = true - $obCollection = CategoryCollection::make()->active(); - - /** @var CategoryItem $obItem */ - $obItem = $obCollection->first(); - self::assertEquals($this->obElement->id + 1, $obItem->id, $sErrorMessage); - self::assertEquals(1, $obCollection->count(), $sErrorMessage); - - $this->obElement->active = true; - $this->obElement->save(); - - //Check item collection, after active = true - $obCollection = CategoryCollection::make()->active(); - - /** @var CategoryItem $obItem */ - $obItem = $obCollection->first(); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - self::assertEquals(2, $obCollection->count(), $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = CategoryCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - } - - /** - * Create brand object for test - */ - protected function createTestData() - { - //Create new element data - $arCreatedData = $this->arCreateData; - $arCreatedData['active'] = true; - - $this->obElement = Category::create($arCreatedData); - - $arCreatedData = $this->arCreateData; - $arCreatedData['active'] = true; - $arCreatedData['slug'] = 'slug1'; - - $this->obChildElement = Category::create($arCreatedData); - - $this->obChildElement->parent_id = $this->obElement->id; - $this->obChildElement->nest_depth = 1; - $this->obChildElement->save(); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/collection/OfferCollectionTest.php b/plugins/lovata/shopaholic/tests/unit/collection/OfferCollectionTest.php deleted file mode 100644 index 2beef4952..000000000 --- a/plugins/lovata/shopaholic/tests/unit/collection/OfferCollectionTest.php +++ /dev/null @@ -1,147 +0,0 @@ - 'name', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - 'price' => 10.50, - 'old_price' => 11.50, - 'quantity' => 5, - ]; - - /** - * Check item collection - */ - public function testCollectionItem() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Offer collection item data is not correct'; - - //Check item collection - $obCollection = OfferCollection::make([$this->obElement->id]); - - /** @var OfferItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(OfferItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - } - - /** - * Check item collection "active" method - */ - public function testActiveList() - { - OfferCollection::make()->active(); - - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Offer collection "active" method is not correct'; - - //Check item collection after create - $obCollection = OfferCollection::make()->active(); - - /** @var OfferItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(OfferItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->active = false; - $this->obElement->save(); - - //Check item collection, after active = false - $obCollection = OfferCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - $this->obElement->active = true; - $this->obElement->save(); - - //Check item collection, after active = true - $obCollection = OfferCollection::make()->active(); - - /** @var OfferItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(OfferItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = OfferCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - } - - /** - * Check item collection "sort" method (price desc, asc) - */ - public function testSortingByPrice() - { - $this->createTestData(1); - $this->createTestData(2); - if(empty($this->obElement)) { - return; - } - - OfferCollection::make()->sort(OfferListStore::SORT_PRICE_ASC); - OfferCollection::make()->sort(OfferListStore::SORT_PRICE_DESC); - - $sErrorMessage = 'Offer collection "sort" method is not correct'; - - //Check item collection after create - $obCollection = OfferCollection::make()->sort(OfferListStore::SORT_PRICE_ASC); - self::assertEquals([1,2], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = OfferCollection::make()->sort(OfferListStore::SORT_PRICE_DESC); - self::assertEquals([2,1], array_values($obCollection->getIDList()), $sErrorMessage); - - //Check item collection, after update offer price - $this->obElement->price = 1; - $this->obElement->save(); - - $obCollection = OfferCollection::make()->sort(OfferListStore::SORT_PRICE_DESC); - self::assertEquals([1,2], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = OfferCollection::make()->sort(OfferListStore::SORT_PRICE_ASC); - self::assertEquals([2,1], array_values($obCollection->getIDList()), $sErrorMessage); - } - - /** - * Create brand object for test - * @param int $iCount - */ - protected function createTestData($iCount= null) - { - //Create new element data - $arCreateData = $this->arCreateData; - $arCreateData['price'] = $iCount + $arCreateData['price']; - $arCreateData['active'] = true; - - $this->obElement = Offer::create($arCreateData); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/collection/ProductCollectionTest.php b/plugins/lovata/shopaholic/tests/unit/collection/ProductCollectionTest.php deleted file mode 100644 index 3051dabdd..000000000 --- a/plugins/lovata/shopaholic/tests/unit/collection/ProductCollectionTest.php +++ /dev/null @@ -1,552 +0,0 @@ - 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - protected $arOfferData = [ - 'active' => true, - 'name' => 'name', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - 'price' => 10.50, - 'old_price' => 11.50, - 'quantity' => 5, - ]; - - protected $arBrandData = [ - 'active' => true, - 'name' => 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - protected $arCategoryData = [ - 'active' => true, - 'name' => 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - 'nest_depth' => 0, - 'parent_id' => 0, - ]; - - /** - * Check item collection - */ - public function testCollectionItem() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Product collection item data is not correct'; - - //Check item collection - $obCollection = ProductCollection::make([$this->obElement->id]); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - } - - /** - * Check item collection "active" method - */ - public function testActiveList() - { - ProductCollection::make()->active(); - - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Product collection "active" method is not correct'; - - //Check item collection after create - $obCollection = ProductCollection::make()->active(); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->active = false; - $this->obElement->save(); - - //Check item collection, after active = false - $obCollection = ProductCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - $this->obElement->active = true; - $this->obElement->save(); - - //Check item collection, after active = true - $obCollection = ProductCollection::make()->active(); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = ProductCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - } - - /** - * Check item collection "active" method with checking offer - */ - public function testActiveListWithCheckingOffer() - { - ProductCollection::make()->active(); - Settings::set('check_offer_active', true); - - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Product collection "active" method is not correct'; - - //Check item collection after create - $obCollection = ProductCollection::make()->active(); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obOffer->active = false; - $this->obOffer->save(); - - //Check item collection, after active = false - $obCollection = ProductCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - $this->obOffer->active = true; - $this->obOffer->save(); - - //Check item collection, after active = true - $obCollection = ProductCollection::make()->active(); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obOffer->delete(); - - //Check item collection, after element remove - $obCollection = ProductCollection::make()->active(); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - Settings::set('check_offer_active', false); - } - - /** - * Check item collection "category" method - */ - public function testCategoryFilter() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - ProductCollection::make()->category($this->obCategory->id); - - $sErrorMessage = 'Product collection "category" method is not correct'; - - //Check item collection after create - $obCollection = ProductCollection::make()->category($this->obCategory->id); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->category_id = $this->obCategory->id + 1; - $this->obElement->save(); - - //Check item collection, after change category_id field - $obCollection = ProductCollection::make()->category($this->obCategory->id); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - $this->obElement->category_id = $this->obCategory->id; - $this->obElement->save(); - - //Check item collection, after change category_id field - $obCollection = ProductCollection::make()->category($this->obCategory->id); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = ProductCollection::make()->category($this->obCategory->id); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - } - - /** - * Check item collection "category" method - */ - public function testParentCategoryFilter() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - ProductCollection::make()->category($this->obCategory->id); - - $sErrorMessage = 'Product collection "category" method is not correct'; - - //Check item collection after create - $obCollection = ProductCollection::make()->category($this->obCategory->id - 1, true); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->category_id = $this->obCategory->id + 1; - $this->obElement->save(); - - //Check item collection, after change category_id field - $obCollection = ProductCollection::make()->category($this->obCategory->id -1, true); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - $this->obElement->category_id = $this->obCategory->id; - $this->obElement->save(); - - //Check item collection, after change category_id field - $obCollection = ProductCollection::make()->category($this->obCategory->id - 1, true); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = ProductCollection::make()->category($this->obCategory->id -1, true); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - } - - /** - * Check item collection "category" method - */ - public function testMultiCategoryFilter() - { - $this->createTestData(1); - $this->createTestData(2); - if(empty($this->obElement)) { - return; - } - - ProductCollection::make()->category([$this->obCategory->id - 2, $this->obCategory->id]); - - $sErrorMessage = 'Product collection "category" method is not correct'; - - //Check item collection after create - $obCollection = ProductCollection::make()->category([$this->obCategory->id - 2, $this->obCategory->id]); - - self::assertEquals(2, $obCollection->count(), $sErrorMessage); - self::assertEquals([$this->obElement->id - 1, $this->obElement->id], $obCollection->getIDList(), $sErrorMessage); - - $this->obElement->category_id = $this->obCategory->id + 1; - $this->obElement->save(); - - //Check item collection, after change category_id field - $obCollection = ProductCollection::make()->category([$this->obCategory->id - 2, $this->obCategory->id]); - - self::assertEquals(1, $obCollection->count(), $sErrorMessage); - self::assertEquals([$this->obElement->id - 1], $obCollection->getIDList(), $sErrorMessage); - - $this->obElement->category_id = $this->obCategory->id; - $this->obElement->save(); - - //Check item collection, after change category_id field - $obCollection = ProductCollection::make()->category([$this->obCategory->id - 2, $this->obCategory->id]); - - self::assertEquals(2, $obCollection->count(), $sErrorMessage); - self::assertEquals([$this->obElement->id - 1, $this->obElement->id], $obCollection->getIDList(), $sErrorMessage); - - $this->obElement->delete(); - - $obCollection = ProductCollection::make()->category([$this->obCategory->id - 2, $this->obCategory->id]); - - //Check item collection, after element remove - self::assertEquals(1, $obCollection->count(), $sErrorMessage); - self::assertEquals([$this->obElement->id - 1], $obCollection->getIDList(), $sErrorMessage); - } - - /** - * Check item collection "brand" method - */ - public function testBrandFilter() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - ProductCollection::make()->brand($this->obBrand->id); - - $sErrorMessage = 'Product collection "brand" method is not correct'; - - //Check item collection after create - $obCollection = ProductCollection::make()->brand($this->obBrand->id); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->brand_id = $this->obBrand->id + 1; - $this->obElement->save(); - - //Check item collection, after change brand_id field - $obCollection = ProductCollection::make()->brand($this->obBrand->id); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - - $this->obElement->brand_id = $this->obBrand->id; - $this->obElement->save(); - - //Check item collection, after change brand_id field - $obCollection = ProductCollection::make()->brand($this->obBrand->id); - - /** @var ProductItem $obItem */ - $obItem = $obCollection->first(); - self::assertInstanceOf(ProductItem::class, $obItem, $sErrorMessage); - self::assertEquals($this->obElement->id, $obItem->id, $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = ProductCollection::make()->brand($this->obBrand->id); - self::assertEquals(true, $obCollection->isEmpty(), $sErrorMessage); - } - - /** - * Check item collection "sort" method (default, new) - */ - public function testSortingByID() - { - $this->createTestData(1); - $this->createTestData(2); - if(empty($this->obElement)) { - return; - } - - ProductCollection::make()->sort(ProductListStore::SORT_NO); - ProductCollection::make()->sort(ProductListStore::SORT_NEW); - - $sErrorMessage = 'Product collection "sort" method is not correct'; - - //Check item collection after create - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_NO); - self::assertEquals([1,2], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_NEW); - self::assertEquals([2,1], array_values($obCollection->getIDList()), $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_NO); - self::assertEquals([1], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_NEW); - self::assertEquals([1], array_values($obCollection->getIDList()), $sErrorMessage); - } - - /** - * Check item collection "sort" method (price desc, asc) - */ - public function testSortingByPrice() - { - $this->createTestData(1); - $this->createTestData(2); - if(empty($this->obElement)) { - return; - } - - ProductCollection::make()->sort(ProductListStore::SORT_PRICE_ASC); - ProductCollection::make()->sort(ProductListStore::SORT_PRICE_DESC); - - $sErrorMessage = 'Product collection "sort" method is not correct'; - - //Check item collection after create - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_ASC); - self::assertEquals([1,2], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_DESC); - self::assertEquals([2,1], array_values($obCollection->getIDList()), $sErrorMessage); - - //Check item collection, after update offer price - $this->obOffer->price = 1; - $this->obOffer->save(); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_DESC); - self::assertEquals([1,2], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_ASC); - self::assertEquals([2,1], array_values($obCollection->getIDList()), $sErrorMessage); - - $this->obOffer->active = false; - $this->obOffer->save(); - - //Check item collection, after offer active = false - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_ASC); - self::assertEquals([1], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_DESC); - self::assertEquals([1], array_values($obCollection->getIDList()), $sErrorMessage); - - //Check item collection, after offer active = true - $this->obOffer->active = true; - $this->obOffer->save(); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_DESC); - self::assertEquals([1,2], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_ASC); - self::assertEquals([2,1], array_values($obCollection->getIDList()), $sErrorMessage); - - $this->obElement->delete(); - - //Check item collection, after element remove - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_ASC); - self::assertEquals([1], array_values($obCollection->getIDList()), $sErrorMessage); - - $obCollection = ProductCollection::make()->sort(ProductListStore::SORT_PRICE_DESC); - self::assertEquals([1], array_values($obCollection->getIDList()), $sErrorMessage); - } - - /** - * Check item collection "getOfferMinPrice" method - */ - public function testOfferMinPriceMethod() - { - $this->createTestData(1); - $this->createTestData(2); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Product collection "getOfferMinPrice" method is not correct'; - - $obOfferItem = ProductCollection::make()->active()->getOfferMinPrice(); - - self::assertInstanceOf(OfferItem::class, $obOfferItem, $sErrorMessage); - self::assertEquals(1, $obOfferItem->id, $sErrorMessage); - } - - /** - * Check item collection "getOfferMaxPrice" method - */ - public function testOfferMaxPriceMethod() - { - $this->createTestData(1); - $this->createTestData(2); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Product collection "getOfferMaxPrice" method is not correct'; - - $obOfferItem = ProductCollection::make()->active()->getOfferMaxPrice(); - - self::assertInstanceOf(OfferItem::class, $obOfferItem, $sErrorMessage); - self::assertEquals(2, $obOfferItem->id, $sErrorMessage); - } - - /** - * Create brand object for test - * @param int $iCount - */ - protected function createTestData($iCount= null) - { - //Create category data - $arCreateData = $this->arCategoryData; - $arCreateData['slug'] = $arCreateData['slug'].'_parent_'.$iCount; - $this->obCategory = Category::create($arCreateData); - - $arCreateData = $this->arCategoryData; - $arCreateData['slug'] = $arCreateData['slug'].$iCount; - $this->obCategory = Category::create($arCreateData); - $this->obCategory->parent_id = $this->obCategory->id -1; - $this->obCategory->save(); - - //Create brand data - $arCreateData = $this->arBrandData; - $arCreateData['slug'] = $arCreateData['slug'].$iCount; - $this->obBrand = Brand::create($arCreateData); - - //Create product data - $arCreateData = $this->arCreateData; - $arCreateData['active'] = true; - $arCreateData['slug'] = $arCreateData['slug'].$iCount; - $arCreateData['category_id'] = $this->obCategory->id; - $arCreateData['brand_id'] = $this->obBrand->id; - $this->obElement = Product::create($arCreateData); - - //Create offer data - $arCreateData = $this->arOfferData; - $arCreateData['product_id'] = $this->obElement->id; - $arCreateData['price'] = $iCount + $arCreateData['price']; - $this->obOffer = Offer::create($arCreateData); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/item/BrandItemTest.php b/plugins/lovata/shopaholic/tests/unit/item/BrandItemTest.php deleted file mode 100644 index 28637eb5a..000000000 --- a/plugins/lovata/shopaholic/tests/unit/item/BrandItemTest.php +++ /dev/null @@ -1,106 +0,0 @@ - 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - /** - * Check item fields - */ - public function testItemFields() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Brand item data is not correct'; - - $arCreatedData = $this->arCreateData; - $arCreatedData['id'] = $this->obElement->id; - - //Check item fields - $obItem = BrandItem::make($this->obElement->id); - foreach ($arCreatedData as $sField => $sValue) { - self::assertEquals($sValue, $obItem->$sField, $sErrorMessage); - } - } - - /** - * Check update cache item data, after update model data - */ - public function testItemClearCache() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Brand item data is not correct, after model update'; - - $obItem = BrandItem::make($this->obElement->id); - self::assertEquals('name', $obItem->name, $sErrorMessage); - - //Check cache update - $this->obElement->name = 'test'; - $this->obElement->save(); - - $obItem = BrandItem::make($this->obElement->id); - self::assertEquals('test', $obItem->name, $sErrorMessage); - } - - /** - * Check update cache item data, after remove element - */ - public function testRemoveElement() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Brand item data is not correct, after model remove'; - - $obItem = BrandItem::make($this->obElement->id); - self::assertEquals(false, $obItem->isEmpty(), $sErrorMessage); - - //Remove element - $this->obElement->delete(); - - $obItem = BrandItem::make($this->obElement->id); - self::assertEquals(true, $obItem->isEmpty(), $sErrorMessage); - } - - /** - * Create brand object for test - */ - protected function createTestData() - { - //Create new element data - $arCreateData = $this->arCreateData; - $arCreateData['active'] = true; - - $this->obElement = Brand::create($arCreateData); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/item/CategoryItemTest.php b/plugins/lovata/shopaholic/tests/unit/item/CategoryItemTest.php deleted file mode 100644 index 46064d0a6..000000000 --- a/plugins/lovata/shopaholic/tests/unit/item/CategoryItemTest.php +++ /dev/null @@ -1,237 +0,0 @@ - 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - protected $arProductData = [ - 'active' => true, - 'name' => 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - /** - * Check item fields - */ - public function testItemFields() - { - $this->createTestData(); - if (empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Category item data is not correct'; - - $arCreatedData = $this->arCreateData; - $arCreatedData['id'] = $this->obElement->id; - $arCreatedData['nest_depth'] = 0; - $arCreatedData['parent_id'] = 0; - $arCreatedData['children_id_list'] = [$this->obChildElement->id]; - - //Check item fields - $obItem = CategoryItem::make($this->obElement->id); - foreach ($arCreatedData as $sField => $sValue) { - self::assertEquals($sValue, $obItem->$sField, $sErrorMessage); - } - - if (empty($this->obChildElement)) { - return; - } - - $arCreatedData = $this->arCreateData; - $arCreatedData['id'] = $this->obChildElement->id; - $arCreatedData['slug'] = 'slug1'; - $arCreatedData['nest_depth'] = 1; - $arCreatedData['parent_id'] = $this->obElement->id; - - $obChildrenCollection = $obItem->children; - self::assertNotEmpty($obChildrenCollection, $sErrorMessage); - self::assertInstanceOf(CategoryCollection::class, $obChildrenCollection, $sErrorMessage); - - /** @var CategoryItem $obChildItem */ - $obChildItem = $obChildrenCollection->shift(); - - //Check item fields - foreach ($arCreatedData as $sField => $sValue) { - self::assertEquals($sValue, $obChildItem->$sField, $sErrorMessage); - } - } - - /** - * Check update cache item data, after update model data - */ - public function testItemClearCache() - { - $this->createTestData(); - if (empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Category item data is not correct, after model update'; - - $obItem = CategoryItem::make($this->obElement->id); - self::assertEquals('name', $obItem->name, $sErrorMessage); - - //Check cache update - $this->obElement->name = 'test'; - $this->obElement->save(); - - $obItem = CategoryItem::make($this->obElement->id); - self::assertEquals('test', $obItem->name, $sErrorMessage); - } - - /** - * Check update cache item data, after remove element - */ - public function testRemoveElement() - { - $this->createTestData(); - if (empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Category item data is not correct, after model remove'; - - $obItem = CategoryItem::make($this->obChildElement->id); - self::assertEquals(false, $obItem->isEmpty(), $sErrorMessage); - - //Remove element - $this->obChildElement->delete(); - - $obItem = CategoryItem::make($this->obChildElement->id); - self::assertEquals(true, $obItem->isEmpty(), $sErrorMessage); - - $obItem = CategoryItem::make($this->obElement->id); - $obChildCollection = $obItem->children; - self::assertEquals(true, $obChildCollection->isEmpty(), $sErrorMessage); - } - - /** - * Test product_count field for main category - */ - public function testProductCountField() - { - $this->createTestData(); - if (empty($this->obElement)) { - return; - } - - $obParentItem = CategoryItem::make($this->obElement->id); - $obItem = CategoryItem::make($this->obChildElement->id); - - self::assertEquals(1, $obParentItem->product_count); - self::assertEquals(1, $obItem->product_count); - - //Set empty category_id in Product object - $this->obProduct->category_id = null; - $this->obProduct->save(); - - $obParentItem = CategoryItem::make($this->obElement->id); - $obItem = CategoryItem::make($this->obChildElement->id); - - self::assertEquals(0, $obParentItem->product_count); - self::assertEquals(0, $obItem->product_count); - - //Set parent category_id in Product object - $this->obProduct->category_id = $this->obElement->id; - $this->obProduct->save(); - - $obParentItem = CategoryItem::make($this->obElement->id); - $obItem = CategoryItem::make($this->obChildElement->id); - - self::assertEquals(1, $obParentItem->product_count); - self::assertEquals(0, $obItem->product_count); - - //Set child category_id in Product object - $this->obProduct->category_id = $this->obChildElement->id; - $this->obProduct->save(); - - $obParentItem = CategoryItem::make($this->obElement->id); - $obItem = CategoryItem::make($this->obChildElement->id); - - self::assertEquals(1, $obParentItem->product_count); - self::assertEquals(1, $obItem->product_count); - - //Set active == false in Product object - $this->obProduct->active = false; - $this->obProduct->save(); - - ProductCollection::make()->active()->save(CategoryItem::class.'_active'); - $obParentItem = CategoryItem::make($this->obElement->id); - $obItem = CategoryItem::make($this->obChildElement->id); - - self::assertEquals(0, $obParentItem->product_count); - self::assertEquals(0, $obItem->product_count); - - //Set active == true in Product object - $this->obProduct->active = true; - $this->obProduct->save(); - - ProductCollection::make()->active()->save(CategoryItem::class.'_active'); - $obParentItem = CategoryItem::make($this->obElement->id); - $obItem = CategoryItem::make($this->obChildElement->id); - - self::assertEquals(1, $obParentItem->product_count); - self::assertEquals(1, $obItem->product_count); - } - - /** - * Create data for test - */ - protected function createTestData() - { - //Create new element data - $arCreatedData = $this->arCreateData; - $arCreatedData['active'] = true; - - $this->obElement = Category::create($arCreatedData); - - $arCreatedData = $this->arCreateData; - $arCreatedData['active'] = true; - $arCreatedData['slug'] = 'slug1'; - - $this->obChildElement = Category::create($arCreatedData); - - $this->obChildElement->parent_id = $this->obElement->id; - $this->obChildElement->nest_depth = 1; - $this->obChildElement->save(); - - $arProductData = $this->arProductData; - $arProductData['category_id'] = $this->obChildElement->id; - - $this->obProduct = Product::create($arProductData); - } -} diff --git a/plugins/lovata/shopaholic/tests/unit/item/MeasureItemTest.php b/plugins/lovata/shopaholic/tests/unit/item/MeasureItemTest.php deleted file mode 100644 index b97448bc3..000000000 --- a/plugins/lovata/shopaholic/tests/unit/item/MeasureItemTest.php +++ /dev/null @@ -1,101 +0,0 @@ - 'name', - ]; - - /** - * Check item fields - */ - public function testItemFields() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Measure item data is not correct'; - - $arCreatedData = $this->arCreateData; - $arCreatedData['id'] = $this->obElement->id; - - //Check item fields - $obItem = MeasureItem::make($this->obElement->id); - foreach ($arCreatedData as $sField => $sValue) { - self::assertEquals($sValue, $obItem->$sField, $sErrorMessage); - } - } - - /** - * Check update cache item data, after update model data - */ - public function testItemClearCache() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Measure item data is not correct, after model update'; - - $obItem = MeasureItem::make($this->obElement->id); - self::assertEquals('name', $obItem->name, $sErrorMessage); - - //Check cache update - $this->obElement->name = 'test'; - $this->obElement->save(); - - $obItem = MeasureItem::make($this->obElement->id); - self::assertEquals('test', $obItem->name, $sErrorMessage); - } - - /** - * Check update cache item data, after remove element - */ - public function testRemoveElement() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Measure item data is not correct, after model remove'; - - $obItem = MeasureItem::make($this->obElement->id); - self::assertEquals(false, $obItem->isEmpty(), $sErrorMessage); - - //Remove element - $this->obElement->delete(); - - $obItem = MeasureItem::make($this->obElement->id); - self::assertEquals(true, $obItem->isEmpty(), $sErrorMessage); - } - - /** - * Create measure object for test - */ - protected function createTestData() - { - //Create new element data - $arCreateData = $this->arCreateData; - - $this->obElement = Measure::create($arCreateData); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/item/OfferItemTest.php b/plugins/lovata/shopaholic/tests/unit/item/OfferItemTest.php deleted file mode 100644 index da51df7eb..000000000 --- a/plugins/lovata/shopaholic/tests/unit/item/OfferItemTest.php +++ /dev/null @@ -1,142 +0,0 @@ - 'name', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - 'price' => '10,50', - 'old_price' => '11,50', - 'quantity' => 5, - ]; - - protected $arProductData = [ - 'name' => 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - /** - * Check item fields - */ - public function testItemFields() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Offer item data is not correct'; - - $arCreatedData = $this->arCreateData; - $arCreatedData['id'] = $this->obElement->id; - $arCreatedData['product_id'] = $this->obProduct->id; - - $arCreatedData['price'] = 10.50; - $arCreatedData['old_price'] = 11.50; - $arCreatedData['price_value'] = 10.50; - $arCreatedData['old_price_value'] = 11.50; - - //Check item fields - $obItem = OfferItem::make($this->obElement->id); - foreach ($arCreatedData as $sField => $sValue) { - self::assertEquals($sValue, $obItem->$sField, $sErrorMessage); - } - - //Check product item data - $obProductItem = $obItem->product; - self::assertInstanceOf(ProductItem::class, $obProductItem); - self::assertEquals($this->obProduct->id, $obProductItem->id, $sErrorMessage); - } - - /** - * Check update cache item data, after update model data - */ - public function testItemClearCache() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Offer item data is not correct, after model update'; - - $obItem = OfferItem::make($this->obElement->id); - self::assertEquals('name', $obItem->name, $sErrorMessage); - - //Check cache update - $this->obElement->name = 'test'; - $this->obElement->save(); - - $obItem = OfferItem::make($this->obElement->id); - self::assertEquals('test', $obItem->name, $sErrorMessage); - } - - /** - * Check item data, after delete model - */ - public function testDeleteElement() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Offer item data is not correct, after model delete'; - - $obItem = OfferItem::make($this->obElement->id); - self::assertEquals(false, $obItem->isEmpty(), $sErrorMessage); - - //Check active flag in item data - $this->obElement->delete(); - - $obItem = OfferItem::make($this->obElement->id); - self::assertEquals(false, $obItem->isEmpty(), $sErrorMessage); - } - - /** - * Create test data - */ - protected function createTestData() - { - Settings::set('decimals', 2); - PriceHelper::forgetInstance(); - - //Create product data - $arCreateData = $this->arProductData; - $arCreateData['active'] = true; - $this->obProduct = Product::create($arCreateData); - - //Create new element data - $arCreateData = $this->arCreateData; - $arCreateData['active'] = true; - $arCreateData['product_id'] = $this->obProduct->id; - - $this->obElement = Offer::create($arCreateData); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/item/ProductItemTest.php b/plugins/lovata/shopaholic/tests/unit/item/ProductItemTest.php deleted file mode 100644 index ce755cd28..000000000 --- a/plugins/lovata/shopaholic/tests/unit/item/ProductItemTest.php +++ /dev/null @@ -1,186 +0,0 @@ - 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - protected $arOfferData = [ - 'active' => true, - 'name' => 'name', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - 'price' => '10,50', - 'old_price' => '11,50', - 'quantity' => 5, - ]; - - protected $arBrandData = [ - 'active' => true, - 'name' => 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - ]; - - protected $arCategoryData = [ - 'active' => true, - 'name' => 'name', - 'slug' => 'slug', - 'code' => 'code', - 'preview_text' => 'preview_text', - 'description' => 'description', - 'nest_depth' => 0, - 'parent_id' => 0, - ]; - - /** - * Check item fields - */ - public function testItemFields() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Product item data is not correct'; - - $arCreatedData = $this->arCreateData; - $arCreatedData['id'] = $this->obElement->id; - $arCreatedData['category_id'] = $this->obCategory->id; - $arCreatedData['brand_id'] = $this->obBrand->id; - $arCreatedData['offer_id_list'] = [$this->obOffer->id]; - - //Check item fields - $obItem = ProductItem::make($this->obElement->id); - foreach ($arCreatedData as $sField => $sValue) { - self::assertEquals($sValue, $obItem->$sField, $sErrorMessage); - } - - //Check category item data - $obCategoryItem = $obItem->category; - self::assertInstanceOf(CategoryItem::class, $obCategoryItem); - self::assertEquals($this->obCategory->id, $obCategoryItem->id, $sErrorMessage); - - //Check brand item data - $obBrandItem = $obItem->brand; - self::assertInstanceOf(BrandItem::class, $obBrandItem); - self::assertEquals($this->obBrand->id, $obBrandItem->id, $sErrorMessage); - - //Check offer collection - $obOfferCollection = $obItem->offer; - self::assertInstanceOf(OfferCollection::class, $obOfferCollection); - - /** @var OfferItem $obOfferItem */ - $obOfferItem = $obOfferCollection->first(); - self::assertInstanceOf(OfferItem::class, $obOfferItem); - self::assertEquals($this->obOffer->id, $obOfferItem->id, $sErrorMessage); - } - - /** - * Check update cache item data, after update model data - */ - public function testItemClearCache() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Product item data is not correct, after model update'; - - $obItem = ProductItem::make($this->obElement->id); - self::assertEquals('name', $obItem->name, $sErrorMessage); - - //Check cache update - $this->obElement->name = 'test'; - $this->obElement->save(); - - $obItem = ProductItem::make($this->obElement->id); - self::assertEquals('test', $obItem->name, $sErrorMessage); - } - - /** - * Check item data, after delete model - */ - public function testDeleteElement() - { - $this->createTestData(); - if(empty($this->obElement)) { - return; - } - - $sErrorMessage = 'Product item data is not correct, after model delete'; - - $obItem = ProductItem::make($this->obElement->id); - self::assertEquals(false, $obItem->isEmpty(), $sErrorMessage); - - //Check active flag in item data - $this->obElement->delete(); - - $obItem = ProductItem::make($this->obElement->id); - self::assertEquals(false, $obItem->isEmpty(), $sErrorMessage); - } - - /** - * Create test data - */ - protected function createTestData() - { - //Create category data - $this->obCategory = Category::create($this->arCategoryData); - - //Create brand data - $this->obBrand = Brand::create($this->arBrandData); - - //Create product data - $arCreateData = $this->arCreateData; - $arCreateData['active'] = true; - $arCreateData['category_id'] = $this->obCategory->id; - $arCreateData['brand_id'] = $this->obBrand->id; - $this->obElement = Product::create($arCreateData); - - //Create offer data - $arCreateData = $this->arOfferData; - $arCreateData['product_id'] = $this->obElement->id; - $this->obOffer = Offer::create($arCreateData); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/models/BrandTest.php b/plugins/lovata/shopaholic/tests/unit/models/BrandTest.php deleted file mode 100644 index 2f3dc1508..000000000 --- a/plugins/lovata/shopaholic/tests/unit/models/BrandTest.php +++ /dev/null @@ -1,53 +0,0 @@ -sModelClass = Brand::class; - parent::__construct(); - } - - /** - * Check model "product" relation config - */ - public function testHasProductRelation() - { - $sErrorMessage = $this->sModelClass.' model has not correct "product" relation config'; - - /** @var Brand $obModel */ - $obModel = new Brand(); - self::assertNotEmpty($obModel->hasMany, $sErrorMessage); - self::assertArrayHasKey('product', $obModel->hasMany, $sErrorMessage); - self::assertEquals(Product::class, $obModel->hasMany['product'], $sErrorMessage); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/models/CategoryTest.php b/plugins/lovata/shopaholic/tests/unit/models/CategoryTest.php deleted file mode 100644 index 44e1af372..000000000 --- a/plugins/lovata/shopaholic/tests/unit/models/CategoryTest.php +++ /dev/null @@ -1,53 +0,0 @@ -sModelClass = Category::class; - parent::__construct(); - } - - /** - * Check model "product" relation config - */ - public function testHasProductRelation() - { - $sErrorMessage = $this->sModelClass.' model has not correct "product" relation config'; - - /** @var Category $obModel */ - $obModel = new Category(); - self::assertNotEmpty($obModel->hasMany, $sErrorMessage); - self::assertArrayHasKey('product', $obModel->hasMany, $sErrorMessage); - self::assertEquals(Product::class, $obModel->hasMany['product'], $sErrorMessage); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/models/MeasureTest.php b/plugins/lovata/shopaholic/tests/unit/models/MeasureTest.php deleted file mode 100644 index 9b406228c..000000000 --- a/plugins/lovata/shopaholic/tests/unit/models/MeasureTest.php +++ /dev/null @@ -1,31 +0,0 @@ -sModelClass = Measure::class; - parent::__construct(); - } -} diff --git a/plugins/lovata/shopaholic/tests/unit/models/OfferTest.php b/plugins/lovata/shopaholic/tests/unit/models/OfferTest.php deleted file mode 100644 index 198455522..000000000 --- a/plugins/lovata/shopaholic/tests/unit/models/OfferTest.php +++ /dev/null @@ -1,51 +0,0 @@ -sModelClass = Offer::class; - parent::__construct(); - } - - /** - * Check model "product" relation config - */ - public function testHasProductRelation() - { - $sErrorMessage = $this->sModelClass.' model has not correct "product" relation config'; - - /** @var Offer $obModel */ - $obModel = new Offer(); - self::assertNotEmpty($obModel->belongsTo, $sErrorMessage); - self::assertArrayHasKey('product', $obModel->belongsTo, $sErrorMessage); - self::assertEquals([Product::class], $obModel->belongsTo['product'], $sErrorMessage); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/tests/unit/models/ProductTest.php b/plugins/lovata/shopaholic/tests/unit/models/ProductTest.php deleted file mode 100644 index 77f641c9a..000000000 --- a/plugins/lovata/shopaholic/tests/unit/models/ProductTest.php +++ /dev/null @@ -1,82 +0,0 @@ -sModelClass = Product::class; - parent::__construct(); - } - - /** - * Check model "offer" relation config - */ - public function testHasOfferRelation() - { - $sErrorMessage = $this->sModelClass.' model has not correct "offer" relation config'; - - /** @var Product $obModel */ - $obModel = new Product(); - self::assertNotEmpty($obModel->hasMany, $sErrorMessage); - self::assertArrayHasKey('offer', $obModel->hasMany, $sErrorMessage); - self::assertEquals([Offer::class], $obModel->hasMany['offer'], $sErrorMessage); - } - - /** - * Check model "category" relation config - */ - public function testHasCategoryRelation() - { - $sErrorMessage = $this->sModelClass.' model has not correct "category" relation config'; - - /** @var Product $obModel */ - $obModel = new Product(); - self::assertNotEmpty($obModel->belongsTo, $sErrorMessage); - self::assertArrayHasKey('category', $obModel->belongsTo, $sErrorMessage); - self::assertEquals([Category::class], $obModel->belongsTo['category'], $sErrorMessage); - } - - /** - * Check model "brand" relation config - */ - public function testHasBrandRelation() - { - $sErrorMessage = $this->sModelClass.' model has not correct "brand" relation config'; - - /** @var Product $obModel */ - $obModel = new Product(); - self::assertNotEmpty($obModel->belongsTo, $sErrorMessage); - self::assertArrayHasKey('brand', $obModel->belongsTo, $sErrorMessage); - self::assertEquals([Brand::class], $obModel->belongsTo['brand'], $sErrorMessage); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/updates/create_table_additional_categories.php b/plugins/lovata/shopaholic/updates/create_table_additional_categories.php deleted file mode 100644 index d26d9ec06..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_additional_categories.php +++ /dev/null @@ -1,38 +0,0 @@ -engine = 'InnoDB'; - $obTable->integer('category_id')->unsigned(); - $obTable->integer('product_id')->unsigned(); - $obTable->primary(['category_id', 'product_id'], 'product_category'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists('lovata_shopaholic_additional_categories'); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_brands.php b/plugins/lovata/shopaholic/updates/create_table_brands.php deleted file mode 100644 index df33941d5..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_brands.php +++ /dev/null @@ -1,48 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->boolean('active')->default(0); - $obTable->string('name'); - $obTable->string('slug')->unique(); - $obTable->string('code')->nullable(); - $obTable->string('external_id')->nullable(); - $obTable->text('preview_text')->nullable(); - $obTable->text('description')->nullable(); - $obTable->integer('sort_order')->nullable(); - $obTable->timestamps(); - - $obTable->index('name'); - $obTable->index('code'); - $obTable->index('external_id'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists('lovata_shopaholic_brands'); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_categories.php b/plugins/lovata/shopaholic/updates/create_table_categories.php deleted file mode 100644 index d316eb7e5..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_categories.php +++ /dev/null @@ -1,52 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->boolean('active')->default(0); - $obTable->string('name'); - $obTable->string('slug')->unique(); - $obTable->string('code')->nullable(); - $obTable->string('external_id')->nullable(); - $obTable->text('preview_text')->nullable(); - $obTable->text('description')->nullable(); - $obTable->integer('parent_id')->nullable()->unsigned(); - $obTable->integer('nest_left')->nullable()->unsigned(); - $obTable->integer('nest_right')->nullable()->unsigned(); - $obTable->integer('nest_depth')->nullable()->unsigned(); - $obTable->timestamps(); - - $obTable->index('name'); - $obTable->index('code'); - $obTable->index('external_id'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists('lovata_shopaholic_categories'); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_currency.php b/plugins/lovata/shopaholic/updates/create_table_currency.php deleted file mode 100644 index 20276bc24..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_currency.php +++ /dev/null @@ -1,49 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->boolean('active')->default(0); - $obTable->boolean('is_default')->default(0); - $obTable->string('name'); - $obTable->string('code')->unique(); - $obTable->string('symbol'); - $obTable->decimal('rate'); - $obTable->string('external_id')->nullable(); - $obTable->integer('sort_order')->nullable(); - $obTable->softDeletes(); - $obTable->timestamps(); - - $obTable->index('external_id'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_measure.php b/plugins/lovata/shopaholic/updates/create_table_measure.php deleted file mode 100644 index f4c93a657..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_measure.php +++ /dev/null @@ -1,58 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id'); - $obTable->string('name'); - $obTable->string('code')->nullable(); - $obTable->timestamps(); - }); - - if (!Schema::hasTable(self::OLD_TABLE_NAME)) { - return; - } - - $obMeasureList = DB::table(self::OLD_TABLE_NAME)->get(); - if ($obMeasureList->isEmpty()) { - return; - } - - foreach ($obMeasureList as $obMeasure) { - Measure::create(['name' => $obMeasure->name]); - } - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} \ No newline at end of file diff --git a/plugins/lovata/shopaholic/updates/create_table_offers.php b/plugins/lovata/shopaholic/updates/create_table_offers.php deleted file mode 100644 index f3a8d7515..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_offers.php +++ /dev/null @@ -1,56 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->boolean('active')->default(0); - $obTable->integer('product_id')->unsigned()->nullable(); - $obTable->string('name'); - $obTable->string('code')->nullable(); - $obTable->string('external_id')->nullable(); - $obTable->decimal('price', 15, 2)->nullable(); - $obTable->decimal('old_price', 15, 2)->nullable(); - $obTable->integer('quantity')->unsigned()->default(0); - $obTable->text('preview_text')->nullable(); - $obTable->text('description')->nullable(); - $obTable->softDeletes(); - $obTable->timestamps(); - - $obTable->index('name'); - $obTable->index('code'); - $obTable->index('external_id'); - $obTable->index('product_id'); - $obTable->index('price'); - $obTable->index('old_price'); - $obTable->index('quantity'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists('lovata_shopaholic_offers'); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_price_types.php b/plugins/lovata/shopaholic/updates/create_table_price_types.php deleted file mode 100644 index ee41584a5..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_price_types.php +++ /dev/null @@ -1,48 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->boolean('active')->default(0); - $obTable->string('name'); - $obTable->string('code')->nullable(); - $obTable->string('external_id')->nullable(); - $obTable->integer('currency_id')->nullable(); - $obTable->integer('sort_order')->nullable(); - $obTable->softDeletes(); - $obTable->timestamps(); - - $obTable->index('code'); - $obTable->index('external_id'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_prices.php b/plugins/lovata/shopaholic/updates/create_table_prices.php deleted file mode 100644 index 0422b00c6..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_prices.php +++ /dev/null @@ -1,50 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->integer('item_id')->unsigned(); - $obTable->string('item_type'); - $obTable->decimal('price', 15, 2)->nullable(); - $obTable->decimal('old_price', 15, 2)->nullable(); - $obTable->integer('price_type_id')->unsigned()->nullable(); - $obTable->timestamps(); - - $obTable->index('item_id'); - $obTable->index('item_type'); - $obTable->index('price'); - $obTable->index('old_price'); - $obTable->index('price_type_id'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_products.php b/plugins/lovata/shopaholic/updates/create_table_products.php deleted file mode 100644 index 02e32bda2..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_products.php +++ /dev/null @@ -1,53 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->boolean('active')->default(0); - $obTable->string('name'); - $obTable->string('slug')->unique(); - $obTable->integer('brand_id')->nullable()->unsigned(); - $obTable->integer('category_id')->nullable()->unsigned(); - $obTable->string('external_id')->nullable(); - $obTable->string('code')->nullable(); - $obTable->text('preview_text')->nullable(); - $obTable->text('description')->nullable(); - $obTable->softDeletes(); - $obTable->timestamps(); - - $obTable->index('name'); - $obTable->index('code'); - $obTable->index('external_id'); - $obTable->index('brand_id'); - $obTable->index('category_id'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists('lovata_shopaholic_products'); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_promo_block.php b/plugins/lovata/shopaholic/updates/create_table_promo_block.php deleted file mode 100644 index 566c4d8a1..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_promo_block.php +++ /dev/null @@ -1,52 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->boolean('active')->default(0); - $obTable->boolean('hidden')->default(0); - $obTable->string('name'); - $obTable->string('slug')->unique(); - $obTable->string('type'); - $obTable->string('code')->nullable(); - $obTable->dateTime('date_begin'); - $obTable->dateTime('date_end')->nullable(); - $obTable->text('preview_text')->nullable(); - $obTable->text('description')->nullable(); - $obTable->integer('sort_order')->nullable(); - $obTable->timestamps(); - - $obTable->index('name'); - $obTable->index('code'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_promo_block_relation.php b/plugins/lovata/shopaholic/updates/create_table_promo_block_relation.php deleted file mode 100644 index 75a93542a..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_promo_block_relation.php +++ /dev/null @@ -1,39 +0,0 @@ -engine = 'InnoDB'; - $obTable->integer('promo_id')->unsigned(); - $obTable->integer('product_id')->unsigned(); - $obTable->primary(['promo_id', 'product_id'], 'product_promo'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_tax_category_relation.php b/plugins/lovata/shopaholic/updates/create_table_tax_category_relation.php deleted file mode 100644 index fef08e7f2..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_tax_category_relation.php +++ /dev/null @@ -1,39 +0,0 @@ -engine = 'InnoDB'; - $obTable->integer('tax_id')->unsigned(); - $obTable->integer('category_id')->unsigned(); - $obTable->primary(['category_id', 'tax_id'], 'tax_category'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_tax_country_relation.php b/plugins/lovata/shopaholic/updates/create_table_tax_country_relation.php deleted file mode 100644 index 6df74a2ea..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_tax_country_relation.php +++ /dev/null @@ -1,39 +0,0 @@ -engine = 'InnoDB'; - $obTable->integer('tax_id')->unsigned(); - $obTable->integer('country_id')->unsigned(); - $obTable->primary(['country_id', 'tax_id'], 'tax_country'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_tax_product_relation.php b/plugins/lovata/shopaholic/updates/create_table_tax_product_relation.php deleted file mode 100644 index 2637ce9ee..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_tax_product_relation.php +++ /dev/null @@ -1,39 +0,0 @@ -engine = 'InnoDB'; - $obTable->integer('tax_id')->unsigned(); - $obTable->integer('product_id')->unsigned(); - $obTable->primary(['product_id', 'tax_id'], 'tax_product'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_tax_state_relation.php b/plugins/lovata/shopaholic/updates/create_table_tax_state_relation.php deleted file mode 100644 index caf576387..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_tax_state_relation.php +++ /dev/null @@ -1,39 +0,0 @@ -engine = 'InnoDB'; - $obTable->integer('tax_id')->unsigned(); - $obTable->integer('state_id')->unsigned(); - $obTable->primary(['state_id', 'tax_id'], 'tax_state'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/create_table_taxes.php b/plugins/lovata/shopaholic/updates/create_table_taxes.php deleted file mode 100644 index 2cdd8bd76..000000000 --- a/plugins/lovata/shopaholic/updates/create_table_taxes.php +++ /dev/null @@ -1,45 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); - $obTable->boolean('active')->default(0); - $obTable->boolean('is_global')->default(0); - $obTable->decimal('percent')->nullable(); - $obTable->string('name'); - $obTable->text('description')->nullable(); - $obTable->integer('sort_order')->nullable(); - $obTable->softDeletes(); - $obTable->timestamps(); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE_NAME); - } -} diff --git a/plugins/lovata/shopaholic/updates/seeder_create_default_currency.php b/plugins/lovata/shopaholic/updates/seeder_create_default_currency.php deleted file mode 100644 index 83356d8c5..000000000 --- a/plugins/lovata/shopaholic/updates/seeder_create_default_currency.php +++ /dev/null @@ -1,47 +0,0 @@ - 0) { - return; - } - - $arDefaultCurrencyData = [ - 'active' => true, - 'is_default' => true, - 'name' => 'USD', - 'code' => 'USD', - 'symbol' => '$', - 'rate' => 1, - 'sort_order' => 1, - ]; - - //Get currency value from settings - $sCurrency = trim(Settings::getValue('currency')); - if (!empty($sCurrency)) { - $arDefaultCurrencyData['name'] = $sCurrency; - $arDefaultCurrencyData['code'] = $sCurrency; - $arDefaultCurrencyData['symbol'] = $sCurrency; - } - - try { - Currency::create($arDefaultCurrencyData); - } catch (\Exception $obException) { - return; - } - } -} diff --git a/plugins/lovata/shopaholic/updates/seeder_price_format.php b/plugins/lovata/shopaholic/updates/seeder_price_format.php deleted file mode 100644 index 4a463fc80..000000000 --- a/plugins/lovata/shopaholic/updates/seeder_price_format.php +++ /dev/null @@ -1,21 +0,0 @@ -get(); - - //Get offer list - $obOfferList = Offer::withTrashed()->get(); - if ($obOfferList->isEmpty()) { - return; - } - - foreach ($obOfferList as $obOffer) { - $obOfferModel = $obPriceList->where('id', $obOffer->id)->first(); - $obOffer->price = $obOfferModel->price; - $obOffer->old_price = $obOfferModel->old_price; - $obOffer->save(); - } - } -} diff --git a/plugins/lovata/shopaholic/updates/update_table_offers_add_dimensions_field.php b/plugins/lovata/shopaholic/updates/update_table_offers_add_dimensions_field.php deleted file mode 100644 index 7433b54dd..000000000 --- a/plugins/lovata/shopaholic/updates/update_table_offers_add_dimensions_field.php +++ /dev/null @@ -1,97 +0,0 @@ - $sFieldName) { - if (Schema::hasColumn(self::TABLE_NAME, $sFieldName)) { - unset($arNewFieldList[$iKey]); - } - } - - if (empty($arNewFieldList)) { - return; - } - - Schema::table(self::TABLE_NAME, function (Blueprint $obTable) use ($arNewFieldList) { - if (in_array('quantity_in_unit', $arNewFieldList)) { - $obTable->double('quantity_in_unit')->nullable()->after('quantity'); - } - if (in_array('measure_of_unit_id', $arNewFieldList)) { - $obTable->integer('measure_of_unit_id')->nullable()->after('quantity'); - } - if (in_array('width', $arNewFieldList)) { - $obTable->double('width')->nullable()->after('quantity'); - } - if (in_array('length', $arNewFieldList)) { - $obTable->double('length')->nullable()->after('quantity'); - } - if (in_array('height', $arNewFieldList)) { - $obTable->double('height')->nullable()->after('quantity'); - } - if (in_array('weight', $arNewFieldList)) { - $obTable->double('weight')->nullable()->after('quantity'); - } - }); - } - - /** - * Rollback migration - */ - public function down() - { - if (!Schema::hasTable(self::TABLE_NAME)) { - return; - } - - $arNewFieldList = [ - 'weight', - 'height', - 'length', - 'width', - 'measure_of_unit_id', - 'quantity_in_unit', - ]; - - foreach ($arNewFieldList as $iKey => $sFieldName) { - if (!Schema::hasColumn(self::TABLE_NAME, $sFieldName)) { - unset($arNewFieldList[$iKey]); - } - } - - if (empty($arNewFieldList)) { - return; - } - - Schema::table(self::TABLE_NAME, function (Blueprint $obTable) use ($arNewFieldList) { - $obTable->dropColumn($arNewFieldList); - }); - } -} diff --git a/plugins/lovata/shopaholic/updates/update_table_offers_add_measure_field.php b/plugins/lovata/shopaholic/updates/update_table_offers_add_measure_field.php deleted file mode 100644 index 187211cb0..000000000 --- a/plugins/lovata/shopaholic/updates/update_table_offers_add_measure_field.php +++ /dev/null @@ -1,42 +0,0 @@ -integer('measure_id')->nullable()->after('quantity'); - }); - } - - /** - * Rollback migration - */ - public function down() - { - if (!Schema::hasTable(self::TABLE_NAME) || !Schema::hasColumn(self::TABLE_NAME, 'measure_id')) { - return; - } - - Schema::table(self::TABLE_NAME, function (Blueprint $obTable) { - $obTable->dropColumn(['measure_id']); - }); - } -} diff --git a/plugins/lovata/shopaholic/updates/update_table_offers_change_quantity_field.php b/plugins/lovata/shopaholic/updates/update_table_offers_change_quantity_field.php deleted file mode 100644 index cf44688af..000000000 --- a/plugins/lovata/shopaholic/updates/update_table_offers_change_quantity_field.php +++ /dev/null @@ -1,42 +0,0 @@ -integer('quantity')->default(0)->change(); - }); - } - - /** - * Rollback migration - */ - public function down() - { - if (!Schema::hasTable(self::TABLE_NAME) || !Schema::hasColumn(self::TABLE_NAME, 'quantity')) { - return; - } - - Schema::table(self::TABLE_NAME, function (Blueprint $obTable) { - $obTable->integer('quantity')->unsigned()->default(0)->change(); - }); - } -} diff --git a/plugins/lovata/shopaholic/updates/update_table_offers_remove_price_field.php b/plugins/lovata/shopaholic/updates/update_table_offers_remove_price_field.php deleted file mode 100644 index 1c062a259..000000000 --- a/plugins/lovata/shopaholic/updates/update_table_offers_remove_price_field.php +++ /dev/null @@ -1,46 +0,0 @@ -dropColumn(['price', 'old_price']); - }); - } - - /** - * Rollback migration - */ - public function down() - { - if (!Schema::hasTable(self::TABLE_NAME) || Schema::hasColumn(self::TABLE_NAME, 'price')) { - return; - } - - Schema::table(self::TABLE_NAME, function (Blueprint $obTable) { - $obTable->decimal('price', 15, 2)->nullable(); - $obTable->decimal('old_price', 15, 2)->nullable(); - - $obTable->index('price'); - $obTable->index('old_price'); - }); - } -} diff --git a/plugins/lovata/shopaholic/updates/update_table_users_add_currency_field.php b/plugins/lovata/shopaholic/updates/update_table_users_add_currency_field.php deleted file mode 100644 index feac5142a..000000000 --- a/plugins/lovata/shopaholic/updates/update_table_users_add_currency_field.php +++ /dev/null @@ -1,50 +0,0 @@ -string('active_currency_code')->nullable(); - }); - } - - if (Schema::hasTable('users') && !Schema::hasColumn('users', 'active_currency_code')) { - - Schema::table('users', function (Blueprint $obTable) { - $obTable->string('active_currency_code')->nullable(); - }); - } - } - - /** - * Rollback migration - */ - public function down() - { - if (Schema::hasTable('lovata_buddies_users') && Schema::hasColumn('lovata_buddies_users', 'active_currency_code')) { - Schema::table('lovata_buddies_users', function (Blueprint $obTable) { - $obTable->dropColumn(['active_currency_code']); - }); - } - - if (Schema::hasTable('users') && Schema::hasColumn('users', 'active_currency_code')) { - Schema::table('users', function (Blueprint $obTable) { - $obTable->dropColumn(['active_currency_code']); - }); - } - } -} diff --git a/plugins/lovata/shopaholic/updates/version.yaml b/plugins/lovata/shopaholic/updates/version.yaml deleted file mode 100644 index 08aac8c4a..000000000 --- a/plugins/lovata/shopaholic/updates/version.yaml +++ /dev/null @@ -1,136 +0,0 @@ -1.0.0: - - 'Initialize plugin.' - - create_table_categories.php - - create_table_products.php - - create_table_offers.php - - create_table_brands.php -1.1.0: - - 'Add integration with "Popularity for Shopaholic" and "Tags for Shopaholic" plugins' -1.2.0: - - 'preview_image, images fields in item classes returns \System\Models\File class objects. Add integration with "Reviews for Shopaholic" plugin' -1.2.1: - - 'Remove php short tags from offers/update.htm' -1.2.2: - - 'Add additional cache cleaning after category reordering' -1.2.3: - - 'Adding additional cache cleaning for the sorted list of brands, after the creation of a new brand. Requires Toolbox plugin version 1.3.0 and later.' -1.3.0: - - 'Add menu types for integration with the StaticPage plugin. Add getPageUrl() method to the CategoryItem class. Requires Toolbox plugin version 1.4.0 and later. Thanks for contribution Alvaro Cánepa.' -1.3.1: - - 'Fix: processing of the "nesting" flag for the menu type "catalog"' -1.4.0: - - 'Replace code of product sorting by popularity and rating from Shopaholic to extension plugins. Add event "shopaholic.sorting.get.list" for custom sorting of products. Add integration with "Related products for Shopaholic" and "Accessories for Shopaholic" plugins' -1.4.1: - - 'Update annotations for "Reviews for Shopaholic" plugin. Fix $dates array in Product model. Thanks for contribution Alexander Shapoval.' -1.5.0: - - 'Add integration with "Search for Shopaholic","Sphinx for Shopaholic" plugins' -1.6.0: - - 'Add integration with "Compare for Shopaholic"' -1.7.0: - - 'Added translation into French. Thanks for contribution philmarc.' -1.8.0: - - 'Add integration with "Viewed products for Shopaholic" plugin' -1.9.0: - - 'Add PriceHelperTrait, TraitCached in models. Add active() method to CategoryCollection class. Move PriceHelper class from Shopaholic plugin to Toolbox plugin. Add new store classes. Refactoring *Store, *Item, *Collection classes. Requires Toolbox plugin version 1.10.0 and later.' - - seeder_price_format.php -1.10.0: - - 'Adding relation between Product model and additional categories. Adding ability to get list of products by category ID list, by the parent category ID.' - - create_table_additional_categories.php -1.11.0: - - 'Adding getPageUrl() method to ProductItem, BrandItem classes.' -1.11.1: - - 'Adding "field.additional_category" value to lang files. Fixed displaying "additional categories" field only for update/preview forms.' -1.11.2: - - 'Fix work with *Store classes in *Handler classes.' -1.11.3: - - 'Fix error in ProductCollection class, if product list by category is empty.' -1.12.0: - - 'Added type returned by methods in AbstractStore * classes' -1.13.0: - - 'Added PromoBlock model. Promo blocks are sections of content that you can place throughout your eCommerce website and advertise products, offers, discounts, campaigns, and other activity. Added PromoBlockData, PromoBlockPage, PromoBlockList components. Added PromoBlockItem, PromoBlockCollection classes.' - - create_table_promo_block.php - - create_table_promo_block_relation.php -1.13.1: - - 'Added annotations for integration with Coupons for Shopaholic, Discounts for Shopaholic, Campaigns for Shopaholic plugins.' -1.14.0: - - 'Added "additional_category" field to ProductItem class.' -1.14.1: - - 'Remove vendor folder from plugin.' -1.15.0: - - 'Added import product, offers, categories, brands from CSV file in backend. Requires Toolbox plugin version 1.18.0 and later' -1.16.0: - - 'Added block with description about import of product/offer properties from CSV file.' -1.16.1: - - 'Added annotations of filterByDiscount(), filterByQuantity() methods to OfferCollection class.' -1.17.0: - - 'Added Japanese language. Thanks for contribution pikanji.' -1.18.0: - - 'Added German language. Thanks for contribution Gerald.' -1.19.0: - - 'Added translatable slug in Product, Brand, Category, PromoBlock models.' -1.19.1: - - 'Fixed permissions for promo block menu item. Thanks for contribution Andreas Kosmowicz.' -1.20.0: - - 'Added Slovak language. Thanks for contribution vosco88.' -1.21.0: - - 'Added multicurrency. Added taxes. Added price types. Added shopaholic:check.table.integrity artisan command.' - - create_table_taxes.php - - create_table_tax_category_relation.php - - create_table_tax_product_relation.php - - create_table_tax_country_relation.php - - create_table_tax_state_relation.php - - create_table_currency.php - - seeder_create_default_currency.php - - create_table_price_types.php - - create_table_prices.php - - update_table_users_add_currency_field.php - - seeder_transfer_offer_prices.php - - update_table_offers_remove_price_field.php -1.21.1: - - 'Fixed labels for tax settings.' -1.21.2: - - 'Fix error with saving offer without prices.' -1.22.0: - - 'Added customizable import from xml file. Thanks to Rolands Zeltins. His donation made this feature available for everyone.' -1.22.1: - - 'Fixed command shopaholic:import_from_xml.' -1.22.2: - - 'Added "deactivate" fields to config of XmlImportSettings model.' -1.22.3: - - 'Fixed attaching of children categories to parent category in script of import from XML.' -1.22.4: - - 'Removed deleted offers from sorting by price.' -1.22.5: - - 'Fixed bug with deactivating items in import from XML files.' -1.23.0: - - 'Added ability to show catalog with active price type. Added annotations for integration with Subscriptions for Shopaholic plugin.' -1.23.1: - - 'Added step attribute to offer price field in backend view' -1.24.0: - - 'Added support of wildcard params to CategoryPage component. Requires Toolbox plugin version 1.26.0 and later' -1.24.1: - - 'Fixed support of wildcard params in CategoryPage component. Requires Toolbox plugin version 1.26.1 and later' -1.24.2: - - 'Added annotations for Subscriptions for Shopaholic plugin.' -1.24.3: - - 'Added validation of import fields that contains relation IDs.' -1.25.0: - - 'Moved "Measure" model from "Properties for Shopaholic" plugin. Added weight, height, length, width, measure_of_unit, quantity_in_unit fields to Offer model. Added new global settings: size unit measure, weight unit measure, piece unit measure.' - - create_table_measure.php - - update_table_offers_add_dimensions_field.php -1.26.0: - - 'Added relation to Offer model with Measure model.' - - update_table_offers_add_measure_field.php -1.27.0: - - 'Added parent category field to backend in Category model. Thanks for contribution Dinwid.' -1.27.1: - - 'Fixed logic of getting prices in Offer model.' -1.28.0: - - 'Added "with children" param in BrandCollection->category method. Added settings for "default pages". Added "lovata.backend.extend_list_toolbar" event to controllers. Added "icon" field to Brand, Category and PromoBlock models. Added settings "Allow negative offer quantity".' - - update_table_offers_change_quantity_field.php -1.29.0: - - 'Added composer.json to plugin' -1.30.0: - - 'Reduced count of database queries, if cache is empty. Requires Toolbox plugin version 1.32.0 and later.' -1.30.1: - - 'Added "lazy" param to tabs config of Products controller' diff --git a/plugins/lovata/shopaholic/views/import_from_xml_info.htm b/plugins/lovata/shopaholic/views/import_from_xml_info.htm deleted file mode 100644 index e90ed8cd5..000000000 --- a/plugins/lovata/shopaholic/views/import_from_xml_info.htm +++ /dev/null @@ -1,8 +0,0 @@ -
-
- -
- -
-
-
\ No newline at end of file diff --git a/plugins/lovata/shopaholic/views/offer_price_list.htm b/plugins/lovata/shopaholic/views/offer_price_list.htm deleted file mode 100644 index c524e6b98..000000000 --- a/plugins/lovata/shopaholic/views/offer_price_list.htm +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - get(); - if ($obPriceTypeList->isNotEmpty()) { - foreach ($obPriceTypeList as $obPriceType) { - ?> - - - - - - - -
name ?>
\ No newline at end of file diff --git a/plugins/lovata/shopaholic/widgets/ImportFromCSV.php b/plugins/lovata/shopaholic/widgets/ImportFromCSV.php deleted file mode 100644 index 132176120..000000000 --- a/plugins/lovata/shopaholic/widgets/ImportFromCSV.php +++ /dev/null @@ -1,21 +0,0 @@ -makePartial('widget'); - } -} diff --git a/plugins/lovata/shopaholic/widgets/ImportFromXML.php b/plugins/lovata/shopaholic/widgets/ImportFromXML.php deleted file mode 100644 index 6c5c74564..000000000 --- a/plugins/lovata/shopaholic/widgets/ImportFromXML.php +++ /dev/null @@ -1,75 +0,0 @@ - ImportBrandModelFromXML::class, - 'import-categories' => ImportCategoryModelFromXML::class, - 'import-properties' => 'Lovata\PropertiesShopaholic\Classes\Import\ImportPropertyModelFromXML', - 'import-products' => ImportProductModelFromXML::class, - 'import-offers' => ImportOfferModelFromXML::class, - 'import-prices' => ImportOfferPriceFromXML::class, - ]; - - /** - * Render method - * @return mixed|string - * @throws \SystemException - */ - public function render() - { - return $this->makePartial('widget'); - } - - /** - * Start import from XML - */ - public function onImportFromXML() - { - foreach ($this->arClassList as $sKey => $sImportClass) { - $bEnableImport = (bool) Input::get($sKey); - if (!class_exists($sImportClass) || !$bEnableImport) { - continue; - } - - /** @var \Lovata\Toolbox\Classes\Helper\AbstractImportModelFromXML $obImport */ - $obImport = new $sImportClass(); - $obImport->import(); - - $this->iCreatedCount += $obImport->getCreatedCount(); - $this->iUpdatedCount += $obImport->getUpdatedCount(); - $this->iSkippedCount += $obImport->getSkippedCount(); - $this->iProcessedCount += $obImport->getProcessedCount(); - } - - $arReportData = [ - 'created' => $this->iCreatedCount, - 'updated' => $this->iUpdatedCount, - 'skipped' => $this->iSkippedCount, - 'processed' => $this->iProcessedCount, - ]; - - Flash::info(Lang::get('lovata.toolbox::lang.message.import_from_xml_report', $arReportData)); - } -} diff --git a/plugins/lovata/shopaholic/widgets/importfromcsv/partials/_widget.htm b/plugins/lovata/shopaholic/widgets/importfromcsv/partials/_widget.htm deleted file mode 100644 index 7105d25af..000000000 --- a/plugins/lovata/shopaholic/widgets/importfromcsv/partials/_widget.htm +++ /dev/null @@ -1,57 +0,0 @@ -hasPlugin('Lovata.PropertiesShopaholic'); -?> - -
-

- -

- -
diff --git a/plugins/lovata/shopaholic/widgets/importfromxml/partials/_widget.htm b/plugins/lovata/shopaholic/widgets/importfromxml/partials/_widget.htm deleted file mode 100644 index aaab5d685..000000000 --- a/plugins/lovata/shopaholic/widgets/importfromxml/partials/_widget.htm +++ /dev/null @@ -1,62 +0,0 @@ -hasPlugin('Lovata.PropertiesShopaholic'); -?> - -
-
-

-
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- - -
- -
-
-
-
diff --git a/plugins/lovata/toolbox/.codeclimate.yml b/plugins/lovata/toolbox/.codeclimate.yml deleted file mode 100644 index 2a893c73c..000000000 --- a/plugins/lovata/toolbox/.codeclimate.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -plugins: - duplication: - enabled: true - config: - languages: - php: - mass_threshold: 50 - fixme: - enabled: true - phpmd: - enabled: true - config: - file_extensions: "php" - rulesets: "controversial,design,unusedcode,PHPMD_custom.xml" - phpcodesniffer: - enabled: true - config: - standard: "Symfony2" - sonar-php: - enabled: true -ratings: - paths: - - "**.php" -exclude_patterns: - - 'tests/' - - 'traits/tests/' - - 'vendor/' - - 'lang/' - - 'classes/item/TestItem.php' - - 'classes/collection/TestCollection.php' \ No newline at end of file diff --git a/plugins/lovata/toolbox/.editorconfig b/plugins/lovata/toolbox/.editorconfig deleted file mode 100644 index 50d0b7a7a..000000000 --- a/plugins/lovata/toolbox/.editorconfig +++ /dev/null @@ -1,36 +0,0 @@ -# Defining consistent coding styles between different editors and IDEs -# Support info @ http://editorconfig.org/#download -# editorconfig.org - -# Top-most EditorConfig file -root = true - -# General settings -[*] -charset = utf-8 -end_of_line = lf -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 4 - -# CSS settings -[*.css] -indent_size = 2 - -# YAML settings -[*.yml] -indent_size = 2 - -# Markdown settings -[*.md] -trim_trailing_whitespace = false - -# Resetting rules for third-party libraries -# [{lib/**.js, lib/**.css}] -# charset = unset -# end_of_line = unset -# trim_trailing_whitespace = unset -# insert_final_newline = unset -# indent_style = unset -# indent_size = unset diff --git a/plugins/lovata/toolbox/.gitignore b/plugins/lovata/toolbox/.gitignore deleted file mode 100644 index 9eb7bf849..000000000 --- a/plugins/lovata/toolbox/.gitignore +++ /dev/null @@ -1,93 +0,0 @@ -/node_modules -Homestead.yaml -/_ide_helper.php -build.sh - -vendor -composer.lock - -#site -pdf/ -_backup/ -cgi-bin/ - -*.log -*.bin -*.komodoproject -/.komodotools/ - -# PhpStorm -.idea - -# Eclipse -*.pydevproject -.project -.metadata -bin/** -tmp/** -tmp/**/* -*.tmp -*.bak -*.swp -*~.nib -local.properties -.classpath -.settings/ -.loadpath -.externalToolBuilders/ -*.launch -.cproject -.buildpath - -# SublimeText -/*.sublime-project -*.sublime-workspace - -# NetBeans -nbproject/ -build/ -nbbuild/ -dist/ -nbdist/ -nbactions.xml -nb-configuration.xml - -# Windows system files -$RECYCLE.BIN/ -Thumbs.db -ehthumbs.db -Desktop.ini - -# OSX system files -.DS_store -.AppleDouble -.LSOverride -Icon -._* -.Spotlight-V100 -.Trashes - -# SVN/CVS -.svn -/CVS/* -*/CVS/* -.cvsignore -*/.cvsignore - -# temporary files/folders - -tmp* -~* -*.~* -*.bak -*.swp - -build/ -png/ -psd/ -doc/ -svg/ -vendors/ -pixelPerfect/ -node_modules/ -docs/ diff --git a/plugins/lovata/toolbox/CONTRIBUTING.md b/plugins/lovata/toolbox/CONTRIBUTING.md deleted file mode 100644 index 73fcc8f70..000000000 --- a/plugins/lovata/toolbox/CONTRIBUTING.md +++ /dev/null @@ -1,60 +0,0 @@ -# Contributing - -When contributing to this repository, please first discuss the change you wish to make via issue with the owners of this repository before making a change. - -Please note we have a code of conduct, please follow it in all your interactions with the project. - -## Pull Request Process - -1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. -2. Cover your code contribution with unit tests and ensure your Pull Request passes all the tests. -3. Open a Pull Request to a `develop` branch. -4. Add to the Pull Request details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. -5. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. - -## Code of Conduct - -### Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -### Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language. -* Being respectful of differing viewpoints and experiences. -* Gracefully accepting constructive criticism. -* Focusing on what is best for the community. -* Showing empathy towards other community members. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances. -* Trolling, insulting/derogatory comments, and personal or political attacks. -* Public or private harassment. -* Publishing others' private information, such as a physical or electronic address, without explicit permission. -* Other conduct which could reasonably be considered inappropriate in a professional setting. - -### Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -### Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -### Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [support@lovata.com](mailto:support@lovata.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -### Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/plugins/lovata/toolbox/LICENSE.md b/plugins/lovata/toolbox/LICENSE.md deleted file mode 100644 index 9cecc1d46..000000000 --- a/plugins/lovata/toolbox/LICENSE.md +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - 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. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -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. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - 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 -state 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 3 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, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program 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, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU 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 Lesser General -Public License instead of this License. But first, please read -. diff --git a/plugins/lovata/toolbox/PHPMD_custom.xml b/plugins/lovata/toolbox/PHPMD_custom.xml deleted file mode 100644 index a24b60992..000000000 --- a/plugins/lovata/toolbox/PHPMD_custom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - Custom rules for checking project LOVATA Group - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/lovata/toolbox/Plugin.php b/plugins/lovata/toolbox/Plugin.php deleted file mode 100644 index 7fc928c4c..000000000 --- a/plugins/lovata/toolbox/Plugin.php +++ /dev/null @@ -1,135 +0,0 @@ - 'Pagination', - ]; - } - - /** - * @return array - */ - public function registerSettings() - { - return [ - 'config' => [ - 'label' => 'lovata.toolbox::lang.field.site_settings', - 'icon' => 'icon-cogs', - 'description' => 'lovata.toolbox::lang.field.site_settings_description', - 'class' => 'Lovata\Toolbox\Models\Settings', - 'order' => 300, - 'permissions' => [ - 'toolbox-menu-settings', - ], - ], - ]; - } - - /** - * Extending twig - * @return array - */ - public function registerMarkupTags() - { - return [ - 'functions' => [ - 'choice' => function ($sLangString, $iNumber) { - return $this->twigChoice($sLangString, $iNumber); - }, - ], - 'filters' => [ - 'phone' => [$this, 'applyPhoneFilter'], - ], - ]; - } - - /** - * Plugin boot method - */ - public function boot() - { - if (env('APP_ENV') == 'testing') { - $this->app->bind(\Lovata\Toolbox\Classes\Item\TestItem::class, \Lovata\Toolbox\Classes\Item\TestItem::class); - $this->app->bind(\Lovata\Toolbox\Classes\Collection\TestCollection::class, \Lovata\Toolbox\Classes\Collection\TestCollection::class); - } - } - - /** - * Register commands - */ - public function register() - { - $this->registerConsoleCommand('toolbox:helper', ToolBoxHelper::class); - $this->registerConsoleCommand('toolbox:create.all', CreateAll::class); - $this->registerConsoleCommand('toolbox:create.plugin', CreatePlugin::class); - $this->registerConsoleCommand('toolbox:create.model', CreateModel::class); - $this->registerConsoleCommand('toolbox:create.model.columns', CreateModelColumn::class); - $this->registerConsoleCommand('toolbox:create.model.fields', CreateModelField::class); - $this->registerConsoleCommand('toolbox:create.controller', CreateController::class); - $this->registerConsoleCommand('toolbox:create.migration', CreateMigration::class); - $this->registerConsoleCommand('toolbox:create.component.data', CreateComponentData::class); - $this->registerConsoleCommand('toolbox:create.component.list', CreateComponentList::class); - $this->registerConsoleCommand('toolbox:create.component.page', CreateComponentPage::class); - $this->registerConsoleCommand('toolbox:create.item', CreateItem::class); - $this->registerConsoleCommand('toolbox:create.collection', CreateCollection::class); - $this->registerConsoleCommand('toolbox:create.event.model', CreateEventModel::class); - $this->registerConsoleCommand('toolbox:create.store', CreateStore::class); - $this->registerConsoleCommand('toolbox:create.event.menu', CreateExtendBackendMenuHandler::class); - $this->registerConsoleCommand('toolbox:create.event.fields', CreateExtendModelFieldsHandler::class); - $this->registerConsoleCommand('toolbox:create.event.columns', CreateExtendModelColumnsHandler::class); - } - - /** - * Apply Lang::choice method to string - * @param string $sLangString - * @param int $iNumber - * @return string - */ - protected function twigChoice($sLangString, $iNumber) - { - return Lang::choice($sLangString, $iNumber); - } - - /** - * Deletes all characters from string except digits and plus - * @param $sValue - * @return string - */ - public function applyPhoneFilter($sValue) { - return preg_replace("%[^\d\+]%", '', $sValue); - } -} diff --git a/plugins/lovata/toolbox/README.md b/plugins/lovata/toolbox/README.md deleted file mode 100644 index 749b2856d..000000000 --- a/plugins/lovata/toolbox/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Toolbox - -[![Build Status](https://travis-ci.org/lovata/oc-toolbox-plugin.svg?branch=master)](https://travis-ci.org/lovata/oc-toolbox-plugin) -[![Dependency Status](https://www.versioneye.com/user/projects/59d504fc2de28c002c1882b5/badge.svg)](https://www.versioneye.com/user/projects/59d504fc2de28c002c1882b5) -[![Coverage Status](https://coveralls.io/repos/github/lovata/oc-toolbox-plugin/badge.svg?branch=master)](https://coveralls.io/github/lovata/oc-toolbox-plugin?branch=master) -[![Code Climate](https://codeclimate.com/github/lovata/oc-toolbox-plugin/badges/gpa.svg)](https://codeclimate.com/github/lovata/oc-toolbox-plugin) -[![Crowdin](https://d322cqt584bo4o.cloudfront.net/toolbox-plugin-for-october-cms/localized.svg)](https://crowdin.com/project/toolbox-plugin-for-october-cms) -[![SemVer 2.0.0](http://img.shields.io/SemVer/2.0.0.png)](http://semver.org/spec/v2.0.0.html) -[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) - -![Toolbox Banner](assets/images/toolbox-banner.png) - -Toolbox is a set of helpers for faster development for [October CMS](https://github.com/octobercms/october). It includes a universal component for rendering pagination navigation controls, a set of tools for caching of objects and lists. Also, it includes a list of most common language strings for using in third-party plugins: name, title, description etc. - -## Features - -* Components - * Pagination is used to get a list of pagination buttons and provides flexible settings. -* Classes - * `ElementCollection` provides a flexible tool for working with cached lists of model elements. - * `ElementData` is an abstract class for components that returns object of `ElementItem` class for model. - * `ElementItem` provides a flexible tool for single element data caching. - * etc. - -[Read more…](https://github.com/lovata/oc-toolbox-plugin/wiki) - -## Get involved - -If you're interested in the improvement of this project you can help in the following ways: -* bug reporting and new feature requesting by creating issues on plugin [GitHub page](https://github.com/lovata/oc-toolbox-plugin/issues); -* contribution to a project following these [instructions](https://github.com/lovata/oc-toolbox-plugin/blob/master/CONTRIBUTING.md); -* localization to your language using [Crowdin](https://crowdin.com/project/toolbox-plugin-for-october-cms) service. - -## License - -© 2017, [LOVATA Group, LLC](https://github.com/lovata) under [GNU GPL v3](https://opensource.org/licenses/GPL-3.0). - -Developed by [Andrey Kharanenka](https://github.com/kharanenka). diff --git a/plugins/lovata/toolbox/assets/images/logo.svg b/plugins/lovata/toolbox/assets/images/logo.svg deleted file mode 100644 index 1e3917848..000000000 --- a/plugins/lovata/toolbox/assets/images/logo.svg +++ /dev/null @@ -1,12 +0,0 @@ - - Toolbox - - - - - - - - - - diff --git a/plugins/lovata/toolbox/assets/images/toolbox-banner.png b/plugins/lovata/toolbox/assets/images/toolbox-banner.png deleted file mode 100644 index 01688fb99..000000000 Binary files a/plugins/lovata/toolbox/assets/images/toolbox-banner.png and /dev/null differ diff --git a/plugins/lovata/toolbox/classes/collection/CollectionStore.php b/plugins/lovata/toolbox/classes/collection/CollectionStore.php deleted file mode 100644 index e22e2de78..000000000 --- a/plugins/lovata/toolbox/classes/collection/CollectionStore.php +++ /dev/null @@ -1,59 +0,0 @@ -arStore[$sKey] = $obCollection->copy(); - } - - /** - * Get saved element collection - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testSaveMethod() - * @param string $sKey - * @return ElementCollection - */ - public function saved($sKey) - { - if (empty($sKey) || empty($this->arStore) || !isset($this->arStore[$sKey])) { - return null; - } - - return $this->arStore[$sKey]->copy(); - } - - /** - * Remove stored collection from store - * @param string $sKey - */ - public function clear($sKey) - { - if (empty($sKey) || empty($this->arStore) || !isset($this->arStore[$sKey])) { - return; - } - - unset($this->arStore[$sKey]); - } -} diff --git a/plugins/lovata/toolbox/classes/collection/ElementCollection.php b/plugins/lovata/toolbox/classes/collection/ElementCollection.php deleted file mode 100644 index 67ea42b9d..000000000 --- a/plugins/lovata/toolbox/classes/collection/ElementCollection.php +++ /dev/null @@ -1,833 +0,0 @@ -make(static::class); - - if (!empty($arElementIDList) && is_array($arElementIDList)) { - $obCollection->arElementIDList = $arElementIDList; - } - - return $obCollection->returnThis(); - } - - /** - * Return this collection - * @return $this - */ - public function returnThis() - { - return $this; - } - - /** - * Check list is clear - * @return bool - */ - public function isClear(): bool - { - return $this->arElementIDList === null; - } - - /** - * Check list is empty - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#isempty - * @return bool - */ - public function isEmpty(): bool - { - return empty($this->arElementIDList); - } - - /** - * Check list is not empty - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#isnotempty - * @return bool - */ - public function isNotEmpty(): bool - { - return !$this->isEmpty(); - } - - /** - * Get element ID list - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#getidlist - * @return array - */ - public function getIDList(): array - { - return array_values((array) $this->arElementIDList); - } - - /** - * Set new - * @param array $arElementIDList - * @return $this - */ - public function set($arElementIDList) - { - if (!is_array($arElementIDList)) { - return $this->returnThis(); - } - - $this->arElementIDList = $arElementIDList; - - return $this->returnThis(); - } - - /** - * Checking, has collection ID - * @param int $iElementID - * @return bool - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testHasMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#hasielementid - */ - public function has($iElementID) - { - if (empty($iElementID) || $this->isEmpty()) { - return false; - } - - return in_array($iElementID, (array) $this->arElementIDList); - } - - /** - * Get element item with ID - * @param int $iElementID - * @return \Lovata\Toolbox\Classes\Item\ElementItem - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testFindMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#findielementid - */ - public function find($iElementID) - { - if (!$this->has($iElementID)) { - return $this->makeItem(null); - } - - return $this->makeItem($iElementID); - } - - /** - * Set clear array to element list - * @return $this - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#clear - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testClearMethod() - */ - public function clear() - { - $this->arElementIDList = []; - - return $this->returnThis(); - } - - /** - * Get element count - * @return int - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#count - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testCountMethod() - */ - public function count() - { - if ($this->isEmpty()) { - return 0; - } - - return count((array) $this->arElementIDList); - } - - /** - * Apply array_intersect for element array list - * @param array $arElementIDList - * @return $this - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testIntersectMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#intersectarelementidlist - */ - public function intersect($arElementIDList) - { - if (empty($arElementIDList)) { - return $this->clear(); - } - - if ($this->isClear()) { - $this->arElementIDList = $arElementIDList; - - return $this->returnThis(); - } - - $this->arElementIDList = array_combine($this->arElementIDList, $this->arElementIDList); - $arElementIDList = array_combine($arElementIDList, $arElementIDList); - - $this->arElementIDList = array_intersect_key($this->arElementIDList, $arElementIDList); - - return $this->returnThis(); - } - - /** - * Apply sorting for elements of collection - * @param array $arResultIDList - * @return $this - */ - public function applySorting($arResultIDList) - { - if (empty($arResultIDList)) { - return $this->clear(); - } - - if (!$this->isClear() && $this->isEmpty()) { - return $this->returnThis(); - } - - if ($this->isClear()) { - $this->arElementIDList = $arResultIDList; - - return $this->returnThis(); - } - - $this->arElementIDList = array_combine($this->arElementIDList, $this->arElementIDList); - $arResultIDList = array_combine($arResultIDList, $arResultIDList); - - $this->arElementIDList = array_intersect_key($arResultIDList, $this->arElementIDList); - - return $this->returnThis(); - } - - /** - * Apply array_merge for element array list - * @param array $arElementIDList - * @return $this - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testMergeMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#mergearelementidlist - */ - public function merge($arElementIDList) - { - if (empty($arElementIDList)) { - return $this->returnThis(); - } - - if ($this->isClear()) { - $this->arElementIDList = $arElementIDList; - - return $this->returnThis(); - } - - $this->arElementIDList = array_merge($this->arElementIDList, $arElementIDList); - $this->arElementIDList = array_unique($this->arElementIDList); - - return $this->returnThis(); - } - - /** - * Apply array_diff for element array list - * @param array $arExcludeIDList - * @return $this - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testDiffMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#diffarelementidlist - */ - public function diff($arExcludeIDList = []) - { - if (empty($arExcludeIDList) || $this->isEmpty()) { - return $this->returnThis(); - } - - $this->arElementIDList = array_diff($this->arElementIDList, $arExcludeIDList); - - return $this->returnThis(); - } - - /** - * Get element item list - * @return array|\Lovata\Toolbox\Classes\Item\ElementItem[] - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#all - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testAllMethod() - */ - public function all() - { - if ($this->isEmpty()) { - return []; - } - - $arResult = $this->prepareItemList($this->arElementIDList); - - return $arResult; - } - - /** - * Set skip element count - * @param int $iCount - * @return $this - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testTakeMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#skipicount - * Used in "take" method - */ - public function skip($iCount) - { - $this->iSkip = (int) trim($iCount); - - return $this->returnThis(); - } - - /** - * Take array with element items - * @param int $iCount - * @return array|\Lovata\Toolbox\Classes\Item\ElementItem[] - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testTakeMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#takeicount--0 - */ - public function take($iCount = 0) - { - $iCount = (int) trim($iCount); - if ($this->isEmpty()) { - return []; - } - - if (empty($iCount)) { - $iCount = null; - } - - $arResultIDList = array_slice($this->arElementIDList, $this->iSkip, $iCount); - if (empty($arResultIDList)) { - return []; - } - - $arResult = $this->prepareItemList($arResultIDList); - - return $arResult; - } - - /** - * Exclude element id from collection - * @param int $iElementID - * @return $this - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testExcludeMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#excludeielementid - */ - public function exclude($iElementID = null) - { - if (empty($iElementID) || $this->isEmpty()) { - return $this->returnThis(); - } - - $iElementIDKey = array_search($iElementID, $this->arElementIDList); - if ($iElementIDKey === false) { - return $this->returnThis(); - } - - unset($this->arElementIDList[$iElementIDKey]); - - return $this->returnThis(); - } - - /** - * Take array with random element items - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#randomicount - * @param int $iCount - * @return array|\Lovata\Toolbox\Classes\Item\ElementItem[] - */ - public function random($iCount = 1) - { - if ($this->isEmpty()) { - return []; - } - - $iCount = (int) trim($iCount); - if ($iCount < 1) { - $iCount = 1; - } - - if (count($this->arElementIDList) < $iCount) { - $iCount = count($this->arElementIDList); - } - - $obThis = $this->copy(); - - $arResultIDList = $obThis->getIDList(); - $arKeyList = array_rand($arResultIDList, $iCount); - if (!is_array($arKeyList)) { - $arKeyList = [$arKeyList]; - } - - $arKeyList = array_combine($arKeyList, $arKeyList); - $arResultIDList = array_intersect_key($arResultIDList, $arKeyList); - - return $obThis->intersect($arResultIDList)->all(); - } - - /** - * Apply pagination for item collection - * @param int $iPage - * @param int $iElementOnPage - * - * @return array|\Lovata\Toolbox\Classes\Item\ElementItem[]|null - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#pageipage-ielementonpage--10 - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testPageMethod() - */ - public function page($iPage, $iElementOnPage = 10) - { - $iPage = (int) trim($iPage); - - //Check page value - if ($iPage < 1) { - $iPage = 1; - } - - if ($iElementOnPage < 1) { - $iElementOnPage = self::COUNT_PER_PAGE; - } - - return $this->skip(($iPage - 1) * $iElementOnPage)->take($iElementOnPage); - } - - /** - * Get first element item - * @return \Lovata\Toolbox\Classes\Item\ElementItem|null - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#first - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testFirstMethod() - */ - public function first() - { - if ($this->isEmpty()) { - return $this->makeItem(null); - } - - $arResultIDList = $this->arElementIDList; - - $iElementID = array_shift($arResultIDList); - - return $this->makeItem($iElementID); - } - - /** - * Get last element item - * @return \Lovata\Toolbox\Classes\Item\ElementItem|null - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#last - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testLastMethod() - */ - public function last() - { - if ($this->isEmpty()) { - return $this->makeItem(null); - } - - $arResultIDList = $this->arElementIDList; - - $iElementID = array_pop($arResultIDList); - - return $this->makeItem($iElementID); - } - - /** - * Apply array_shift to element ID list and get first element item - * @return \Lovata\Toolbox\Classes\Item\ElementItem|null - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#shift - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testShiftMethod() - */ - public function shift() - { - if (empty($this->arElementIDList)) { - return $this->makeItem(null); - } - - $iElementID = array_shift($this->arElementIDList); - - return $this->makeItem($iElementID); - } - - /** - * Apply array_unshift to element ID - * @param int $iElementID - * @return $this - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#unshiftielementid - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testUnshiftMethod() - */ - public function unshift($iElementID) - { - if (empty($iElementID)) { - return $this->returnThis(); - } - - if ($this->isEmpty()) { - $this->arElementIDList = [$iElementID]; - - return $this->returnThis(); - } - - array_unshift($this->arElementIDList, $iElementID); - - return $this->returnThis(); - } - - /** - * Apply array_pop to element ID list and get first element item - * @return \Lovata\Toolbox\Classes\Item\ElementItem|null - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#pop - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testPopMethod() - */ - public function pop() - { - if ($this->isEmpty()) { - return $this->makeItem(null); - } - - $iElementID = array_pop($this->arElementIDList); - - return $this->makeItem($iElementID); - } - - /** - * Push element ID to end of list - * @param int $iElementID - * @return $this - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#pushielementid - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testUnshiftMethod() - */ - public function push($iElementID) - { - if (empty($iElementID)) { - return $this->returnThis(); - } - - if ($this->isEmpty()) { - $this->arElementIDList = [$iElementID]; - - return $this->returnThis(); - } - - $this->arElementIDList[] = $iElementID; - - return $this->returnThis(); - } - - /** - * Get array with item field value - * @param string $sFieldName - * @return array|null - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testPluckMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#plucksfieldname - */ - public function pluck($sFieldName) - { - if (empty($sFieldName) || $this->isEmpty()) { - return null; - } - - //Get all items - $arItemList = $this->all(); - - $arResult = []; - foreach ($arItemList as $obItem) { - if ($obItem->isEmpty()) { - continue; - } - - $arResult[] = $obItem->$sFieldName; - } - - return $arResult; - } - - /** - * Get implode string with item field value - * @param string $sFieldName - * @param string $sDelimiter - * @return null - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#implodesfieldname-sdelimiter--- - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testImplodeMethod() - */ - public function implode($sFieldName, $sDelimiter = ', ') - { - if (empty($sFieldName) || $this->isEmpty()) { - return null; - } - - //Get field value array - $arFieldValue = $this->pluck($sFieldName); - if (empty($arFieldValue)) { - return null; - } - - $sResult = implode($sDelimiter, $arFieldValue); - - return $sResult; - } - - /** - * Get new collection with next nearest elements - * @param int $iElementID - * @param int $iCount - * @param bool $bCyclic - * @return $this - */ - public function getNearestNext($iElementID, $iCount = 1, $bCyclic = false) - { - $obList = self::make(); - if (empty($iElementID) || empty($iCount) || $iCount < 1) { - return $obList->returnThis(); - } - - //Check current collection - if ($this->isEmpty() || !$this->has($iElementID)) { - return $obList->returnThis(); - } - - $this->arElementIDList = array_values($this->arElementIDList); - - //Search element position - $iElementPosition = array_search($iElementID, $this->arElementIDList); - - //Get next elements - $arResultIDList = array_slice($this->arElementIDList, $iElementPosition + 1); - if ($bCyclic && $iElementPosition >= 1) { - //Get elements from start of array - $arAdditionElementIDList = array_slice($this->arElementIDList, 0, $iElementPosition); - $arResultIDList = array_merge($arResultIDList, $arAdditionElementIDList); - } - - //Get result element ID list - $arResultIDList = array_slice($arResultIDList, 0, $iCount); - $obList->intersect($arResultIDList); - - return $obList->returnThis(); - } - - /** - * Get new collection with prev nearest elements - * @param int $iElementID - * @param int $iCount - * @param bool $bCyclic - * @return $this - */ - public function getNearestPrev($iElementID, $iCount = 1, $bCyclic = false) - { - $obList = self::make(); - if (empty($iElementID) || empty($iCount) || $iCount < 1) { - return $obList->returnThis(); - } - - //Check current collection - if ($this->isEmpty() || !$this->has($iElementID)) { - return $obList->returnThis(); - } - - $this->arElementIDList = array_values($this->arElementIDList); - - //Search element position - $iElementPosition = array_search($iElementID, $this->arElementIDList); - - //Get prev elements - $arResultIDList = (array) array_slice($this->arElementIDList, 0, $iElementPosition); - $arResultIDList = array_reverse($arResultIDList); - - if ($bCyclic && $iElementPosition < count($this->arElementIDList)) { - //Get elements from end of array - $arAdditionElementIDList = (array) array_slice($this->arElementIDList, $iElementPosition); - $arAdditionElementIDList = array_reverse($arAdditionElementIDList); - - $arResultIDList = array_merge($arResultIDList, $arAdditionElementIDList); - } - - //Get result element ID list - $arResultIDList = array_slice($arResultIDList, 0, $iCount); - $obList->intersect($arResultIDList); - - return $obList->returnThis(); - } - - /** - * Save item collection in store - * @param string $sKey - * @return $this - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testSaveMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#saveskeysavedskey - */ - public function save($sKey) - { - if (empty($sKey)) { - return $this; - } - - $sKey = static::class.'@'.$sKey; - CollectionStore::instance()->save($sKey, $this); - - return $this->returnThis(); - } - - /** - * Get saved item collection - * @param string $sKey - * @return $this - * @see \Lovata\Toolbox\Tests\Unit\CollectionTest::testSaveMethod() - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#saveskeysavedskey - */ - public function saved($sKey) - { - if (empty($sKey)) { - return null; - } - - $sKey = static::class.'@'.$sKey; - - $obCollection = CollectionStore::instance()->saved($sKey); - if (empty($obCollection)) { - return null; - } - - return $obCollection; - } - - /** - * Clone collection object - * @return $this - */ - public function copy() - { - return static::make()->intersect($this->getIDList()); - } - - /** - * Helper method for collection debug - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#debug - * @return $this - */ - public function debug() - { - return $this->returnThis(); - } - - /** - * Get an iterator for the items. - * @return \ArrayIterator - */ - public function getIterator() - { - return new ArrayIterator($this->all()); - } - - /** - * Make element item - * @param int $iElementID - * @param \Model $obElement - * @return \Lovata\Toolbox\Classes\Item\ElementItem - */ - protected function makeItem($iElementID, $obElement = null) - { - $sItemClass = static::ITEM_CLASS; - - return $sItemClass::make($iElementID, $obElement); - } - - /** - * Make element item from cache only - * @param int $iElementID - * @return \Lovata\Toolbox\Classes\Item\ElementItem - */ - protected function makeItemOnlyCache($iElementID) - { - $sItemClass = static::ITEM_CLASS; - - return $sItemClass::makeOnlyCache($iElementID); - } - - /** - * Prepare item list - * @param array $arElementIDList - * @return array - */ - protected function prepareItemList($arElementIDList): array - { - $arResult = []; - if (empty($arElementIDList)) { - return $arResult; - } - - $arEmptyIDList = []; - - foreach ($arElementIDList as $iElementID) { - /** @var \Lovata\Toolbox\Classes\Item\ElementItem $obElementItem */ - $obElementItem = static::makeItemOnlyCache($iElementID); - if ($obElementItem->isEmpty()) { - $arEmptyIDList[] = $iElementID; - $arResult[$iElementID] = null; - } else { - $arResult[$iElementID] = $obElementItem; - } - } - - $arResult = $this->getElementListFromDB($arEmptyIDList, $arResult); - $arResult = array_filter($arResult); - - return $arResult; - } - - /** - * Get element list from DB - * @param array $arElementIDList - * @param array $arResult - * @return array - */ - protected function getElementListFromDB($arElementIDList, $arResult) - { - if (empty($arElementIDList)) { - return $arResult; - } - - $arChunkIDList = array_chunk($arElementIDList, 10000); - $sItemClass = static::ITEM_CLASS; - $sModelClass = $sItemClass::MODEL_CLASS; - - foreach ($arChunkIDList as $arSingleChunk) { - $obQuery = $sModelClass::whereIn($sItemClass::QUERY_FIELD, $arElementIDList); - if (method_exists($sModelClass, 'trashed')) { - $obQuery->withTrashed(); - } - - if (!empty($sItemClass::$arQueryWith)) { - $obQuery->with($sItemClass::$arQueryWith); - } - - $obElementList = $obQuery->get(); - - foreach ($arSingleChunk as $iElementID) { - $obElement = !empty($obElementList) ? $obElementList->find($iElementID) : null; - $obElementItem = static::makeItem($iElementID, $obElement); - if ($obElementItem->isEmpty()) { - continue; - } - - $arResult[$iElementID] = $obElementItem; - } - } - - return $arResult; - } -} diff --git a/plugins/lovata/toolbox/classes/collection/TestCollection.php b/plugins/lovata/toolbox/classes/collection/TestCollection.php deleted file mode 100644 index 3eebe9454..000000000 --- a/plugins/lovata/toolbox/classes/collection/TestCollection.php +++ /dev/null @@ -1,13 +0,0 @@ -sMode = $this->property('mode'); - if (empty($this->sMode)) { - $this->sMode = self::MODE_AJAX; - } - } - - /** - * Get old form data value - * @param string $sField - * @return mixed - */ - public function getOldValue($sField) - { - if (empty($sField)) { - return null; - } - - return Input::old($sField); - } - - /** - * Get all old form fields - * @return array|string - */ - public function getOldFormData() - { - return Input::old(); - } - - /** - * Get error message - * @return mixed - */ - public function getErrorMessage() - { - $arResult = [ - 'message' => Session::get('message'), - 'field' => Session::get('data.field'), - ]; - - return $arResult; - } - - /** - * Get redirect page property list - * @return array - */ - abstract protected function getRedirectPageProperties(); - - /** - * Get component property "mode" - * @return array - */ - protected function getModeProperty() - { - $arResult = [ - self::PROPERTY_MODE => [ - 'title' => 'lovata.toolbox::lang.component.property_mode', - 'type' => 'dropdown', - 'options' => [ - self::MODE_SUBMIT => Lang::get('lovata.toolbox::lang.component.mode_'.self::MODE_SUBMIT), - self::MODE_AJAX => Lang::get('lovata.toolbox::lang.component.mode_'.self::MODE_AJAX), - ], - ], - self::PROPERTY_FLASH_ON => [ - 'title' => 'lovata.toolbox::lang.component.property_flash_on', - 'type' => 'checkbox', - ], - self::PROPERTY_REDIRECT_ON => [ - 'title' => 'lovata.toolbox::lang.component.property_redirect_on', - 'type' => 'checkbox', - ], - ]; - - try { - $arPageList = Page::getNameList(); - } catch (\Exception $obException) { - $arPageList = []; - } - - if (!empty($arPageList)) { - $arResult[self::PROPERTY_REDIRECT_PAGE] = [ - 'title' => 'lovata.toolbox::lang.component.property_redirect_page', - 'type' => 'dropdown', - 'options' => $arPageList, - ]; - } - - return $arResult; - } - - /** - * Get response (mode = form) - * @param string $sRedirectURL - * @return \Illuminate\Http\RedirectResponse|null - */ - protected function getResponseModeForm($sRedirectURL = null) - { - if (!Result::status() && !empty($sRedirectURL)) { - return Redirect::to($sRedirectURL)->withInput()->with(Result::get()); - } elseif (!Result::status()) { - return Redirect::back()->withInput()->with(Result::get()); - } - - $bRedirectOn = $this->property(self::PROPERTY_REDIRECT_ON); - $sRedirectPage = $this->property(self::PROPERTY_REDIRECT_PAGE); - if (!$bRedirectOn) { - return null; - } - - if (!empty($sRedirectURL)) { - return Redirect::to($sRedirectURL); - } - - if (empty($sRedirectPage)) { - return Redirect::to('/'); - } - - $sRedirectURL = Page::url($sRedirectPage, $this->getRedirectPageProperties()); - - return Redirect::to($sRedirectURL); - } - - /** - * Get response (mode = response) - * @param string $sRedirectURL - * @return \Illuminate\Http\RedirectResponse|array - */ - protected function getResponseModeAjax($sRedirectURL = null) - { - $this->sendFlashMessage(); - - if (!Result::status() && !empty($sRedirectURL)) { - return Redirect::to($sRedirectURL); - } elseif (!Result::status()) { - return Result::get(); - } - - $bRedirectOn = $this->property(self::PROPERTY_REDIRECT_ON); - $sRedirectPage = $this->property(self::PROPERTY_REDIRECT_PAGE); - if (!$bRedirectOn) { - return Result::get(); - } - - if (!empty($sRedirectURL)) { - return Redirect::to($sRedirectURL); - } - - if (empty($sRedirectPage)) { - return Redirect::to('/'); - } - - $sRedirectURL = Page::url($sRedirectPage, $this->getRedirectPageProperties()); - - return Redirect::to($sRedirectURL); - } - - /** - * Send flash message - */ - protected function sendFlashMessage() - { - $bFlashOn = $this->property(self::PROPERTY_FLASH_ON); - if (!$bFlashOn) { - return; - } - - $sMessage = Result::message(); - if (empty($sMessage)) { - return; - } - - if (Result::status()) { - Flash::success($sMessage); - } else { - Flash::error($sMessage); - } - } -} diff --git a/plugins/lovata/toolbox/classes/component/ElementData.php b/plugins/lovata/toolbox/classes/component/ElementData.php deleted file mode 100644 index f0272e0ee..000000000 --- a/plugins/lovata/toolbox/classes/component/ElementData.php +++ /dev/null @@ -1,65 +0,0 @@ -makeItem($iElementID); - - return $obElementItem->toArray(); - } - - /** - * Ajax listener - * @return string - */ - public function onGetJSONData() - { - $iElementID = Input::get('element_id'); - $obElementItem = $this->makeItem($iElementID); - - return $obElementItem->toJSON(); - } - - /** - * Ajax listener - * @deprecated - * @return bool - */ - public function onAjaxRequest() - { - return true; - } - - /** - * Get element item - * @param int $iElementID - * @return \Lovata\Toolbox\Classes\Item\ElementItem - */ - public function get($iElementID) - { - $obElementItem = $this->makeItem($iElementID); - - return $obElementItem; - } - - /** - * Male new element item - * @param int $iElementID - * @return \Lovata\Toolbox\Classes\Item\ElementItem - */ - abstract protected function makeItem($iElementID); -} diff --git a/plugins/lovata/toolbox/classes/component/ElementPage.php b/plugins/lovata/toolbox/classes/component/ElementPage.php deleted file mode 100644 index 6b6fc60ec..000000000 --- a/plugins/lovata/toolbox/classes/component/ElementPage.php +++ /dev/null @@ -1,165 +0,0 @@ -arPropertyList = array_merge($this->arPropertyList, $this->getElementPageProperties()); - if ($this->bHasWildCard) { - $this->arPropertyList['has_wildcard'] = [ - 'title' => 'lovata.toolbox::lang.component.has_wildcard', - 'type' => 'checkbox', - 'default' => 0, - ]; - } - - $this->arPropertyList['skip_error'] = [ - 'title' => 'lovata.toolbox::lang.component.skip_error', - 'type' => 'checkbox', - 'default' => 0, - ]; - - return $this->arPropertyList; - } - - /** - * Get element object - * @return \Illuminate\Http\Response|null - * @throws \Exception - */ - public function onRun() - { - //Get element slug - $sElementSlug = $this->property('slug'); - if (empty($sElementSlug) && !$this->property('slug_required')) { - return null; - } - - if (empty($this->obElement) && !$this->property('skip_error')) { - return $this->getErrorResponse(); - } - - return null; - } - - /** - * Init plugin method - */ - public function init() - { - //Get element slug - $sElementSlug = $this->property('slug'); - if (empty($sElementSlug)) { - return; - } - - //Get element by slug - $this->obElement = $this->getElementObject($sElementSlug); - if (empty($this->obElement)) { - return; - } - - //Get element item - $this->obElementItem = $this->makeItem($this->obElement->id, $this->obElement); - if ($this->bNeedSmartURLCheck && $this->property('smart_url_check') && !$this->smartUrlCheck()) { - $this->obElement = null; - $this->obElementItem = null; - } - } - - /** - * Get element item - * @return \Lovata\Toolbox\Classes\Item\ElementItem - */ - public function get() - { - return $this->obElementItem; - } - - /** - * Get element object by slug - * @param string $sElementSlug - * @return \Model - */ - abstract protected function getElementObject($sElementSlug); - - /** - * Male new element item - * @param int $iElementID - * @param \Model $obElement - * @return \Lovata\Toolbox\Classes\Item\ElementItem - */ - abstract protected function makeItem($iElementID, $obElement); - - /** - * Checks trans value, if value is not form active lang, then return false - * @param \Model $obElement - * @param string $sElementSlug - * @return bool - */ - protected function checkTransSlug($obElement, $sElementSlug) - { - if (empty($obElement) || empty($sElementSlug)) { - return false; - } - - $bResult = $obElement->slug == $sElementSlug; - - return $bResult; - } - - /** - * Smart check URL with additional checking - * @return bool - */ - protected function smartUrlCheck() - { - if (empty($this->obElementItem)) { - return false; - } - - $sCurrentURL = $this->currentPageUrl(); - $sValidURL = $this->obElementItem->getPageUrl($this->page->id); - $bResult = preg_match("%^{$sValidURL}%", $sCurrentURL); - - return $bResult; - } - - /** - * Return true, if slug is translatable - * @return bool - */ - protected function isSlugTranslatable() - { - return (bool) Settings::getValue('slug_is_translatable') && PluginManager::instance()->hasPlugin('RainLab.Translate'); - } -} diff --git a/plugins/lovata/toolbox/classes/component/SortingElementList.php b/plugins/lovata/toolbox/classes/component/SortingElementList.php deleted file mode 100644 index ecf527c1e..000000000 --- a/plugins/lovata/toolbox/classes/component/SortingElementList.php +++ /dev/null @@ -1,44 +0,0 @@ -setActiveSorting(); - parent::init(); - } - - /** - * Get active sorting - * @return string - */ - public function getSorting() - { - return $this->sSorting; - } - - /** - * Set active sorting - */ - protected function setActiveSorting() - { - $this->sSorting = Input::get('sort'); - if (empty($this->sSorting)) { - $this->sSorting = $this->property('sorting'); - } - } -} diff --git a/plugins/lovata/toolbox/classes/console/CommonCreateFile.php b/plugins/lovata/toolbox/classes/console/CommonCreateFile.php deleted file mode 100644 index ab6d5e965..000000000 --- a/plugins/lovata/toolbox/classes/console/CommonCreateFile.php +++ /dev/null @@ -1,546 +0,0 @@ - [], - 'enable' => [], - 'disable' => [], - 'addition' => [], - 'lang' => [], - ]; - - /** - * Execute the console command. - */ - public function handle() - { - $this->initData(); - $this->setLogo(); - $this->setDeveloper(); - $this->setAuthor(); - $this->setPlugin(); - - $this->call('toolbox:create.plugin', ['data' => $this->arData]); - } - - /** - * Get the console command arguments. - * @return array - */ - protected function getArguments() - { - return [ - ['data', InputArgument::OPTIONAL], - ]; - } - - /** - * Init data - */ - protected function initData() - { - $this->arInoutData = $this->argument('data'); - - if (!empty($this->arInoutData)) { - $this->arData = $this->arInoutData; - } else { - $this->setDisableList(); - } - } - - /** - * Set logo - */ - protected function setLogo() - { - if ($this->checkAdditionList(self::CODE_LOGO)) { - return; - } - - $this->setAdditionList(self::CODE_LOGO); - $this->logoToolBox(); - } - - /** - * Set developer - */ - protected function setDeveloper() - { - if ($this->checkAdditionList(self::CODE_DEVELOPER)) { - return; - } - - $this->setAdditionList(self::CODE_DEVELOPER); - $sDeveloper = env('DEVELOPER', ''); - - if (empty($sDeveloper)) { - return; - } - - array_set($this->arData, 'replace.developer'.self::CODE_DEVELOPER, $sDeveloper); - } - - /** - * Set author - * @param boolean $bExpansion - */ - protected function setAuthor($bExpansion = false) - { - $this->setAuthorAndPlugin( - $bExpansion, - self::CODE_AUTHOR, - self::CODE_EXPANSION_AUTHOR, - 'Lovata' - ); - } - - /** - * Set plugin - * @param boolean $bExpansion - */ - protected function setPlugin($bExpansion = false) - { - $this->setAuthorAndPlugin( - $bExpansion, - self::CODE_PLUGIN, - self::CODE_EXPANSION_PLUGIN, - 'Shopaholic' - ); - } - - /** - * Set author and plugin - * @param bool $bExpansion - * @param string $sCode - * @param string $sExpansionCode - * @param string $sExample - */ - protected function setAuthorAndPlugin($bExpansion, $sCode, $sExpansionCode, $sExample) - { - if (empty($sCode) || empty($sExpansionCode) || empty($sExample) || !is_bool($bExpansion)) { - return; - } - - $bCheckCreateAll = $this->checkAdditionList(self::CODE_COMMAND_PARENT); - - if (!$this->checkAdditionList($sCode) || !$bCheckCreateAll) { - if (!$bCheckCreateAll && $bExpansion) { - $sCode = $sExpansionCode; - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.set', [ - 'name' => $sCode, - 'example' => $sExample, - ]); - - $sValue = $this->validationAskByName($sMessage); - - if (!$bCheckCreateAll && $bExpansion) { - $this->setRegisterString($sValue, $sExpansionCode); - - return; - } - - $this->setAdditionList($sCode); - $this->setRegisterString($sValue, $sCode); - $this->setRegisterString($sValue, $sExpansionCode); - } - } - - /** - * Set model - */ - protected function setModel() - { - if ($this->checkAdditionList(self::CODE_MODEL)) { - return; - } - - $this->setAdditionList(self::CODE_MODEL); - $sMessage = Lang::get('lovata.toolbox::lang.message.set', [ - 'name' => self::CODE_MODEL, - 'example' => 'Product', - ]); - - $sModel = $this->validationAskByName($sMessage); - $this->setRegisterString($sModel, self::CODE_MODEL); - } - - /** - * Set controller - */ - protected function setController() - { - if ($this->checkAdditionList(self::CODE_CONTROLLER)) { - return; - } - - $this->setAdditionList(self::CODE_CONTROLLER); - $sMessage = Lang::get('lovata.toolbox::lang.message.set', [ - 'name' => self::CODE_CONTROLLER, - 'example' => 'Products', - ]); - - $sController = $this->validationAskByName($sMessage); - $this->setRegisterString($sController, self::CODE_CONTROLLER); - } - - /** - * Set field list - * @param array $arException - * @param array $arOnlyThis - */ - protected function setFieldList($arException = [], $arOnlyThis = []) - { - if ($this->checkAdditionList(self::CODE_FIELDS)) { - return; - } - - $this->setAdditionList(self::CODE_FIELDS); - $sMessage = Lang::get('lovata.toolbox::lang.message.choice_field_list'); - $arChoiceList = [self::CODE_DEFAULT]; - $arChoiceList = array_merge($this->arFieldList, $arChoiceList); - $arChoiceList = $this->exceptionByList($arChoiceList, $arException, $arOnlyThis); - $this->arFieldList = $this->choice($sMessage, $arChoiceList, null, null, true); - - if (empty($this->arFieldList) || in_array(self::CODE_DEFAULT, $this->arFieldList)) { - return; - } - - $bCheckName = in_array(self::CODE_NAME, $this->arFieldList); - $bCheckSlug = in_array(self::CODE_SLUG, $this->arFieldList); - $bCheckPreviewImage = in_array(self::CODE_PREVIEW_IMAGE, $this->arFieldList); - $bCheckImages = in_array(self::CODE_IMAGES, $this->arFieldList); - $bCheckFile = in_array(self::CODE_FILE, $this->arFieldList); - - $this->setEnableList(self::CODE_EMPTY_FIELD); - $this->setEnableList($this->arFieldList); - - if ($bCheckName || $bCheckSlug) { - $this->setEnableList(self::CODE_EMPTY_VALIDATE); - } - - if ($bCheckPreviewImage || $bCheckFile) { - $this->setEnableList(self::CODE_EMPTY_ATTACH_ONE); - } - - if ($bCheckImages) { - $this->setEnableList(self::CODE_EMPTY_ATTACH_MANY); - } - } - - /** - * Set import export csv extends for model - */ - protected function setImportExportCSV() - { - if ($this->checkAdditionList(self::CODE_IMPORT_EXPORT_SVG)) { - return; - } - - $this->setAdditionList(self::CODE_IMPORT_EXPORT_SVG); - $sMessage = Lang::get('lovata.toolbox::lang.message.choice_extend_model'); - $arChoiceList = [ - self::CODE_MODEL, - self::CODE_IMPORT_SVG, - self::CODE_EXPORT_SVG, - ]; - - $sResult = $this->choice($sMessage, $arChoiceList); - - if ($sResult != self::CODE_MODEL) { - $this->setEnableList([self::CODE_EMPTY_IMPORT_EXPORT_SVG, $sResult, self::CODE_EMPTY_ATTACH_ONE]); - } else { - $this->setEnableList(self::CODE_MODEL); - } - } - - /** - * Set sorting - * @param array $arException - * @param array $arOnlyThis - */ - protected function setSorting($arException = [], $arOnlyThis = []) - { - if ($this->checkAdditionList(self::CODE_SORTING)) { - return; - } - - $this->setAdditionList(self::CODE_SORTING); - $sMessage = Lang::get('lovata.toolbox::lang.message.choice_sorting'); - $arChoiceList = [ - self::CODE_NESTED_TREE, - self::CODE_SORTABLE, - self::CODE_DEFAULT_SORTING, - self::CODE_DEFAULT, - ]; - - $arChoiceList = $this->exceptionByList($arChoiceList, $arException, $arOnlyThis); - $sResult = $this->choice($sMessage, $arChoiceList); - - if ($sResult == self::CODE_DEFAULT) { - return; - } elseif ($sResult == self::CODE_NESTED_TREE || $sResult == self::CODE_SORTABLE) { - $this->setEnableList(self::CODE_EMPTY_SORTABLE_NESTED_TREE); - } - - $this->setEnableList($sResult); - } - - /** - * Exception by list - * @param array $arList - * @param array $arException - * @param array $arOnlyThis - * @return array - */ - protected function exceptionByList($arList = [], $arException = [], $arOnlyThis = []) - { - if (empty($arException) && empty($arOnlyThis)) { - return $arList; - } elseif (empty($arException) && !empty($arOnlyThis)) { - return $arOnlyThis; - } - - $arChoiceList = array_diff($arList, $arException); - - return array_values($arChoiceList); - } - /** - * Validation answer to a question by name - * @param string $sMessage - * @return string - */ - protected function validationAskByName($sMessage) - { - $sResult = $this->ask($sMessage); - - if (!preg_match("/^[a-zA-Z]+$/", $sResult)) { - $sResult = $this->validationAskByName($sMessage); - } - - return $sResult; - } - - /** - * Set register string for $arData - * @param string $sString - * @param string $sArrayKey - */ - protected function setRegisterString($sString, $sArrayKey) - { - if (empty($sString) || empty($sArrayKey)) { - return; - } - - $sStringCase = snake_case($sString); - $sStringStudly = studly_case($sStringCase); - $sStringLower = mb_strtolower($sString); - array_set($this->arData, 'replace.'.self::PREFIX_STUDLY.$sArrayKey, $sStringStudly); - array_set($this->arData, 'replace.'.self::PREFIX_LOWER.$sArrayKey, $sStringLower); - } - - /** - * Check enable list - * @param string $sCode - * @return bool - */ - protected function checkEnableList($sCode) - { - $arEnableList = array_get($this->arData, 'enable'); - - if (!empty($sCode) && !empty($arEnableList) && is_array($arEnableList) && in_array($sCode, $arEnableList)) { - return true; - } - - return false; - } - - /** - * Check addition list - * @param string $sCode - * @return bool - */ - protected function checkAdditionList($sCode) - { - $arAdditionList = array_get($this->arData, 'addition'); - - if (!empty($sCode) && !empty($arAdditionList) && is_array($arAdditionList) && in_array($sCode, $arAdditionList)) { - return true; - } - - return false; - } - - /** - * Set disable list - */ - protected function setDisableList() - { - $arDisableList = [ - self::CODE_DEVELOPER, - self::CODE_EMPTY_FIELD, - self::CODE_EMPTY_VALIDATE, - self::CODE_EMPTY_ATTACH_ONE, - self::CODE_EMPTY_ATTACH_MANY, - self::CODE_EMPTY_IMPORT_EXPORT_SVG, - self::CODE_IMPORT_SVG, - self::CODE_EXPORT_SVG, - self::CODE_MODEL, - self::CODE_NESTED_TREE, - self::CODE_SORTABLE, - self::CODE_DEFAULT_SORTING, - self::CODE_EMPTY_SORTABLE_NESTED_TREE, - ]; - - if (!empty($this->arFieldList) && is_array($this->arFieldList)) { - $arDisableList = array_merge($arDisableList, $this->arFieldList); - } - - array_set($this->arData, 'disable', $arDisableList); - } - - /** - * Set addition list - * @param string $sValue - */ - protected function setAdditionList($sValue) - { - if (!empty($sValue)) { - $this->arData['addition'][] = $sValue; - } - } - - /** - * Set enable list - * @param string|array - */ - protected function setEnableList($arData) - { - if (empty($arData)) { - return; - } - - $arResult = []; - - if (!is_array($arData)) { - $arData = [$arData]; - } - - foreach ($arData as $mixData) { - if (is_array($mixData)) { - $arResult = array_merge($arResult, $mixData); - } - $arResult[] = $mixData; - } - - $arResult = array_unique($arResult); - $arDisableList = array_get($this->arData, 'disable'); - - foreach ($arResult as $sValue) { - $mixKey = array_search($sValue, $arDisableList); - if (!$mixKey) { - continue; - } - - $sValue = $arDisableList[$mixKey]; - $this->arData['enable'][] = $sValue; - array_forget($this->arData, 'disable.'.$mixKey); - } - } - - /** - * Create file - * @param string $sClass - */ - protected function createFile($sClass) - { - if (empty($sClass)) { - return; - } - - $obFile = new $sClass($this->arData); - $sFile = $obFile->create(); - if (!empty($sFile)) { - $sMessage = Lang::get('lovata.toolbox::lang.message.force_file', ['file' => $sFile]); - if ($this->confirm($sMessage, true)) { - $obFile->create(true); - } - } - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateAll.php b/plugins/lovata/toolbox/classes/console/CreateAll.php deleted file mode 100644 index 6544607bd..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateAll.php +++ /dev/null @@ -1,92 +0,0 @@ -setModel(); - $this->setController(); - $this->setFieldList(); - $this->setSorting(); - $this->setImportExportCSV(); - $this->setAdditionList(self::CODE_COMMAND_PARENT); - $this->callCommandList(); - } - - /** - * Call command list - */ - protected function callCommandList() - { - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_MODEL]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.model', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_CONTROLLER]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.controller', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_ITEM]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.item', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_STORE]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.store', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_COLLECTION]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.collection', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_COMPONENT_PAGE]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.component.page', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_COMPONENT_DATA]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.component.data', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_COMPONENT_LIST]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.component.list', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_EVENT]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.event.model', ['data' => $this->arData]); - } - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateCollection.php b/plugins/lovata/toolbox/classes/console/CreateCollection.php deleted file mode 100644 index 77bfb3630..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateCollection.php +++ /dev/null @@ -1,29 +0,0 @@ -setModel(); - $this->setFieldList(null, [self::CODE_ACTIVE, self::CODE_DEFAULT]); - $this->setSorting(); - $this->createFile(CollectionCreateFile::class); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateComponentData.php b/plugins/lovata/toolbox/classes/console/CreateComponentData.php deleted file mode 100644 index 5fcc16b75..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateComponentData.php +++ /dev/null @@ -1,38 +0,0 @@ - [ - '{{lower_model}}_data_name' => '{{studly_model}} Data', - '{{lower_model}}_data_description' => 'Get {{lower_model}} by ID', - ], - ]; - - /** - * Execute the console command. - */ - public function handle() - { - parent::handle(); - - $this->setModel(); - $this->createFile(ComponentDataCreateFile::class); - $this->updatePluginLang($this->arLangData); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateComponentList.php b/plugins/lovata/toolbox/classes/console/CreateComponentList.php deleted file mode 100644 index 39a961ee3..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateComponentList.php +++ /dev/null @@ -1,39 +0,0 @@ - [ - '{{lower_model}}_list_name' => '{{studly_model}} List', - '{{lower_model}}_list_description' => 'Get {{lower_model}} list', - ], - ]; - - /** - * Execute the console command. - */ - public function handle() - { - parent::handle(); - - $this->setModel(); - $this->setSorting([self::CODE_NESTED_TREE, self::CODE_SORTABLE]); - $this->createFile(ComponentListCreateFile::class); - $this->updatePluginLang($this->arLangData); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateComponentPage.php b/plugins/lovata/toolbox/classes/console/CreateComponentPage.php deleted file mode 100644 index 02fdd519d..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateComponentPage.php +++ /dev/null @@ -1,39 +0,0 @@ - [ - '{{lower_model}}_page_name' => '{{studly_model}} Page', - '{{lower_model}}_page_description' => 'Get {{lower_model}} page data', - ], - ]; - - /** - * Execute the console command. - */ - public function handle() - { - parent::handle(); - - $this->setModel(); - $this->setFieldList(null, [self::CODE_ACTIVE, self::CODE_VIEW_COUNT, self::CODE_DEFAULT]); - $this->createFile(ComponentPageCreateFile::class); - $this->updatePluginLang($this->arLangData); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateController.php b/plugins/lovata/toolbox/classes/console/CreateController.php deleted file mode 100644 index 4aa2a9ac1..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateController.php +++ /dev/null @@ -1,110 +0,0 @@ - [ - '{{lower_controller}}' => '{{studly_model}} list', - ], - 'permission' => [ - '{{lower_model}}' => 'Manage {{lower_model}}', - ], - '{{lower_model}}' => [ - 'name' => '{{lower_model}}', - 'list_title' => '{{studly_model}} list', - ], - ]; - - /** - * Execute the console command. - */ - public function handle() - { - parent::handle(); - - $this->setModel(); - $this->setController(); - $this->setFieldList(null, [self::CODE_ACTIVE, self::CODE_DEFAULT]); - $this->setImportExportCSV(); - $this->setSorting([self::CODE_DEFAULT_SORTING]); - $this->createAdditionalFile(); - } - - /** - * Create file list - */ - protected function createAdditionalFile() - { - $this->createFile(ControllerCreateFile::class); - $this->createFile(ControllerListToolbarCreateFile::class); - $this->createFile(ControllerConfirmFormCreateFile::class); - $this->createFile(ControllerConfirmListCreateFile::class); - $this->createFile(ControllerCreateCreateFile::class); - $this->createFile(ControllerIndexCreateFile::class); - $this->createFile(ControllerPreviewCreateFile::class); - $this->createFile(ControllerUpdateCreateFile::class); - $this->createFile(ControllerConfirmFilterCreateFile::class); - - if ($this->checkEnableList(self::CODE_IMPORT_SVG)) { - $this->createFile(ControllerImportCreateFile::class); - } - - if ($this->checkEnableList(self::CODE_EXPORT_SVG)) { - $this->createFile(ControllerExportCreateFile::class); - } - - if ($this->checkEnableList(self::CODE_EMPTY_IMPORT_EXPORT_SVG)) { - $this->createFile(ControllerConfigImportExportCreateFile::class); - } - - if ($this->checkEnableList(self::CODE_EMPTY_SORTABLE_NESTED_TREE)) { - $this->createFile(ControllerReorderCreateFile::class); - $this->createFile(ControllerConfigReorderCreateFile::class); - } - - $this->updatePluginYAML(); - $this->updatePluginLang($this->arLangData); - } - - /** - * Update plugin.yaml - */ - protected function updatePluginYAML() - { - $sMessage = Lang::get('lovata.toolbox::lang.message.add_side_menu'); - if ($this->confirm($sMessage, true)) { - $obUpdate = new PluginYAMLUpdateFile($this->arData); - $obUpdate->update(); - } - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateEventModel.php b/plugins/lovata/toolbox/classes/console/CreateEventModel.php deleted file mode 100644 index 1379ade89..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateEventModel.php +++ /dev/null @@ -1,31 +0,0 @@ -setAuthor(true); - $this->setPlugin(true); - $this->setModel(); - $this->setFieldList(null, [self::CODE_ACTIVE, self::CODE_VIEW_COUNT, self::CODE_DEFAULT]); - $this->setSorting(); - $this->createFile(EventModelCreateFile::class); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateExtendBackendMenuHandler.php b/plugins/lovata/toolbox/classes/console/CreateExtendBackendMenuHandler.php deleted file mode 100644 index 26be41efa..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateExtendBackendMenuHandler.php +++ /dev/null @@ -1,26 +0,0 @@ -createFile(ExtendBackendMenuHandlerCreateFile::class); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateExtendModelColumnsHandler.php b/plugins/lovata/toolbox/classes/console/CreateExtendModelColumnsHandler.php deleted file mode 100644 index 75bec56ca..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateExtendModelColumnsHandler.php +++ /dev/null @@ -1,30 +0,0 @@ -setAuthor(true); - $this->setPlugin(true); - $this->setModel(); - $this->setController(); - $this->createFile(ExtendModelColumnsHandlerCreateFile::class); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateExtendModelFieldsHandler.php b/plugins/lovata/toolbox/classes/console/CreateExtendModelFieldsHandler.php deleted file mode 100644 index 55842715e..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateExtendModelFieldsHandler.php +++ /dev/null @@ -1,30 +0,0 @@ -setAuthor(true); - $this->setPlugin(true); - $this->setModel(); - $this->setController(); - $this->createFile(ExtendModelFieldsHandlerCreateFile::class); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateItem.php b/plugins/lovata/toolbox/classes/console/CreateItem.php deleted file mode 100644 index 6949f2abd..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateItem.php +++ /dev/null @@ -1,29 +0,0 @@ -setModel(); - $this->setFieldList(); - $this->setSorting([self::CODE_DEFAULT_SORTING]); - $this->createFile(ItemCreateFile::class); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateMigration.php b/plugins/lovata/toolbox/classes/console/CreateMigration.php deleted file mode 100644 index 81860596b..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateMigration.php +++ /dev/null @@ -1,44 +0,0 @@ -setController(); - $this->setFieldList([self::CODE_PREVIEW_IMAGE, self::CODE_IMAGES, self::CODE_FILE]); - $this->setSorting([self::CODE_DEFAULT_SORTING]); - $this->createFile(MigrationCreateFile::class); - $this->updatePluginVersionYAML(); - } - - /** - * Update version.yaml - */ - protected function updatePluginVersionYAML() - { - $sMessage = Lang::get('lovata.toolbox::lang.message.version_up'); - $bConfirm = $this->confirm($sMessage, false); - array_set($this->arData, 'addition.version_up', $bConfirm); - $obUpdate = new PluginVersionYAMLUpdateFile($this->arData); - $obUpdate->update(); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateModel.php b/plugins/lovata/toolbox/classes/console/CreateModel.php deleted file mode 100644 index 3f4cf19ed..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateModel.php +++ /dev/null @@ -1,58 +0,0 @@ -setModel(); - $this->setController(); - $this->setFieldList(); - $this->setImportExportCSV(); - $this->setSorting([self::CODE_DEFAULT_SORTING]); - $this->setAdditionList(self::CODE_COMMAND_PARENT); - $this->createFile(ModelCreateFile::class); - $this->callCommandList(); - } - - /** - * Call command list - */ - protected function callCommandList() - { - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_CREATION_MIGRATION]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.migration.create', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_CREATION_MODEL_COLUMNS]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.model.columns', ['data' => $this->arData]); - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.create', ['name' => self::CODE_CREATION_MODEL_FIELDS]); - - if ($this->confirm($sMessage, true)) { - $this->call('toolbox:create.model.fields', ['data' => $this->arData]); - } - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateModelColumn.php b/plugins/lovata/toolbox/classes/console/CreateModelColumn.php deleted file mode 100644 index d10bab234..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateModelColumn.php +++ /dev/null @@ -1,29 +0,0 @@ -setModel(); - $this->setFieldList([self::CODE_PREVIEW_IMAGE, self::CODE_IMAGES, self::CODE_FILE]); - $this->setSorting([self::CODE_DEFAULT_SORTING, self::CODE_NESTED_TREE]); - $this->createFile(ModelColumnCreateFile::class); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateModelField.php b/plugins/lovata/toolbox/classes/console/CreateModelField.php deleted file mode 100644 index f4c78d88f..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateModelField.php +++ /dev/null @@ -1,28 +0,0 @@ -setModel(); - $this->setFieldList(); - $this->createFile(ModelFieldCreateFile::class); - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreatePlugin.php b/plugins/lovata/toolbox/classes/console/CreatePlugin.php deleted file mode 100644 index 480fbe09d..000000000 --- a/plugins/lovata/toolbox/classes/console/CreatePlugin.php +++ /dev/null @@ -1,106 +0,0 @@ -initData(); - $this->setLogo(); - $this->setDeveloper(); - - if (!$this->checkAdditionList(self::CODE_AUTHOR) || !$this->checkAdditionList(self::CODE_PLUGIN)) { - $this->setAuthor(); - $this->setPlugin(); - } - - if ($this->checkPluginExist()) { - return; - } - - $this->setLangList(); - $this->createFile(PluginPHPCreateFile::class); - $this->createFile(PluginYAMLCreateFile::class); - $this->createFile(PluginVersionCreateFile::class); - $this->createLangFile(); - } - - /** - * Check plugin exist - * @return bool - */ - protected function checkPluginExist() - { - $bResult = true; - $sAuthor = array_get($this->arData, 'replace.lower_author'); - $sPlugin = array_get($this->arData, 'replace.lower_plugin'); - - if (empty($sAuthor) || empty($sPlugin)) { - return $bResult; - } - - $sPluginPHPPath = plugins_path($sAuthor.'/'.$sPlugin.'/Plugin.php'); - $sPluginYAMLPath = plugins_path($sAuthor.'/'.$sPlugin.'/plugin.yaml'); - - if (!file_exists($sPluginPHPPath) && !file_exists($sPluginYAMLPath)) { - $bResult = false; - } - - return $bResult; - } - - /** - * Set lang list - */ - protected function setLangList() - { - if (empty($this->arLangList)) { - return; - } - - $sMessage = Lang::get('lovata.toolbox::lang.message.choice_lang_list'); - - $this->arLangList = $this->choice($sMessage, $this->arLangList, null, null, true); - } - - /** - * Create lang file - */ - protected function createLangFile() - { - if (empty($this->arLangList)) { - return; - } - - foreach ($this->arLangList as $sLang) { - array_set($this->arData, 'replace.lang', $sLang); - $this->createFile(PluginLangCreateFile::class); - } - } -} diff --git a/plugins/lovata/toolbox/classes/console/CreateStore.php b/plugins/lovata/toolbox/classes/console/CreateStore.php deleted file mode 100644 index 8f7943979..000000000 --- a/plugins/lovata/toolbox/classes/console/CreateStore.php +++ /dev/null @@ -1,46 +0,0 @@ -setAuthor(true); - $this->setPlugin(true); - $this->setModel(); - $this->setFieldList(null, [self::CODE_ACTIVE, self::CODE_VIEW_COUNT, self::CODE_DEFAULT]); - $this->setSorting(); - $this->createFile(ListStoreCreateFile::class); - - if ($this->checkEnableList(self::CODE_ACTIVE)) { - $this->createFile(ActiveListStoreCreateFile::class); - } - - if ($this->checkEnableList(self::CODE_SORTABLE) || $this->checkEnableList(self::CODE_DEFAULT_SORTING)) { - $this->createFile(SortingListStoreCreateFile::class); - } - - if ($this->checkEnableList(self::CODE_NESTED_TREE)) { - $this->createFile(TopLevelListStoreCreateFile::class); - } - } -} diff --git a/plugins/lovata/toolbox/classes/console/ToolBoxHelper.php b/plugins/lovata/toolbox/classes/console/ToolBoxHelper.php deleted file mode 100644 index 82d67133d..000000000 --- a/plugins/lovata/toolbox/classes/console/ToolBoxHelper.php +++ /dev/null @@ -1,110 +0,0 @@ -logoToolBox(); - - $arHeaderList = [self::HEADER_COMMAND_LIST, self::HEADER_DESCRIPTION]; - - $arRowList = [ - [ - 'toolbox:helper', - Lang::get('lovata.toolbox::lang.message.table_toolbox_helper'), - ], - [ - 'toolbox:create.all', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'all pack.']), - ], - [ - 'toolbox:create.plugin', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'plugin.']), - ], - [ - 'toolbox:create.model', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'model.']), - ], - [ - 'toolbox:create.model.columns', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'columns model.']), - ], - [ - 'toolbox:create.model.fields', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'fields model.']), - ], - [ - 'toolbox:create.controller', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'controller.']), - ], - [ - 'toolbox:create.migration', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'migration.']), - ], - [ - 'toolbox:create.component.data', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'component data.']), - ], - [ - 'toolbox:create.component.list', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'component list.']), - ], - [ - 'toolbox:create.component.page', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'component page.']), - ], - [ - 'toolbox:create.item', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'item.']), - ], - [ - 'toolbox:create.collection', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'collection.']), - ], - [ - 'toolbox:create.store', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'store.']), - ], - [ - 'toolbox:create.event.model', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'event model.']), - ], - [ - 'toolbox:create.event.menu', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'extend backend menu.']), - ], - [ - 'toolbox:create.event.fields', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'extend model fields.']), - ], - [ - 'toolbox:create.event.columns', - Lang::get('lovata.toolbox::lang.message.table_toolbox_create', ['description' => 'extend model columns.']), - ], - ]; - - $this->table($arHeaderList, $arRowList); - } -} diff --git a/plugins/lovata/toolbox/classes/event/AbstractBackendColumnHandler.php b/plugins/lovata/toolbox/classes/event/AbstractBackendColumnHandler.php deleted file mode 100644 index 659475b48..000000000 --- a/plugins/lovata/toolbox/classes/event/AbstractBackendColumnHandler.php +++ /dev/null @@ -1,53 +0,0 @@ -listen('backend.list.extendColumns', function ($obWidget) { - - $sControllerClass = $this->getControllerClass(); - $sModelName = $this->getModelClass(); - - /** @var \Backend\Widgets\Lists $obWidget */ - if (!$obWidget->getController() instanceof $sControllerClass) { - return; - } - - if (!$obWidget->model instanceof $sModelName) { - return; - } - - $this->extendColumns($obWidget); - }, $this->iPriority); - } - - /** - * Extend backend columns - * @param \Backend\Widgets\Lists $obWidget - */ - abstract protected function extendColumns($obWidget); - - /** - * Get model class name - * @return string - */ - abstract protected function getModelClass() : string; - - /** - * Get controller class name - * @return string - */ - abstract protected function getControllerClass() : string; -} diff --git a/plugins/lovata/toolbox/classes/event/AbstractBackendFieldHandler.php b/plugins/lovata/toolbox/classes/event/AbstractBackendFieldHandler.php deleted file mode 100644 index a2b85011f..000000000 --- a/plugins/lovata/toolbox/classes/event/AbstractBackendFieldHandler.php +++ /dev/null @@ -1,53 +0,0 @@ -listen('backend.form.extendFields', function ($obWidget) { - - $sControllerClass = $this->getControllerClass(); - $sModelName = $this->getModelClass(); - - /** @var \Backend\Widgets\Form $obWidget */ - if (!$obWidget->getController() instanceof $sControllerClass || $obWidget->isNested || empty($obWidget->context)) { - return; - } - - if (!$obWidget->model instanceof $sModelName) { - return; - } - - $this->extendFields($obWidget); - }, $this->iPriority); - } - - /** - * Extend backend fields - * @param \Backend\Widgets\Form $obWidget - */ - abstract protected function extendFields($obWidget); - - /** - * Get model class name - * @return string - */ - abstract protected function getModelClass() : string; - - /** - * Get controller class name - * @return string - */ - abstract protected function getControllerClass() : string; -} diff --git a/plugins/lovata/toolbox/classes/event/AbstractBackendMenuHandler.php b/plugins/lovata/toolbox/classes/event/AbstractBackendMenuHandler.php deleted file mode 100644 index d990a8bd2..000000000 --- a/plugins/lovata/toolbox/classes/event/AbstractBackendMenuHandler.php +++ /dev/null @@ -1,28 +0,0 @@ -listen('backend.menu.extendItems', function ($obManager) { - $this->addMenuItems($obManager); - }, $this->iPriority); - } - - /** - * Add menu items - * @param \Backend\Classes\NavigationManager $obManager - */ - abstract protected function addMenuItems($obManager); -} diff --git a/plugins/lovata/toolbox/classes/event/AbstractExtendRelationConfigHandler.php b/plugins/lovata/toolbox/classes/event/AbstractExtendRelationConfigHandler.php deleted file mode 100644 index 7947accaa..000000000 --- a/plugins/lovata/toolbox/classes/event/AbstractExtendRelationConfigHandler.php +++ /dev/null @@ -1,58 +0,0 @@ -getControllerClass(); - $sControllerClass::extend(function ($obController) { - /** @var \Backend\Classes\Controller $obController */ - $this->extendConfig($obController); - }); - } - - /** - * Extend controller - * @param \Backend\Classes\Controller $obController - */ - protected function extendConfig($obController) - { - if (empty($obController->implement)) { - $obController->implement = []; - } - - //Extend controller - if (!in_array('Backend.Behaviors.RelationController', $obController->implement) && !in_array('Backend\Behaviors\RelationController', $obController->implement)) { - $obController->implement[] = 'Backend.Behaviors.RelationController'; - } - - if (!isset($obController->relationConfig)) { - $obController->addDynamicProperty('relationConfig'); - } - - $obController->relationConfig = $obController->mergeConfig( - $obController->relationConfig, - $this->getConfigPath() - ); - } - - /** - * Get controller class name - * @return string - */ - abstract protected function getControllerClass() : string; - - /** - * Get path to config file - * @return string - */ - abstract protected function getConfigPath() : string; -} diff --git a/plugins/lovata/toolbox/classes/event/AbstractModelRelationHandler.php b/plugins/lovata/toolbox/classes/event/AbstractModelRelationHandler.php deleted file mode 100644 index d3a81c923..000000000 --- a/plugins/lovata/toolbox/classes/event/AbstractModelRelationHandler.php +++ /dev/null @@ -1,95 +0,0 @@ -getModelClass(); - - $sModelClass::extend(function ($obModel) { - /** @var \Model $obModel */ - $obModel->bindEvent('model.relation.afterAttach', function ($sRelationName, $arAttachedIDList, $arInsertData) use ($obModel) { - if (!$this->checkRelationName($sRelationName)) { - return; - } - - $this->sRelationName = $sRelationName; - $this->afterAttach($obModel, $arAttachedIDList, $arInsertData); - }, $this->iPriority); - - $obModel->bindEvent('model.relation.afterDetach', function ($sRelationName, $arAttachedIDList) use ($obModel) { - if (!$this->checkRelationName($sRelationName)) { - return; - } - - $this->sRelationName = $sRelationName; - $this->afterDetach($obModel, $arAttachedIDList); - }, $this->iPriority); - }); - } - - /** - * After attach event handler - * @param \Model $obModel - * @param array $arAttachedIDList - * @param array $arInsertData - */ - protected function afterAttach($obModel, $arAttachedIDList, $arInsertData) - { - } - - /** - * After detach event handler - * @param \Model $obModel - * @param array $arAttachedIDList - */ - protected function afterDetach($obModel, $arAttachedIDList) - { - } - - /** - * Check relation name - * @param string $sRelationName - * @return bool - */ - protected function checkRelationName($sRelationName) : bool - { - $sCheckedRelationName = $this->getRelationName(); - if (empty($sCheckedRelationName)) { - return true; - } - - if (is_array($sCheckedRelationName) && in_array($sRelationName, $sCheckedRelationName)) { - return true; - } - - $bResult = $sRelationName == $sCheckedRelationName; - - return $bResult; - } - - /** - * Get model class name - * @return string - */ - abstract protected function getModelClass() : string; - - /** - * Get relation name - * @return string|array - */ - abstract protected function getRelationName(); -} diff --git a/plugins/lovata/toolbox/classes/event/ModelHandler.php b/plugins/lovata/toolbox/classes/event/ModelHandler.php deleted file mode 100644 index 5c38c2cf6..000000000 --- a/plugins/lovata/toolbox/classes/event/ModelHandler.php +++ /dev/null @@ -1,236 +0,0 @@ -getModelClass(); - $sModelClass::extend(function ($obElement) { - - /** @var \Model $obElement */ - $obElement->bindEvent('model.afterCreate', function () use ($obElement) { - $this->obElement = $obElement; - $this->init(); - $this->afterCreate(); - }, $this->iPriority); - - /** @var \Model $obElement */ - $obElement->bindEvent('model.afterSave', function () use ($obElement) { - $this->obElement = $obElement; - $this->init(); - $this->afterSave(); - }, $this->iPriority); - - /** @var \Model $obElement */ - $obElement->bindEvent('model.afterDelete', function () use ($obElement) { - $this->obElement = $obElement; - $this->init(); - $this->afterDelete(); - }, $this->iPriority); - - if ($this->bWithRestore) { - /** @var \Model $obElement */ - $obElement->bindEvent('model.afterRestore', function () use ($obElement) { - $this->obElement = $obElement; - $this->init(); - $this->afterRestore(); - }, $this->iPriority); - } - }); - } - - /** - * Get model class name - * @return string - */ - abstract protected function getModelClass(); - - /** - * Get item class name - * @return string - */ - abstract protected function getItemClass(); - - /** - * Init store objects - */ - protected function init() - { - } - - /** - * After create event handler - */ - protected function afterCreate() - { - } - - /** - * After save event handler - */ - protected function afterSave() - { - $this->clearItemCache(); - } - - /** - * After delete event handler - */ - protected function afterDelete() - { - $this->clearItemCache(); - } - - /** - * After restore event handler - */ - protected function afterRestore() - { - } - - /** - * Clear item cache - */ - protected function clearItemCache() - { - $sItemClass = $this->getItemClass(); - $sField = $this->sIdentifierField; - - $sItemClass::clearCache($this->obElement->$sField); - } - - /** - * If field value was changed, then cache clear by value - * @param string $sField - * @param AbstractStoreWithParam|AbstractStoreWithoutParam $obListStore - */ - protected function checkFieldChanges($sField, $obListStore) - { - if (empty($sField) || empty($obListStore) || !$this->isFieldChanged($sField)) { - return; - } - - if ($obListStore instanceof AbstractStoreWithoutParam) { - $obListStore->clear(); - } elseif ($obListStore instanceof AbstractStoreWithParam) { - $obListStore->clear($this->obElement->$sField); - $obListStore->clear($this->obElement->getOriginal($sField)); - } - } - - /** - * If field has not empty value, then cache clear by value - * @param string $sField - * @param AbstractStoreWithParam|AbstractStoreWithoutParam $obListStore - */ - protected function clearCacheNotEmptyValue($sField, $obListStore) - { - if (empty($sField) || empty($obListStore) || empty($this->obElement->$sField)) { - return; - } - - if ($obListStore instanceof AbstractStoreWithoutParam) { - $obListStore->clear(); - } elseif ($obListStore instanceof AbstractStoreWithParam) { - $obListStore->clear($this->obElement->$sField); - } - } - - /** - * If field has empty value, then cache clear by value - * @param string $sField - * @param AbstractStoreWithoutParam $obListStore - */ - protected function clearCacheEmptyValue($sField, $obListStore) - { - if (empty($sField) || empty($obListStore) || !empty($this->obElement->$sField) || ! $obListStore instanceof AbstractStoreWithoutParam) { - return; - } - - $obListStore->clear(); - } - - /** - * If field value was changed, then cache clear by value - * @param $sField - * @param $sAdditionalField - * @param AbstractStoreWithTwoParam $obListStore - */ - protected function clearCacheNotEmptyTwoValue($sField, $sAdditionalField, $obListStore) - { - if (empty($sField) || empty($obListStore) || empty($this->obElement->$sField) || !$obListStore instanceof AbstractStoreWithTwoParam) { - return; - } - - $obListStore->clear($this->obElement->$sField); - if (empty($this->obElement->$sAdditionalField)) { - return; - } - - $obListStore->clear($this->obElement->$sField, $this->obElement->$sAdditionalField); - } - - /** - * @param $sField - * @param $sAdditionalField - * @param AbstractStoreWithTwoParam $obListStore - */ - protected function checkFieldChangesTwoParam($sField, $sAdditionalField, $obListStore) - { - if (empty($sField) || empty($sAdditionalField) || empty($obListStore) || !$obListStore instanceof AbstractStoreWithTwoParam) { - return; - } - - if (!$this->isFieldChanged($sField) && $this->isFieldChanged($sAdditionalField)) { - return; - } - - $obListStore->clear($this->obElement->$sField); - $obListStore->clear($this->obElement->$sField, $this->obElement->$sAdditionalField); - $obListStore->clear($this->obElement->$sField, $this->obElement->getOriginal($sField)); - - $obListStore->clear($this->obElement->getOriginal($sField)); - $obListStore->clear($this->obElement->getOriginal($sField), $this->obElement->$sAdditionalField); - $obListStore->clear($this->obElement->getOriginal($sField), $this->obElement->getOriginal($sField)); - } - - /** - * Check: field value was change - * @param string $sField - * @return bool - */ - protected function isFieldChanged($sField) - { - if (empty($sField)) { - return false; - } - - if ($this->obElement->$sField == $this->obElement->getOriginal($sField)) { - return false; - } - - return true; - } -} diff --git a/plugins/lovata/toolbox/classes/helper/AbstractImportModel.php b/plugins/lovata/toolbox/classes/helper/AbstractImportModel.php deleted file mode 100644 index 8fad80fc5..000000000 --- a/plugins/lovata/toolbox/classes/helper/AbstractImportModel.php +++ /dev/null @@ -1,358 +0,0 @@ -initActiveLang(); - } - - /** - * Deactivate active elements - */ - public function deactivateElements() - { - if (!$this->bDeactivate) { - return; - } - - $arDeactivateIDList = array_diff((array) $this->arExistIDList, (array) $this->arProcessedIDList); - if (empty($arDeactivateIDList)) { - return; - } - - //Get element list - $sModelClass = static::MODEL_CLASS; - $obElementList = $sModelClass::whereIn('external_id', $arDeactivateIDList)->get(); - foreach ($obElementList as $obElement) { - $obElement->active = false; - $obElement->save(); - } - } - - /** - * Create new item - */ - abstract protected function createItem(); - - /** - * Update item - */ - abstract protected function updateItem(); - - /** - * Run import item - */ - protected function run() - { - $this->prepareImportData(); - $this->fireBeforeImportEvent(); - $this->prepareImportDataBeforeSave(); - - $this->findByExternalID(); - if (!empty($this->obModel)) { - $this->updateItem(); - } else { - $this->createItem(); - } - - if (empty($this->obModel)) { - return; - } - - $this->processModelObject(); - Event::fire(self::EVENT_AFTER_IMPORT, [$this->obModel, $this->arImportData]); - } - - /** - * Find item by external ID - */ - protected function findByExternalID() - { - $sModelClass = static::MODEL_CLASS; - if ($this->bWithTrashed) { - $this->obModel = $sModelClass::withTrashed()->getByExternalID($this->sExternalID)->first(); - } else { - $this->obModel = $sModelClass::getByExternalID($this->sExternalID)->first(); - } - } - - /** - * Prepare array of import data - */ - protected function prepareImportData() - { - } - - /** - * Prepare array of import data - */ - protected function prepareImportDataBeforeSave() - { - if (empty($this->arImportData)) { - return; - } - - $arResult = []; - foreach ($this->arImportData as $sKey => $sValue) { - if (is_string($sValue)) { - $sValue = trim($sValue); - } elseif (is_array($sValue)) { - $sValue = array_filter($sValue); - } - - array_set($arResult, $sKey, $sValue); - } - - $this->arImportData = $arResult; - } - - /** - * Process model object after creation/updating - */ - protected function processModelObject() - { - $arActiveLangList = $this->getActiveLangList(); - if (empty($arActiveLangList) || empty($this->obModel)) { - return; - } - - foreach ($arActiveLangList as $sLangCode) { - if (!array_key_exists($sLangCode, $this->arImportData)) { - continue; - } - - foreach ($this->arImportData[$sLangCode] as $sField => $sValue) { - $this->obModel->setAttributeTranslated($sField, $sValue, $sLangCode); - } - } - - $this->obModel->save(); - } - - /** - * Fire beforeImport event and update import data array - */ - protected function fireBeforeImportEvent() - { - $arEventData = [static::MODEL_CLASS, $this->arImportData]; - - $arEventData = Event::fire(self::EVENT_BEFORE_IMPORT, $arEventData); - if (empty($arEventData)) { - return; - } - - foreach ($arEventData as $arModelData) { - if (empty($arModelData)) { - continue; - } - - foreach ($arModelData as $sKey => $sValue) { - $this->arImportData[$sKey] = $sValue; - } - } - } - - /** - * Import obProductModel images - */ - protected function importImageList() - { - if (!$this->bNeedUpdateImageList) { - return; - } - - if (empty($this->arImageList)) { - $this->removeAllImages(); - - return; - } - - //Update old images - $obImageList = $this->obModel->images; - if (!$obImageList->isEmpty()) { - /** @var File $obImage */ - foreach ($obImageList as $obImage) { - $sFilePath = array_shift($this->arImageList); - - //Check image - if (!empty($sFilePath) && (!file_exists($obImage->getLocalPath()) || md5_file($sFilePath) != md5_file($obImage->getLocalPath()))) { - try { - $obImage->deleteThumbs(); - } catch (\Exception $obException) {} - $obImage->fromFile($sFilePath); - $obImage->save(); - } elseif (empty($sFilePath)) { - try { - $obImage->deleteThumbs(); - $obImage->delete(); - } catch (\Exception $obException) {} - } - } - } - - //Create new images - if (!empty($this->arImageList)) { - foreach ($this->arImageList as $sFilePath) { - $obImage = new File(); - $obImage->fromFile($sFilePath); - - $this->obModel->images()->add($obImage); - } - } - } - - /** - * Import preview image - */ - protected function importPreviewImage() - { - if (!$this->bNeedUpdatePreviewImage) { - return; - } - - $obPreviewImage = $this->obModel->preview_image; - if (empty($obPreviewImage) && empty($this->sPreviewImage)) { - return; - } - - if (empty($obPreviewImage) && !empty($this->sPreviewImage)) { - //Create new preview - $obPreviewImage = new File(); - $obPreviewImage->fromFile($this->sPreviewImage); - $this->obModel->preview_image()->add($obPreviewImage); - - return; - } - - if (!file_exists($obPreviewImage->getLocalPath())) { - $obPreviewImage->fromFile($this->sPreviewImage); - $obPreviewImage->save(); - } elseif (!empty($this->sPreviewImage) && file_exists($obPreviewImage->getLocalPath()) && md5_file($this->sPreviewImage) != md5_file($obPreviewImage->getLocalPath())) { - //Update preview image - $obPreviewImage->deleteThumbs(); - $obPreviewImage->fromFile($this->sPreviewImage); - $obPreviewImage->save(); - } elseif (!empty($obPreviewImage) && empty($this->sPreviewImage)) { - try { - $obPreviewImage->deleteThumbs(); - $obPreviewImage->delete(); - } catch (\Exception $obException) {} - } - } - - /** - * Remove all images - */ - protected function removeAllImages() - { - //Delete old images - $obImageList = $this->obModel->images; - if ($obImageList->isEmpty()) { - return; - } - - /** @var \System\Models\File $obFile */ - foreach ($obImageList as $obFile) { - try { - $obFile->deleteThumbs(); - $obFile->delete(); - } catch (\Exception $obException) {} - } - } - - /** - * Set active filed value, if active value is not null - */ - protected function setActiveField() - { - $bActive = array_get($this->arImportData, 'active'); - if ($bActive === null) { - $this->arImportData['active'] = true; - } else { - $this->arImportData['active'] = $this->processBooleanValue($bActive); - } - } - - /** - * @param string $sValue - * @return bool - */ - protected function processBooleanValue($sValue) : bool - { - if (is_string($sValue) && $sValue == 'false') { - return false; - } else { - return (bool) $sValue; - } - } - - /** - * Create queue job with import single item - * @throws \Throwable - */ - protected function createJob() - { - $sQueueName = Settings::getValue('import_queue_name'); - - $arQueueData = [ - 'class' => static::class, - 'data' => $this->arImportData, - ]; - - if (empty($sQueueName)) { - Queue::push(ImportItemQueue::class, $arQueueData); - } else { - Queue::pushOn($sQueueName, ImportItemQueue::class, $arQueueData); - } - } -} diff --git a/plugins/lovata/toolbox/classes/helper/AbstractImportModelFromCSV.php b/plugins/lovata/toolbox/classes/helper/AbstractImportModelFromCSV.php deleted file mode 100644 index a75b70a04..000000000 --- a/plugins/lovata/toolbox/classes/helper/AbstractImportModelFromCSV.php +++ /dev/null @@ -1,270 +0,0 @@ -bDeactivate = (bool) Input::get('ImportOptions.deactivate'); - } - - /** - * Import item - * @param array $arModeData - * @param bool $bWithQueue - * @throws \Throwable - */ - public function import($arModeData, $bWithQueue = true) - { - $this->sResultMethod = null; - $this->sErrorMessage = null; - - if (empty($arModeData)) { - $this->setWarningResult('lovata.toolbox::lang.message.row_is_empty'); - - return; - } - - $this->sExternalID = trim(array_get($arModeData, 'external_id')); - if (empty($this->sExternalID)) { - $this->setWarningResult('lovata.toolbox::lang.message.external_id_is_empty'); - - return; - } - - $this->arImportData = $arModeData; - $this->arProcessedIDList[] = $this->sExternalID; - - $bQueueOn = Settings::getValue('import_queue_on'); - if ($bQueueOn && $bWithQueue) { - $this->createJob(); - $this->setResultMethod(); - - return; - } - - $this->run(); - } - - /** - * Get result method - * @return string - */ - public function getResultMethod() - { - return $this->sResultMethod; - } - - /** - * Get result error message - * @return string - */ - public function getResultError() - { - return $this->sErrorMessage; - } - - /** - * Create new item - */ - protected function createItem() - { - $sModelClass = static::MODEL_CLASS; - try { - $this->obModel = $sModelClass::create($this->arImportData); - } catch (\Exception $obException) { - trace_log($obException); - $this->setErrorResult($obException->getMessage()); - - return; - } - - $this->setCreatedResult(); - } - - /** - * Update item - */ - protected function updateItem() - { - try { - $this->obModel->update($this->arImportData); - } catch (\Exception $obException) { - trace_log($obException); - $this->setErrorResult($obException->getMessage()); - - return; - } - - if ($this->bWithTrashed && $this->obModel->trashed()) { - $this->obModel->restore(); - } - - $this->setUpdatedResult(); - } - - /** - * Init image list - */ - protected function initImageList() - { - if (!array_key_exists('images', $this->arImportData)) { - $this->bNeedUpdateImageList = false; - return; - } - - $this->bNeedUpdateImageList = true; - $this->arImageList = explode(',', array_get($this->arImportData, 'images')); - array_forget($this->arImportData, 'images'); - - if (empty($this->arImageList)) { - return; - } - - foreach ($this->arImageList as $iKey => $sPath) { - $sPath = $this->checkForRemoteFile(trim($sPath)); - if (empty($sPath)) { - unset($this->arImageList[$iKey]); - continue; - } - - $sFilePath = storage_path($sPath); - if (!file_exists($sFilePath)) { - unset($this->arImageList[$iKey]); - } else { - $this->arImageList[$iKey] = $sFilePath; - } - } - } - - /** - * Init preview image path - */ - protected function initPreviewImage() - { - if (!array_key_exists('preview_image', $this->arImportData)) { - $this->bNeedUpdatePreviewImage = false; - - return; - } - - $this->bNeedUpdatePreviewImage = true; - $sTrimmedImage = trim(array_get($this->arImportData, 'preview_image')); - $this->sPreviewImage = $this->checkForRemoteFile($sTrimmedImage); - if (empty($this->sPreviewImage)) { - return; - } - - $this->sPreviewImage = storage_path($this->sPreviewImage); - if (!file_exists($this->sPreviewImage)) { - $this->sPreviewImage = null; - } - } - - /** - * Check for remote file and downloads it if possible - */ - protected function checkForRemoteFile($sPotentialUrl) - { - if (!preg_match('/https?:\/\//', $sPotentialUrl)) { - return $sPotentialUrl; - } - - try { - $obFile = new File; - $obFile->fromUrl($sPotentialUrl); - $obFile->save(); - - $sValue = 'app/' . $obFile->getDiskPath(); - - return $sValue; - } catch(Exception $obException) { - return $sPotentialUrl; - } - } - - /** - * Set create/update result method - */ - protected function setResultMethod() - { - if (!empty($this->arExistIDList) && in_array($this->sExternalID, $this->arExistIDList)) { - $this->setUpdatedResult(); - - return; - } - - $this->setCreatedResult(); - } - - /** - * Set result method name as logCreated() - */ - protected function setCreatedResult() - { - $this->sResultMethod = 'logCreated'; - } - - /** - * Set result method name as logUpdated() - */ - protected function setUpdatedResult() - { - $this->sResultMethod = 'logUpdated'; - } - - /** - * Set result method name as logError() - * @param string $sMessage - */ - protected function setErrorResult($sMessage = null) - { - if (!empty($sMessage)) { - $this->sErrorMessage = Lang::get($sMessage); - } - - $this->sResultMethod = 'logError'; - } - - /** - * Set result method name as logWarning() - * @param string $sMessage - */ - protected function setWarningResult($sMessage = null) - { - if (!empty($sMessage)) { - $this->sErrorMessage = Lang::get($sMessage); - } - - $this->sResultMethod = 'logWarning'; - } - - /** - * Set result method name as logSkipped() - * @param string $sMessage - */ - protected function setSkippedResult($sMessage = null) - { - if (!empty($sMessage)) { - $this->sErrorMessage = Lang::get($sMessage); - } - - $this->sResultMethod = 'logSkipped'; - } -} diff --git a/plugins/lovata/toolbox/classes/helper/AbstractImportModelFromXML.php b/plugins/lovata/toolbox/classes/helper/AbstractImportModelFromXML.php deleted file mode 100644 index 17f5a5d87..000000000 --- a/plugins/lovata/toolbox/classes/helper/AbstractImportModelFromXML.php +++ /dev/null @@ -1,379 +0,0 @@ -arFieldList = $this->extendImportFields($this->arFieldList); - $this->arFieldList = $this->initLangFields($this->arFieldList); - - return $this->arFieldList; - } - - /** - * Get created count - * @return int - */ - public function getCreatedCount() - { - return $this->iCreatedCount; - } - - /** - * Get updated count - * @return int - */ - public function getUpdatedCount() - { - return $this->iUpdatedCount; - } - - /** - * Get skipped count - * @return int - */ - public function getSkippedCount() - { - return $this->iSkippedCount; - } - - /** - * Get processed count - * @return int - */ - public function getProcessedCount() - { - return $this->iProcessedCount; - } - - /** - * Get total count of elements - * @return int - */ - public function getTotalCount() - { - return !empty($this->arElementList) ? count($this->arElementList) : 0; - } - - /** - * Start import - * @param $obProgressBar - * @throws - */ - public function import($obProgressBar = null) - { - $this->openMainFile(); - if (empty($this->arElementList)) { - return; - } - - $sParseNodeClass = static::PARSE_NODE_CLASS; - foreach ($this->arElementList as $obElementNode) { - - /** @var ParseXMLNode $obParseNode */ - $obParseNode = new $sParseNodeClass($obElementNode, $this->arImportSettings, $this->sPrefix, $this->sNamespace); - $arImportData = $obParseNode->get(); - - $arImportData = $this->extendImportData($arImportData, $obParseNode); - - $this->importRow($arImportData); - if (!empty($obProgressBar)) { - $obProgressBar->advance(); - } - } - } - - /** - * Import item - * @param array $arModeData - * @param bool $bWithQueue - * @throws \Throwable - */ - public function importRow($arModeData, $bWithQueue = true) - { - $this->iProcessedCount++; - - if (empty($arModeData)) { - $this->setErrorMessage(Lang::get('lovata.toolbox::lang.message.row_is_empty')); - return; - } - - $this->sExternalID = trim(array_get($arModeData, 'external_id')); - if (empty($this->sExternalID)) { - $this->setErrorMessage(Lang::get('lovata.toolbox::lang.message.external_id_is_empty')); - return; - } - - $this->arImportData = $arModeData; - $this->arProcessedIDList[] = $this->sExternalID; - - $bQueueOn = Settings::getValue('import_queue_on'); - if ($bQueueOn && $bWithQueue) { - $this->createJob(); - - return; - } - - $this->run(); - } - - /** - * Open XML file and read file - */ - public function openMainFile() - { - if (!empty($this->obMainXMLFile)) { - return; - } - - $sFilePath = storage_path($this->sMainFilePath); - if (empty($this->sMainFilePath) || !file_exists($sFilePath)) { - return; - } - - $this->obMainXMLFile = new ImportXMLNode(file_get_contents($sFilePath)); - if (empty($this->obMainXMLFile)) { - return; - } - - $this->arElementList = $this->obMainXMLFile->findListByPath($this->sElementListPath, $this->sPrefix, $this->sNamespace); - } - - /** - * Create new item - */ - protected function createItem() - { - $sModelClass = static::MODEL_CLASS; - try { - $this->obModel = $sModelClass::create($this->arImportData); - } catch (\Exception $obException) { - trace_log($obException); - $this->setErrorMessage($obException->getMessage()); - - return; - } - - $this->iCreatedCount++; - } - - /** - * Update item - */ - protected function updateItem() - { - try { - $this->obModel->update($this->arImportData); - } catch (\Exception $obException) { - trace_log($obException); - $this->setErrorMessage($obException->getMessage()); - - return; - } - - if ($this->bWithTrashed && $this->obModel->trashed()) { - $this->obModel->restore(); - } - - $this->iUpdatedCount++; - } - - /** - * Init image list - */ - protected function initImageList() - { - if (!array_key_exists('images', $this->arImportData)) { - $this->bNeedUpdateImageList = false; - return; - } - - $this->bNeedUpdateImageList = true; - $this->arImageList = array_get($this->arImportData, 'images'); - array_forget($this->arImportData, 'images'); - if (empty($this->arImageList)) { - return; - } - - if (is_string($this->arImageList)) { - $this->arImageList = [$this->arImageList]; - } - - foreach ($this->arImageList as $iKey => $sPath) { - $sPath = trim($sPath); - $sPath = trim($sPath, '/'); - if (empty($sPath)) { - unset($this->arImageList[$iKey]); - continue; - } - - $sFilePath = storage_path(trim($this->sImageFolderPath.'/'.$sPath, '/')); - if (!file_exists($sFilePath)) { - unset($this->arImageList[$iKey]); - } else { - $this->arImageList[$iKey] = $sFilePath; - } - } - } - - /** - * Init preview image path - */ - protected function initPreviewImage() - { - if (!array_key_exists('preview_image', $this->arImportData)) { - $this->bNeedUpdatePreviewImage = false; - - return; - } - - $this->bNeedUpdatePreviewImage = true; - $this->sPreviewImage = array_get($this->arImportData, 'preview_image'); - if (is_array($this->sPreviewImage)) { - $this->sPreviewImage = array_shift($this->sPreviewImage); - } - - $this->sPreviewImage = trim($this->sPreviewImage); - $this->sPreviewImage = trim($this->sPreviewImage, '/'); - array_forget($this->arImportData, 'preview_image'); - if (empty($this->sPreviewImage)) { - return; - } - - $this->sPreviewImage = storage_path(trim($this->sImageFolderPath.'/'.$this->sPreviewImage, '/')); - if (!file_exists($this->sPreviewImage)) { - $this->sPreviewImage = null; - } - } - - /** - * Set error message - * @param string $sMessage - */ - protected function setErrorMessage($sMessage) - { - Log::warning($sMessage); - - Result::setFalse()->setMessage($sMessage); - $this->iSkippedCount++; - } - - /** - * Fire event and extend import fields - * @param array $arFieldList - * @return array - */ - protected function extendImportFields($arFieldList) - { - $arEventData = Event::fire(static::EXTEND_FIELD_LIST, [$arFieldList]); - if (empty($arEventData)) { - return $arFieldList; - } - - foreach ($arEventData as $arAdditionFieldList) { - if (empty($arAdditionFieldList) || !is_array($arAdditionFieldList)) { - continue; - } - - $arFieldList = array_merge($arFieldList, $arAdditionFieldList); - } - - return $arFieldList; - } - - /** - * Fire event and extend import data - * @param array $arImportData - * @param ParseXMLNode $obParseNode - * @return array - */ - protected function extendImportData($arImportData, $obParseNode) - { - $arEventData = Event::fire(static::EXTEND_IMPORT_DATA, [$arImportData, $obParseNode]); - if (empty($arEventData)) { - return $arImportData; - } - - foreach ($arEventData as $arAdditionData) { - if (empty($arAdditionData) || !is_array($arAdditionData)) { - continue; - } - - $arImportData = array_merge($arImportData, $arAdditionData); - } - - return $arImportData; - } - - /** - * Add lang fields - * @param array $arFieldList - * @return array - */ - protected function initLangFields($arFieldList) - { - $arActiveLangList = $this->getActiveLangList(); - if (empty($arActiveLangList)) { - return $arFieldList; - } - - $sModelClass = static::MODEL_CLASS; - $obModel = new $sModelClass(); - $arLangFieldList = $obModel->translatable; - if (empty($arLangFieldList)) { - return $arFieldList; - } - - foreach ($arLangFieldList as $sFieldName) { - if (!array_key_exists($sFieldName, $arFieldList)) { - continue; - } - - foreach ($arActiveLangList as $sLangCode) { - $arFieldList[$sLangCode.'.'.$sFieldName] = $arFieldList[$sFieldName]." ($sLangCode)"; - } - } - - return $arFieldList; - } -} diff --git a/plugins/lovata/toolbox/classes/helper/ImportXMLNode.php b/plugins/lovata/toolbox/classes/helper/ImportXMLNode.php deleted file mode 100644 index dcb5eb272..000000000 --- a/plugins/lovata/toolbox/classes/helper/ImportXMLNode.php +++ /dev/null @@ -1,74 +0,0 @@ -registerXPathNamespace($sPrefix, $sNamespace); - - // Split string to array to add prefix. If there is no separator, array_walk will work anyway. - $arPaths = explode('/', $sPath); - array_walk($arPaths, function (&$sSection) use ($sPrefix) { - $sSection = sprintf("%s:%s", $sPrefix, $sSection); - }); - - $sPath = implode('/', $arPaths); - } - - $arResult = $this->xpath($sPath); - - return $arResult; - } - - /** - * @param \SimpleXMLElement $obNode - * @param string $sFieldPath - * @param string|null $sPrefix - * @param string|null $sNamespace - * @return string|null|array - */ - public function getValueByPath($sFieldPath, $sPrefix = null, $sNamespace = null) - { - if (empty($sFieldPath)) { - return null; - } - - $arValueNodeList = $this->findListByPath($sFieldPath, $sPrefix, $sNamespace); - if (empty($arValueNodeList)) { - return null; - } - - $arResult = []; - foreach ($arValueNodeList as $obValueNode) { - $arResult[] = (string) $obValueNode; - } - - if (count($arResult) == 1) { - return array_shift($arResult); - } elseif (empty($arResult)) { - return null; - } - - return $arResult; - } -} diff --git a/plugins/lovata/toolbox/classes/helper/PageHelper.php b/plugins/lovata/toolbox/classes/helper/PageHelper.php deleted file mode 100644 index 6fe9edfe7..000000000 --- a/plugins/lovata/toolbox/classes/helper/PageHelper.php +++ /dev/null @@ -1,259 +0,0 @@ -hasCache($sCacheKey)) { - return $this->getCachedData($sCacheKey); - } - - $arResult = []; - if (empty($sPageCode) || empty($sParamName)) { - return $arResult; - } - - //Get component list - $arComponentList = $this->getFullComponentList($sPageCode); - if (empty($arComponentList)) { - return $arResult; - } - - foreach ($arComponentList as $sKey => $arPropertyList) { - if (!empty($sComponentName) && !preg_match('%^'.$sComponentName.'%', $sKey)) { - continue; - } - - if (empty($arPropertyList) || !isset($arPropertyList[$sParamName])) { - continue; - } - - /* - * Extract the routing parameter name - * eg: {{ :someRouteParam }} - */ - if (!preg_match('/^\{\{([^\}]+)\}\}$/', $arPropertyList['slug'], $arMatches)) { - continue; - } - - $sValue = trim($arMatches[1]); - $sValue = ltrim($sValue, ':'); - - if ($bFindWildcard && array_get($arPropertyList, 'has_wildcard')) { - $arResult = [$sValue]; - break; - } elseif (!$bFindWildcard) { - $arResult[] = $sValue; - } - } - - $this->setCachedData($sCacheKey, $arResult); - - return $arResult; - } - - /** - * Get array with names of pages - * @return array - */ - public function getPageNameList() - { - if (!empty($this->arPageNameList)) { - return $this->arPageNameList; - } - - $arResult = []; - - //Get page list - $obPageList = $this->getPageList(); - if (empty($obPageList)) { - return $arResult; - } - - //Process page list - foreach ($obPageList as $obPage) { - $arResult[$obPage->id] = $obPage->title; - } - - $this->arPageNameList = $arResult; - - return $arResult; - } - - /** - * Init class data - */ - protected function init() - { - $this->obTheme = Theme::getActiveTheme(); - } - - /** - * Get component list for page - * @param string $sPageCode - * - * @return array - */ - protected function getFullComponentList($sPageCode) - { - if ($this->hasCache($sPageCode)) { - return $this->getCachedData($sPageCode); - } - - //Get page object - $obPage = $this->getPageObject($sPageCode); - if (empty($obPage) || empty($obPage->settings) || !isset($obPage->settings['components'])) { - return []; - } - - //Get component list - $arPageComponentList = $obPage->settings['components']; - $this->setCachedData($sPageCode, $arPageComponentList); - - return $arPageComponentList; - } - - /** - * Get page object - * @param string $sPageCode - * @return CmsPage|null - */ - protected function getPageObject($sPageCode) - { - if (isset($this->arPageList[$sPageCode])) { - return $this->arPageList[$sPageCode]; - } - - if (empty($sPageCode) || empty($this->obTheme)) { - return null; - } - - $this->arPageList[$sPageCode] = CmsPage::loadCached($this->obTheme, $sPageCode); - - return $this->arPageList[$sPageCode]; - } - - /** - * Get cached data - * @param string $sKey - * @return mixed|null - */ - protected function getCachedData($sKey) - { - if (isset($this->arCachedData[$sKey])) { - return $this->arCachedData[$sKey]; - } - - return null; - } - - /** - * Set cached data - * @param string $sKey - * @param mixed $obValue - */ - protected function setCachedData($sKey, $obValue) - { - $this->arCachedData[$sKey] = $obValue; - } - - /** - * @param string $sKey - * @return bool - */ - protected function hasCache($sKey) - { - return isset($this->arCachedData[$sKey]); - } - - /** - * Get page list - * @return array|\Cms\Classes\CmsObjectCollection|CmsPage[]|null - */ - protected function getPageList() - { - //Get CMS page list - $obPageList = $this->getCmsPageList(); - - //Get static page list - $obStaticPageList = $this->getStaticPageList(); - if (!empty($obStaticPageList)) { - if (empty($obPageList)) { - return $obStaticPageList; - } - - $obPageList = $obPageList->merge($obStaticPageList->all()); - } - - return $obPageList; - } - - /** - * @return \Cms\Classes\CmsObjectCollection|\Cms\Classes\Page[]|null - */ - protected function getCmsPageList() - { - if (empty($this->obTheme)) { - return null; - } - - //Get CMS page list - /** @var \Cms\Classes\CmsObjectCollection|\Cms\Classes\Page[] $obPageList */ - $obPageList = CmsPage::listInTheme($this->obTheme, true); - - return $obPageList; - } - - /** - * Get Static page list - * @return array|\Cms\Classes\CmsObjectCollection|CmsPage[]|null - */ - protected function getStaticPageList() - { - if (!PluginManager::instance()->hasPlugin('RainLab.Pages') || empty($this->obTheme)) { - return null; - } - - //Get Static page list - /** @var \Cms\Classes\CmsObjectCollection|\Cms\Classes\Page[] $obStaticPageList */ - $obStaticPage = new \RainLab\Pages\Classes\PageList($this->obTheme); - $obStaticPageList = $obStaticPage->listPages(true); - - return $obStaticPageList; - } -} diff --git a/plugins/lovata/toolbox/classes/helper/ParseXMLNode.php b/plugins/lovata/toolbox/classes/helper/ParseXMLNode.php deleted file mode 100644 index baeff6ee6..000000000 --- a/plugins/lovata/toolbox/classes/helper/ParseXMLNode.php +++ /dev/null @@ -1,97 +0,0 @@ -obElementNode = $obNode; - $this->arImportSettings = $arSettings; - $this->sPrefix = $sPrefix; - $this->sNamespace = $sNamespace; - - $this->parse(); - } - - /** - * @return ImportXMLNode - */ - public function getNode() - { - return $this->obElementNode; - } - - /** - * Get node data - * @return array - */ - public function get() - { - return $this->arImportData; - } - - protected function parse() - { - if (empty($this->arImportSettings)) { - return; - } - - foreach ($this->arImportSettings as $arFieldData) { - $sFieldName = array_get($arFieldData, 'field'); - $sFieldPath = array_get($arFieldData, 'path_to_field'); - if (empty($sFieldName) || empty($sFieldPath)) { - continue; - } - - $sMethodName = 'parse'.studly_case($sFieldName).'Attribute'; - if (method_exists(static::class, $sMethodName)) { - $sValue = $this->$sMethodName($sFieldPath, $this->sPrefix, $this->sNamespace); - } else { - $sValue = $this->obElementNode->getValueByPath($sFieldPath, $this->sPrefix, $this->sNamespace); - } - - if ($sValue === null) { - continue; - } - - $sCurrentValue = array_get($this->arImportData, $sFieldName); - if (!empty($sCurrentValue) && !is_array($sCurrentValue)) { - $sCurrentValue = [$sCurrentValue]; - } - - if (is_array($sCurrentValue) && is_array($sValue)) { - $sCurrentValue = array_merge($sCurrentValue, $sValue); - $sCurrentValue = array_filter($sCurrentValue); - $sCurrentValue = array_unique($sCurrentValue); - } elseif (is_array($sCurrentValue) && !is_array($sValue)) { - $sCurrentValue[] = $sValue; - $sCurrentValue = array_filter($sCurrentValue); - $sCurrentValue = array_unique($sCurrentValue); - } else { - $sCurrentValue = $sValue; - } - - array_set($this->arImportData, $sFieldName, $sCurrentValue); - } - } -} diff --git a/plugins/lovata/toolbox/classes/helper/PriceHelper.php b/plugins/lovata/toolbox/classes/helper/PriceHelper.php deleted file mode 100644 index a5c92a180..000000000 --- a/plugins/lovata/toolbox/classes/helper/PriceHelper.php +++ /dev/null @@ -1,91 +0,0 @@ -iDecimal, $obThis->sDecPoint, $obThis->sThousandsSep); - } - - /** - * Convert price string to float value - * @param string $sValue - * @return float - */ - public static function toFloat($sValue) - { - $sValue = str_replace(',', '.', $sValue); - $fPrice = (float) preg_replace("/[^0-9\.]/", "", $sValue); - - return $fPrice; - } - - /** - * Round float price value - * @param float $fPrice - * - * @return float - */ - public static function round($fPrice) - { - return round($fPrice, 2); - } - - /** - * PriceHelper constructor. - */ - protected function init() - { - //Get options from settings - $iDecimalValue = (int) Settings::getValue('decimals'); - if ($iDecimalValue >= 0) { - $this->iDecimal = $iDecimalValue; - } - - $sDecPointValue = Settings::getValue('dec_point'); - switch ($sDecPointValue) { - case 'comma': - $this->sDecPoint = ','; - break; - default: - $this->sDecPoint = '.'; - } - - $sThousandsSepValue = Settings::getValue('thousands_sep'); - switch ($sThousandsSepValue) { - case 'space': - $this->sThousandsSep = ' '; - break; - default: - $this->sThousandsSep = ''; - } - } -} diff --git a/plugins/lovata/toolbox/classes/helper/SendMailHelper.php b/plugins/lovata/toolbox/classes/helper/SendMailHelper.php deleted file mode 100644 index 4e25ce74e..000000000 --- a/plugins/lovata/toolbox/classes/helper/SendMailHelper.php +++ /dev/null @@ -1,133 +0,0 @@ -sMailTemplate = $sMailTemplate; - if ($bCheckActiveLang) { - $this->sMailTemplate = $this->addActiveLangSuffix($this->sMailTemplate); - } - - //Get template data - $this->arMailData = $this->getMailData($sEmailDataEventName, $arDefaultEmailData); - - //Process email list - if (is_string($mEmailList)) { - $arEmailList = explode(',', $mEmailList); - } else { - $arEmailList = $mEmailList; - } - - foreach ($arEmailList as $sEmail) { - $sEmail = trim($sEmail); - - $this->sendMail($sEmail); - } - } - - /** - * Init settings - */ - protected function init() - { - //Get queue settings - $this->bUseQueue = Settings::getValue('queue_on'); - $this->sQueueName = Settings::getValue('queue_name'); - } - - /** - * @param string $sEmail - */ - protected function sendMail($sEmail) - { - if (empty($this->sMailTemplate) || empty($sEmail)) { - return; - } - - //Send restore mail - if ($this->bUseQueue && empty($this->sQueueName)) { - Mail::queue($this->sMailTemplate, $this->arMailData, function ($obMessage) use ($sEmail) { - $obMessage->to($sEmail); - }); - } elseif ($this->bUseQueue && !empty($this->sQueueName)) { - Mail::queueOn($this->sQueueName, $this->sMailTemplate, $this->arMailData, function ($obMessage) use ($sEmail) { - $obMessage->to($sEmail); - }); - } else { - Mail::send($this->sMailTemplate, $this->arMailData, function ($obMessage) use ($sEmail) { - $obMessage->to($sEmail); - }); - } - } - - /** - * Get mail data - * @param string $sEventName - * @param array $arResult - * @return array - */ - protected function getMailData($sEventName, $arResult = []) - { - if (empty($sEventName)) { - return $arResult; - } - - //Get addition data for template - //Fire event - $arAdditionData = Event::fire($sEventName, $arResult); - if (empty($arAdditionData) || !is_array($arAdditionData)) { - return $arResult; - } - - foreach ($arAdditionData as $arData) { - if (empty($arData) || !is_array($arData)) { - continue; - } - - $arResult = array_merge($arResult, $arData); - } - - return $arResult; - } -} diff --git a/plugins/lovata/toolbox/classes/helper/UserHelper.php b/plugins/lovata/toolbox/classes/helper/UserHelper.php deleted file mode 100644 index 0cee38d5e..000000000 --- a/plugins/lovata/toolbox/classes/helper/UserHelper.php +++ /dev/null @@ -1,147 +0,0 @@ -obHelper)) { - return null; - } - - $sAuthFacadeClass = $this->obHelper->getAuthFacade(); - - return $sAuthFacadeClass::getUser(); - } - - /** - * Get user ID - * @return int|null - */ - public function getUserID() - { - $obUser = $this->getUser(); - if (empty($obUser)) { - return null; - } - - return $obUser->id; - } - - /** - * Create new user - * @param array $arUserData - * @param bool $bActivate - * @return \Lovata\Buddies\Models\User|\RainLab\User\Models\User|null - */ - public function register($arUserData, $bActivate = false) - { - if (empty($this->obHelper)) { - return null; - } - - $sAuthFacadeClass = $this->obHelper->getAuthFacade(); - - return $sAuthFacadeClass::register($arUserData, $bActivate); - } - - /** - * Find user by email - * @param string $sEmail - * - * @return \Lovata\Buddies\Models\User|\RainLab\User\Models\User|null - */ - public function findUserByEmail($sEmail) - { - if (empty($sEmail) || empty($this->obHelper)) { - return null; - } - - return $this->obHelper->findUserByEmail($sEmail); - } - - /** - * Get user model class name - * @return string - */ - public function getUserModel() - { - if (empty($this->obHelper)) { - return null; - } - - return $this->obHelper->getUserModel(); - } - - /** - * Get user controller class name - * @return string - */ - public function getUserController() - { - if (empty($this->obHelper)) { - return null; - } - - return $this->obHelper->getUserController(); - } - - /** - * Get auth facade class name - * @return string - */ - public function getAuthFacade() - { - if (empty($this->obHelper)) { - return null; - } - - return $this->obHelper->getAuthFacade(); - } - - /** - * Get active plugin name - * @return string - */ - public function getPluginName() - { - return $this->sPluginName; - } - - /** - * Init data - */ - protected function init() - { - $obPluginManager = PluginManager::instance(); - if ($obPluginManager->exists('Lovata.Buddies')) { - $this->obHelper = app(BuddiesUserHelper::class); - $this->sPluginName = 'Lovata.Buddies'; - } elseif ($obPluginManager->exists('RainLab.User')) { - $this->obHelper = app(RainLabUserHelper::class); - $this->sPluginName = 'RainLab.User'; - } - } -} diff --git a/plugins/lovata/toolbox/classes/helper/users/AbstractUserHelper.php b/plugins/lovata/toolbox/classes/helper/users/AbstractUserHelper.php deleted file mode 100644 index 37ce468c7..000000000 --- a/plugins/lovata/toolbox/classes/helper/users/AbstractUserHelper.php +++ /dev/null @@ -1,34 +0,0 @@ -first(); - } - - /** - * Get user model class name - * @return string - */ - public function getUserModel() - { - return \Lovata\Buddies\Models\User::class; - } - - /** - * Get user controller class name - * @return string - */ - public function getUserController() - { - return \Lovata\Buddies\Controllers\Users::class; - } - - /** - * Get auth facade class name - * @return string - */ - public function getAuthFacade() - { - return \Lovata\Buddies\Facades\AuthHelper::class; - } -} diff --git a/plugins/lovata/toolbox/classes/helper/users/RainLabUserHelper.php b/plugins/lovata/toolbox/classes/helper/users/RainLabUserHelper.php deleted file mode 100644 index ad831f2d5..000000000 --- a/plugins/lovata/toolbox/classes/helper/users/RainLabUserHelper.php +++ /dev/null @@ -1,51 +0,0 @@ -iElementID = $iElementID; - $this->obElement = $obElement; - - //Check instance of obElement - $sModelClass = static::MODEL_CLASS; - if (!empty($this->obElement) && !$this->obElement instanceof $sModelClass) { - $this->obElement = null; - } - - $this->bootIfNotBooted(); - - $this->initActiveLang(); - $this->extendableConstruct(); - } - - /** - * @param string $sName - * @return string - */ - public function __get($sName) - { - return $this->extendableGet($sName); - } - - /** - * @param string $sName - * @param mixed $obValue - */ - public function __set($sName, $obValue) - { - $this->extendableSet($sName, $obValue); - } - - /** - * @param string $sName - * @param array $arParamList - * @return mixed - */ - public function __call($sName, $arParamList) - { - return $this->extendableCall($sName, $arParamList); - } - - /** - * @param string $sName - * @param array $arParamList - * @return mixed - * @throws \Exception - */ - public static function __callStatic($sName, $arParamList) - { - return self::extendableCallStatic($sName, $arParamList); - } - - - /** - * Serialize item object - * @return array - */ - public function __sleep() - { - return ['iElementID']; - } - - /** - * Unserialize object - */ - public function __wakeup() - { - $this->setCachedData(); - } - - /** - * @return string - */ - public function __toString() - { - return $this->toJSON(); - } - - /** - * @param callable $callback - */ - public static function extend(callable $callback) - { - self::extendableExtendCallback($callback); - } - - /** - * Make new element item - * @param int|string $iElementID - * @param \Model $obElement - * - * @return $this - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementItem#makeielementid-obelement--null - * @see \Lovata\Toolbox\Tests\Unit\ItemTest::testItem() - */ - public static function make($iElementID, $obElement = null) - { - $arParamList = [ - 'iElementID' => $iElementID, - 'obElement' => $obElement, - ]; - - $obItem = ItemStorage::get(static::class, $iElementID); - if (!empty($obItem)) { - return $obItem; - } - - /** @var ElementItem $obItem */ - $obItem = app()->make(static::class, $arParamList); - - //Init cached array model data - $obItem->setCachedData(); - - ItemStorage::set(static::class, $iElementID, $obItem); - - return $obItem; - } - - /** - * Make new element item - * @param int|string $iElementID - * @param Model $obElement - * @return $this - * @throws \Exception - */ - public static function makeOnlyCache($iElementID, $obElement = null) - { - $arParamList = [ - 'iElementID' => $iElementID, - 'obElement' => $obElement, - ]; - - $obItem = ItemStorage::get(static::class, $iElementID); - if (!empty($obItem)) { - return $obItem; - } - - /** @var $this $obItem */ - $obItem = app()->make(static::class, $arParamList); - - //Init cached array model data - $obItem->setCachedData(false); - if ($obItem->isEmpty()) { - return $obItem; - } - - ItemStorage::set(static::class, $iElementID, $obItem); - - return $obItem; - } - - /** - * Make new element item (no cache) - * @param int $iElementID - * @param \Model $obElement - * @return $this - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementItem#makenocacheielementid-obelement--null - * @see \Lovata\Toolbox\Tests\Unit\ItemTest::testItem() - */ - public static function makeNoCache($iElementID, $obElement = null) - { - $arParamList = [ - 'iElementID' => $iElementID, - 'obElement' => $obElement, - ]; - - /** @var $this $obItem */ - $obItem = app()->make(static::class, $arParamList); - - //Init array model data (no cache) - $obItem->setData(); - - return $obItem; - } - - /** - * Remove model data from cache - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementItem#clearcacheielementid - * @param int $iElementID - */ - public static function clearCache($iElementID) - { - if (empty($iElementID)) { - return; - } - - ItemStorage::clear(static::class, $iElementID); - CCache::clear(static::getCacheTag(), $iElementID); - } - - /** - * Check model data is empty - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementItem#isempty - * @return bool - */ - public function isEmpty() - { - return empty($this->arModelData); - } - - /** - * Check model data is not empty - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementItem#isnotempty - * @return bool - */ - public function isNotEmpty() - { - return !$this->isEmpty(); - } - - /** - * Get model data - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementItem#toarray - * @return array - */ - public function toArray() - { - return $this->arModelData; - } - - /** - * Get model data in JSON string - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementItem#tojson - * @return string - */ - public function toJSON() - { - return json_encode($this->arModelData); - } - - /** - * Get model object - * @link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementItem#getobject - * - * @return \Model - */ - public function getObject() - { - $this->initElementObject(); - - return $this->obElement; - } - - /** - * Set data from model object - */ - protected function setData() - { - $this->initElementObject(); - if (empty($this->obElement)) { - return; - } - - //Set default lang (if update cache with non default lang) - if (self::$bLangInit && !empty(self::$sDefaultLang) && $this->obElement->isClassExtendedWith('RainLab.Translate.Behaviors.TranslatableModel')) { - $this->obElement->lang(self::$sDefaultLang); - } - - //Get cached field list from model and add fields to cache array - $this->setCachedFieldList(); - - //Get element data - $arResult = $this->getElementData(); - if (empty($arResult) || !is_array($arResult)) { - $arResult = []; - } - - //Add fields values to cached array - foreach ($arResult as $sField => $sValue) { - $this->setAttribute($sField, $sValue); - } - - //Save lang properties (integration with Translate plugin) - $this->setLangProperties(); - - //Run methods from $arExtendResult array - $this->setExtendData(); - } - - /** - * Get cached field list from model and add fields to cache array - */ - protected function setCachedFieldList() - { - if (!$this->obElement->methodExists('getCachedField')) { - return; - } - - //Get cached field list - $arFieldList = $this->obElement->getCachedField(); - if (empty($arFieldList)) { - return; - } - - foreach ($arFieldList as $sField) { - if (array_key_exists($sField, (array) $this->obElement->attachOne)) { - $arFileData = $this->getUploadFileData($this->obElement->$sField); - $sFieldName = 'attachOne|'.$sField; - $this->setAttribute($sFieldName, $arFileData); - } elseif (array_key_exists($sField, (array) $this->obElement->attachMany)) { - $arFileList = []; - $obFileList = $this->obElement->$sField; - foreach ($obFileList as $obFile) { - $arFileData = $this->getUploadFileData($obFile); - $arFileList[] = $arFileData; - } - - $sFieldName = 'attachMany|'.$sField; - $this->setAttribute($sFieldName, $arFileList); - } else { - $this->setAttribute($sField, $this->obElement->$sField); - } - } - } - - /** - * Run methods from $arExtendResult array - */ - protected function setExtendData() - { - //Check extend result methods - if (empty($this->arExtendResult)) { - return; - } - - //Apply extend methods - foreach ($this->arExtendResult as $sMethodName) { - if (empty($sMethodName) || !(method_exists($this, $sMethodName) || $this->methodExists($sMethodName))) { - continue; - } - - $this->$sMethodName(); - } - } - - /** - * Set cached brand data - * @param bool $bWithQuery - */ - protected function setCachedData($bWithQuery = true) - { - if (empty($this->iElementID)) { - return; - } - - $arCacheTags = static::getCacheTag(); - $sCacheKey = $this->iElementID; - - $this->arModelData = CCache::get($arCacheTags, $sCacheKey); - if (!$this->isEmpty() || !$bWithQuery) { - return; - } - - $this->setData(); - - //Set cache data - CCache::forever($arCacheTags, $sCacheKey, $this->arModelData); - } - - /** - * Set model data from object - * @return mixed - */ - protected function getElementData() - { - return []; - } - - /** - * Check if the model needs to be booted and if so, do it. - * - * @return void - */ - protected function bootIfNotBooted() - { - if (isset(static::$arBooted[static::class])) { - return; - } - - static::boot(); - static::$arBooted[static::class] = true; - } - - /** - * The "booting" method of the model. - * - * @return void - */ - protected static function boot() - { - static::bootTraits(); - } - - /** - * Boot all of the bootable traits on the model. - * - * @return void - */ - protected static function bootTraits() - { - foreach (class_uses_recursive(get_called_class()) as $trait) { - if (method_exists(get_called_class(), $method = 'boot'.class_basename($trait))) { - forward_static_call([get_called_class(), $method]); - } - } - } - - /** - * Init element object - */ - protected function initElementObject() - { - $sModelClass = static::MODEL_CLASS; - if (!empty($this->obElement) && !$this->obElement instanceof $sModelClass) { - $this->obElement = null; - } - - if (!empty($this->obElement) || empty($this->iElementID)) { - return; - } - - $this->setElementObject(); - } - - /** - * Set element object - */ - protected function setElementObject() - { - $sModelClass = static::MODEL_CLASS; - - $obQuery = $sModelClass::where(static::QUERY_FIELD, $this->iElementID); - if (method_exists($sModelClass, 'trashed')) { - $obQuery->withTrashed(); - } - - if (!empty(static::$arQueryWith)) { - $obQuery->with(static::$arQueryWith); - } - - $this->obElement = $obQuery->first(); - } - - /** - * Get cache tag array for model - * @return array - */ - protected static function getCacheTag() - { - return [static::class]; - } - - /** - * Process translatable fields and save values, how 'field_name|lang_code' - */ - private function setLangProperties() - { - if (empty($this->obElement) || !$this->obElement->isClassExtendedWith('RainLab.Translate.Behaviors.TranslatableModel')) { - return; - } - - //Check translate model property - if (empty($this->obElement->translatable) || !is_array($this->obElement->translatable)) { - return; - } - - //Get active lang list from Translate plugin - $arLangList = self::getActiveLangList(); - if (empty($arLangList)) { - return; - } - - //Process translatable fields - foreach ($this->obElement->translatable as $sField) { - //Check field name - if (empty($sField) || (!is_string($sField) && !is_array($sField))) { - continue; - } - - if (is_array($sField)) { - $sField = array_shift($sField); - } - - if (!isset($this->arModelData[$sField]) || array_key_exists($sField, (array) $this->obElement->attachOne) || array_key_exists($sField, (array) $this->obElement->attachMany)) { - continue; - } - - //Save field value with different lang code - foreach ($arLangList as $sLangCode) { - $sLangField = $sField.'|'.$sLangCode; - $sValue = $this->obElement->lang($sLangCode)->$sField; - $this->setAttribute($sLangField, $sValue); - } - } - } - - /** - * Get image data from image object - * @param \System\Models\File $obFile - * @return [] - */ - private function getUploadFileData($obFile) : array - { - if (empty($obFile)) { - return []; - } - - //Set default lang in image object - if (!empty(self::$sDefaultLang) && $obFile->isClassExtendedWith('RainLab.Translate.Behaviors.TranslatableModel')) { - $obFile->lang(self::$sDefaultLang); - } - - //Convert image data to array - $arFileData = $obFile->toArray(); - $arLangList = $this->getActiveLangList(); - if (empty($arLangList) || !$obFile->isClassExtendedWith('RainLab.Translate.Behaviors.TranslatableModel')) { - return $arFileData; - } - - //Add lang fields to array - foreach ($arLangList as $sLangCode) { - $arFileData[$sLangCode] = []; - foreach ($obFile->translatable as $sLangField) { - $arFileData[$sLangCode][$sLangField] = $obFile->lang($sLangCode)->$sLangField; - } - } - - return $arFileData; - } -} diff --git a/plugins/lovata/toolbox/classes/item/ItemStorage.php b/plugins/lovata/toolbox/classes/item/ItemStorage.php deleted file mode 100644 index be0b33be3..000000000 --- a/plugins/lovata/toolbox/classes/item/ItemStorage.php +++ /dev/null @@ -1,70 +0,0 @@ -isEmpty()) { - return; - } - - $sKey = self::getKey($sClassName, $iElementID); - self::$arItemStore[$sKey] = clone $obItem; - } - - /** - * Clear item object in storage - * @param string $sClassName - * @param int $iElementID - */ - public static function clear($sClassName, $iElementID) - { - $sKey = self::getKey($sClassName, $iElementID); - if (!isset(self::$arItemStore[$sKey])) { - return; - } - - unset(self::$arItemStore[$sKey]); - } - - /** - * Get store key for item object - * @param string $sClassName - * @param int $iElementID - * @return string - */ - protected static function getKey($sClassName, $iElementID) - { - return $sClassName.'|'.$iElementID; - } -} diff --git a/plugins/lovata/toolbox/classes/item/MainItem.php b/plugins/lovata/toolbox/classes/item/MainItem.php deleted file mode 100644 index 92effa284..000000000 --- a/plugins/lovata/toolbox/classes/item/MainItem.php +++ /dev/null @@ -1,263 +0,0 @@ -arRelationList) && isset($this->arRelationList[$sName])) { - return $this->getRelationField($sName, $this->arRelationList[$sName]); - } - - $sMethodName = 'get'.studly_case($sName).'Attribute'; - if (method_exists(static::class, $sMethodName) || $this->methodExists($sMethodName)) { - return $this->$sMethodName($this); - } - - $sAttachOneField = 'attachOne|'.$sName; - if (isset($this->arModelData[$sAttachOneField])) { - return $this->getUploadFileField($sName, $sAttachOneField); - } - - $sAttachManyField = 'attachMany|'.$sName; - if (isset($this->arModelData[$sAttachManyField])) { - return $this->getUploadFileListField($sName, $sAttachManyField); - } - - if (!empty(self::$sActiveLang)) { - return $this->getLangAttribute($sName); - } - - return $this->getAttribute($sName); - } - - /** - * Get attribute value - * @param string $sName - * @return mixed|null - */ - public function getAttribute($sName) - { - if (empty($sName)) { - return null; - } - - if (!empty($this->arModelData) && isset($this->arModelData[$sName])) { - return $this->arModelData[$sName]; - } - - return null; - } - - /** - * Get lang attribute value - * @param string $sName - * @param string $sLangCode - * @return mixed|null - */ - public function getLangAttribute($sName, $sLangCode = null) - { - if (empty($sName)) { - return null; - } - - if (empty($sLangCode)) { - $sLangCode = self::$sActiveLang; - } - - if (empty($sLangCode)) { - return $this->getAttribute($sName); - } - - $sLangName = $sName.'|'.$sLangCode; - if (!empty($this->arModelData) && isset($this->arModelData[$sLangName])) { - return $this->arModelData[$sLangName]; - } - - return $this->getAttribute($sName); - } - - /** - * Set attribute value - * @param string $sField - * @param mixed $obValue - */ - public function __set($sField, $obValue) - { - $this->setAttribute($sField, $obValue); - } - - /** - * Set attribute value - * @param string $sField - * @param mixed $obValue - */ - public function setAttribute($sField, $obValue) - { - if (empty($sField)) { - return; - } - - $this->arModelData[$sField] = $obValue; - } - - /** - * @param string $sName - * @param array $arParamList - * @return mixed|null - */ - public function __call($sName, $arParamList) - { - return $this->$sName; - } - - /** - * @param string $sName - * @return bool - */ - public function __isset($sName) - { - $sValue = $this->getAttribute($sName); - - return !empty($sValue); - } - - /** - * Get "Has one" item object or get "Has many" collection object - * @param string $sName - * @param array $arRelationData - * - * @return null|ElementItem|\Lovata\Toolbox\Classes\Collection\ElementCollection - */ - protected function getRelationField($sName, $arRelationData) - { - //Check relation config data - if (empty($sName) || empty($arRelationData) || !is_array($arRelationData)) { - return null; - } - - if (empty($arRelationData['class']) || empty($arRelationData['field'])) { - return null; - } - - $sClassName = $arRelationData['class']; - $sFieldName = $arRelationData['field']; - - //Check class is exist - if (!class_exists($sClassName)) { - return null; - } - - $obValue = $this->getAttribute($sName); - if (!empty($obValue) && $obValue instanceof $sClassName) { - return $obValue; - } - - $obValue = $sClassName::make($this->$sFieldName); - if ($obValue instanceof ElementCollection && empty($this->$sFieldName)) { - $obValue->intersect($this->$sFieldName); - } - - $this->setAttribute($sName, $obValue); - - return $this->getAttribute($sName); - } - - /** - * Get image object form field with image array - * @param string $sField - * @param string $sFakeField - * - * @return File|null - */ - protected function getUploadFileField($sField, $sFakeField) - { - $obFile = $this->getAttribute($sField); - if (!empty($obFile)) { - return $obFile; - } - - $arFileData = $this->getAttribute($sFakeField); - $obFile = $this->initUploadFileObject($arFileData); - $this->setAttribute($sField, $obFile); - - return $obFile; - } - - /** - * Get image object form field with image array - * @param string $sField - * @param string $sFakeField - * @return File[]|null - */ - protected function getUploadFileListField($sField, $sFakeField) - { - $arFileList = $this->getAttribute($sField); - if (!empty($arFileList)) { - return $arFileList; - } - - $arFileList = []; - - $arCachedFileList = (array) $this->getAttribute($sFakeField); - foreach ($arCachedFileList as $arFileData) { - $obFile = $this->initUploadFileObject($arFileData); - if (empty($obFile)) { - continue; - } - - $arFileList[] = $obFile; - } - - $this->setAttribute($sField, $arFileList); - - return $arFileList; - } - - /** - * @param array $arFileData - * @return File|null - */ - protected function initUploadFileObject($arFileData) - { - if (empty($arFileData)) { - return null; - } - - $obFile = File::make($arFileData); - $obFile->disk_name = array_get($arFileData, 'disk_name'); - $obFile->id = array_get($arFileData, 'id'); - if (!empty(self::$sActiveLang) && self::$sActiveLang != self::$sDefaultLang && $obFile->isClassExtendedWith('RainLab.Translate.Behaviors.TranslatableModel')) { - foreach ($obFile->translatable as $sLangField) { - $obFile->$sLangField = array_get($arFileData, self::$sActiveLang.'.'.$sLangField, $obFile->$sLangField); - } - } - - return $obFile; - } -} diff --git a/plugins/lovata/toolbox/classes/item/TestItem.php b/plugins/lovata/toolbox/classes/item/TestItem.php deleted file mode 100644 index 34cebc059..000000000 --- a/plugins/lovata/toolbox/classes/item/TestItem.php +++ /dev/null @@ -1,87 +0,0 @@ - [ - 'class' => self::class, - 'field' => 'test_id', - ], - 'test_null' => null, - 'test_class' => [ - 'class_fail' => self::class, - 'field' => 'test_id', - ], - 'test_field' => [ - 'class' => self::class, - 'field_fail' => 'test_id', - ], - 'test_exist' => [ - 'class' => self::class.'Test', - 'field' => 'test_id', - ], - 'test_list' => [ - 'class' => TestCollection::class, - 'field' => 'test_list_id', - ], - 'test_empty_list' => [ - 'class' => TestCollection::class, - 'field' => 'test_empty_list_id', - ], - ]; - - /** - * Set element object - */ - protected function setElementObject() - { - $obElement = new Model(); - $obElement->id = $this->iElementID; - - $this->obElement = $obElement; - } - - /** - * Set brand data from model object - * - * @return array - */ - protected function getElementData() - { - $arResult = [ - 'id' => $this->obElement->id, - 'test_id' => $this->obElement->id + 1, - 'test_list_id' => [$this->obElement->id, $this->obElement->id + 1], - ]; - - return $arResult; - } - - /** - * Add title - */ - protected function addTitle() - { - $this->setAttribute('title', 'title'.$this->obElement->id); - } -} diff --git a/plugins/lovata/toolbox/classes/parser/create/ActiveListStoreCreateFile.php b/plugins/lovata/toolbox/classes/parser/create/ActiveListStoreCreateFile.php deleted file mode 100644 index 7a6155ada..000000000 --- a/plugins/lovata/toolbox/classes/parser/create/ActiveListStoreCreateFile.php +++ /dev/null @@ -1,16 +0,0 @@ -arReplaceList = array_get($arData, 'replace'); - $this->arEnableList = array_get($arData, 'enable'); - $this->arDisableList = array_get($arData, 'disable'); - - if (empty($this->arReplaceList) || empty($this->sFolderPath) || empty($this->sFile) || empty($this->sTemplatePath)) { - $this->bCreate = false; - - return; - } - - $this->sFolderPath = plugins_path().$this->parseByName($this->arReplaceList, $this->sFolderPath); - $this->sFile = $this->parseByName($this->arReplaceList, $this->sFile); - $this->sFilePath = $this->sFolderPath.$this->sFile; - $this->obFile = new Filesystem(); - - if (!$this->obFile->exists($this->sFolderPath)) { - $this->obFile->makeDirectory($this->sFolderPath, 0777, true, true); - } - - $this->sContent = $this->obFile->get(plugins_path().$this->sTemplatePath); - - if (!$this->obFile->exists($this->sFilePath)) { - $this->bForce = true; - } - } - - /** - * Create file - * @param bool $bForce - * @return null|string - */ - public function create($bForce = false) - { - if (!$this->bForce && !$bForce || !$this->bCreate) { - return $this->sFilePath; - } - - if (!empty($this->arDisableList)) { - $this->sContent = $this->parseByWrapper($this->arDisableList, $this->sContent); - } - - if (!empty($this->arEnableList)) { - $this->sContent = $this->parseByNameWrapper($this->arEnableList, $this->sContent); - } - - if (!empty($this->arReplaceList)) { - $this->sContent = $this->parseByName($this->arReplaceList, $this->sContent); - } - - if ($bForce || $this->bForce) { - $this->obFile->put($this->sFilePath, $this->sContent); - } - - return null; - } -} diff --git a/plugins/lovata/toolbox/classes/parser/create/ComponentDataCreateFile.php b/plugins/lovata/toolbox/classes/parser/create/ComponentDataCreateFile.php deleted file mode 100644 index eba3448b0..000000000 --- a/plugins/lovata/toolbox/classes/parser/create/ComponentDataCreateFile.php +++ /dev/null @@ -1,16 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/collection.stub b/plugins/lovata/toolbox/classes/parser/templates/collection.stub deleted file mode 100644 index 7e57b15ea..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/collection.stub +++ /dev/null @@ -1,83 +0,0 @@ -active->get(); - - return $this->intersect($arResultIDList); - } -[[active]][[sortable]] - /** - * Sort list - * @return $this - */ - public function sort() - { - $arResultIDList = {{studly_model}}ListStore::instance()->sorting->get(); - - return $this->applySorting($arResultIDList); - } -[[sortable]][[default_sorting]] - /** - * Sort list by - * @param string $sSorting - * @return $this - */ - public function sort($sSorting) - { - $arResultIDList = {{studly_model}}ListStore::instance()->sorting->get($sSorting); - - return $this->applySorting($arResultIDList); - } -[[default_sorting]][[nested_tree]] - /** - * Sort list - * @return $this - */ - public function tree() - { - $arResultIDList = {{studly_model}}ListStore::instance()->top_level->get(); - - return $this->applySorting($arResultIDList); - } -[[nested_tree]][[code]] - /** - * Get item by code - * @param string $sCode - * @return {{studly_model}}Item - */ - public function getByCode($sCode) - { - if ($this->isEmpty() || empty($sCode)) { - return {{studly_model}}Item::make(null); - } - - $ar{{studly_model}}List = $this->all(); - - /** @var {{studly_model}}Item $ob{{studly_model}}Item */ - foreach ($ar{{studly_model}}List as $ob{{studly_model}}Item) { - if ($ob{{studly_model}}Item->code == $sCode) { - return $ob{{studly_model}}Item; - } - } - - return {{studly_model}}Item::make(null); - } -[[code]]} diff --git a/plugins/lovata/toolbox/classes/parser/templates/columns.stub b/plugins/lovata/toolbox/classes/parser/templates/columns.stub deleted file mode 100644 index 1ce50c389..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/columns.stub +++ /dev/null @@ -1,47 +0,0 @@ -columns: -[[name]] name: - label: 'lovata.toolbox::lang.field.name' - type: text - searchable: true - sortable: true -[[name]][[active]] active: - label: 'lovata.toolbox::lang.field.active' - type: switch - searchable: false - sortable: true -[[active]][[code]] code: - label: 'lovata.toolbox::lang.field.code' - type: text - searchable: true - sortable: true -[[code]][[external_id]] external_id: - label: 'lovata.toolbox::lang.field.external_id' - type: text - searchable: true - sortable: true -[[external_id]][[sortable]] sort_order: - label: 'lovata.toolbox::lang.field.sort_order' - type: text - searchable: false - sortable: true -[[sortable]][[view_count]] view_count: - label: 'lovata.toolbox::lang.field.view_count' - type: number - searchable: false - sortable: true -[[view_count]] id: - label: 'lovata.toolbox::lang.field.id' - type: number - searchable: true - sortable: true - width: 100px - created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: timetense - sortable: true - invisible: true - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: timetense - sortable: true - invisible: true diff --git a/plugins/lovata/toolbox/classes/parser/templates/component_data.stub b/plugins/lovata/toolbox/classes/parser/templates/component_data.stub deleted file mode 100644 index f1e79ec50..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/component_data.stub +++ /dev/null @@ -1,34 +0,0 @@ - '{{lower_author}}.{{lower_plugin}}::lang.component.{{lower_model}}_data_name', - 'description' => '{{lower_author}}.{{lower_plugin}}::lang.component.{{lower_model}}_data_description', - ]; - } - - /** - * Make new element item - * @param int $iElementID - * @return {{studly_model}}Item - */ - protected function makeItem($iElementID) - { - return {{studly_model}}Item::make($iElementID); - } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/component_list.stub b/plugins/lovata/toolbox/classes/parser/templates/component_list.stub deleted file mode 100644 index 0b63307fd..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/component_list.stub +++ /dev/null @@ -1,43 +0,0 @@ - '{{lower_author}}.{{lower_plugin}}::lang.component.{{lower_model}}_list_name', - 'description' => '{{lower_author}}.{{lower_plugin}}::lang.component.{{lower_model}}_list_description', - ]; - } - - /** - * Make element collection - * @param array $arElementIDList - * @return {{studly_model}}Collection - */ - public function make($arElementIDList = null) - { - return {{studly_model}}Collection::make($arElementIDList); - } - - /** - * Method for ajax request with empty response - * @return bool - */ - public function onAjaxRequest() - { - return true; - } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/component_page.stub b/plugins/lovata/toolbox/classes/parser/templates/component_page.stub deleted file mode 100644 index e0f498a2f..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/component_page.stub +++ /dev/null @@ -1,57 +0,0 @@ - '{{lower_author}}.{{lower_plugin}}::lang.component.{{lower_model}}_page_name', - 'description' => '{{lower_author}}.{{lower_plugin}}::lang.component.{{lower_model}}_page_description', - ]; - } - - /** - * Get element object - * @param string $sElementSlug - * @return {{studly_model}} - */ - protected function getElementObject($sElementSlug) - { - if (empty($sElementSlug)) { - return null; - } - - $obElement = {{studly_model}}::[[active]]active()->[[active]]getBySlug($sElementSlug)->first(); - -[[view_count]] if(!empty($obElement)) { - $obElement->view_count++; - $obElement->save(); - } - -[[view_count]] return $obElement; - } - - /** - * Make new element item - * @param int $iElementID - * @param {{studly_model}} $obElement - * @return {{studly_model}}Item - */ - protected function makeItem($iElementID, $obElement) - { - return {{studly_model}}Item::make($iElementID, $obElement); - } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller.stub b/plugins/lovata/toolbox/classes/parser/templates/controller.stub deleted file mode 100644 index 6491b0d68..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller.stub +++ /dev/null @@ -1,50 +0,0 @@ - true - - active = true -[[active]] created_at: - label: 'lovata.toolbox::lang.field.created_at' - type: daterange - conditions: created_at >= ':after' AND created_at <= ':before' - updated_at: - label: 'lovata.toolbox::lang.field.updated_at' - type: daterange - conditions: updated_at >= ':after' AND updated_at <= ':before' diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_config_form.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_config_form.stub deleted file mode 100644 index 6aa9adc16..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_config_form.stub +++ /dev/null @@ -1,41 +0,0 @@ -# Record name -name: '{{lower_author}}.{{lower_plugin}}::lang.{{lower_model}}.name' - -# Model Form Field configuration -form: $/{{lower_author}}/{{lower_plugin}}/models/{{lower_model}}/fields.yaml - -# Model Class name -modelClass: {{studly_author}}\{{studly_plugin}}\Models\{{studly_model}} - -# Default redirect location -defaultRedirect: {{lower_author}}/{{lower_plugin}}/{{lower_controller}} - -# Create page -create: - title: 'backend::lang.form.create_title' - redirect: {{lower_author}}/{{lower_plugin}}/{{lower_controller}}/update/:id - redirectClose: {{lower_author}}/{{lower_plugin}}/{{lower_controller}} - flashSave: 'lovata.toolbox::lang.message.create_success' - -# Update page -update: - title: 'backend::lang.form.update_title' - redirect: {{lower_author}}/{{lower_plugin}}/{{lower_controller}} - redirectClose: {{lower_author}}/{{lower_plugin}}/{{lower_controller}} - flashSave: 'lovata.toolbox::lang.message.update_success' - flashDelete: 'lovata.toolbox::lang.message.delete_success' -[[import_svg]] -# Import page -import: - title: 'backend::lang.form.update_title' - redirect: {{lower_author}}/{{lower_plugin}}/{{lower_controller}}/import - redirectClose: {{lower_author}}/{{lower_plugin}}/emails -[[import_svg]][[export_svg]] -# Export page -export: - title: 'backend::lang.form.update_title' - redirect: {{lower_author}}/{{lower_plugin}}/emails/export - redirectClose: {{lower_author}}/{{lower_plugin}}/{{lower_controller}} -[[export_svg]] -# Preview page -preview: { } diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_config_import_export.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_config_import_export.stub deleted file mode 100644 index 1290c1817..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_config_import_export.stub +++ /dev/null @@ -1,18 +0,0 @@ -[[import_svg]]import: - title: '{{lower_author}}.toolbox::lang.button.import_from_csv' - list: $/{{lower_author}}/{{lower_plugin}}/models/{{lower_model}}/columns.yaml -# form: $/{{lower_author}}/{{lower_plugin}}/models/{{lower_model}}/fields.yaml -# form: -# fields: - modelClass: {{studly_author}}\{{studly_plugin}}\Models\{{studly_model}} - redirect: {{lower_author}}/{{lower_plugin}}/{{lower_controller}} -[[import_svg]][[export_svg]]export: - title: '{{lower_author}}.toolbox::lang.button.export_in_csv' - list: $/{{lower_author}}/{{lower_plugin}}/models/{{lower_model}}/columns.yaml -# form: $/{{lower_author}}/{{lower_plugin}}/models/{{lower_model}}/fields.yaml -# form: -# fields: - fileName: export.csv - modelClass: {{studly_author}}\{{studly_plugin}}\Models\{{studly_model}} - redirect: {{lower_author}}/{{lower_plugin}}/{{lower_controller}} -[[export_svg]] \ No newline at end of file diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_config_list.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_config_list.stub deleted file mode 100644 index f3ae2bcb0..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_config_list.stub +++ /dev/null @@ -1,46 +0,0 @@ -# Model List Column configuration -list: $/{{lower_author}}/{{lower_plugin}}/models/{{lower_model}}/columns.yaml - -# Model Class name -modelClass: {{studly_author}}\{{studly_plugin}}\Models\{{studly_model}} - -# List Title -title: '{{lower_author}}.{{lower_plugin}}::lang.{{lower_model}}.list_title' - -# Link URL for each record -recordUrl: {{lower_author}}/{{lower_plugin}}/{{lower_controller}}/update/:id - -# Message to display if the list is empty -noRecordsMessage: backend::lang.list.no_records - -# Records to display per page -recordsPerPage: 20 - -# Display page numbers with pagination, disable to improve performance -showPageNumbers: true - -# Displays the list column set up button -showSetup: true - -# Displays the sorting link on each column -showSorting: true - -# Default sorting column -# defaultSort: -# column: created_at -# direction: desc - -# Display checkboxes next to each record -showCheckboxes: true - -# Toolbar widget configuration -toolbar: - # Partial for toolbar buttons - buttons: list_toolbar - - # Search widget configuration - search: - prompt: backend::lang.list.search_prompt - -# Display filter list -filter: _config_filter.yaml diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_config_reorder.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_config_reorder.stub deleted file mode 100644 index 4a7c45644..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_config_reorder.stub +++ /dev/null @@ -1,3 +0,0 @@ -title: 'backend::lang.reorder.default_title' -modelClass: {{studly_author}}\{{studly_plugin}}\Models\{{studly_model}} -nameFrom: name diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_create.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_create.stub deleted file mode 100644 index 417452869..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_create.stub +++ /dev/null @@ -1,51 +0,0 @@ - -
    -
  • - - - -
  • -
  • pageTitle) ?>
  • -
- -fatalError): ?> - 'layout']) ?> -
- formRender() ?> -
-
-
- - - - - - - - -
-
- - -

fatalError) ?>

-

- - - -

- diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_export.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_export.stub deleted file mode 100644 index 03313c5d2..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_export.stub +++ /dev/null @@ -1,25 +0,0 @@ - -
    -
  • - - - -
  • -
  • pageTitle) ?>
  • -
- - 'layout']) ?> -
- exportRender() ?> -
-
- -
- diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_import.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_import.stub deleted file mode 100644 index d66290f48..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_import.stub +++ /dev/null @@ -1,25 +0,0 @@ - -
    -
  • - - - -
  • -
  • pageTitle) ?>
  • -
- - 'layout']) ?> -
- importRender() ?> -
-
- -
- diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_index.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_index.stub deleted file mode 100644 index ea43a3636..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_index.stub +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_list_toolbar.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_list_toolbar.stub deleted file mode 100644 index e0e6b1db3..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_list_toolbar.stub +++ /dev/null @@ -1,27 +0,0 @@ -
- - - - -[[import_svg]] - - -[[import_svg]][[export_svg]] - - -[[export_svg]][[empty_sortable_nested_tree]] - - -[[empty_sortable_nested_tree]]
diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_preview.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_preview.stub deleted file mode 100644 index 9a2d91da3..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_preview.stub +++ /dev/null @@ -1,22 +0,0 @@ - -
    -
  • - - - -
  • -
  • pageTitle) ?>
  • -
- -fatalError): ?> -
- formRenderPreview() ?> -
- -

fatalError) ?>

-

- - - -

- diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_reorder.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_reorder.stub deleted file mode 100644 index 9dd59d7e0..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_reorder.stub +++ /dev/null @@ -1,7 +0,0 @@ - -
    -
  • -
  • pageTitle) ?>
  • -
- -reorderRender() ?> diff --git a/plugins/lovata/toolbox/classes/parser/templates/controller_update.stub b/plugins/lovata/toolbox/classes/parser/templates/controller_update.stub deleted file mode 100644 index ed2c70c9d..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/controller_update.stub +++ /dev/null @@ -1,59 +0,0 @@ - -
    -
  • - - - -
  • -
  • pageTitle) ?>
  • -
- -fatalError): ?> - 'layout']) ?> -
- formRender() ?> -
-
-
- - - - - - - - - -
-
- - -

fatalError) ?>

-

- - - -

- diff --git a/plugins/lovata/toolbox/classes/parser/templates/event_model.stub b/plugins/lovata/toolbox/classes/parser/templates/event_model.stub deleted file mode 100644 index d09db83eb..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/event_model.stub +++ /dev/null @@ -1,130 +0,0 @@ -listen(self::EVENT_UPDATE_SORTING, function () { -[[nested_tree]] {{studly_model}}ListStore::instance()->top_level->clear(); - - //Get category ID list - $ar{{studly_model}}IDList = {{studly_model}}::lists('id'); - if (empty($ar{{studly_model}}IDList)) { - return; - } - - //Clear cache for all - foreach ($ar{{studly_model}}IDList as $i{{studly_model}}ID) { - {{studly_model}}Item::clearCache($i{{studly_model}}ID); - } -[[nested_tree]][[sortable]] {{studly_model}}ListStore::instance()->sorting->clear(); -[[sortable]] }); - } - -[[empty_sortable_nested_tree]] /** - * After create event handler - */ - protected function afterCreate() - { - parent::afterCreate(); -[[default_sorting]] - $this->clearBySortingPublished(); -[[view_count]] $this->clearBySortingViews(); -[[view_count]][[default_sorting]] } - - /** - * After save event handler - */ - protected function afterSave() - { - parent::afterSave(); -[[default_sorting]][[view_count]] - if ($this->isFieldChanged('view_count')) { - $this->clearBySortingViews(); - } -[[view_count]][[default_sorting]][[active]] - $this->checkFieldChanges('active', {{studly_model}}ListStore::instance()->active); -[[active]][[nested_tree]] {{studly_model}}ListStore::instance()->top_level->clear(); -[[nested_tree]] } - - /** - * After delete event handler - */ - protected function afterDelete() - { - parent::afterDelete(); -[[active]] - if ($this->obElement->active) { - {{studly_model}}ListStore::instance()->active->clear(); - } -[[active]][[nested_tree]] - {{studly_model}}ListStore::instance()->top_level->clear(); - - //Clear parent item cache - if (!empty($this->obElement->parent_id)) { - {{studly_model}}Item::clearCache($this->obElement->parent_id); - } -[[nested_tree]][[sortable]] - {{studly_model}}ListStore::instance()->sorting->clear(); -[[sortable]][[default_sorting]] - $this->clearBySortingPublished(); -[[view_count]] $this->clearBySortingViews(); -[[view_count]][[default_sorting]] } -[[default_sorting]] - /** - * Clear cache by created_at - */ - protected function clearBySortingPublished() - { - {{studly_model}}ListStore::instance()->sorting->clear({{studly_model}}ListStore::SORT_CREATED_AT_ASC); - {{studly_model}}ListStore::instance()->sorting->clear({{studly_model}}ListStore::SORT_CREATED_AT_DESC); - } -[[view_count]] - /** - * Clear cache by views - */ - protected function clearBySortingViews() - { - {{studly_model}}ListStore::instance()->sorting->clear({{studly_model}}ListStore::SORT_VIEW_COUNT_ASC); - {{studly_model}}ListStore::instance()->sorting->clear({{studly_model}}ListStore::SORT_VIEW_COUNT_DESC); - } -[[view_count]][[default_sorting]]} diff --git a/plugins/lovata/toolbox/classes/parser/templates/extend_backend_menu_handler.stub b/plugins/lovata/toolbox/classes/parser/templates/extend_backend_menu_handler.stub deleted file mode 100644 index 96788e582..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/extend_backend_menu_handler.stub +++ /dev/null @@ -1,40 +0,0 @@ -removeSideMenuItem('Lovata.Shopaholic', 'shopaholic-menu-main', 'shopaholic-menu-products'); -// $obManager->addSideMenuItem('Lovata.Shopaholic', 'shopaholic-menu-main', 'shopaholic-menu-products', $this->dataMenuProduct()); - } - -// /** -// * Data menu product -// * @return array -// */ -// protected function dataMenuProduct() -// { -// return [ -// 'label' => 'lovata.shopaholic::lang.menu.products', -// 'url' => Backend::url('lovata/shopaholic/products'), -// 'icon' => 'icon-smile-o', -// 'permissions' => ['shopaholic-menu-products'], -// 'order' => 1000, -// ]; -// } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/extend_model_columns_handler.stub b/plugins/lovata/toolbox/classes/parser/templates/extend_model_columns_handler.stub deleted file mode 100644 index b91d7f7fc..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/extend_model_columns_handler.stub +++ /dev/null @@ -1,59 +0,0 @@ -removeColumn($obWidget); - $this->addColumn($obWidget); - } - - /** - * Remove columns model - * @param \Backend\Widgets\Lists $obWidget - */ - protected function removeColumn($obWidget) - { - $obWidget->removeColumn(''); - } - - /** - * Add columns model - * @param \Backend\Widgets\Lists $obWidget - */ - protected function addColumn($obWidget) - { - $obWidget->addColumns([]); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() : string - { - return {{studly_model}}::class; - } - - /** - * Get controller class name - * @return string - */ - protected function getControllerClass() : string - { - return {{studly_controller}}::class; - } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/extend_model_fields_handler.stub b/plugins/lovata/toolbox/classes/parser/templates/extend_model_fields_handler.stub deleted file mode 100644 index 33468300b..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/extend_model_fields_handler.stub +++ /dev/null @@ -1,59 +0,0 @@ -removeField($obWidget); - $this->addField($obWidget); - } - - /** - * Remove fields model - * @param \Backend\Widgets\Form $obWidget - */ - protected function removeField($obWidget) - { - $obWidget->removeField(''); - } - - /** - * Add fields model - * @param \Backend\Widgets\Form $obWidget - */ - protected function addField($obWidget) - { - $obWidget->addTabFields([]); - } - - /** - * Get model class name - * @return string - */ - protected function getModelClass() : string - { - return {{studly_model}}::class; - } - - /** - * Get controller class name - * @return string - */ - protected function getControllerClass() : string - { - return {{studly_controller}}::class; - } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/fields.stub b/plugins/lovata/toolbox/classes/parser/templates/fields.stub deleted file mode 100644 index 96f9a11f6..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/fields.stub +++ /dev/null @@ -1,75 +0,0 @@ -fields: -[[active]] active: - label: 'lovata.toolbox::lang.field.active' - span: full - default: 0 - type: switch -[[active]][[name]] name: - label: 'lovata.toolbox::lang.field.name' - span: auto - required: 1 - type: text - placeholder: 'lovata.toolbox::lang.field.name' -[[name]][[slug]] slug: - label: 'lovata.toolbox::lang.field.slug' - span: auto - required: 1 - placeholder: 'lovata.toolbox::lang.field.slug' - preset: - field: name - type: slug - type: text -[[slug]]tabs: - fields: -[[code]] code: - label: 'lovata.toolbox::lang.field.code' - span: left - type: text - placeholder: 'lovata.toolbox::lang.field.code' - tab: 'lovata.toolbox::lang.tab.settings' -[[code]][[external_id]] external_id: - label: 'lovata.toolbox::lang.field.external_id' - span: left - type: text - placeholder: 'lovata.toolbox::lang.field.external_id' - tab: 'lovata.toolbox::lang.tab.settings' -[[external_id]][[preview_text]] preview_text: - label: 'lovata.toolbox::lang.field.preview_text' - size: large - span: full - type: textarea - placeholder: 'lovata.toolbox::lang.field.preview_text' - tab: 'lovata.toolbox::lang.tab.description' -[[preview_text]][[description]] description: - label: 'lovata.toolbox::lang.field.description' - size: giant - span: full - type: richeditor - tab: 'lovata.toolbox::lang.tab.description' -[[description]][[preview_image]] preview_image: - label: 'lovata.toolbox::lang.field.preview_image' - mode: image - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' -[[preview_image]][[images]] images: - label: 'lovata.toolbox::lang.field.images' - mode: image - useCaption: true - thumbOptions: - mode: crop - extension: auto - span: left - type: fileupload - tab: 'lovata.toolbox::lang.tab.images' -[[images]][[file]] file: - label: 'lovata.toolbox::lang.field.file' - type: fileupload - span: left - required: 0 - mode: file - tab: 'lovata.toolbox::lang.tab.files'[[file]] diff --git a/plugins/lovata/toolbox/classes/parser/templates/item.stub b/plugins/lovata/toolbox/classes/parser/templates/item.stub deleted file mode 100644 index 4fdcd39e5..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/item.stub +++ /dev/null @@ -1,109 +0,0 @@ - [ - 'class' => {{studly_model}}Item::class, - 'field' => 'parent_id', - ], - 'children' => [ - 'class' => {{studly_model}}Collection::class, - 'field' => 'children_id_list', - ], - ]; -[[nested_tree]] - /** - * Returns URL of a brand page. - * @param string $sPageCode - * @return string - */ - public function getPageUrl($sPageCode = '{{lower_model}}') - { - //Get URL params - $arParamList = $this->getPageParamList($sPageCode); - - //Generate page URL - $sURL = CmsPage::url($sPageCode, $arParamList); - - return $sURL; - } - - /** - * Get URL param list by page code - * @param string $sPageCode - * @return array - */ - public function getPageParamList($sPageCode) : array - { - $arPageParamList = []; - - //Get URL params for page - $arParamList = PageHelper::instance()->getUrlParamList($sPageCode, '{{studly_model}}Page'); - if (!empty($arParamList)) { - $sPageParam = array_shift($arParamList); - $arPageParamList[$sPageParam] = $this->slug; - } - - return $arPageParamList; - } -[[nested_tree]] - /** - * Set element data from model object - * @return array - */ - protected function getElementData() - { - $arResult = [ - 'nest_depth' => $this->obElement->getDepth(), - ]; - - $arResult['children_id_list'] = $this->obElement->children() - ->active() - ->orderBy('nest_left', 'asc') - ->lists('id'); - - return $arResult; - } -[[nested_tree]]} diff --git a/plugins/lovata/toolbox/classes/parser/templates/lang.stub b/plugins/lovata/toolbox/classes/parser/templates/lang.stub deleted file mode 100644 index 35347be66..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/lang.stub +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'name' => '{{studly_plugin}}', - 'description' => '', - ], - 'field' => [], - 'menu' => [ - 'main' => '{{studly_plugin}}', -// 'products' => 'Products', - ], - 'tab' => [ - 'permissions' => '{{studly_plugin}}', - ], - 'comment' => [], - 'message' => [], - 'button' => [], - 'component' => [ -// 'product_list_name' => 'Product List', -// 'product_list_description' => '', - ], - 'permission' => [ -// 'product' => 'Manage products', - ], -// 'product' => [ -// 'name' => 'product', -// 'list_title' => 'Product list', -// ], -]; diff --git a/plugins/lovata/toolbox/classes/parser/templates/list_store.stub b/plugins/lovata/toolbox/classes/parser/templates/list_store.stub deleted file mode 100644 index d827ccdbe..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/list_store.stub +++ /dev/null @@ -1,37 +0,0 @@ -addToStoreList('active', ActiveListStore::class); -[[active]][[default_sorting]] $this->addToStoreList('sorting', SortingListStore::class); -[[default_sorting]][[sortable]] $this->addToStoreList('sorting', SortingListStore::class); -[[sortable]][[nested_tree]] $this->addToStoreList('top_level', TopLevelListStore::class); -[[nested_tree]] } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/migration.stub b/plugins/lovata/toolbox/classes/parser/templates/migration.stub deleted file mode 100644 index b7fcd4ae5..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/migration.stub +++ /dev/null @@ -1,53 +0,0 @@ -engine = 'InnoDB'; - $obTable->increments('id')->unsigned(); -[[empty_fields]][[active]] $obTable->boolean('active')->default(0); -[[active]][[name]] $obTable->string('name')->index(); -[[name]][[slug]] $obTable->string('slug')->unique()->index(); -[[slug]][[code]] $obTable->string('code')->nullable()->index(); -[[code]][[external_id]] $obTable->string('external_id')->nullable()->index(); -[[external_id]][[preview_text]] $obTable->text('preview_text')->nullable(); -[[preview_text]][[description]] $obTable->text('description')->nullable(); -[[description]][[view_count]] $obTable->integer('view_count')->nullable()->default(0); -[[view_count]][[empty_fields]][[nested_tree]] $obTable->integer('parent_id')->nullable()->unsigned(); - $obTable->integer('nest_left')->nullable()->unsigned(); - $obTable->integer('nest_right')->nullable()->unsigned(); - $obTable->integer('nest_depth')->nullable()->unsigned(); -[[nested_tree]][[sortable]] $obTable->integer('sort_order')->nullable()->default(0); -[[sortable]] $obTable->timestamps(); - }); - } - - /** - * Rollback migration - */ - public function down() - { - Schema::dropIfExists(self::TABLE); - } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/model.stub b/plugins/lovata/toolbox/classes/parser/templates/model.stub deleted file mode 100644 index 67b969704..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/model.stub +++ /dev/null @@ -1,205 +0,0 @@ - 'lovata.toolbox::lang.field.name', -[[name]][[slug]] 'slug' => 'lovata.toolbox::lang.field.slug', -[[slug]] [[empty_validate]]]; - /** @var array */ - public $rules = [[[empty_validate]] -[[name]] 'name' => 'required', -[[name]][[slug]] 'slug' => 'required|unique:{{lower_author}}_{{lower_plugin}}_{{lower_controller}}', -[[slug]] [[empty_validate]]]; - /** @var array */ - public $slugs = [[[slug]] - 'slug' => 'name' - [[slug]]]; - /** @var array */ - public $jsonable = []; - /** @var array */ - public $fillable = [[[empty_fields]] -[[active]] 'active', -[[active]][[name]] 'name', -[[name]][[slug]] 'slug', -[[slug]][[code]] 'code', -[[code]][[external_id]] 'external_id', -[[external_id]][[preview_text]] 'preview_text', -[[preview_text]][[description]] 'description', -[[description]] [[empty_fields]]]; - /** @var array */ - public $cached = [[[empty_fields]] - 'id', -[[nested_tree]] 'parent_id', -[[nested_tree]][[active]] 'active', -[[active]][[name]] 'name', -[[name]][[slug]] 'slug', -[[slug]][[code]] 'code', -[[code]][[external_id]] 'external_id', -[[external_id]][[view_count]] 'view_count', -[[view_count]][[preview_text]] 'preview_text', -[[preview_text]][[description]] 'description', -[[description]][[preview_image]] 'preview_image', -[[preview_image]][[file]] 'file', -[[file]][[images]] 'images', -[[images]] [[empty_fields]]]; - /** @var array */ - public $dates = [ - 'created_at', - 'updated_at', - ]; - /** @var array */ - public $casts = []; - /** @var array */ - public $visible = []; - /** @var array */ - public $hidden = []; - /** @var array */ - public $hasOne = []; - /** @var array */ - public $hasMany = []; - /** @var array */ - public $belongsTo = []; - /** @var array */ - public $belongsToMany = []; - /** @var array */ - public $morphTo = []; - /** @var array */ - public $morphOne = []; - /** @var array */ - public $morphMany = []; - /** @var array */ - public $attachOne = [[[empty_attach_one]] - [[preview_image]]'preview_image' => 'System\Models\File', - [[preview_image]][[file]]'file' => 'System\Models\File', - [[file]][[import_svg]]'import_file' => [\System\Models\File::class, 'public' => false], - [[import_svg]][[export_svg]]'import_file' => [\System\Models\File::class, 'public' => false], - [[export_svg]][[empty_attach_one]]]; - /** @var array */ - public $attachMany = [[[empty_attach_many]] - [[images]]'images' => 'System\Models\File'[[images]] - [[empty_attach_many]]]; -[[nested_tree]] - /** - * Get by parent ID - * @param {{studly_model}} $obQuery - * @param string $sData - * @return {{studly_model}} - */ - public function scopeGetByParentID($obQuery, $sData) - { - return $obQuery->where('parent_id', $sData); - } -[[nested_tree]][[import_svg]] - /** - * Parse CSV file - * @param array $arResults - * @param null|string $sSessionKey - */ - public function importData($arResults, $sSessionKey = null) - { - if (empty($arResults)) { - return; - } - - foreach ($arResults as $sRow => $arData) { - try { - $ob{{studly_model}} = new {{studly_model}}(); - $ob{{studly_model}}->fill($arData); - $ob{{studly_model}}->save(); - $this->logCreated(); - } catch (\Exception $obException) { - $this->logError($sRow, $obException->getMessage()); - } - } - } -[[import_svg]][[export_svg]] - /** - * Parse CSV file - * @param array $arColumns - * @param null|string $sSessionKey - * @return array - */ - public function exportData($arColumns, $sSessionKey = null) - { - if (empty($arColumns)) { - return []; - } - - $ob{{studly_model}}List = {{studly_model}}::all(); - $ob{{studly_model}}List->each(function($ob{{studly_model}}List) use ($arColumns) { - $ob{{studly_model}}List->addVisible($arColumns); - }); - - return $ob{{studly_model}}List->toArray(); - } -[[export_svg]]} diff --git a/plugins/lovata/toolbox/classes/parser/templates/plugin_php.stub b/plugins/lovata/toolbox/classes/parser/templates/plugin_php.stub deleted file mode 100644 index 574b94509..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/plugin_php.stub +++ /dev/null @@ -1,12 +0,0 @@ -lists('id'); - - return $arElementIDList; - } -[[sortable]][[default_sorting]] - /** - * Get ID list from database - * @return array - */ - protected function getIDListFromDB() : array - { - switch ($this->sValue) { - case {{studly_model}}ListStore::SORT_CREATED_AT_ASC: - $arElementIDList = $this->getByPublishASC(); - break; - case {{studly_model}}ListStore::SORT_CREATED_AT_DESC: - $arElementIDList = $this->getByPublishDESC(); - break; -[[view_count]] case {{studly_model}}ListStore::SORT_VIEW_COUNT_ASC: - $arElementIDList = $this->getByViewsASC(); - break; - case {{studly_model}}ListStore::SORT_VIEW_COUNT_DESC: - $arElementIDList = $this->getByViewsDESC(); - break; -[[view_count]] default: - $arElementIDList = $this->getDefaultList(); - break; - } - - return $arElementIDList; - } - - /** - * Get default list - * @return array - */ - protected function getDefaultList() : array - { - $arElementIDList = (array) {{studly_model}}::lists('id'); - - return $arElementIDList; - } - - /** - * Get sorting ID list by published (ASC) - * @return array - */ - protected function getByPublishASC() : array - { - $arElementIDList = (array) {{studly_model}}::orderBy('created_at', 'asc')->lists('id'); - - return $arElementIDList; - } - - /** - * Get sorting ID list by published (DESC) - * @return array - */ - protected function getByPublishDESC() : array - { - $arElementIDList = (array) {{studly_model}}::orderBy('created_at', 'desc')->lists('id'); - - return $arElementIDList; - } -[[view_count]] - /** - * Get sorting ID list by views (ASC) - * @return array - */ - protected function getByViewsASC() : array - { - $arElementIDList = (array) {{studly_model}}::orderBy('view_count', 'asc')->lists('id'); - - return $arElementIDList; - } - - /** - * Get sorting ID list by views (DESC) - * @return array - */ - protected function getByViewsDESC() : array - { - $arElementIDList = (array) {{studly_model}}::orderBy('view_count', 'desc')->lists('id'); - - return $arElementIDList; - } -[[view_count]][[default_sorting]]} diff --git a/plugins/lovata/toolbox/classes/parser/templates/sorting_top_level_list_store.stub b/plugins/lovata/toolbox/classes/parser/templates/sorting_top_level_list_store.stub deleted file mode 100644 index 8f0ff56de..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/sorting_top_level_list_store.stub +++ /dev/null @@ -1,27 +0,0 @@ -orderBy('nest_left', 'asc') - ->lists('id'); - - return $arElementIDList; - } -} diff --git a/plugins/lovata/toolbox/classes/parser/templates/version.stub b/plugins/lovata/toolbox/classes/parser/templates/version.stub deleted file mode 100644 index 3d8f8cd8c..000000000 --- a/plugins/lovata/toolbox/classes/parser/templates/version.stub +++ /dev/null @@ -1,2 +0,0 @@ -1.0.0: - - 'Init plugin' diff --git a/plugins/lovata/toolbox/classes/parser/update/CommonUpdateFile.php b/plugins/lovata/toolbox/classes/parser/update/CommonUpdateFile.php deleted file mode 100644 index 7a8913fa0..000000000 --- a/plugins/lovata/toolbox/classes/parser/update/CommonUpdateFile.php +++ /dev/null @@ -1,62 +0,0 @@ -arData = $arData; - $arReplace = array_get($this->arData, 'replace'); - $sClassCreateFile = $this->classCreateFile(); - - if (empty($this->arData) || empty($arReplace) || empty($this->sFilePath) || empty($sClassCreateFile)) { - $this->bUpdate = false; - - return; - } - - $this->obFile = new Filesystem(); - $this->sFilePath = plugins_path($this->sFilePath); - $this->sFilePath = $this->parseByName($arReplace, $this->sFilePath); - - if (!$this->obFile->exists($this->sFilePath)) { - $obFile = new $sClassCreateFile($this->arData); - $obFile->create(true); - } - } - - /** - * Class create file - * @return string - */ - protected function classCreateFile() - { - return ''; - } -} diff --git a/plugins/lovata/toolbox/classes/parser/update/PluginLangUpdateFile.php b/plugins/lovata/toolbox/classes/parser/update/PluginLangUpdateFile.php deleted file mode 100644 index 291f942f9..000000000 --- a/plugins/lovata/toolbox/classes/parser/update/PluginLangUpdateFile.php +++ /dev/null @@ -1,86 +0,0 @@ -arData, 'replace'); - - if (empty($arData) || !is_array($arData) || empty($arReplaceList) || !$this->bUpdate) { - return; - } - - $arLangData = $this->getLangData(); - - foreach ($arData as $sKeyLang => $arValueLang) { - if (!is_array($arValueLang)) { - continue; - } - - $sKeyLang = $this->parseByName($arReplaceList, $sKeyLang); - - foreach ($arValueLang as $sKeyParam => $sValueParam) { - $sKeyParam = $this->parseByName($arReplaceList, $sKeyParam); - $sValueParam = $this->parseByName($arReplaceList, $sValueParam); - - $arCheck = array_get($arLangData, $sKeyLang.'.'.$sKeyParam); - - if (empty($arCheck)) { - array_set($arLangData, $sKeyLang.'.'.$sKeyParam, $sValueParam); - } - } - } - - $this->sContent = $this->arrayToStringFile($arLangData); - $this->save(); - } - - - /** - * Class create file - * @return string - */ - protected function classCreateFile() - { - return PluginLangCreateFile::class; - } - - /** - * Get lang data - * @return array|mixed - */ - protected function getLangData() - { - if (!isset($this->sFilePath) || empty($this->sFilePath)) { - return []; - } - - return require $this->sFilePath; - } - - /** - * Save lang.php - */ - protected function save() - { - if (!isset($this->sContent) || empty($this->sContent)) { - return; - } - - $this->obFile->put($this->sFilePath, $this->sContent); - } -} diff --git a/plugins/lovata/toolbox/classes/parser/update/PluginVersionYAMLUpdateFile.php b/plugins/lovata/toolbox/classes/parser/update/PluginVersionYAMLUpdateFile.php deleted file mode 100644 index d541f3edb..000000000 --- a/plugins/lovata/toolbox/classes/parser/update/PluginVersionYAMLUpdateFile.php +++ /dev/null @@ -1,158 +0,0 @@ -bUpdate || !isset($this->sFilePath) || empty($this->sFilePath)) { - return; - } - - $this->arYAML = Yaml::parseFile($this->sFilePath); - - if (!array_key_exists($this->sVersion, $this->arYAML)) { - return; - } - - $sLowerAuthor = array_get($this->arData, 'replace.lower_author'); - $sLowerPlugin = array_get($this->arData, 'replace.lower_plugin'); - $sLowerController = array_get($this->arData, 'replace.lower_controller'); - - if (!empty($this->arYAML) && count($this->arYAML) > 0) { - $this->arVersion = array_slice($this->arYAML, -1); - $this->setVersion(); - } else { - $this->arVersion[$this->sVersion] = []; - } - - $this->setMigrationList($sLowerAuthor, $sLowerPlugin, $sLowerController); - $this->setYAML(); - $this->save(); - } - - /** - * Set version - */ - protected function setVersion() - { - $bVersionUp = array_get($this->arData, 'addition.version_up'); - - if (is_bool($bVersionUp)) { - $this->bVersionUp = $bVersionUp; - } - - $sCurrentVersion = key($this->arVersion); - - if (empty($sCurrentVersion) || !$this->bSave) { - $this->bSave = false; - - return; - } - - if (!$this->bVersionUp) { - $this->sVersion = $sCurrentVersion; - } else { - $this->sVersion = $this->versionUp($sCurrentVersion); - } - } - - /** - * Version Up - * @param string $sCurrentVersion - * @return string - */ - protected function versionUp($sCurrentVersion) - { - $arValueList = explode('.', $sCurrentVersion); - $iValue = (int) array_pop($arValueList); - $arValueList[] = ++$iValue; - - return implode('.', $arValueList); - } - - /** - * Set migration list - * @param string $sLowerAuthor - * @param string $sLowerPlugin - * @param string $sLowerController - */ - protected function setMigrationList($sLowerAuthor, $sLowerPlugin, $sLowerController) - { - if (empty($sLowerAuthor) || empty($sLowerPlugin) || empty($sLowerController) || empty($this->arVersion) || !$this->bSave) { - $this->bSave = false; - - return; - } - - $sMessage = 'Create tables.'; - $sFile = 'create_table_'.$sLowerController.'.php'; - - if (!$this->bVersionUp) { - $this->arMigrationList = array_pop($this->arVersion); - $this->arMigrationList[] = $sFile; - } else { - $this->arMigrationList[] = $sMessage; - $this->arMigrationList[] = $sFile; - } - } - - /** - * Set YAML - */ - protected function setYAML() - { - if (empty($this->arMigrationList) || empty($this->sVersion) || !$this->bSave) { - $this->bSave = false; - - return; - } - - $this->arYAML[$this->sVersion] = $this->arMigrationList; - } - - /** - * Save version.yaml - */ - protected function save() - { - if (!$this->bSave || empty($this->arYAML) || !isset($this->sFilePath) || empty($this->sFilePath)) { - return; - } - - $sContent = Yaml::render($this->arYAML); - $this->obFile->put($this->sFilePath, $sContent); - } -} diff --git a/plugins/lovata/toolbox/classes/parser/update/PluginYAMLUpdateFile.php b/plugins/lovata/toolbox/classes/parser/update/PluginYAMLUpdateFile.php deleted file mode 100644 index 329f4109a..000000000 --- a/plugins/lovata/toolbox/classes/parser/update/PluginYAMLUpdateFile.php +++ /dev/null @@ -1,174 +0,0 @@ -bUpdate || !isset($this->sFilePath) || empty($this->sFilePath)) { - return; - } - - $this->arYAML = Yaml::parseFile($this->sFilePath); - - $sLowerAuthor = array_get($this->arData, 'replace.lower_author'); - $sLowerPlugin = array_get($this->arData, 'replace.lower_plugin'); - $sLowerController = array_get($this->arData, 'replace.lower_controller'); - $sLowerModel = array_get($this->arData, 'replace.lower_model'); - - $sKeyMainMenu = $sLowerPlugin.'-menu-'.'main'; - $sKeySideMenu = $sLowerPlugin.'-menu-'.$sLowerController; - $sKeyPermission = $sLowerPlugin.'-menu-'.$sLowerController; - - $arNavigation = array_get($this->arYAML, self::PLUGIN_NAVIGATION); - $arPermissions = array_get($this->arYAML, self::PLUGIN_PERMISSIONS); - - $arMainMenuCurrent = array_get($arNavigation, $sKeyMainMenu); - $arSideMenuCurrent = array_get($arMainMenuCurrent, self::PLUGIN_SIDE_MENU.'.'.$sKeySideMenu); - $arPermissionCurrent = array_get($arPermissions, $sKeyPermission); - - if (empty($arNavigation) || count($arNavigation) == 0 || empty($arMainMenuCurrent)) { - $this->setMainMenu($sLowerAuthor, $sLowerPlugin, $sLowerController); - } else { - $this->arMainMenu = $arMainMenuCurrent; - } - - if (empty($arSideMenuCurrent)) { - $this->setSideMenu($sLowerAuthor, $sLowerPlugin, $sLowerController); - } else { - $this->arSideMenu = $arSideMenuCurrent; - } - - if (empty($arPermissionCurrent)) { - $this->setPermission($sLowerAuthor, $sLowerPlugin, $sLowerModel); - } else { - $this->arPermission = $arPermissionCurrent; - } - - $this->setYAML($sKeyMainMenu, $sKeySideMenu, $sKeyPermission); - $this->save(); - } - - /** - * Set main menu - * @param string $sLowerAuthor - * @param string $sLowerPlugin - * @param string $sLowerController - */ - protected function setMainMenu($sLowerAuthor = '', $sLowerPlugin = '', $sLowerController = '') - { - if (empty($sLowerAuthor) || empty($sLowerPlugin) || empty($sLowerController) || !$this->bSave) { - $this->bSave = false; - - return; - } - - array_set($this->arMainMenu, 'label', $sLowerAuthor.'.'.$sLowerPlugin.'::lang.menu.main'); - array_set($this->arMainMenu, 'url', $sLowerAuthor.'/'.$sLowerPlugin.'/'.$sLowerController); - array_set($this->arMainMenu, 'permissions', [$sLowerPlugin.'-menu-'.'*']); - array_set($this->arMainMenu, 'icon', 'icon-paw'); - } - - /** - * Set side menu - * @param string $sLowerAuthor - * @param string $sLowerPlugin - * @param string $sLowerController - */ - protected function setSideMenu($sLowerAuthor, $sLowerPlugin, $sLowerController) - { - if (empty($sLowerAuthor) || empty($sLowerPlugin) || empty($sLowerController) || !$this->bSave) { - $this->bSave = false; - - return; - } - - array_set($this->arSideMenu, 'label', $sLowerAuthor.'.'.$sLowerPlugin.'::lang.menu.' . $sLowerController); - array_set($this->arSideMenu, 'url', $sLowerAuthor.'/'.$sLowerPlugin.'/'.$sLowerController); - array_set($this->arSideMenu, 'permissions', [$sLowerPlugin.'-menu-'.$sLowerController]); - array_set($this->arSideMenu, 'icon', 'icon-paw'); - } - - /** Set permission - * @param string $sLowerAuthor - * @param string $sLowerPlugin - * @param string $sLowerModel - */ - protected function setPermission($sLowerAuthor, $sLowerPlugin, $sLowerModel) - { - if (empty($sLowerAuthor) || empty($sLowerPlugin) || empty($sLowerModel) || !$this->bSave) { - $this->bSave = false; - - return; - } - - array_set($this->arPermission, 'label', $sLowerAuthor.'.'.$sLowerPlugin.'::lang.permission.'.$sLowerModel); - array_set($this->arPermission, 'tab', $sLowerAuthor.'.'.$sLowerPlugin.'::lang.tab.permissions'); - } - - /** - * Set YAML - * @param string $sKeyMainMenu - * @param string $sKeySideMenu - * @param string $sKeyPermission - */ - protected function setYAML($sKeyMainMenu, $sKeySideMenu, $sKeyPermission) - { - if (empty($sKeyMainMenu) || empty($sKeySideMenu) || empty($sKeyPermission) || !$this->bSave) { - $this->bSave = false; - - return; - } - - array_set($this->arMainMenu, self::PLUGIN_SIDE_MENU.'.'.$sKeySideMenu, $this->arSideMenu); - array_set($this->arYAML, self::PLUGIN_NAVIGATION.'.'.$sKeyMainMenu, $this->arMainMenu); - array_set($this->arYAML, self::PLUGIN_PERMISSIONS.'.'.$sKeyPermission, $this->arPermission); - } - - /** - * Save version.yaml - */ - protected function save() - { - if (!$this->bSave || empty($this->arYAML) || !isset($this->sFilePath) || empty($this->sFilePath)) { - return; - } - - $sContent = Yaml::render($this->arYAML); - $this->obFile->put($this->sFilePath, $sContent); - } -} diff --git a/plugins/lovata/toolbox/classes/queue/ImportItemQueue.php b/plugins/lovata/toolbox/classes/queue/ImportItemQueue.php deleted file mode 100644 index ba8e31542..000000000 --- a/plugins/lovata/toolbox/classes/queue/ImportItemQueue.php +++ /dev/null @@ -1,49 +0,0 @@ -import($sImportClass, $arImportData); - - $obJob->delete(); - } - - /** - * Import item - * @param string $sImportClass - * @param array $arImportData - * @throws \Throwable - */ - protected function import($sImportClass, $arImportData) - { - if (empty($sImportClass) || empty($arImportData) || !class_exists($sImportClass)) { - return; - } - - /** @var \Lovata\Toolbox\Classes\Helper\AbstractImportModel $obImport */ - $obImport = new $sImportClass(); - if ($obImport instanceof AbstractImportModelFromCSV) { - $obImport->import($arImportData, false); - } elseif($obImport instanceof AbstractImportModelFromXML) { - $obImport->importRow($arImportData, false); - } - - } -} diff --git a/plugins/lovata/toolbox/classes/storage/AbstractUserStorage.php b/plugins/lovata/toolbox/classes/storage/AbstractUserStorage.php deleted file mode 100644 index a61ecb0da..000000000 --- a/plugins/lovata/toolbox/classes/storage/AbstractUserStorage.php +++ /dev/null @@ -1,96 +0,0 @@ -get($sKey); - if (empty($arValueList) || !is_array($arValueList)) { - $arValueList = []; - } - - return $arValueList; - } - - /** - * Add value to list - * @param string $sKey - * @param string $sValue - */ - public function addToList($sKey, $sValue) - { - if (empty($sKey) || empty($sValue)) { - return; - } - - //Get value from storage - $arValueList = $this->getList($sKey); - - array_unshift($arValueList, $sValue); - $arValueList = array_unique($arValueList); - - $this->put($sKey, $arValueList); - } - - /** - * Remove value from list - * @param string $sKey - * @param string $sValue - */ - public function removeFromList($sKey, $sValue) - { - if (empty($sKey) || empty($sValue)) { - return; - } - - //Get value from storage - $arValueList = $this->getList($sKey); - - $iPosition = array_search($sValue, $arValueList); - if ($iPosition === false) { - return; - } - - unset($arValueList[$iPosition]); - $arValueList = array_values($arValueList); - - $this->put($sKey, $arValueList); - } -} diff --git a/plugins/lovata/toolbox/classes/storage/CookieUserStorage.php b/plugins/lovata/toolbox/classes/storage/CookieUserStorage.php deleted file mode 100644 index 24efa6dad..000000000 --- a/plugins/lovata/toolbox/classes/storage/CookieUserStorage.php +++ /dev/null @@ -1,70 +0,0 @@ -iMinutePeriod); - } - - /** - * Clear value in storage - * @param string $sKey - */ - public function clear($sKey) - { - if (empty($sKey)) { - return; - } - - Cookie::forget($sKey); - } - - /** - * Set minute period - * @param int $iPeriod - */ - public function setMinutePeriod($iPeriod) - { - $this->iMinutePeriod = (int) $iPeriod; - } -} diff --git a/plugins/lovata/toolbox/classes/storage/SessionUserStorage.php b/plugins/lovata/toolbox/classes/storage/SessionUserStorage.php deleted file mode 100644 index b62f416ac..000000000 --- a/plugins/lovata/toolbox/classes/storage/SessionUserStorage.php +++ /dev/null @@ -1,56 +0,0 @@ -obDefaultStorage = app($obUserStorage); - if (!empty($this->obDefaultStorage) && $this->obDefaultStorage instanceof CookieUserStorage) { - $this->obDefaultStorage->setMinutePeriod($iMinutePeriod); - } - } - - /** - * Get value from storage - * @param string $sKey - * @param mixed $sDefaultValue - * - * @return mixed - */ - public function get($sKey, $sDefaultValue = null) - { - if (empty($sKey)) { - return $sDefaultValue; - } - - //Get auth user object - $obUser = UserHelper::instance()->getUser(); - if (empty($obUser)) { - return $this->getDefaultStorageValue($sKey, $sDefaultValue); - } - - //Get value from user object - $obValue = $obUser->$sKey; - if (empty($obValue)) { - return $sDefaultValue; - } - - return $obValue; - } - - /** - * Put value to storage - * @param string $sKey - * @param mixed $obValue - */ - public function put($sKey, $obValue) - { - if (empty($sKey)) { - return; - } - - //Get auth user object - $obUser = UserHelper::instance()->getUser(); - if (empty($obUser)) { - $this->putDefaultStorageValue($sKey, $obValue); - - return; - } - - $obUser->$sKey = $obValue; - $obUser->save(); - } - - /** - * Clear value in storage - * @param string $sKey - */ - public function clear($sKey) - { - if (empty($sKey)) { - return; - } - - $this->clearDefaultStorageValue($sKey); - - //Get auth user object - $obUser = UserHelper::instance()->getUser(); - if (empty($obUser)) { - return; - } - - $obUser->$sKey = null; - $obUser->save(); - } - - /** - * Get list value from storage - * @param string $sKey - * @return array - */ - public function getList($sKey) - { - if (empty($sKey)) { - return []; - } - - $arDefaultStorageValue = $this->getListDefaultStorageValue($sKey); - - //Get auth user object - $obUser = UserHelper::instance()->getUser(); - if (empty($obUser)) { - return $arDefaultStorageValue; - } - - //Get value from user object - $arValueList = $obUser->$sKey; - if (empty($arValueList) || !is_array($arValueList)) { - $arValueList = []; - } - - if (!empty($arDefaultStorageValue)) { - $arValueList = array_merge($arDefaultStorageValue, $arValueList); - $arValueList = array_unique($arValueList); - - $this->put($sKey, $arValueList); - $this->clearDefaultStorageValue($sKey); - } - - return $arValueList; - } - - /** - * Get value from storage - * @param string $sKey - * @param mixed $sDefaultValue - * - * @return mixed - */ - protected function getDefaultStorageValue($sKey, $sDefaultValue = null) - { - if (empty($this->obDefaultStorage)) { - return $sDefaultValue; - } - - return $this->obDefaultStorage->get($sKey, $sDefaultValue); - } - - /** - * Get list value from storage - * @param string $sKey - * - * @return array - */ - protected function getListDefaultStorageValue($sKey) - { - if (empty($this->obDefaultStorage)) { - return []; - } - - return $this->obDefaultStorage->getList($sKey); - } - - /** - * Put value to storage - * @param string $sKey - * @param mixed $obValue - */ - protected function putDefaultStorageValue($sKey, $obValue) - { - if (empty($this->obDefaultStorage)) { - return; - } - - $this->obDefaultStorage->put($sKey, $obValue); - } - - /** - * Clear value in storage - * @param string $sKey - */ - protected function clearDefaultStorageValue($sKey) - { - if (empty($this->obDefaultStorage)) { - return; - } - - $this->obDefaultStorage->clear($sKey); - } -} diff --git a/plugins/lovata/toolbox/classes/store/AbstractListStore.php b/plugins/lovata/toolbox/classes/store/AbstractListStore.php deleted file mode 100644 index 5113dad57..000000000 --- a/plugins/lovata/toolbox/classes/store/AbstractListStore.php +++ /dev/null @@ -1,43 +0,0 @@ -arStoreList[$sFieldName])) { - return $this->arStoreList[$sFieldName]; - } - - return null; - } - - /** - * Add store class to list and get store object - * @param string $sFieldName - * @param string $sClassName - */ - protected function addToStoreList($sFieldName, $sClassName) - { - if (empty($sFieldName) || empty($sClassName) || !class_exists($sClassName)) { - return; - } - - $this->arStoreList[$sFieldName] = $sClassName::instance(); - } -} diff --git a/plugins/lovata/toolbox/classes/store/AbstractStore.php b/plugins/lovata/toolbox/classes/store/AbstractStore.php deleted file mode 100644 index 92ab05610..000000000 --- a/plugins/lovata/toolbox/classes/store/AbstractStore.php +++ /dev/null @@ -1,92 +0,0 @@ -getIDListFromCache(); - if (!empty($arElementIDList) && is_array($arElementIDList)) { - return $arElementIDList; - } - - $arElementIDList = $this->getIDListFromDB(); - $this->saveIDList($arElementIDList); - - return $arElementIDList; - } - - /** - * Get element ID list from array - * @return array|null - */ - protected function getIDListFromCache() : array - { - $arCacheTags = $this->getCacheTagList(); - $sCacheKey = $this->getCacheKey(); - - $arElementIDList = (array) CCache::get($arCacheTags, $sCacheKey); - - return $arElementIDList; - } - - /** - * Save element ID list in cache - * @param array $arElementIDList - */ - protected function saveIDList($arElementIDList) - { - $arCacheTags = $this->getCacheTagList(); - $sCacheKey = $this->getCacheKey(); - - //Set cache data - CCache::forever($arCacheTags, $sCacheKey, $arElementIDList); - } - - /** - * Clear element ID list in cache - */ - protected function clearIDList() - { - $arCacheTags = $this->getCacheTagList(); - $sCacheKey = $this->getCacheKey(); - - CCache::clear($arCacheTags, $sCacheKey); - } - - /** - * Get array with cache tags - * @return array - */ - protected function getCacheTagList() - { - return [static::class]; - } -} diff --git a/plugins/lovata/toolbox/classes/store/AbstractStoreWithParam.php b/plugins/lovata/toolbox/classes/store/AbstractStoreWithParam.php deleted file mode 100644 index 9cbddd1db..000000000 --- a/plugins/lovata/toolbox/classes/store/AbstractStoreWithParam.php +++ /dev/null @@ -1,82 +0,0 @@ -sValue = $sFilterValue; - if (array_key_exists($this->getCacheKey(), $this->arCachedList) && is_array($this->arCachedList[$this->getCacheKey()])) { - return $this->arCachedList[$this->getCacheKey()]; - } - - $arElementIDList = $this->getIDList(); - $this->arCachedList[$this->getCacheKey()] = $arElementIDList; - - return $arElementIDList; - } - - /** - * Get element ID list from database, without cache - * @param mixed $sFilterValue - * @return array|null - */ - public function getNoCache($sFilterValue) : array - { - if (empty($sFilterValue) && $sFilterValue !== 0 && $sFilterValue !== '0') { - return []; - } - - $this->sValue = $sFilterValue; - $arElementIDList = $this->getIDListFromDB(); - - return $arElementIDList; - } - - /** - * Clear element ID list - * @param mixed $sFilterValue - */ - public function clear($sFilterValue) - { - if (empty($sFilterValue) && $sFilterValue !== 0 && $sFilterValue !== '0') { - return; - } - - $this->sValue = $sFilterValue; - - $this->clearIDList(); - - if (array_key_exists($this->getCacheKey(), $this->arCachedList)) { - unset($this->arCachedList[$this->getCacheKey()]); - } - } - - /** - * Get cache key - * @return string - */ - protected function getCacheKey() : string - { - return $this->sValue; - } -} diff --git a/plugins/lovata/toolbox/classes/store/AbstractStoreWithTwoParam.php b/plugins/lovata/toolbox/classes/store/AbstractStoreWithTwoParam.php deleted file mode 100644 index 443b3a0ba..000000000 --- a/plugins/lovata/toolbox/classes/store/AbstractStoreWithTwoParam.php +++ /dev/null @@ -1,92 +0,0 @@ -sValue = $sFilterValue; - $this->sAdditionParam = $sAdditionalParam; - if (array_key_exists($this->getCacheKey(), $this->arCachedList) && is_array($this->arCachedList[$this->getCacheKey()])) { - return $this->arCachedList[$this->getCacheKey()]; - } - - $arElementIDList = $this->getIDList(); - $this->arCachedList[$this->getCacheKey()] = $arElementIDList; - - return $arElementIDList; - } - - /** - * Get element ID list from database, without cache - * @param mixed $sFilterValue - * @param mixed $sAdditionalParam - * @return array|null - */ - public function getNoCache($sFilterValue, $sAdditionalParam = null) : array - { - if (empty($sFilterValue) && $sFilterValue !== 0 && $sFilterValue !== '0') { - return []; - } - - $this->sValue = $sFilterValue; - $this->sAdditionParam = $sAdditionalParam; - - $arElementIDList = $this->getIDListFromDB(); - - return $arElementIDList; - } - - /** - * Clear element ID list - * @param mixed $sFilterValue - * @param mixed $sAdditionalParam - */ - public function clear($sFilterValue, $sAdditionalParam = null) - { - if (empty($sFilterValue) && $sFilterValue !== 0 && $sFilterValue !== '0') { - return; - } - - $this->sValue = $sFilterValue; - $this->sAdditionParam = $sAdditionalParam; - - $this->clearIDList(); - - if (array_key_exists($this->getCacheKey(), $this->arCachedList)) { - unset($this->arCachedList[$this->getCacheKey()]); - } - } - - /** - * Get cache key - * @return string - */ - protected function getCacheKey() : string - { - return $this->sValue.'_'.$this->sAdditionParam; - } -} diff --git a/plugins/lovata/toolbox/classes/store/AbstractStoreWithoutParam.php b/plugins/lovata/toolbox/classes/store/AbstractStoreWithoutParam.php deleted file mode 100644 index 970f9d4a2..000000000 --- a/plugins/lovata/toolbox/classes/store/AbstractStoreWithoutParam.php +++ /dev/null @@ -1,57 +0,0 @@ -arCachedList !== null && is_array($this->arCachedList)) { - return $this->arCachedList; - } - - $arElementIDList = $this->getIDList(); - $this->arCachedList = $arElementIDList; - - return $arElementIDList; - } - - /** - * Get element ID list from database, without cache - * @return array|null - */ - public function getNoCache() : array - { - $arElementIDList = $this->getIDListFromDB(); - - return $arElementIDList; - } - - /** - * Clear element ID list - */ - public function clear() - { - $this->clearIDList(); - $this->arCachedList = null; - } - - /** - * Get cache key - * @return string - */ - protected function getCacheKey() : string - { - return static::class; - } -} diff --git a/plugins/lovata/toolbox/components/Pagination.php b/plugins/lovata/toolbox/components/Pagination.php deleted file mode 100644 index 1d144d48e..000000000 --- a/plugins/lovata/toolbox/components/Pagination.php +++ /dev/null @@ -1,168 +0,0 @@ - [ - 'title' => 'lovata.toolbox::lang.settings.available_count_per_page', - 'description' => 'lovata.toolbox::lang.settings.available_count_per_page_desc', - 'type' => 'string', - ], - ]; - - /** - * @return array - */ - public function componentDetails() - { - return [ - 'name' => 'lovata.toolbox::lang.component.pagination', - 'description' => 'lovata.toolbox::lang.component.pagination_desc', - ]; - } - - /** - * @return array - */ - public function defineProperties() - { - $this->arPropertyList = array_merge($this->arPropertyList, PaginationHelper::getProperties('toolbox')); - - return $this->arPropertyList; - } - - /** - * Init start data - */ - public function init() - { - $arAvailableValue = []; - $sAvailableValue = $this->property('available_count_per_page'); - if (!empty($sAvailableValue)) { - $arAvailableValue = explode(',', $sAvailableValue); - } - - //Get limit from request - $iLimit = (int) Input::get('limit'); - if ($iLimit > 0 && (empty($arAvailableValue) || in_array($iLimit, $arAvailableValue))) { - $this->iElementOnPage = $iLimit; - - return; - } - - $iRequestElementOnPage = (int) $this->property('count_per_page'); - if ($iRequestElementOnPage > 0) { - $this->iElementOnPage = $iRequestElementOnPage; - } - } - - /** - * Get page from request - * @return int - */ - public function getPageFromRequest() - { - $iPage = (int) trim(Input::get('page')); - - //Check page value - if ($iPage < 1) { - $iPage = 1; - } - - return $iPage; - } - - /** - * Get count element per page - * @return int - */ - public function getCountPerPage() - { - return $this->iElementOnPage; - } - - /** - * Get max page value - * @param int $iCount - * @return int - */ - public function getMaxPage($iCount) - { - if ($iCount < 1) { - return 0; - } - - return ceil($iCount / $this->iElementOnPage); - } - - /** - * Get element count for next page - * @param int $iPage - * @param int $iCount - * - * @return int - */ - public function getCountForNextPage($iPage, $iCount) - { - if ($iCount < 1) { - return 0; - } - - $iPage = (int) trim($iPage); - - //Check page value - if ($iPage < 1) { - $iPage = 1; - } - - //Get max page value - $iMaxPage = $this->getMaxPage($iCount); - if ($iMaxPage <= $iPage) { - return 0; - } - - $iNextCount = $iCount - $this->iElementOnPage * $iPage; - if ($iNextCount > $this->iElementOnPage) { - $iNextCount = $this->iElementOnPage; - } - - return $iNextCount; - } - - /** - * Get pagination data - * @param int $iPage - * @param int $iCount - * @return array|null - */ - public function get($iPage, $iCount) - { - if ($iCount < 1) { - return null; - } - - $iPage = (int) trim($iPage); - - //Check page value - if ($iPage < 1) { - $iPage = 1; - } - - $this->properties['count_per_page'] = $this->iElementOnPage; - - return PaginationHelper::get($iPage, $iCount, $this->properties); - } -} diff --git a/plugins/lovata/toolbox/composer.json b/plugins/lovata/toolbox/composer.json deleted file mode 100644 index c04e268a8..000000000 --- a/plugins/lovata/toolbox/composer.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "lovata/toolbox-plugin", - "type": "october-plugin", - "description": "Toolbox plugin for October CMS", - "license": "GPL-3.0-only", - "require": { - "kharanenka/php-result-store": "2.*", - "kharanenka/laravel-scope-active": "1.0.*", - "kharanenka/oc-pagination": "1.0.*", - "kharanenka/laravel-cache-helper": "1.0.*", - "kharanenka/laravel-scope-category-belongs-to": "1.0.*", - "kharanenka/laravel-scope-code": "1.0.*", - "kharanenka/laravel-scope-date": "1.0.*", - "kharanenka/laravel-scope-external-id": "1.0.*", - "kharanenka/laravel-scope-name": "1.0.*", - "kharanenka/laravel-scope-slug": "1.0.*", - "kharanenka/laravel-scope-user-belongs-to": "1.0.*", - "kharanenka/oc-data-file-model": "1.*", - "kharanenka/laravel-scope-moderation": "1.0.*", - "kharanenka/laravel-scope-hidden": "1.0.*", - "kharanenka/laravel-scope-type": "1.0.*", - "composer/installers": "~1.0" - } -} diff --git a/plugins/lovata/toolbox/crowdin.yml b/plugins/lovata/toolbox/crowdin.yml deleted file mode 100644 index 535152bcc..000000000 --- a/plugins/lovata/toolbox/crowdin.yml +++ /dev/null @@ -1,3 +0,0 @@ -files: - - source: /lang/en/*php - translation: /lang/%two_letters_code%/%original_file_name% diff --git a/plugins/lovata/toolbox/lang/ar/lang.php b/plugins/lovata/toolbox/lang/ar/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/ar/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/be/lang.php b/plugins/lovata/toolbox/lang/be/lang.php deleted file mode 100644 index ee6a730d3..000000000 --- a/plugins/lovata/toolbox/lang/be/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'ID бацькоўскай катэгорыі', - 'category_parent' => 'Бацькоўская катэгорыя', - 'children_category' => 'Дзіцячыя катэгорыі', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/bg/lang.php b/plugins/lovata/toolbox/lang/bg/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/bg/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/ca/lang.php b/plugins/lovata/toolbox/lang/ca/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/ca/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/cs/lang.php b/plugins/lovata/toolbox/lang/cs/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/cs/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/da/lang.php b/plugins/lovata/toolbox/lang/da/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/da/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/de/lang.php b/plugins/lovata/toolbox/lang/de/lang.php deleted file mode 100644 index d7a6443fa..000000000 --- a/plugins/lovata/toolbox/lang/de/lang.php +++ /dev/null @@ -1,193 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox ist eine Reihe von Helfern für eine schnellere Entwicklung für Oktober CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Titel', - 'active' => 'Aktiv', - 'hidden' => 'Versteckt', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'Externe ID', - 'preview_text' => 'Vorschau des Textes', - 'preview_image' => 'Vorschau des Bildes', - 'image' => 'Bild', - 'images' => 'Bilder (Galerie)', - 'icon' => 'Icon', - 'description' => 'Beschreibung', - 'category' => 'Kategorie', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Telefon', - 'moderation' => 'Moderation', - 'mode' => 'Modus', - 'status' => 'Status', - 'city' => 'Stadt', - 'address' => 'Adresse', - 'street' => 'Straße', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Typ', - 'avatar' => 'Avatar', - 'property' => 'Eigenschaft', - 'property_list_value' => 'verfügbare Eigenschaftswerte', - 'property_mode' => 'Eigenschaftsmodus', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Eigenschaft ist übersetzbar', - 'key' => 'Schlüssel', - 'value' => 'Wert', - 'label' => 'Label', - 'date' => 'Datum', - 'datetime' => 'Datum und Zeit', - 'time' => 'Zeit', - 'file' => 'Date', - 'decimals' => 'Anzahl der Nachkommastellen', - 'dec_point' => 'Bruchteilstrennung', - 'thousands_sep' => 'Tausendertrennzeichen', - 'dot' => 'Punkt', - 'comma' => 'Komma', - 'together' => 'Zusammenführen', - 'space' => 'Leerzeichen', - 'date_begin' => 'Anfangsdatum', - 'date_end' => 'Enddatum', - 'discount_value' => 'Rabattwert', - 'discount_type' => 'Rabattart', - 'discount_price' => 'Preisnachlass', - 'discount' => 'Rabatt', - 'product' => 'Produkt', - 'priority' => 'Priorität', - 'group' => 'Gruppe', - 'count' => 'Zählen', - 'length' => 'Länge', - 'amount' => 'Betrag', - 'author' => 'Autor', - 'link' => 'Link', - 'view_count' => 'Anzahl anzeigen', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sortierung', - 'created_at' => 'Erstellt', - 'updated_at' => 'Aktualisiert', - 'deleted_at' => 'Gelöscht am', - 'deleted' => 'Gelöscht', - 'empty' => 'Leer', - 'password' => 'Passwort', - - 'site_settings' => 'Anwendungseinstellungen', - 'site_settings_description' => 'Allgemeine Einstellungen der Anwendung', - 'queue_on' => 'Senden von Nachrichten aus der Warteschlange', - 'queue_name' => 'Der Name der Warteschlange für den Versand der E-Mails.', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Elemente deaktivieren', - 'import_deactivate_description' => 'Alle aktiven Elemente, die sich nicht in der CSV-Datei befinden, werden deaktiviert.', - - 'country' => 'Land', - 'state' => 'Staat', - 'house' => 'Hausnummer', - 'flat' => 'Wohnungsnummer', - 'address1' => 'Adresse 1', - 'address2' => 'Adresse 2', - 'postcode' => 'Postleitzahl', - ], - 'tab' => [ - 'preview_content' => 'Inhaltsvorschau', - 'full_content' => 'Inhalt', - 'images' => 'Bilder', - 'files' => 'Dateien', - 'settings' => 'Einstellungen', - 'description' => 'Beschreibung', - 'properties' => 'Eigenschaften', - 'mail' => 'Senden von Emails', - 'import' => 'Importieren', - 'permissions' => 'Seiteneinstellungen verwalten', - 'prices_format' => 'Preisformat', - ], - 'component' => [ - 'property_name_error_404' => '404 Seite anzeigen', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug wird benötigt', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Seitennavigation', - 'pagination_desc' => 'Rendert Button für Seitennavigation', - - 'property_redirect_page' => 'Seite umleiten', - 'property_redirect_success_page' => 'Erfolgsseite umleiten', - 'property_redirect_fail_page' => 'Fehlerseite umleiten', - 'property_redirect_on' => 'Umleitung EIN', - 'property_flash_on' => 'Flash EIN', - 'property_mode' => 'Komponenten-Modus', - 'mode_submit' => 'Formular absenden', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => ':name erstellen war erfolgreich', - 'update_success' => ':name aktualisieren war erfolgreich', - 'delete_success' => ':name löschen war erfolgreich', - 'restore_confirm' => 'Möchten Sie ausgewählte Elemente wiederherstellen?', - 'restore_success' => 'Wiederherstellen von Elementen war erfolgreich!', - 'e_not_correct_request' => 'Anfrage ist nicht korrekt!', - 'row_is_empty' => 'Zeile ist leer.', - 'external_id_is_empty' => 'Die externe ID ist leer.', - 'import_additional_info' => 'Zusätzliche Importinformationen.', - 'import_active_field_info' => 'Der Wert des Feldes "aktiv" wird auf "wahr" gesetzt, wenn es sich nicht in der CSV-Datei befindet.', - 'import_preview_image_field_info' => 'Der Pfad zur Vorschau-Bilddatei muss relativ zum Speicherort Ihres Projekts eingestellt sein. Zum Beispiel: "app/media/image.jpg".', - 'import_images_field_info' => 'Der Pfad zur Bilddatei muss relativ zum Speicherort Ihres Projekts eingestellt werden. Zum Beispiel: "app/media/image.jpg". Pfade zu Bilddateien müssen durch Kommas getrennt werden.', - ], - 'settings' => [ - 'count_per_page' => 'Elemente pro Seite zählen', - 'available_count_per_page' => 'Liste der verfügbaren Werte für "count_per_page".', - 'available_count_per_page_desc' => 'Setzen Sie zulässige Werte, die durch Kommas getrennt sind.', - 'number_validation' => 'Sie müssen die Nummer eingeben.', - 'pagination_limit' => 'Buttons für max count', - 'active_class' => 'Klasse für "Active Button"', - 'button_list' => 'Button Liste', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button Name', - 'button_limit' => 'Button nach Seite anzeigen', - 'button_number' => 'Zeigt den Namen des Buttons an', - 'button_class' => 'CSS class', - 'last_button' => '"Zuletzt" Button', - 'last-more_button' => '"Mehr" (vor "Zuletzt")', - 'next_button' => '"Nächste" Button', - 'next-more_button' => '"Mehr" (vor "Nächste")', - 'prev_button' => '"Vorher" Button', - 'prev-more_button' => '"Mehr" (nach "Vorher")', - 'first_button' => '"Zuerst" Button', - 'first-more_button' => '"Mehr" (nach "Zuerst")', - 'main_button' => '"Haupt" Button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Eigenschaftswert hinzufügen', - 'import_from_csv' => 'Importieren mit CSV', - 'export_in_csv' => 'Exportieren in CSV', - 'import_button' => 'Datensätze importieren', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'Datei', - ], - 'permission' => [ - 'settings' => 'Einstellungen verwalten', - ], -]; diff --git a/plugins/lovata/toolbox/lang/el/lang.php b/plugins/lovata/toolbox/lang/el/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/el/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/en/lang.php b/plugins/lovata/toolbox/lang/en/lang.php deleted file mode 100644 index 0c387989a..000000000 --- a/plugins/lovata/toolbox/lang/en/lang.php +++ /dev/null @@ -1,227 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'view_count' => 'View count', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - 'field' => 'Field', - 'weight' => 'Weight', - 'height' => 'Height', - 'length' => 'Length', - 'width' => 'Width', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - - 'import_file_list' => 'Import file list', - 'import_from_file' => 'Import from file', - 'import_file_path' => 'Relative path from storage folder to file', - 'import_path_prefix' => 'Prefix for fields paths', - 'import_file_namespace' => 'File namespace', - 'import_image_folder' => 'Relative path from storage folder to image folder', - 'import_path_to_list' => 'Path to node with list of elements', - 'import_path_to_list_example' => 'main/elements/element', - 'import_field_list' => 'Field list', - 'import_path_to_field' => 'Path to field node', - 'import_path_to_field_example' => 'fields/field[@code="active"]', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'files' => 'Files', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - 'has_wildcard' => 'URL section is wildcard', - 'skip_error' => 'Skip "Not found" error', - ], - 'message' => [ - 'create_success' => 'Create :name was successful', - 'update_success' => 'Update :name was successful', - 'delete_success' => 'Delete :name was successful', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successful', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - 'import_from_xml_confirm' => 'Start import from XML file?', - 'import_from_xml_report' => 'Import results: created - :created, updated - :updated, skipped - :skipped, processed - :processed.', - - 'table_toolbox_helper' => 'Display command list.', - 'table_toolbox_create' => 'Create :description', - - 'choice_field_list' => 'Choice available fields (Example: 1,2,3,4)', - 'choice_sorting' => 'Choice sorting', - 'choice_lang_list' => 'Choice lang', - 'choice_extend_model' => 'Choice extend model', - 'set' => 'Set :name (Example: :example)', - 'create' => 'Create :name?', - 'force_file' => 'File :file already exists. Create forced?', - 'add_side_menu' => 'Add side menu to plugin.yaml?', - 'version_up' => 'Add new version to version.yaml?', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - 'import_from_xml' => 'Import from XML', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/es/lang.php b/plugins/lovata/toolbox/lang/es/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/es/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/et/lang.php b/plugins/lovata/toolbox/lang/et/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/et/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/fa/lang.php b/plugins/lovata/toolbox/lang/fa/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/fa/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/fi/lang.php b/plugins/lovata/toolbox/lang/fi/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/fi/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/fr/lang.php b/plugins/lovata/toolbox/lang/fr/lang.php deleted file mode 100644 index c7dcdce88..000000000 --- a/plugins/lovata/toolbox/lang/fr/lang.php +++ /dev/null @@ -1,193 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox est un ensemble d\'helpers pour un développement plus rapide avec OctoberCMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Nom', - 'title' => 'Titre', - 'active' => 'Actif', - 'hidden' => 'Caché', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'ID Externe', - 'preview_text' => 'Prévisualiser le texte', - 'preview_image' => 'Prévisualiser l\'image', - 'image' => 'Image', - 'images' => 'Images (galerie)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Catégorie', - 'category_parent_id' => 'Catégorie parentale ID', - 'category_parent' => 'Catégorie parentale', - 'children_category' => 'Catégories enfants', - 'email' => 'Email', - 'phone' => 'Téléphone', - 'moderation' => 'Modération', - 'mode' => 'Mode', - 'status' => 'Statut', - 'city' => 'Ville', - 'address' => 'Adresse', - 'street' => 'Rue', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Propriété', - 'property_list_value' => 'Valeurs de propriété disponibles', - 'property_mode' => 'Mode de propriété', - 'property_tab' => 'Nom de l\'onglet', - 'property_is_translatable' => 'La propriété est traduisible', - 'key' => 'Clé', - 'value' => 'Valeur', - 'label' => 'Étiquette', - 'date' => 'Date', - 'datetime' => 'Date et heure', - 'time' => 'Heure', - 'file' => 'Fichier', - 'decimals' => 'Nombre de décimales', - 'dec_point' => 'Séparateur décimal', - 'thousands_sep' => 'Séparateur de milliers', - 'dot' => 'Point', - 'comma' => 'Virgule', - 'together' => 'Fusionner', - 'space' => 'Espace', - 'date_begin' => 'Date du début', - 'date_end' => 'Date de la fin', - 'discount_value' => 'Valeur de remise', - 'discount_type' => 'Type de remise', - 'discount_price' => 'Prix de la remise', - 'discount' => 'Remise', - 'product' => 'Produit', - 'priority' => 'Priorité', - 'group' => 'Groupe', - 'count' => 'Compter', - 'length' => 'Longueur', - 'amount' => 'Montant', - 'view_count' => 'Nombre de vues', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Tri', - 'created_at' => 'Créé', - 'updated_at' => 'Actualisé', - 'deleted_at' => 'Supprimé', - 'deleted' => 'supprimé', - 'empty' => 'Vide', - 'password' => 'Mot de passe', - - 'site_settings' => 'Paramètres de l\'application', - 'site_settings_description' => 'Paramètres généraux de l\'application', - 'queue_on' => 'Envoi de messages de la file d\'attente (queue)', - 'queue_name' => 'Nom de la queue pour l\'envoi d\'emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Remplir une liste d\'emails séparés par des virgules', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Pays', - 'state' => 'Etat', - 'house' => 'Numéro de maison', - 'flat' => 'Numéro d\'appartement', - 'address1' => 'Adresse 1', - 'address2' => 'Adresse 2', - 'postcode' => 'Code postal', - ], - 'tab' => [ - 'preview_content' => 'Prévisualiser le contenu', - 'full_content' => 'Contenu', - 'images' => 'Images', - 'files' => 'Des dossiers', - 'settings' => 'Paramètres', - 'description' => 'Description', - 'properties' => 'Propriétés', - 'mail' => 'Envoi d\'emails', - 'import' => 'Import', - 'permissions' => 'Gérer les paramètres du site', - 'prices_format' => 'Format de prix', - ], - 'component' => [ - 'property_name_error_404' => 'Voir la page 404', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Le slug est requis', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Afficher le bouton de pagination', - - 'property_redirect_page' => 'Page de redirection', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirection ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Mode du component', - 'mode_submit' => 'Soumission par form', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => ':name créé avec succès', - 'update_success' => ':name mis à jour avec succès', - 'delete_success' => ':name supprimé avec succès', - 'restore_confirm' => 'Voulez-vous restaurer les éléments sélectionnés ?', - 'restore_success' => 'La restauration a été effectuée avec succès', - 'e_not_correct_request' => 'La requête est incorrecte', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Compter les éléments par page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'Vous devez entrer le numéro', - 'pagination_limit' => 'Maximum de boutons', - 'active_class' => 'Classe du bouton actif', - 'button_list' => 'Liste des boutons', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Nom du bouton', - 'button_limit' => 'Afficher le bouton après la page', - 'button_number' => 'Afficher le nombre du bouton', - 'button_class' => 'Classe CSS', - 'last_button' => 'Bouton "Last"', - 'last-more_button' => 'Bouton "More" (avant "Last")', - 'next_button' => 'Bouton "Next"', - 'next-more_button' => 'Bouton "More" (avant "Next")', - 'prev_button' => 'Bouton "Prev"', - 'prev-more_button' => 'Bouton "More" (après "Prev")', - 'first_button' => 'Bouton "First"', - 'first-more_button' => 'Bouton "More" (après "First")', - 'main_button' => 'Bouton "Main"', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Ajouter une valeur de propriété', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Champ de texte (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Champ de texte (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Liste de cases à cocher (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Sélectionner (select)', - 'radio' => 'Radio button', - 'date' => 'Sélecteur de date (datetime)', - 'colorpicker' => 'Sélecteur de couleur (colorpicker)', - 'mediafinder' => 'Fichier', - ], - 'permission' => [ - 'settings' => 'Gérer les paramètres', - ], -]; diff --git a/plugins/lovata/toolbox/lang/hu/lang.php b/plugins/lovata/toolbox/lang/hu/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/hu/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/id/lang.php b/plugins/lovata/toolbox/lang/id/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/id/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/it/lang.php b/plugins/lovata/toolbox/lang/it/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/it/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/ja/lang.php b/plugins/lovata/toolbox/lang/ja/lang.php deleted file mode 100644 index 73e43f71b..000000000 --- a/plugins/lovata/toolbox/lang/ja/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => '開発効率化のためのツールセット', - ], - 'field' => [ - 'id' => 'ID', - 'name' => '名称', - 'title' => 'タイトル', - 'active' => '有効', - 'hidden' => '非表示', - 'code' => 'コード', - 'slug' => 'URL', - 'external_id' => '外部ID', - 'preview_text' => 'プレビューテキスト', - 'preview_image' => 'プレビュー画像', - 'image' => '画像', - 'images' => '画像 (ギャラリー)', - 'icon' => 'Icon', - 'description' => '説明', - 'category' => 'カテゴリ', - 'category_parent_id' => '親カテゴリID', - 'category_parent' => '親カテゴリ', - 'children_category' => '子供のカテゴリー', - 'email' => 'メール', - 'phone' => '電話', - 'moderation' => 'モデレーション', - 'mode' => 'モード', - 'status' => 'ステータス', - 'city' => '市', - 'address' => '住所', - 'street' => '番地', - 'lat' => '緯度', - 'lng' => '経度', - 'type' => 'タイプ', - 'avatar' => 'アバター', - 'property' => 'プロパティ', - 'property_list_value' => 'プロパティ選択肢', - 'property_mode' => 'プロパティモード', - 'property_tab' => 'タブ名', - 'property_is_translatable' => 'プロパティは翻訳可能', - 'key' => 'キー', - 'value' => '値', - 'label' => 'ラベル', - 'date' => '日付', - 'datetime' => '日時', - 'time' => '時間', - 'file' => 'ファイル', - 'decimals' => '小数点以下の桁数', - 'dec_point' => '小数部の区切り文字', - 'thousands_sep' => '千単位の区切り文字', - 'dot' => 'ドット (.)', - 'comma' => 'カンマ (,)', - 'together' => 'マージ', - 'space' => 'スペース', - 'date_begin' => '開始日', - 'date_end' => '終了日', - 'discount_value' => '割引値', - 'discount_type' => '割引タイプ', - 'discount_price' => '割引価格', - 'discount' => '割引', - 'product' => '製品', - 'priority' => '優先度', - 'group' => 'グループ', - 'count' => 'カウント', - 'length' => '長さ', - 'amount' => '量', - 'author' => '作者', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => '並び順', - 'created_at' => '作成日時', - 'updated_at' => '更新日時', - 'deleted_at' => '削除日時', - 'deleted' => '削除済み', - 'empty' => '未設定', - 'password' => 'パスワード', - - 'site_settings' => 'アプリケーション設定', - 'site_settings_description' => 'アプリケーションの共通設定', - 'queue_on' => 'メール送信はキューを使用する', - 'queue_name' => 'メール送信キューの名前', - 'import_queue_on' => 'データインポートにキューを使用する', - 'import_queue_name' => 'データインポートに使用するキューの名称', - 'email_list_description' => '複数のメールアドレスはカンマ区切りで入力してください', - 'import_deactivate' => '要素を無効にする', - 'import_deactivate_description' => 'CSVファイルに含まれないすべての要素は無効化されます', - - 'country' => '国', - 'state' => '都道府県、州、省など', - 'house' => '番地', - 'flat' => '部屋番号', - 'address1' => '住所1', - 'address2' => '住所2', - 'postcode' => '郵便番号', - ], - 'tab' => [ - 'preview_content' => 'プレビュー', - 'full_content' => 'コンテンツ', - 'images' => '画像', - 'settings' => '設定', - 'description' => '説明', - 'properties' => 'プロパティ', - 'mail' => 'メール送信', - 'import' => 'インポート', - 'permissions' => 'サイト設定', - 'prices_format' => '価格書式', - ], - 'component' => [ - 'property_name_error_404' => '404ページ表示', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slugは必須です', - 'property_url_check' => 'Smart url check', - 'pagination' => 'ページネーション', - 'pagination_desc' => 'ページネーションボタン表示', - - 'property_redirect_page' => 'リダイレクト先ページ', - 'property_redirect_success_page' => '成功時リダイレクト先ページ', - 'property_redirect_fail_page' => '失敗時リダイレクト先ページ', - 'property_redirect_on' => 'リダイレクトON', - 'property_flash_on' => 'FlashメッセージON', - 'property_mode' => '動作モード', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => ':name は正常に作成されました', - 'update_success' => ':name は正常に更新されました', - 'delete_success' => ':name は正常に削除されました', - 'restore_confirm' => '選択した項目を復元しますか?', - 'restore_success' => '項目は正常に復元されました', - 'e_not_correct_request' => 'リクエストが不正です', - 'row_is_empty' => 'データがありません', - 'external_id_is_empty' => '外部IDが設定されていません', - 'import_additional_info' => '追加インポート情報', - 'import_active_field_info' => 'CSVファイルに含まれない“active”なフィールドの値は“true”になります', - 'import_preview_image_field_info' => 'プレビュー画像ファイルはストレージディレクトリへの相対パスで入力してください。例)"app/media/image.jpg"', - 'import_images_field_info' => '画像ファイルはストレージディレクトリへの相対パスで入力してください。例)"app/media/image.jpg" 複数指定する場合はカンマ区切りで入力してください', - ], - 'settings' => [ - 'count_per_page' => 'ページあたり表示数', - 'available_count_per_page' => 'ページあたり表示数の選択肢', - 'available_count_per_page_desc' => '選択可能にする数字をカンマ区切りで入力してください', - 'number_validation' => '半角数字を入力してください', - 'pagination_limit' => '最大ページボタン数', - 'active_class' => 'アクティブボタンに設定するクラス', - 'button_list' => '表示するボタン', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-moreからカンマ区切りで入力してください', - 'button_name' => 'ボタンラベル', - 'button_limit' => 'ボタンを表示し始めるページ番号', - 'button_number' => 'ボタンにページ番号を表示', - 'button_class' => 'CSSクラス', - 'last_button' => '"Last"ボタン', - 'last-more_button' => '"More" ("Last"の前)', - 'next_button' => '"Next"ボタン', - 'next-more_button' => '"More" ("Next"の前)', - 'prev_button' => '"Prev"ボタン', - 'prev-more_button' => '"More" ("Prev"の後)', - 'first_button' => '"First"ボタン', - 'first-more_button' => '"More" ("First"の後)', - 'main_button' => '"Main"ボタン', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => '値を追加', - 'import_from_csv' => 'CSVから読込む', - 'export_in_csv' => 'CSVへ書出す', - 'import_button' => 'データの読込み', - ], - 'type' => [ - 'input' => 'テキスト (input)', - 'number' => 'テキスト (number)', - 'textarea' => 'テキスト (textarea)', - 'rich_editor' => 'テキスト (wysiwyg)', - 'single_checkbox' => 'シングル チェックボックス', - 'switch' => 'スイッチ', - 'checkbox' => 'チェックボックス リスト (checkbox)', - 'balloon_selector' => 'バルーン セレクタ', - 'tag_list' => 'タグリスト', - 'select' => 'セレクト', - 'radio' => 'ラジオボタン', - 'date' => '日付ピッカー (datetime)', - 'colorpicker' => 'カラーピッカー (colorpicker)', - 'mediafinder' => 'ファイル', - ], - 'permission' => [ - 'settings' => 'サイト設定管理', - ], -]; diff --git a/plugins/lovata/toolbox/lang/kk/lang.php b/plugins/lovata/toolbox/lang/kk/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/kk/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/ko/lang.php b/plugins/lovata/toolbox/lang/ko/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/ko/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/ky/lang.php b/plugins/lovata/toolbox/lang/ky/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/ky/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/lt/lang.php b/plugins/lovata/toolbox/lang/lt/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/lt/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/lv/lang.php b/plugins/lovata/toolbox/lang/lv/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/lv/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/nb/lang.php b/plugins/lovata/toolbox/lang/nb/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/nb/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/nl/lang.php b/plugins/lovata/toolbox/lang/nl/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/nl/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/pl/lang.php b/plugins/lovata/toolbox/lang/pl/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/pl/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/pt/lang.php b/plugins/lovata/toolbox/lang/pt/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/pt/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/ro/lang.php b/plugins/lovata/toolbox/lang/ro/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/ro/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/ru/lang.php b/plugins/lovata/toolbox/lang/ru/lang.php deleted file mode 100644 index ae7fd3d95..000000000 --- a/plugins/lovata/toolbox/lang/ru/lang.php +++ /dev/null @@ -1,214 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox — это набор хэлперов для ускорения разработки на платформе October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Название', - 'title' => 'Заголовок', - 'active' => 'Активность', - 'hidden' => 'Скрытый', - 'code' => 'Код', - 'slug' => 'URL', - 'external_id' => 'Внешний ID', - 'preview_text' => 'Краткое описание', - 'preview_image' => 'Изображение-превью', - 'image' => 'Изображение', - 'images' => 'Изображения (галерея)', - 'icon' => 'Иконка', - 'description' => 'Описание', - 'category' => 'Категория', - 'category_parent_id' => 'ID родительской категории', - 'category_parent' => 'Родительская категория', - 'children_category' => 'Дочерние категории', - 'email' => 'Email', - 'phone' => 'Контактный телефон', - 'moderation' => 'Модерация', - 'mode' => 'Режим работы', - 'status' => 'Статус', - 'city' => 'Город', - 'address' => 'Адрес', - 'street' => 'Улица', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Тип', - 'avatar' => 'Аватар', - 'property' => 'Свойство', - 'property_list_value' => 'Допустимые значения свойства', - 'property_mode' => 'Вид свойства', - 'property_tab' => 'Название вкладки', - 'property_is_translatable' => 'Свойство доступно для перевода', - 'key' => 'Ключ', - 'value' => 'Значение', - 'label' => 'Метка', - 'date' => 'Дата', - 'datetime' => 'Дата и время', - 'time' => 'Время', - 'file' => 'Файл', - 'decimals' => 'Число знаков после запятой', - 'dec_point' => 'Разделитель дробной части', - 'thousands_sep' => 'Разделитель тысяч', - 'dot' => 'Точка', - 'comma' => 'Запятая', - 'together' => 'Слитно', - 'space' => 'Пробел', - 'date_begin' => 'Дата начала действия', - 'date_end' => 'Дата окончания действия', - 'discount_value' => 'Размер скидки', - 'discount_type' => 'Тип скидки', - 'discount_price' => 'Значение скидки', - 'discount' => 'Скидка', - 'product' => 'Товар', - 'priority' => 'Приоритет', - 'group' => 'Группа', - 'count' => 'Количество', - 'amount' => 'Сумма', - 'author' => 'Автор', - 'link' => 'Ссылка', - 'view_count' => 'Количество просмотров', - 'is_default' => 'По-умолчанию', - 'symbol' => 'Символ', - 'field' => 'Поле', - 'weight' => 'Вес', - 'height' => 'Высота', - 'length' => 'Длина', - 'width' => 'Ширина', - - 'sort_order' => 'Сортировка', - 'created_at' => 'Создано', - 'updated_at' => 'Обновлено', - 'deleted_at' => 'Удалено', - 'deleted' => 'Удаленные', - 'empty' => 'Не выбрано', - 'password' => 'Пароль', - - 'site_settings' => 'Настройки приложения', - 'site_settings_description' => 'Общие настройки приложения', - 'queue_on' => 'Отправка писем используя Queue', - 'queue_name' => 'Название queue для отправки письма', - 'import_queue_on' => 'Использовать queue при обработке импорта', - 'import_queue_name' => 'Название Queue при обработке импорта', - 'email_list_description' => 'Заполните список email адресов, разделенных запятыми', - 'import_deactivate' => 'Деактивировать элементы', - 'import_deactivate_description' => 'Все элементы, которых нет в CSV файле, будут деактивированы.', - - 'country' => 'Страна', - 'state' => 'Регион', - 'house' => 'Номер дома', - 'flat' => 'Номер квартиры', - 'address1' => 'Адрес 1', - 'address2' => 'Адрес 2', - 'postcode' => 'Индекс', - - 'import_file_list' => 'Список файлов импорта', - 'import_from_file' => 'Импорт из файла', - 'import_file_path' => 'Относительный путь из папки "storage" к файлу импорта', - 'import_path_prefix' => 'Префикс полей для этого файла', - 'import_file_namespace' => 'Пространство имен файла', - 'import_image_folder' => 'Относительный путь из папки "storage" к папке с изображениями', - 'import_path_to_list' => 'Путь к узлу со списком элементов', - 'import_path_to_list_example' => 'main/elements/element', - 'import_field_list' => 'Список полей', - 'import_path_to_field' => 'Путь к узлу поля', - 'import_path_to_field_example' => 'fields/field[@code="active"]', - ], - 'tab' => [ - 'preview_content' => 'Превью-контент', - 'full_content' => 'Полный контент', - 'images' => 'Изображения', - 'files' => 'Файлы', - 'settings' => 'Настройки', - 'description' => 'Описание', - 'properties' => 'Свойства', - 'mail' => 'Отправка писем', - 'import' => 'Импорт', - 'permissions' => 'Управление настройками приложения', - 'prices_format' => 'Формат цен', - ], - 'component' => [ - 'property_name_error_404' => 'Отображать 404 страницу', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Параметр Slug обязательный', - 'property_url_check' => 'Умная проверка URL', - 'pagination' => 'Пагинация', - 'pagination_desc' => 'Вывод кнопок пагинации', - - 'property_redirect_page' => 'Страница перенаправления', - 'property_redirect_success_page' => 'Страница перенаправления после успешного выполнения', - 'property_redirect_fail_page' => 'Страница перенаправления после не успешного выполнения', - 'property_redirect_on' => 'Перенаправление вкл.', - 'property_flash_on' => 'Уведомление вкл.', - 'property_mode' => 'Режим работы', - 'mode_submit' => 'Отправка формы', - 'mode_ajax' => 'Ajax', - 'has_wildcard' => 'Часть URL является wildcard параметром', - 'skip_error' => 'Пропустить ошибку "Не найдено"', - ], - 'message' => [ - 'create_success' => 'Создание :name было успешно выполнено', - 'update_success' => 'Редактирование :name было успешно выполнено', - 'delete_success' => 'Удаление :name было успешно выполнено', - 'restore_confirm' => 'Вы действительно хотите восстановить выбранные элементы?', - 'restore_success' => 'Элементы восстановлены', - 'e_not_correct_request' => 'Некорректный запрос', - 'row_is_empty' => 'Пустая строка.', - 'external_id_is_empty' => 'Пустое значение внешнего ID.', - 'import_additional_info' => 'Дополнительная информация о импорте.', - 'import_active_field_info' => 'Значение поля "Активность" будет уставлено в true, если его не передавать в файле CSV.', - 'import_preview_image_field_info' => 'Путь к файлу превью-изображения должен быть указан относительно директории хранилища в вашем проекте. Например: "app/media/image.jpg".', - 'import_images_field_info' => 'Путь к файлам изображениЙ должен быть указан относительно директории хранилища в вашем проекте. Например: "app/media/image.jpg". Пути к файлам должны быть указаны через запятую.', - 'import_from_xml_confirm' => 'Начать импорт из XML файла?', - 'import_from_xml_report' => 'Результаты импорта: создано - :created, обновлено - :updated, пропущено - :skipped, обработано - :processed.', - ], - 'settings' => [ - 'count_per_page' => 'Количество элементов на странице', - 'available_count_per_page' => 'Список допустимых значений для "count_per_page"', - 'available_count_per_page_desc' => 'Укажите список допустимых значений через запятую', - 'number_validation' => 'Необходимо ввести число', - 'pagination_limit' => 'Максимальное количество кнопок пагинации', - 'active_class' => 'Класс активной кнопки', - 'button_list' => 'Список кнопок', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Название кнопки', - 'button_limit' => 'Отображить после страницы', - 'button_number' => 'Отображить имя кнопки как число', - 'button_class' => 'CSS класс', - 'last_button' => '"Последняя"', - 'last-more_button' => '"Еще" (перед "Последняя")', - 'next_button' => '"Следующая"', - 'next-more_button' => '"Еще" (перед "Следующая")', - 'prev_button' => '"Предыдущая"', - 'prev-more_button' => '"Еще" (после "Предыдущая")', - 'first_button' => '"Первая"', - 'first-more_button' => '"Еще" (после "Первая")', - 'main_button' => '"Основная"', - 'slug_is_translatable' => 'URL поддерживает мультиязычность', - ], - 'button' => [ - 'add_property_value' => 'Добавить значение свойства', - 'import_from_csv' => 'Импорт из CSV', - 'export_in_csv' => 'Экспорт в CSV', - 'import_button' => 'Импортировать записи', - 'import_from_xml' => 'Импорт из XML', - ], - 'type' => [ - 'input' => 'Текстовое поле (input)', - 'number' => 'Числовое поле (number)', - 'textarea' => 'Текстовое поле (textarea)', - 'rich_editor' => 'Текстовое поле (wysiwyg)', - 'single_checkbox' => 'Чекбокс', - 'switch' => 'Переключатель', - 'checkbox' => 'Множественный выбор из списка (checkbox)', - 'balloon_selector' => 'Выбор из списка (balloon selector)', - 'tag_list' => 'Множественный выбор из списка (tag list)', - 'select' => 'Выбор из списка (select)', - 'radio' => 'Выбор из списка (radio button)', - 'date' => 'Поле выбора даты и времени (datetime)', - 'colorpicker' => 'Поле выбора цвета (colorpicker)', - 'mediafinder' => 'Файл', - ], - 'permission' => [ - 'settings' => 'Управление настройками', - ], -]; diff --git a/plugins/lovata/toolbox/lang/sk/lang.php b/plugins/lovata/toolbox/lang/sk/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/sk/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/sv/lang.php b/plugins/lovata/toolbox/lang/sv/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/sv/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/tr/lang.php b/plugins/lovata/toolbox/lang/tr/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/tr/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/uk/lang.php b/plugins/lovata/toolbox/lang/uk/lang.php deleted file mode 100644 index d825501b5..000000000 --- a/plugins/lovata/toolbox/lang/uk/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Категорія', - 'category_parent_id' => 'ID батьківської категорії', - 'category_parent' => 'Батьківська категорія', - 'children_category' => 'Категорії дітей', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/vi/lang.php b/plugins/lovata/toolbox/lang/vi/lang.php deleted file mode 100644 index d4743d058..000000000 --- a/plugins/lovata/toolbox/lang/vi/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => 'Toolbox', - 'description' => 'Toolbox is a set of helpers for faster development for October CMS.', - ], - 'field' => [ - 'id' => 'ID', - 'name' => 'Name', - 'title' => 'Title', - 'active' => 'Active', - 'hidden' => 'Hidden', - 'code' => 'Code', - 'slug' => 'URL', - 'external_id' => 'External ID', - 'preview_text' => 'Preview text', - 'preview_image' => 'Preview image', - 'image' => 'Image', - 'images' => 'Images (gallery)', - 'icon' => 'Icon', - 'description' => 'Description', - 'category' => 'Category', - 'category_parent_id' => 'Parent category ID', - 'category_parent' => 'Parent category', - 'children_category' => 'Children categories', - 'email' => 'Email', - 'phone' => 'Phone', - 'moderation' => 'Moderation', - 'mode' => 'Mode', - 'status' => 'Status', - 'city' => 'City', - 'address' => 'Address', - 'street' => 'Street', - 'lat' => 'lat', - 'lng' => 'lng', - 'type' => 'Type', - 'avatar' => 'Avatar', - 'property' => 'Property', - 'property_list_value' => 'Available property values', - 'property_mode' => 'Property mode', - 'property_tab' => 'Tab name', - 'property_is_translatable' => 'Property is translatable', - 'key' => 'Key', - 'value' => 'Value', - 'label' => 'Label', - 'date' => 'Date', - 'datetime' => 'Date and time', - 'time' => 'Time', - 'file' => 'File', - 'decimals' => 'Number of decimal places', - 'dec_point' => 'Fractional part separator', - 'thousands_sep' => 'Thousands separator', - 'dot' => 'Dot', - 'comma' => 'Comma', - 'together' => 'Merge', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => 'Discount value', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/lang/zh/lang.php b/plugins/lovata/toolbox/lang/zh/lang.php deleted file mode 100644 index c410a3f84..000000000 --- a/plugins/lovata/toolbox/lang/zh/lang.php +++ /dev/null @@ -1,191 +0,0 @@ - [ - 'name' => '工具框', - 'description' => '工具箱是一组帮助程序, 用于为 10月 cms 更快地开发。', - ], - 'field' => [ - 'id' => 'ID', - 'name' => '名称', - 'title' => '标题', - 'active' => '活动', - 'hidden' => '隐藏', - 'code' => '代码', - 'slug' => '网址', - 'external_id' => '外部 ID', - 'preview_text' => '预览文本', - 'preview_image' => '预览图片', - 'image' => '图片', - 'images' => '图片库', - 'icon' => 'Icon', - 'description' => '描述', - 'category' => '类别', - 'category_parent_id' => '父类别ID', - 'category_parent' => '父类别', - 'children_category' => '儿童类别', - 'email' => '邮箱', - 'phone' => '手机', - 'moderation' => '调试', - 'mode' => '模式', - 'status' => '状态', - 'city' => '城市', - 'address' => '地址', - 'street' => '街道', - 'lat' => 'Lat', - 'lng' => 'lng', - 'type' => '类型', - 'avatar' => '头像', - 'property' => '属性', - 'property_list_value' => '可用属性', - 'property_mode' => '属性模式', - 'property_tab' => '选项卡名称', - 'property_is_translatable' => '属性是可翻译的', - 'key' => '关键字', - 'value' => '数值', - 'label' => '标签', - 'date' => '日期', - 'datetime' => '日期和时间', - 'time' => '时间', - 'file' => '文件', - 'decimals' => '小数位数:', - 'dec_point' => '小数零件分离器', - 'thousands_sep' => '千位分隔符', - 'dot' => '点', - 'comma' => 'Comma', - 'together' => '合并', - 'space' => 'Space', - 'date_begin' => 'Date of the beginning', - 'date_end' => 'Date of the ending', - 'discount_value' => '折扣价', - 'discount_type' => 'Discount type', - 'discount_price' => 'Discount price', - 'discount' => 'Discount', - 'product' => 'Product', - 'priority' => 'Priority', - 'group' => 'Group', - 'count' => 'Count', - 'length' => 'Length', - 'amount' => 'Amount', - 'author' => 'Author', - 'link' => 'Link', - 'is_default' => 'Is default', - 'symbol' => 'Symbol', - - 'sort_order' => 'Sorting', - 'created_at' => 'Created', - 'updated_at' => 'Updated', - 'deleted_at' => 'Deleted', - 'deleted' => 'deleted', - 'empty' => 'Empty', - 'password' => 'Password', - - 'site_settings' => 'Application settings', - 'site_settings_description' => 'Common settings of application', - 'queue_on' => 'Sending messages from the queue', - 'queue_name' => 'The name of the queue for sending the emails', - 'import_queue_on' => 'Use queue when processing import items', - 'import_queue_name' => 'The name of the queue for processing import items', - 'email_list_description' => 'Fill out list of emails separated by commas', - 'import_deactivate' => 'Deactivate elements', - 'import_deactivate_description' => 'All active elements that are not in CSV file will be deactivated.', - - 'country' => 'Country', - 'state' => 'State', - 'house' => 'House number', - 'flat' => 'Flat number', - 'address1' => 'Address 1', - 'address2' => 'Address 2', - 'postcode' => 'Postcode', - ], - 'tab' => [ - 'preview_content' => 'Preview content', - 'full_content' => 'Content', - 'images' => 'Images', - 'settings' => 'Settings', - 'description' => 'Description', - 'properties' => 'Properties', - 'mail' => 'Sending emails', - 'import' => 'Import', - 'permissions' => 'Manage site settings', - 'prices_format' => 'Price format', - ], - 'component' => [ - 'property_name_error_404' => 'View 404 page', - 'property_slug' => 'Slug', - 'property_slug_required' => 'Slug is required', - 'property_url_check' => 'Smart url check', - 'pagination' => 'Pagination', - 'pagination_desc' => 'Render button of pagination', - - 'property_redirect_page' => 'Redirect page', - 'property_redirect_success_page' => 'Redirect success page', - 'property_redirect_fail_page' => 'Redirect fail page', - 'property_redirect_on' => 'Redirect ON', - 'property_flash_on' => 'Flash ON', - 'property_mode' => 'Component mode', - 'mode_submit' => 'Form submit', - 'mode_ajax' => 'Ajax', - ], - 'message' => [ - 'create_success' => 'Create :name was successfully', - 'update_success' => 'Update :name was successfully', - 'delete_success' => 'Delete :name was successfully', - 'restore_confirm' => 'Do you want to restore selected items?', - 'restore_success' => 'Restore elements was successfully', - 'e_not_correct_request' => 'Request is not correct', - 'row_is_empty' => 'Row is empty.', - 'external_id_is_empty' => 'External ID is empty.', - 'import_additional_info' => 'Additional import information.', - 'import_active_field_info' => 'Value of “active” field will be set to “true”, if it is not in CSV file.', - 'import_preview_image_field_info' => 'Path to preview image file must be set relative to storage directory of your project. For example: "app/media/image.jpg".', - 'import_images_field_info' => 'Path to image file must be set relative to storage directory of your project. For example: "app/media/image.jpg". Paths to image files must be separated by commas.', - ], - 'settings' => [ - 'count_per_page' => 'Count elements per page', - 'available_count_per_page' => 'List of available values for "count_per_page"', - 'available_count_per_page_desc' => 'Set allowed values separated by commas.', - 'number_validation' => 'You must enter the number', - 'pagination_limit' => 'Max count buttons', - 'active_class' => 'Class for active button', - 'button_list' => 'Button list', - 'button_list_description' => 'main,first,first-more,prev,prev-more,next,next-more,last,last-more', - 'button_name' => 'Button name', - 'button_limit' => 'Show button after page', - 'button_number' => 'Show number button name', - 'button_class' => 'CSS class', - 'last_button' => '"Last" button', - 'last-more_button' => '"More" (before "Last")', - 'next_button' => '"Next" button', - 'next-more_button' => '"More" (before "Next")', - 'prev_button' => '"Prev" button', - 'prev-more_button' => '"More" (after "Prev")', - 'first_button' => '"First" button', - 'first-more_button' => '"More" (after "First")', - 'main_button' => '"Main" button', - 'slug_is_translatable' => 'URL is translatable', - ], - 'button' => [ - 'add_property_value' => 'Add property value', - 'import_from_csv' => 'Import from CSV', - 'export_in_csv' => 'Export in CSV', - 'import_button' => 'Import records', - ], - 'type' => [ - 'input' => 'Text field (input)', - 'number' => 'Text field (number)', - 'textarea' => 'Text field (textarea)', - 'rich_editor' => 'Text field (wysiwyg)', - 'single_checkbox' => 'Single checkbox', - 'switch' => 'Switch', - 'checkbox' => 'Checkbox list (checkbox)', - 'balloon_selector' => 'Balloon selector', - 'tag_list' => 'Tag list', - 'select' => 'Select', - 'radio' => 'Radio button', - 'date' => 'Date picker (datetime)', - 'colorpicker' => 'Color picker (colorpicker)', - 'mediafinder' => 'File', - ], - 'permission' => [ - 'settings' => 'Manage settings', - ], -]; diff --git a/plugins/lovata/toolbox/models/CommonProperty.php b/plugins/lovata/toolbox/models/CommonProperty.php deleted file mode 100644 index f473b4b44..000000000 --- a/plugins/lovata/toolbox/models/CommonProperty.php +++ /dev/null @@ -1,497 +0,0 @@ - [\System\Models\File::class, 'public' => false], - ]; - - /** - * Get widget data - * @return array - */ - public function getWidgetData() - { - $arResult = []; - - switch ($this->type) { - case self::TYPE_INPUT: - $arResult = $this->getInputFieldSettings(); - break; - case self::TYPE_NUMBER: - $arResult = $this->getNumberFieldSettings(); - break; - case self::TYPE_TEXT_AREA: - $arResult = $this->getTextareaFieldSettings(); - break; - case self::TYPE_RICH_EDITOR: - $arResult = $this->getRichEditorFieldSettings(); - break; - case self::TYPE_SINGLE_CHECKBOX: - $arResult = $this->getSingleCheckboxFieldSettings(); - break; - case self::TYPE_SWITCH: - $arResult = $this->getSwitchFieldSettings(); - break; - case self::TYPE_CHECKBOX: - $arResult = $this->getCheckboxListSettings(); - break; - case self::TYPE_BALLOON: - $arResult = $this->getBalloonSettings(); - break; - case self::TYPE_TAG_LIST: - $arResult = $this->getTagListSettings(); - break; - case self::TYPE_SELECT: - $arResult = $this->getSelectSettings(); - break; - case self::TYPE_RADIO: - $arResult = $this->getRadioSettings(); - break; - case self::TYPE_DATE: - $arResult = $this->getDateSettings(); - break; - case self::TYPE_COLOR_PICKER: - $arResult = $this->getColorPickerSettings(); - break; - /** FILE FINDER TYPE */ - case self::TYPE_MEDIA_FINDER: - $arResult = $this->getMediaFinderSettings(); - break; - default: - return $arResult; - } - - //Get common widget settings - if (empty($arResult)) { - return $arResult; - } - - $arResult = array_merge($arResult, $this->getDefaultConfigSettings()); - - return $arResult; - } - - /** - * Get property variants from settings - * @return array - */ - public function getPropertyVariants() - { - $arValueList = []; - - //Get and check settings array - $arSettings = $this->settings; - if (empty($arSettings) || !isset($arSettings['list']) || empty($arSettings['list'])) { - return $arValueList; - } - - //Get property value variants - foreach ($arSettings['list'] as $arValue) { - if (!isset($arValue['value']) || empty($arValue['value'])) { - continue; - } - - $arValueList[$arValue['value']] = $arValue['value']; - } - - natsort($arValueList); - - return $arValueList; - } - - /** - * Check, property is translatable flag - * @return bool - */ - public function isTranslatable() - { - return (bool) $this->getSettingValue('is_translatable'); - } - - /** - * Get type list - * @return array - */ - public function getTypeOptions() - { - $sLangPath = 'lovata.toolbox::lang.type.'; - - return [ - self::TYPE_INPUT => Lang::get($sLangPath.self::TYPE_INPUT), - self::TYPE_NUMBER => Lang::get($sLangPath.self::TYPE_NUMBER), - self::TYPE_TEXT_AREA => Lang::get($sLangPath.self::TYPE_TEXT_AREA), - self::TYPE_RICH_EDITOR => Lang::get($sLangPath.self::TYPE_RICH_EDITOR), - self::TYPE_SINGLE_CHECKBOX => Lang::get($sLangPath.self::TYPE_SINGLE_CHECKBOX), - self::TYPE_SWITCH => Lang::get($sLangPath.self::TYPE_SWITCH), - self::TYPE_CHECKBOX => Lang::get($sLangPath.self::TYPE_CHECKBOX), - self::TYPE_TAG_LIST => Lang::get($sLangPath.self::TYPE_TAG_LIST), - self::TYPE_SELECT => Lang::get($sLangPath.self::TYPE_SELECT), - self::TYPE_RADIO => Lang::get($sLangPath.self::TYPE_RADIO), - self::TYPE_BALLOON => Lang::get($sLangPath.self::TYPE_BALLOON), - self::TYPE_DATE => Lang::get($sLangPath.self::TYPE_DATE), - self::TYPE_COLOR_PICKER => Lang::get($sLangPath.self::TYPE_COLOR_PICKER), - self::TYPE_MEDIA_FINDER => Lang::get($sLangPath.self::TYPE_MEDIA_FINDER), - ]; - } - - /** - * Import item list from CSV file - * @param array $arElementList - * @param null $sSessionKey - * @throws \Throwable - */ - public function importData($arElementList, $sSessionKey = null) - { - } - - /** - * Get field setting with type "text" - * @return array - */ - protected function getInputFieldSettings() : array - { - $arResult = [ - 'type' => 'text', - ]; - - if ($this->isTranslatable()) { - $arResult['type'] = 'mltext'; - } - - return $arResult; - } - - /** - * Get field setting with type "number" - * @return array - */ - protected function getNumberFieldSettings() : array - { - $arResult = [ - 'type' => 'number', - ]; - - return $arResult; - } - - /** - * Get field setting with type "textarea" - * @return array - */ - protected function getTextareaFieldSettings() : array - { - $arResult = [ - 'type' => 'textarea', - 'size' => 'large', - ]; - - if ($this->isTranslatable()) { - $arResult['type'] = 'mltextarea'; - } - - return $arResult; - } - - /** - * Get field setting with type "rich editor" - * @return array - */ - protected function getRichEditorFieldSettings() : array - { - $arResult = [ - 'type' => 'richeditor', - 'size' => 'large', - ]; - - if ($this->isTranslatable()) { - $arResult['type'] = 'mlricheditor'; - } - - return $arResult; - } - - /** - * Get field setting with type "checkbox" - * @return array - */ - protected function getSingleCheckboxFieldSettings() : array - { - $arResult = [ - 'type' => 'checkbox', - ]; - - return $arResult; - } - - /** - * Get field setting with type "switch" - * @return array - */ - protected function getSwitchFieldSettings() : array - { - $arResult = [ - 'type' => 'switch', - ]; - - return $arResult; - } - - /** - * Get field setting with type "checkbox list" - * @return array - */ - protected function getCheckboxListSettings() : array - { - //Get property variants - $arValueList = $this->getPropertyVariants(); - if (empty($arValueList)) { - return []; - } - - $arResult = [ - 'type' => 'checkboxlist', - 'options' => $arValueList, - ]; - - return $arResult; - } - - /** - * Get field setting with type "balloon-selector" - * @return array - */ - protected function getBalloonSettings() : array - { - //Get property variants - $arValueList = $this->getPropertyVariants(); - if (empty($arValueList)) { - return []; - } - - $arResult = [ - 'type' => 'balloon-selector', - 'options' => $arValueList, - ]; - - return $arResult; - } - - /** - * Get field setting with type "tag list" - * @return array - */ - protected function getTagListSettings() : array - { - //Get property variants - $arValueList = $this->getPropertyVariants(); - if (empty($arValueList)) { - return []; - } - - $arResult = [ - 'type' => 'taglist', - 'options' => $arValueList, - ]; - - return $arResult; - } - - /** - * Get field setting with type "select" - * @return array - */ - protected function getSelectSettings() : array - { - //Get property variants - $arValueList = $this->getPropertyVariants(); - if (empty($arValueList)) { - return []; - } - - $arResult = [ - 'type' => 'dropdown', - 'emptyOption' => 'lovata.toolbox::lang.field.empty', - 'options' => $arValueList, - ]; - - return $arResult; - } - - /** - * Get field setting with type "radio" - * @return array - */ - protected function getRadioSettings() : array - { - //Get property variants - $arValueList = $this->getPropertyVariants(); - if (empty($arValueList)) { - return []; - } - - $arResult = [ - 'type' => 'radio', - 'options' => $arValueList, - ]; - - return $arResult; - } - - /** - * Get field setting with type "date" - * @return array - */ - protected function getDateSettings() : array - { - $sMode = $this->getSettingValue('datepicker'); - if (!in_array($sMode, ['date', 'time', 'datetime'])) { - return []; - } - - $arResult = [ - 'type' => 'datepicker', - 'mode' => $sMode, - ]; - - return $arResult; - } - - /** - * Get field setting with type "color picker" - * @return array - */ - protected function getColorPickerSettings() : array - { - $arResult = [ - 'type' => self::TYPE_COLOR_PICKER, - ]; - - return $arResult; - } - - /** - * Get field setting with type "media finder" - * @return array - */ - protected function getMediaFinderSettings() : array - { - $sMode = $this->getSettingValue(self::TYPE_MEDIA_FINDER); - if (!in_array($sMode, ['file', 'image'])) { - return []; - } - - $arResult = [ - 'type' => self::TYPE_MEDIA_FINDER, - 'mode' => $sMode, - ]; - - return $arResult; - } - - /** - * Get default config field settings - * @return array - */ - protected function getDefaultConfigSettings() : array - { - $arResult = [ - 'tab' => 'lovata.toolbox::lang.tab.properties', - 'span' => 'left', - 'label' => $this->name, - 'comment' => $this->description, - ]; - - //Get property tab - $sTabName = $this->getSettingValue('tab'); - if (!empty($sTabName)) { - $arResult['tab'] = $sTabName; - } - - return $arResult; - } - /** - * Get property settings value - * @param string $sKey - * @return mixed|null - */ - protected function getSettingValue($sKey) - { - $arSettings = $this->settings; - if (empty($sKey) || empty($arSettings) || !isset($arSettings[$sKey])) { - return null; - } - - return $arSettings[$sKey]; - } -} diff --git a/plugins/lovata/toolbox/models/CommonSettings.php b/plugins/lovata/toolbox/models/CommonSettings.php deleted file mode 100644 index e28796589..000000000 --- a/plugins/lovata/toolbox/models/CommonSettings.php +++ /dev/null @@ -1,61 +0,0 @@ -first(); - if (empty($obSettings)) { - static::$arCacheValue[$sCode] = static::get($sCode, $sDefaultValue); - - return static::$arCacheValue[$sCode]; - } - - $sValue = $obSettings->$sCode; - if ($sValue === null) { - return $sDefaultValue; - } - - static::$arCacheValue[$sCode] = $sValue; - - return $sValue; - } -} diff --git a/plugins/lovata/toolbox/models/Settings.php b/plugins/lovata/toolbox/models/Settings.php deleted file mode 100644 index b14e9b3ac..000000000 --- a/plugins/lovata/toolbox/models/Settings.php +++ /dev/null @@ -1,15 +0,0 @@ - - - - - ./tests/unit - - - -         -            ./classes/collection/CollectionStore.php -            ./classes/collection/ElementCollection.php -            ./classes/item/ElementItem.php -            ./classes/item/MainItem.php -         -     - - - - - - \ No newline at end of file diff --git a/plugins/lovata/toolbox/plugin.yaml b/plugins/lovata/toolbox/plugin.yaml deleted file mode 100644 index 68c23d2aa..000000000 --- a/plugins/lovata/toolbox/plugin.yaml +++ /dev/null @@ -1,11 +0,0 @@ -plugin: - name: 'lovata.toolbox::lang.plugin.name' - description: 'lovata.toolbox::lang.plugin.description' - author: Lovata - icon: oc-icon-star - homepage: 'https://github.com/lovata/oc-toolbox-plugin' -permissions: - toolbox-menu-settings: - tab: 'lovata.toolbox::lang.tab.permissions' - label: 'lovata.toolbox::lang.permission.settings' - order: 100 \ No newline at end of file diff --git a/plugins/lovata/toolbox/tests/CommonTest.php b/plugins/lovata/toolbox/tests/CommonTest.php deleted file mode 100644 index a878dd510..000000000 --- a/plugins/lovata/toolbox/tests/CommonTest.php +++ /dev/null @@ -1,49 +0,0 @@ -getPlugins()); - foreach ($arPluginList as $sPluginKey) { - if(!preg_match('%^lovata.*%i', $sPluginKey)) { - continue; - } - - $obManager->refreshPlugin($sPluginKey); - } - - $obManager->bootAll(true); - $obManager->registerAll(true); - } - - public function tearDown(): void - { - parent::tearDown(); - - // Get the plugin manager - $obManager = PluginManager::instance(); - - // Ensure that plugins are registered again for the next test - $obManager->unregisterAll(); - } -} diff --git a/plugins/lovata/toolbox/tests/unit/CollectionStoreTest.php b/plugins/lovata/toolbox/tests/unit/CollectionStoreTest.php deleted file mode 100644 index 8722a5079..000000000 --- a/plugins/lovata/toolbox/tests/unit/CollectionStoreTest.php +++ /dev/null @@ -1,42 +0,0 @@ -saved('test')); - - CollectionStore::instance()->save('', $obList); - self::assertEquals(null, CollectionStore::instance()->saved('')); - - CollectionStore::instance()->save('test', $obList); - - $obList->merge([2]); - $obSavedList = CollectionStore::instance()->saved('test'); - - self::assertEquals([1], $obSavedList->getIDList()); - - $obSavedList->clear(); - - self::assertEquals([1,2], $obList->getIDList()); - } -} \ No newline at end of file diff --git a/plugins/lovata/toolbox/tests/unit/CollectionTest.php b/plugins/lovata/toolbox/tests/unit/CollectionTest.php deleted file mode 100644 index 4b215a52a..000000000 --- a/plugins/lovata/toolbox/tests/unit/CollectionTest.php +++ /dev/null @@ -1,734 +0,0 @@ -arElementIDList); - self::assertEquals($this->arElementIDList, $obCollection->getIDList(), $sMessage); - - $sMessage = 'Error in "make" collection method'; - self::assertEquals(true, $obCollection->isNotEmpty(), $sMessage); - self::assertEquals(false, $obCollection->isEmpty(), $sMessage); - } - - /** - * Test set method in item collection class - */ - public function testSetMethod() - { - $sMessage = 'Error in "set" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - self::assertEquals($this->arElementIDList, $obCollection->getIDList(), $sMessage); - - $obCollection->set($this->arIntersectIDList); - self::assertEquals($this->arIntersectIDList, $obCollection->getIDList(), $sMessage); - } - - /** - * Test "has" method in item collection class - */ - public function testHasMethod() - { - $sMessage = 'Error in "has" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $iElementID = array_shift($this->arElementIDList); - self::assertEquals(true, $obCollection->has($iElementID), $sMessage); - self::assertEquals(false, $obCollection->has(null), $sMessage); - } - - /** - * Test find method in item collection class - */ - public function testFindMethod() - { - $sMessage = 'Error in "find" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $obItem = $obCollection->find($this->arElementIDList[0]); - self::assertEquals($this->arElementIDList[0], $obItem->id, $sMessage); - } - - /** - * Test clear method in item collection class - */ - public function testClearMethod() - { - $sMessage = 'Error in "clear" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->clear(); - - self::assertEquals([], $obCollection->getIDList(), $sMessage); - } - - /** - * Test count method in item collection class - */ - public function testCountMethod() - { - $sMessage = 'Error in "count" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - self::assertEquals(count($this->arElementIDList), $obCollection->count(), $sMessage); - - $obCollection = TestCollection::make(); - self::assertEquals(0, $obCollection->count(), $sMessage); - } - - /** - * Test intersect method in item collection class - */ - public function testIntersectMethod() - { - $sMessage = 'Error in "intersect" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->intersect($this->arIntersectIDList); - - $arResult = array_intersect($this->arElementIDList, $this->arIntersectIDList); - $arResult = array_values($arResult); - - self::assertEquals($arResult, $obCollection->getIDList(), $sMessage); - - //Test intersect with empty array - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->intersect(null); - - self::assertEquals([], $obCollection->getIDList(), $sMessage); - - //Test intersect with clear collection - $obCollection = TestCollection::make(); - $obCollection->intersect($this->arIntersectIDList); - - self::assertEquals($this->arIntersectIDList, $obCollection->getIDList(), $sMessage); - - $obCollection = TestCollection::make()->intersect(null); - $obCollection->intersect($this->arIntersectIDList); - - self::assertEquals([], $obCollection->getIDList(), $sMessage); - } - - /** - * Test applySorting method in item collection class - */ - public function testApplySortingMethod() - { - $arSortedList = [5,3,4, 12, 20]; - - $sMessage = 'Error in "applySorting" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->applySorting($arSortedList); - - $arResult = array_intersect($arSortedList, $this->arElementIDList); - - self::assertEquals($arResult, $obCollection->getIDList(), $sMessage); - - //Test intersect with empty array - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->applySorting(null); - - self::assertEquals([], $obCollection->getIDList(), $sMessage); - - //Test intersect with clear collection - $obCollection = TestCollection::make(); - $obCollection->applySorting($this->arIntersectIDList); - - self::assertEquals($this->arIntersectIDList, $obCollection->getIDList(), $sMessage); - - $obCollection = TestCollection::make()->intersect(null); - $obCollection->applySorting($arSortedList); - - self::assertEquals([], $obCollection->getIDList(), $sMessage); - } - - /** - * Test merge method in item collection class - */ - public function testMergeMethod() - { - $sMessage = 'Error in "merge" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->merge($this->arIntersectIDList); - - $arResult = array_merge($this->arElementIDList, $this->arIntersectIDList); - $arResult = array_unique($arResult); - $arResult = array_values($arResult); - - self::assertEquals($arResult, $obCollection->getIDList(), $sMessage); - - //test merge with empty array - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->merge(null); - - self::assertEquals($this->arElementIDList, $obCollection->getIDList(), $sMessage); - - //test merge with empty collection - $obCollection = TestCollection::make(); - $obCollection->merge($this->arIntersectIDList); - - self::assertEquals($this->arIntersectIDList, $obCollection->getIDList(), $sMessage); - } - - /** - * Test diff method in item collection class - */ - public function testDiffMethod() - { - $sMessage = 'Error in "diff" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->diff($this->arIntersectIDList); - - $arResult = array_diff($this->arElementIDList, $this->arIntersectIDList); - - self::assertEquals($arResult, $obCollection->getIDList(), $sMessage); - - //Test method with empty array - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->diff(null); - - self::assertEquals($this->arElementIDList, $obCollection->getIDList(), $sMessage); - - //Test method empty diff result - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->diff($this->arElementIDList); - - self::assertEquals([], $obCollection->getIDList(), $sMessage); - } - - /** - * Test all method in item collection class - */ - public function testAllMethod() - { - $sMessage = 'Error in "all" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $arElementIDList = $this->arElementIDList; - $arResult = $obCollection->all(); - foreach ($arResult as $iKey => $obItem) { - self::assertEquals(array_shift($arElementIDList), $obItem->id, $sMessage); - } - - $obCollection = TestCollection::make(); - - $arResult = $obCollection->all(); - self::assertEquals([], $arResult, $sMessage); - } - - /** - * Test take method in item collection class - */ - public function testTakeMethod() - { - $sMessage = 'Error in "take" collection method'; - - $obCollection = TestCollection::make([]); - $arResult = $obCollection->take(2); - self::assertEquals([], $arResult, $sMessage); - - $obCollection = TestCollection::make($this->arElementIDList); - - $arElementIDList = $this->arElementIDList; - $arResult = $obCollection->take(null); - - self::assertEquals(count($arElementIDList), count($arResult), $sMessage); - foreach ($arResult as $iKey => $obItem) { - self::assertEquals(array_shift($arElementIDList), $obItem->id, $sMessage); - } - - $arElementIDList = $this->arElementIDList; - $arResult = $obCollection->take(2); - - self::assertEquals(2, count($arResult), $sMessage); - foreach ($arResult as $iKey => $obItem) { - self::assertEquals(array_shift($arElementIDList), $obItem->id, $sMessage); - } - - $arElementIDList = $this->arElementIDList; - $arResult = $obCollection->skip(1)->take(2); - - array_shift($arElementIDList); - self::assertEquals(2, count($arResult), $sMessage); - foreach ($arResult as $iKey => $obItem) { - self::assertEquals(array_shift($arElementIDList), $obItem->id, $sMessage); - } - - $arResult = $obCollection->skip(10)->take(2); - self::assertEquals([], $arResult, $sMessage); - } - - /** - * Test exclude method in item collection class - */ - public function testExcludeMethod() - { - $sMessage = 'Error in "exclude" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $obItem = $obCollection->find(3); - self::assertEquals(true, $obItem->isNotEmpty(), $sMessage); - - $obCollection->exclude(3); - - $obItem = $obCollection->find(3); - self::assertEquals(true, $obItem->isEmpty(), $sMessage); - - //Exclude from empty collection - $obCollection = TestCollection::make(); - $obCollection->exclude(3); - - self::assertEquals(true, $obItem->isEmpty(), $sMessage); - - //Exclude missing element - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->exclude(15); - - self::assertEquals(count($this->arElementIDList), $obCollection->count(), $sMessage); - } - - /** - * Test random method in item collection class - */ - public function testRandomMethod() - { - $sMessage = 'Error in "random" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $arResult = $obCollection->random(1); - $obItem = array_shift($arResult); - self::assertEquals(true, $obCollection->has($obItem->id), $sMessage); - - $arResult = $obCollection->random(-1); - $obItem = array_shift($arResult); - self::assertEquals(true, $obCollection->has($obItem->id), $sMessage); - - $arResult = $obCollection->random($obCollection->count() + 1); - self::assertEquals($obCollection->count(), count($arResult), $sMessage); - - $obCollection = TestCollection::make(); - - $arResult = $obCollection->random(1); - self::assertEquals([], $arResult, $sMessage); - } - - /** - * Test page method in item collection class - */ - public function testPageMethod() - { - $sMessage = 'Error in "page" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $arElementIDList = $this->arElementIDList; - $arResult = $obCollection->page(2, 1); - - self::assertEquals(1, count($arResult), $sMessage); - - array_shift($arElementIDList); - foreach ($arResult as $iKey => $obItem) { - self::assertEquals(array_shift($arElementIDList), $obItem->id, $sMessage); - } - - $arResult = $obCollection->page(-1, 1); - - self::assertEquals(1, count($arResult), $sMessage); - - $arElementIDList = $this->arElementIDList; - foreach ($arResult as $iKey => $obItem) { - self::assertEquals(array_shift($arElementIDList), $obItem->id, $sMessage); - } - - $arResult = $obCollection->page(1, -1); - self::assertEquals($obCollection->count(), count($arResult), $sMessage); - } - - /** - * Test first method in item collection class - */ - public function testFirstMethod() - { - $sMessage = 'Error in "first" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $obItem = $obCollection->first(); - self::assertEquals($this->arElementIDList[0], $obItem->id, $sMessage); - self::assertEquals(count($this->arElementIDList), $obCollection->count(), $sMessage); - - $obCollection = TestCollection::make(); - - $obItem = $obCollection->first(); - self::assertEquals(true, $obItem->isEmpty(), $sMessage); - } - - /** - * Test last method in item collection class - */ - public function testLastMethod() - { - $sMessage = 'Error in "last" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $obItem = $obCollection->last(); - self::assertEquals($this->arElementIDList[count($this->arElementIDList) -1], $obItem->id, $sMessage); - self::assertEquals(count($this->arElementIDList), $obCollection->count(), $sMessage); - - $obCollection = TestCollection::make(); - - $obItem = $obCollection->last(); - self::assertEquals(true, $obItem->isEmpty(), $sMessage); - } - - /** - * Test shift method in item collection class - */ - public function testShiftMethod() - { - $sMessage = 'Error in "shift" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $obItem = $obCollection->shift(); - self::assertEquals(array_shift($this->arElementIDList), $obItem->id, $sMessage); - self::assertEquals(count($this->arElementIDList), $obCollection->count(), $sMessage); - - $obCollection = TestCollection::make(); - - $obItem = $obCollection->shift(); - self::assertEquals(true, $obItem->isEmpty(), $sMessage); - } - - /** - * Test unshift method in item collection class - */ - public function testUnshiftMethod() - { - $sMessage = 'Error in "unshift" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $obCollection->unshift(null); - self::assertEquals(count($this->arElementIDList), $obCollection->count(), $sMessage); - - $obCollection->unshift(10); - - $obItem = $obCollection->first(); - self::assertEquals(10, $obItem->id, $sMessage); - - $obCollection = TestCollection::make(); - - $obCollection->unshift(10); - $obItem = $obCollection->first(); - self::assertEquals(10, $obItem->id, $sMessage); - self::assertEquals(1, $obCollection->count(), $sMessage); - } - - - /** - * Test push method in item collection class - */ - public function testPushMethod() - { - $sMessage = 'Error in "push" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $obCollection->push(null); - self::assertEquals(count($this->arElementIDList), $obCollection->count(), $sMessage); - - $obCollection->push(10); - - $obItem = $obCollection->last(); - self::assertEquals(10, $obItem->id, $sMessage); - - $obCollection = TestCollection::make(); - - $obCollection->push(10); - $obItem = $obCollection->last(); - self::assertEquals(10, $obItem->id, $sMessage); - self::assertEquals(1, $obCollection->count(), $sMessage); - } - - /** - * Test pop method in item collection class - */ - public function testPopMethod() - { - $sMessage = 'Error in "pop" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $obItem = $obCollection->pop(); - self::assertEquals(array_pop($this->arElementIDList), $obItem->id, $sMessage); - self::assertEquals(count($this->arElementIDList), $obCollection->count(), $sMessage); - - $obCollection = TestCollection::make(); - - $obItem = $obCollection->pop(); - self::assertEquals(true, $obItem->isEmpty(), $sMessage); - } - - /** - * Test pluck method in item collection class - */ - public function testPluckMethod() - { - $sMessage = 'Error in "pluck" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $arResult = $obCollection->pluck('id'); - self::assertEquals($this->arElementIDList, $arResult, $sMessage); - - $obCollection = TestCollection::make(); - - $arResult = $obCollection->pluck('id'); - self::assertEquals(null, $arResult, $sMessage); - } - - /** - * Test implode method in item collection class - */ - public function testImplodeMethod() - { - $sMessage = 'Error in "implode" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - $sResult = $obCollection->implode('id'); - self::assertEquals(implode(', ', $this->arElementIDList), $sResult, $sMessage); - - $sResult = $obCollection->implode('id', '-'); - self::assertEquals(implode('-', $this->arElementIDList), $sResult, $sMessage); - - $obCollection = TestCollection::make(); - - $sResult = $obCollection->implode('id'); - self::assertEquals(null, $sResult, $sMessage); - } - - /** - * Test getNearestNext method in item collection class - */ - public function testGetNearestNextMethod() - { - $sMessage = 'Error in "getNearestNext" collection method'; - - $obCollection = TestCollection::make(); - - //Test method with empty collection - $obResult = $obCollection->getNearestNext(1); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - //Get not empty collection - $obCollection = TestCollection::make($this->arElementIDList); - - //Test method with empty data - $obResult = $obCollection->getNearestNext(null); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - $obResult = $obCollection->getNearestNext(1, 0); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - $obResult = $obCollection->getNearestNext(1, -1); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - $obResult = $obCollection->getNearestNext(100); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - //Get nearest elements #1 - $obResult = $obCollection->getNearestNext(1); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(1, $obResult->count(), $sMessage); - - $obItem = $obResult->first(); - self::assertInstanceOf(TestItem::class, $obItem, $sMessage); - self::assertEquals(2, $obItem->id, $sMessage); - - //Get nearest elements #2 - $obResult = $obCollection->getNearestNext(5); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - //Get nearest elements #3 - $obResult = $obCollection->getNearestNext(4, 2); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(1, $obResult->count(), $sMessage); - - $obItem = $obResult->first(); - self::assertInstanceOf(TestItem::class, $obItem, $sMessage); - self::assertEquals(5, $obItem->id, $sMessage); - - //Get nearest elements #4 - $obResult = $obCollection->getNearestNext(4, 2, true); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(2, $obResult->count(), $sMessage); - - $obItem = $obResult->last(); - self::assertInstanceOf(TestItem::class, $obItem, $sMessage); - self::assertEquals(1, $obItem->id, $sMessage); - - //Get nearest elements #10 - $obResult = $obCollection->getNearestNext(10, 2, true); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(0, $obResult->count(), $sMessage); - } - - /** - * Test getNearestPrev method in item collection class - */ - public function testGetNearestPrevMethod() - { - $sMessage = 'Error in "getNearestPrev" collection method'; - - $obCollection = TestCollection::make(); - - //Test method with empty collection - $obResult = $obCollection->getNearestPrev(1); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - //Get not empty collection - $obCollection = TestCollection::make($this->arElementIDList); - - //Test method with empty data - $obResult = $obCollection->getNearestPrev(null); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - $obResult = $obCollection->getNearestPrev(1, 0); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - $obResult = $obCollection->getNearestPrev(1, -1); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - $obResult = $obCollection->getNearestPrev(100); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - //Get nearest elements #1 - $obResult = $obCollection->getNearestPrev(5); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(1, $obResult->count(), $sMessage); - - $obItem = $obResult->first(); - self::assertInstanceOf(TestItem::class, $obItem, $sMessage); - self::assertEquals(4, $obItem->id, $sMessage); - - //Get nearest elements #2 - $obResult = $obCollection->getNearestPrev(1); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(true, $obResult->isEmpty(), $sMessage); - - //Get nearest elements #3 - $obResult = $obCollection->getNearestPrev(2, 2); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(1, $obResult->count(), $sMessage); - - $obItem = $obResult->first(); - self::assertInstanceOf(TestItem::class, $obItem, $sMessage); - self::assertEquals(1, $obItem->id, $sMessage); - - //Get nearest elements #4 - $obResult = $obCollection->getNearestPrev(2, 2, true); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(2, $obResult->count(), $sMessage); - - $obItem = $obResult->last(); - self::assertInstanceOf(TestItem::class, $obItem, $sMessage); - self::assertEquals(5, $obItem->id, $sMessage); - - //Get nearest elements #10 - $obResult = $obCollection->getNearestPrev(10, 2, true); - - self::assertInstanceOf(TestCollection::class, $obResult, $sMessage); - self::assertEquals(0, $obResult->count(), $sMessage); - } - - /** - * Test save/saved method in item collection class - */ - public function testSaveMethod() - { - $sMessage = 'Error in "save" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - $obCollection->save('test'); - - $obCollection = TestCollection::make()->saved('test'); - self::assertEquals($this->arElementIDList, $obCollection->getIDList(), $sMessage); - - $obCollection->save(null); - - $obCollection = TestCollection::make()->saved(null); - self::assertEquals(null, $obCollection, $sMessage); - } - - /** - * Test debug method in item collection class - */ - public function testDebugMethod() - { - $sMessage = 'Error in "debug" collection method'; - $obCollection = TestCollection::make($this->arElementIDList); - - self::assertEquals($obCollection, $obCollection->debug(), $sMessage); - } - - /** - * Test iterator interface in item collection class - */ - public function testIteratorInterface() - { - $sMessage = 'Error in iteration collection'; - $obCollection = TestCollection::make($this->arElementIDList); - - foreach ($obCollection as $iKey => $obItem) { - self::assertEquals(array_shift($this->arElementIDList), $obItem->id, $sMessage); - } - - $obCollection = TestCollection::make([]); - - foreach ($obCollection as $iKey => $obItem) { - self::assertEquals(array_shift($this->arElementIDList), $obItem->id, $sMessage); - } - } -} \ No newline at end of file diff --git a/plugins/lovata/toolbox/tests/unit/ItemTest.php b/plugins/lovata/toolbox/tests/unit/ItemTest.php deleted file mode 100644 index 031231f6f..000000000 --- a/plugins/lovata/toolbox/tests/unit/ItemTest.php +++ /dev/null @@ -1,82 +0,0 @@ -id, 'Error in "make" item method'); - self::assertEquals(false, empty($obItem->id), 'Error in "__isset" item method'); - - $obItem = TestItem::makeNoCache(1); - self::assertEquals(1, $obItem->id, 'Error in "makeNoCache" item method'); - - $arItemData = [ - 'id' => 1, - 'test_id' => 2, - 'title' => 'title1', - 'test_list_id' => [1,2], - ]; - - self::assertEquals($arItemData, $obItem->toArray(), 'Error in "toArray" item method'); - - self::assertInstanceOf(\Model::class, $obItem->getObject(), 'Error in "getObject" item method'); - } - - /** - * Test item relations - */ - public function testItemRelations() - { - $sMessage = 'Error in relation methods'; - $obItem = TestItem::make(1); - - $obRelationItem = $obItem->test; - self::assertInstanceOf(TestItem::class, $obRelationItem, $sMessage); - self::assertEquals(2, $obRelationItem->id, $sMessage); - - $obRelationItem = $obItem->test; - self::assertInstanceOf(TestItem::class, $obRelationItem, $sMessage); - self::assertEquals(2, $obRelationItem->id, $sMessage); - - $obRelationItem = $obItem->test_null; - self::assertEquals(null, $obRelationItem, $sMessage); - - $obRelationItem = $obItem->test_class; - self::assertEquals(null, $obRelationItem, $sMessage); - - $obRelationItem = $obItem->test_field; - self::assertEquals(null, $obRelationItem, $sMessage); - - $obRelationItem = $obItem->test_exist; - self::assertEquals(null, $obRelationItem, $sMessage); - - /** @var TestCollection $obRelationList */ - $obRelationList = $obItem->test_list; - self::assertInstanceOf(TestCollection::class, $obRelationList, $sMessage); - self::assertEquals(2, $obRelationList->count(), $sMessage); - - /** @var TestCollection $obRelationList */ - $obRelationList = $obItem->test_empty_list; - self::assertInstanceOf(TestCollection::class, $obRelationList, $sMessage); - self::assertEquals(0, $obRelationList->count(), $sMessage); - self::assertEquals([], $obRelationList->getIDList(), $sMessage); - } -} \ No newline at end of file diff --git a/plugins/lovata/toolbox/traits/console/LogoTrait.php b/plugins/lovata/toolbox/traits/console/LogoTrait.php deleted file mode 100644 index bd4e2dc97..000000000 --- a/plugins/lovata/toolbox/traits/console/LogoTrait.php +++ /dev/null @@ -1,38 +0,0 @@ -███──████──████──█────████───████──██─██', - '─█───█──█──█──█──█────█──██──█──█───███', - '─█───█──█──█──█──█────████───█──█────█', - '─█───█──█──█──█──█────█──██──█──█───███', - '─█───████──████──███──████───████──██─██', - ]; - /** @var array */ - protected $arLogoLovata = [ - '█──────████───█───█───████──███████──████', - '█──────█──█───█───█───█──█─────█─────█──█', - '█──────█──█───█───█───████─────█─────████', - '█──────█──█────███────█──█─────█─────█──█', - '█████──████─────█─────█──█─────█─────█──█', - ]; - - /** - * Write logo toolbox - */ - protected function logoToolBox() - { - $this->output->newLine(1); - $this->output->writeln($this->arLogoLovata); - $this->output->newLine(1); - $this->output->writeln($this->arLogoToolBox); - $this->output->newLine(1); - } -} diff --git a/plugins/lovata/toolbox/traits/console/UpdateLangFile.php b/plugins/lovata/toolbox/traits/console/UpdateLangFile.php deleted file mode 100644 index 6039012a2..000000000 --- a/plugins/lovata/toolbox/traits/console/UpdateLangFile.php +++ /dev/null @@ -1,55 +0,0 @@ -arData) || empty($this->arData)) { - return []; - } - - $sLowerAuthor = array_get($this->arData, 'replace.'.self::PREFIX_LOWER.self::CODE_AUTHOR); - $sLowerPlugin = array_get($this->arData, 'replace.'.self::PREFIX_LOWER.self::CODE_PLUGIN); - - $sFolderPath = plugins_path($sLowerAuthor.'/'.$sLowerPlugin.'/lang'); - - if (empty($sLowerAuthor) || empty($sLowerPlugin) || !file_exists($sFolderPath)) { - return []; - } - - $arLangList = scandir($sFolderPath); - array_shift($arLangList); - array_shift($arLangList); - - return $arLangList; - } - - /** - * Update lang file - * @param array $arLangData - */ - protected function updatePluginLang($arLangData) - { - if (empty($arLangData)) { - return; - } - - foreach ($this->getLangList() as $sLang) { - array_set($this->arData, 'replace.lang', $sLang); - - $obUpdate = new PluginLangUpdateFile($this->arData); - $obUpdate->update($arLangData); - } - } -} diff --git a/plugins/lovata/toolbox/traits/helpers/PriceHelperTrait.php b/plugins/lovata/toolbox/traits/helpers/PriceHelperTrait.php deleted file mode 100644 index 76ebe74aa..000000000 --- a/plugins/lovata/toolbox/traits/helpers/PriceHelperTrait.php +++ /dev/null @@ -1,168 +0,0 @@ -arPriceField) || !is_array($obElement->arPriceField)) { - return; - } - - foreach ($obElement->arPriceField as $sFieldName) { - if (empty($sFieldName) || !is_string($sFieldName)) { - continue; - } - - $sFieldConvert = Str::studly($sFieldName); - - self::addGetPriceFieldMethod($obElement, $sFieldName, $sFieldConvert); - - if ($obElement instanceof Model) { - self::addSetPriceFieldMethod($obElement, $sFieldName, $sFieldConvert); - self::addGetPriceValueFieldMethod($obElement, $sFieldName, $sFieldConvert); - - self::addScopePriceFieldMethod($obElement, $sFieldName, $sFieldConvert); - } - } - } - - /** - * Add set{field_name}Attribute methods - * @param \Model|\Eloquent|\Lovata\Toolbox\Classes\Item\ElementItem $obElement $obElement - * @param string $sFieldName - * @param string $sFieldConvert - */ - protected static function addSetPriceFieldMethod($obElement, $sFieldName, $sFieldConvert) - { - $sMethodName = 'set'.$sFieldConvert.'Attribute'; - if (method_exists($obElement, $sMethodName)) { - return; - } - - $obElement->addDynamicMethod($sMethodName, function ($sValue) use ($sFieldName, $obElement) { - - $fPrice = PriceHelper::toFloat($sValue); - $obElement->attributes[$sFieldName] = $fPrice; - }); - } - - /** - * Add get{field_name}ValueAttribute methods - * @param \Model|\Eloquent|\Lovata\Toolbox\Classes\Item\ElementItem $obElement $obElement - * @param string $sFieldName - * @param string $sFieldConvert - */ - protected static function addGetPriceValueFieldMethod($obElement, $sFieldName, $sFieldConvert) - { - $sMethodName = 'get'.$sFieldConvert.'ValueAttribute'; - if (method_exists($obElement, $sMethodName)) { - return; - } - - if ($obElement instanceof ElementItem) { - $obElement->addDynamicMethod($sMethodName, function ($obElement) use ($sFieldName) { - /** @var \Model|\Eloquent|\Lovata\Toolbox\Classes\Item\ElementItem $obElement */ - $fPrice = 0; - if (isset($obElement->attributes[$sFieldName])) { - $fPrice = $obElement->attributes[$sFieldName]; - } - - return $fPrice; - }); - } else { - $obElement->addDynamicMethod($sMethodName, function () use ($sFieldName, $obElement) { - $fPrice = 0; - if (isset($obElement->attributes[$sFieldName])) { - $fPrice = $obElement->attributes[$sFieldName]; - } - - return $fPrice; - }); - } - } - - /** - * Add get{field_name}Attribute methods - * @param \Model|\Eloquent|\Lovata\Toolbox\Classes\Item\ElementItem $obElement $obElement - * @param string $sFieldName - * @param string $sFieldConvert - */ - protected static function addGetPriceFieldMethod($obElement, $sFieldName, $sFieldConvert) - { - $sMethodName = 'get'.$sFieldConvert.'Attribute'; - if (method_exists($obElement, $sMethodName)) { - return; - } - - if ($obElement instanceof ElementItem) { - $obElement->addDynamicMethod($sMethodName, function ($obElement) use ($sFieldName) { - /** @var \Model|\Eloquent|\Lovata\Toolbox\Classes\Item\ElementItem $obElement */ - $sFieldName .= '_value'; - $fPrice = $obElement->$sFieldName; - - $sPrice = PriceHelper::format($fPrice); - - return $sPrice; - }); - } else { - $obElement->addDynamicMethod($sMethodName, function () use ($sFieldName, $obElement) { - $sFieldName .= '_value'; - $fPrice = $obElement->$sFieldName; - - $sPrice = PriceHelper::format($fPrice); - - return $sPrice; - }); - } - } - - /** - * Add scopeGetBy{field_name} methods - * @param \Model|\Eloquent|\Lovata\Toolbox\Classes\Item\ElementItem $obElement $obElement - * @param string $sFieldName - * @param string $sFieldConvert - */ - protected static function addScopePriceFieldMethod($obElement, $sFieldName, $sFieldConvert) - { - $sMethodName = 'scopeGetBy'.$sFieldConvert; - if (method_exists($obElement, $sMethodName)) { - return; - } - - $obElement->addDynamicMethod($sMethodName, function ($obQuery, $sValue, $sCondition = '=') use ($sFieldName, $obElement) { - /** @var \October\Rain\Database\Builder $obQuery */ - $sValue = (float) $sValue; - - if (!empty($sCondition)) { - $obQuery->where($sFieldName, $sCondition, $sValue); - } - - return $obQuery; - }); - } -} diff --git a/plugins/lovata/toolbox/traits/helpers/TraitCached.php b/plugins/lovata/toolbox/traits/helpers/TraitCached.php deleted file mode 100644 index 89fdfc224..000000000 --- a/plugins/lovata/toolbox/traits/helpers/TraitCached.php +++ /dev/null @@ -1,46 +0,0 @@ -cached) || !is_array($this->cached)) { - $this->cached = []; - } - - if (is_string($arFieldList)) { - $arFieldList = [$arFieldList]; - } - - $this->cached = array_merge($this->cached, $arFieldList); - $this->cached = array_unique($this->cached); - } - - /** - * Get cached field list - * @return array - */ - public function getCachedField(): array - { - if (empty($this->cached) || !is_array($this->cached)) { - $this->cached = []; - } - - return $this->cached; - } -} diff --git a/plugins/lovata/toolbox/traits/helpers/TraitComponentNotFoundResponse.php b/plugins/lovata/toolbox/traits/helpers/TraitComponentNotFoundResponse.php deleted file mode 100644 index 86c63f6a2..000000000 --- a/plugins/lovata/toolbox/traits/helpers/TraitComponentNotFoundResponse.php +++ /dev/null @@ -1,59 +0,0 @@ - [ - 'title' => 'lovata.toolbox::lang.component.property_slug', - 'type' => 'string', - 'default' => '{{ :slug }}', - ], - 'slug_required' => [ - 'title' => 'lovata.toolbox::lang.component.property_slug_required', - 'type' => 'checkbox', - 'default' => 1, - ], - ]; - - if ($this->bNeedSmartURLCheck) { - $arResult['smart_url_check'] = [ - 'title' => 'lovata.toolbox::lang.component.property_url_check', - 'type' => 'checkbox', - 'default' => 0, - ]; - } - - return $arResult; - } - - /** - * Get error response for 404 page - * @throws AjaxException - * @return \Illuminate\Http\Response - */ - public function getErrorResponse() - { - if (Request::ajax()) { - throw new AjaxException('Element not found'); - } - - return Response::make($this->controller->run('404')->getContent(), 404); - } -} diff --git a/plugins/lovata/toolbox/traits/helpers/TraitInitActiveLang.php b/plugins/lovata/toolbox/traits/helpers/TraitInitActiveLang.php deleted file mode 100644 index cb502ae04..000000000 --- a/plugins/lovata/toolbox/traits/helpers/TraitInitActiveLang.php +++ /dev/null @@ -1,102 +0,0 @@ -hasPlugin('RainLab.Translate')) { - return self::$arActiveLangList; - } - - self::$arActiveLangList = \RainLab\Translate\Models\Locale::isEnabled()->lists('code'); - if (empty(self::$arActiveLangList)) { - return self::$arActiveLangList; - } - - //Remove default lang from list - foreach (self::$arActiveLangList as $iKey => $sLangCode) { - if ($sLangCode == self::$sDefaultLang) { - unset(self::$arActiveLangList[$iKey]); - break; - } - } - - return self::$arActiveLangList; - } - - /** - * Get and save active lang from Translate plugin - */ - protected function initActiveLang() - { - if (self::$bLangInit || !PluginManager::instance()->hasPlugin('RainLab.Translate')) { - return; - } - - self::$bLangInit = true; - $obTranslate = \RainLab\Translate\Classes\Translator::instance(); - - self::$sDefaultLang = $obTranslate->getDefaultLocale(); - - $sActiveLangCode = $obTranslate->getLocale(); - if (empty($sActiveLangCode) || $obTranslate->getDefaultLocale() == $sActiveLangCode) { - return; - } - - self::$sActiveLang = $sActiveLangCode; - } - - /** - * Add suffix with active lang code - * @param string $sValue - * @param string $sSeparator - * - * @return string - */ - protected function addActiveLangSuffix($sValue, $sSeparator = '_') - { - if (empty(self::$sActiveLang)) { - return $sValue; - } - - return $sValue.$sSeparator.self::$sActiveLang; - } - - /** - * Add prefix with active lang code - * @param string $sValue - * @param string $sSeparator - * - * @return string - */ - protected function addActiveLangPrefix($sValue, $sSeparator = '_') - { - if (empty(self::$sActiveLang)) { - return $sValue; - } - - return self::$sActiveLang.$sSeparator.$sValue; - } -} diff --git a/plugins/lovata/toolbox/traits/helpers/TraitValidationHelper.php b/plugins/lovata/toolbox/traits/helpers/TraitValidationHelper.php deleted file mode 100644 index b06078fbf..000000000 --- a/plugins/lovata/toolbox/traits/helpers/TraitValidationHelper.php +++ /dev/null @@ -1,24 +0,0 @@ -getFields()); - - Result::setFalse(['field' => array_shift($arFiledList)]) - ->setMessage($obException->getMessage()) - ->setCode($obException->getCode()); - } -} diff --git a/plugins/lovata/toolbox/traits/models/SetPropertyAttributeTrait.php b/plugins/lovata/toolbox/traits/models/SetPropertyAttributeTrait.php deleted file mode 100644 index ac723a335..000000000 --- a/plugins/lovata/toolbox/traits/models/SetPropertyAttributeTrait.php +++ /dev/null @@ -1,36 +0,0 @@ -fromJson($arValue); - } - - if (empty($arValue) || !is_array($arValue)) { - return; - } - - $arPropertyList = $this->property; - if (empty($arPropertyList)) { - $arPropertyList = []; - } - - foreach ($arValue as $sKey => $sValue) { - $arPropertyList[$sKey] = $sValue; - } - - $this->attributes['property'] = $this->asJson($arPropertyList); - } -} diff --git a/plugins/lovata/toolbox/traits/parse/ParseByPatternTrait.php b/plugins/lovata/toolbox/traits/parse/ParseByPatternTrait.php deleted file mode 100644 index a01fc5464..000000000 --- a/plugins/lovata/toolbox/traits/parse/ParseByPatternTrait.php +++ /dev/null @@ -1,123 +0,0 @@ - $sName) { - $sPattern = $this->namePattern($sKey); - $sContent = str_replace($sPattern, $sName, $sContent); - } - - return $sContent; - } - - /** - * Parse content by name wrapper - * @param array $arNameList - * @param string $sContent - * @return string - */ - public function parseByNameWrapper($arNameList, $sContent) - { - if (empty($arNameList) || !is_array($arNameList) || empty($sContent)) { - return ''; - } - - foreach ($arNameList as $sName) { - $sPattern = $this->nameWrapperPattern($sName); - $sContent = preg_replace($sPattern, '', $sContent); - } - - return $sContent; - } - - /** - * Parse content by wrapper - * @param array $arNameList - * @param string $sContent - * @return string - */ - public function parseByWrapper($arNameList, $sContent) - { - if (empty($arNameList) || !is_array($arNameList) || empty($sContent)) { - return ''; - } - - foreach ($arNameList as $sName) { - $sPattern = $this->wrapperPattern($sName); - $sContent = preg_replace($sPattern, '', $sContent); - } - - return $sContent; - } - - /** - * Name pattern. Example: {{key}} - * @param string $sKey - * @return string - */ - public function namePattern($sKey) - { - return '{{'.$sKey.'}}'; - } - - /** - * Name wrapper pattern. Example: [[key]] - * @param string $sKey - * @return string - */ - public function nameWrapperPattern($sKey) - { - return '/\[\['.$sKey.'\]\]/'; - } - - /** - * Wrapper pattern. Example: [[key]]...[[key]] - * @param string $sKey - * @return string - */ - public function wrapperPattern($sKey) - { - return "[\[\[".$sKey."\]\][A-Za-z0-9\t\n\r\f\v\x20-\x7E]+?\[\[".$sKey."\]\]]"; - } - - /** - * Parse array to string file - * @param array $arData - * @return string - */ - public function arrayToStringFile($arData) - { - if (empty($arData) || !is_array($arData)) { - return ''; - } - - $sContent = var_export($arData, true); - $sContent = preg_replace("/(\\n[ ]+array[ , \\n]+\(\\n)/", "[\n", $sContent); - $sContent = preg_replace("/(array[ , \\n]+\(\\n)/", "[\n", $sContent); - $sContent = preg_replace("/\)\,/", "],", $sContent); - $sContent = preg_replace("/\)$/", "];", $sContent); - $sContent = 'sModelClass.' model has not correct images config'; - - /** @var \Model $obModel */ - $obModel = new $this->sModelClass(); - self::assertNotEmpty($obModel->attachMany, $sErrorMessage); - self::assertArrayHasKey('images', $obModel->attachMany, $sErrorMessage); - self::assertEquals('System\Models\File', $obModel->attachMany['images'], $sErrorMessage); - } -} diff --git a/plugins/lovata/toolbox/traits/tests/TestModelHasPreviewImage.php b/plugins/lovata/toolbox/traits/tests/TestModelHasPreviewImage.php deleted file mode 100644 index 9d552ad3d..000000000 --- a/plugins/lovata/toolbox/traits/tests/TestModelHasPreviewImage.php +++ /dev/null @@ -1,25 +0,0 @@ -sModelClass.' model has not correct preview image config'; - - /** @var \Model $obModel */ - $obModel = new $this->sModelClass(); - self::assertNotEmpty($obModel->attachOne, $sErrorMessage); - self::assertArrayHasKey('preview_image', $obModel->attachOne, $sErrorMessage); - self::assertEquals('System\Models\File', $obModel->attachOne['preview_image'], $sErrorMessage); - } -} \ No newline at end of file diff --git a/plugins/lovata/toolbox/traits/tests/TestModelValidationNameField.php b/plugins/lovata/toolbox/traits/tests/TestModelValidationNameField.php deleted file mode 100644 index 61b16facf..000000000 --- a/plugins/lovata/toolbox/traits/tests/TestModelValidationNameField.php +++ /dev/null @@ -1,32 +0,0 @@ -sModelClass(); - - //Get validation rules array and check it - $arValidationRules = $obModel->rules; - self::assertNotEmpty($arValidationRules, $this->sModelClass.' model has empty validation rules array'); - - //Check rules for "name" field - self::assertArrayHasKey('name', $arValidationRules, $this->sModelClass.' model not has validation rules for field "name"'); - self::assertNotEmpty($arValidationRules['name'], $this->sModelClass.' model not has validation rules for field "name"'); - - $arValidationCondition = explode('|', $arValidationRules['name']); - self::assertContains('required', $arValidationCondition,$this->sModelClass.' model not has validation rule "required" for field "name"'); - } -} \ No newline at end of file diff --git a/plugins/lovata/toolbox/traits/tests/TestModelValidationSlugField.php b/plugins/lovata/toolbox/traits/tests/TestModelValidationSlugField.php deleted file mode 100644 index 5fdd6a770..000000000 --- a/plugins/lovata/toolbox/traits/tests/TestModelValidationSlugField.php +++ /dev/null @@ -1,33 +0,0 @@ -sModelClass(); - - //Get validation rules array and check it - $arValidationRules = $obModel->rules; - self::assertNotEmpty($arValidationRules, $this->sModelClass.' model has empty validation rules array'); - - //Check rules for "slug" field - self::assertArrayHasKey('slug', $arValidationRules, $this->sModelClass.' model not has validation rules for field "slug"'); - self::assertNotEmpty($arValidationRules['slug'], $this->sModelClass.' model not has validation rules for field "slug"'); - - $arValidationCondition = explode('|', $arValidationRules['slug']); - self::assertContains('required', $arValidationCondition,$this->sModelClass.' model not has validation rule "required" for field "slug"'); - self::assertContains('unique:'.$obModel->table, $arValidationCondition,$this->sModelClass.' model not has validation rule "unique" for field "slug"'); - } -} \ No newline at end of file diff --git a/plugins/lovata/toolbox/updates/version.yaml b/plugins/lovata/toolbox/updates/version.yaml deleted file mode 100644 index 7f65b49f8..000000000 --- a/plugins/lovata/toolbox/updates/version.yaml +++ /dev/null @@ -1,110 +0,0 @@ -1.0.0: - - 'Initialize plugin.' -1.1.0: - - 'Add diff, unshift, push, getNearestNext, getNearestPrev methods to ElementCollection class, add ComponentSubmitForm class' -1.2.0: - - 'Add integration with Translate plugin' -1.3.0: - - 'Adding afterCreate model event handling for additional cache cleaning' -1.3.1: - - 'Restore getOldFormData() method in ComponentSubmitForm class' -1.3.2: - - 'Fix lang path for the default properties tab in CommonProperty class' -1.3.3: - - 'Fix path to field name with error in getErrorMessage() method' -1.4.0: - - 'Add PageHelper class' -1.4.1: - - 'Fix processing of positive results in ComponentSubmitForm::getResponseModeAjax() method, if flash_on enabled' -1.5.0: - - 'Add TraitInitActiveLang trait' -1.6.0: - - 'Add SendMailHelper class, Add CommonSettings model' -1.7.0: - - 'Add UserStorage classes. Add classes for integration with Lovata.Buddies and RainLab.User plugins' -1.8.0: - - 'Added translation into French. Thanks for contribution philmarc.' -1.9.0: - - 'Add TraitCached. Update vendor packages.' -1.9.1: - - 'Remove force boot and register plugins in CommonTest class' -1.10.0: - - 'Add PriceHelperTrait. Move PriceHelper class from Shopaholic plugin. Add set(), applySorting() methods to ElementCollection class. Add abstract store classes.' -1.10.1: - - 'Fix ItemStorage class. Clone item objects form storage.' -1.10.2: - - 'Fix ItemStorage class. Added cloning of *Item object before saving it to storage.' -1.11.0: - - 'Added saving of arrays to class properties of *Store class objects after receiving array from cache.' -1.12.0: - - 'Add PageHelper::getPageNameList() method.' -1.12.1: - - 'Update of vendor packages' -1.12.2: - - 'Update of php-pagination vendor packages' -1.13.0: - - 'Added type returned by methods in AbstractStore * classes' -1.14.0: - - 'Add Countable interface in ElementCollection class' -1.14.1: - - 'Added natsort() for property value variants.' -1.15.0: - - 'Added AbstractBackendColumnHandler, AbstractBackendFieldHandler, AbstractBackendMenuHandler, AbstractExtendRelationConfigHandler, AbstractModelRelationHandler classes.' -1.16.0: - - 'Add package information to composer.json. Thanks for contribution pikanji.' -1.17.0: - - 'Added processing of "limit" parameter for the pagination component.' -1.18.0: - - 'Added AbstractImportModel class.' -1.19.0: - - 'Added supported property types: number, rich editor, single checkbox, switch, balloon selector, tag list, radio.' -1.20.0: - - 'Added Japanese language. Thanks for contribution pikanji.' -1.20.1: - - 'Fixed deletion of old images for improt from CSV file.' -1.21.0: - - 'Added support translatable slug in ElementPage class. Added German language. Thanks for contribution Gerald.' -1.21.1: - - 'Removed Iterator interface from ElementCollection class. Added IteratorAggregate interface to ElementCollection class.' -1.22.0: - - 'Replace array_intersect function with array_intersect_key in ElementCollection class.' -1.23.0: - - 'Added copy() method to ElementCollection class. Added choice twig function.' -1.24.0: - - 'Added caching of uploaded file objects as an array.' -1.24.1: - - 'Fixed copy() method in ElementCollection class.' -1.25.0: - - 'Added classes for import elements from xml file.' -1.25.1: - - 'Fixed openMainFile method in AbstractImportModelFromXML class.' -1.25.2: - - 'Added try->catch section for removing images in AbstractImportModel class.' -1.25.3: - - 'Fixed bug with import through queues.' -1.26.0: - - 'Added support of wildcard params to ElementPage class.' -1.26.1: - - 'Fixed support of wildcard params in ElementPage class.' -1.26.2: - - 'Added validation widget context field in AbstractBackendFieldHandler class.' -1.27.0: - - 'Added redirect to error page, if result status is false and redirect URL is not empty.' -1.28.0: - - 'Added dimension fields to lang files' -1.28.1: - - 'Added passing $this param to get[FieldName]Attribute() method in ElementItem class. It is recommended to use parameter from callback function in the dynamic methods get[FieldName]Attribute in ElementItem class.' -1.29.0: - - 'Improved speed of random method in ElementCollection class.' -1.30.0: - - 'The ability to specify URL for downloading images has been added to the abstract import class. Thanks for contribution Sebastiaan Kloos.' -1.31.0: - - 'Added composer.json to plugin.' -1.32.0: - - 'Reduced count of database queries, if cache is empty.' -1.33.0: - - 'Fixed $sFilterValue condition in AbstractStoreWithParam and AbstractStoreWithTwoParam classes.' -1.33.1: - - 'Fixed error with cache images with same disk_name.' -1.34.0: - - 'Added makeItemOnlyCache method to ElementCollection class.'