Merge branch 'master' into doc-mysql56
Conflicts: Readme.md
This commit is contained in:
17
.gitignore
vendored
17
.gitignore
vendored
@@ -25,7 +25,20 @@ xhprof/
|
||||
phpunit.phar
|
||||
.DS_Store
|
||||
phpmyadmin
|
||||
templates/default-esi
|
||||
local/modules/TemplateEsiModule
|
||||
composer.phar
|
||||
web/.htaccess
|
||||
|
||||
# Ignore everything in the "modules" directory, except the "default modules"
|
||||
local/modules/*
|
||||
!local/modules/Cheque/
|
||||
!local/modules/Front/
|
||||
!local/modules/TheliaDebugBar/
|
||||
!local/modules/Tinymce/
|
||||
!local/modules/Colissimo/
|
||||
|
||||
# Ignore everything in the "templates" directory, except the "default template"
|
||||
templates/*
|
||||
!templates/backOffice/
|
||||
!templates/email/
|
||||
!templates/frontOffice/
|
||||
!templates/pdf/
|
||||
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "local/modules/Klikandpay"]
|
||||
path = local/modules/Klikandpay
|
||||
url = https://github.com/thelia-modules/Klikandpay
|
||||
@@ -15,7 +15,7 @@ before_script:
|
||||
- composer install --prefer-dist --dev
|
||||
- sh -c "mysql -u$DB_USER -e 'SET FOREIGN_KEY_CHECKS = 0; DROP DATABASE IF EXISTS thelia;SET FOREIGN_KEY_CHECKS = 1;'; fi"
|
||||
- php Thelia thelia:install --db_host=localhost --db_username=$DB_USER --db_name=thelia
|
||||
- php install/faker.php
|
||||
- php setup/faker.php
|
||||
- php Thelia module:activate Colissimo
|
||||
- php Thelia module:activate Cheque
|
||||
|
||||
|
||||
31
CHANGELOG.md
31
CHANGELOG.md
@@ -1,7 +1,36 @@
|
||||
#2.0.1
|
||||
- possibility to apply a permanent discount on a customer
|
||||
- display estimated shipping on cart page
|
||||
- export newsletter subscribers list
|
||||
- Fix redirect issues
|
||||
- enhancement of coupon UI
|
||||
- enhancement of admin menu. Coupon is now in Tools menu
|
||||
- front office, email and pdf templates are translated in Russian and Czech
|
||||
- fix bugs : https://github.com/thelia/thelia/issues?milestone=4&page=1&state=closed
|
||||
|
||||
#2.0.0
|
||||
- coupons effect are recalculated after each product's cart modification
|
||||
- Coupons values are re-evaluated when a product quantity is changed in the shopping cart
|
||||
- You can declare new compilerPass in modules. See Thelia\Module\BaseModule::getCompilers phpDoc
|
||||
- Add ability to load assets from another template. See https://gist.github.com/lunika/9365180
|
||||
- allow possibility to use Dependency Injection compiler in Thelia modules
|
||||
- Add Deactivate Module Command Line
|
||||
- Add indexes to database to improve performance
|
||||
- Order and customer references are more human readable than before
|
||||
- Refactor intl process. A domain is created for each templates and modules :
|
||||
- core => for thelia core translations
|
||||
- bo.template_name (eg : bo.default) => for each backoffice template
|
||||
- fo.template_name (eg : fo.default) => for each frontoffice template
|
||||
- pdf.template_name (eg : pdf.default) => for each pdf template
|
||||
- email.template_name (eg : email.default) => for each email template
|
||||
- modules :
|
||||
- module_code (eg : paypal) => fore module core translations
|
||||
- module_code.ai (eg : paypal.ai) => used in AdminIncludes templates
|
||||
- bo.module_code.template_name (eg : bo.paypal.default) => used in back office template
|
||||
- fo.module_code.template_name (eg : fo.paypal.default) => used in front office template
|
||||
- new parameter for smarty ```intl``` function. The parameter ```d``` allow you to specify the translation domain (as explain before). This parameter is optional
|
||||
- the ```d``` can be omitted if you use ```{default_translation_domain domain='bo.default'}``` in your layout. If you use this smarty function, the ```d``` parameter is automatically set with the domain specify in ```default_translation_domain``` function
|
||||
- We changed Thelia's license. Thelia is published under the LGPL 3.0+ License
|
||||
|
||||
|
||||
#2.0.0-RC1
|
||||
- Remove container from BaseAction.
|
||||
|
||||
@@ -4,6 +4,7 @@ please email us (info@thelia.net) or fork this file on Github and send a pull-re
|
||||
Manuel Raynaud - manu@thelia.net
|
||||
Etienne Roudeix - etienne.roudeix@gmail.com
|
||||
Franck Allimant - franck@allimant.org
|
||||
Julien Chanséaume - jchanseaume@openstudio.fr
|
||||
Guillaume Morel - gmorel@openstudio.fr
|
||||
Michaël Espeche - mespeche@openstudio.fr
|
||||
Christophe Laffont - claffont@openstudio.fr
|
||||
|
||||
827
LICENSE.txt
827
LICENSE.txt
@@ -1,674 +1,165 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
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
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser 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
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
||||
45
Readme.md
45
Readme.md
@@ -5,11 +5,13 @@ Thelia
|
||||
------
|
||||
[](https://travis-ci.org/thelia/thelia) [](https://packagist.org/packages/thelia/thelia) [](https://scrutinizer-ci.com/g/thelia/thelia/)
|
||||
|
||||
[Thelia](http://thelia.net/v2) is an open source tool for creating e-business websites and managing online content. This software is published under GPL.
|
||||
[Thelia](http://thelia.net/) is an open source tool for creating e-business websites and managing online content. This software is published under LGPL.
|
||||
|
||||
Here is the most recent developed code for the next major version (v2). You can download this version for testing or having a look on the code (or anything you wish, respecting GPL). See http://thelia.net/v2 web site for more information.
|
||||
This is the new major version of Thelia.
|
||||
|
||||
Most part of the code can possibly change, a large part will be refactor soon, graphical setup does not exist yet.
|
||||
You can download this version and have a try or take a look at the source code (or anything you wish, respecting LGPL). See http://thelia.net/ web site for more information.
|
||||
|
||||
A repository containing all thelia modules is available at this address : https://github.com/thelia-modules
|
||||
|
||||
Requirements
|
||||
------------
|
||||
@@ -34,7 +36,7 @@ If you use Mac OSX, it still doesn't use php 5.4 as default php version... There
|
||||
* use last MAMP version and put the php bin directory in your path:
|
||||
|
||||
```bash
|
||||
export PATH=/Applications/MAMP/bin/php/php5.4.x/bin/:$PATH
|
||||
export PATH=/Applications/MAMP/bin/php/php5.5.x/bin/:$PATH
|
||||
```
|
||||
|
||||
* configure a complete development environment : http://php-osx.liip.ch/
|
||||
@@ -65,15 +67,36 @@ SET @@GLOBAL.sql_mode='NO_ENGINE_SUBSTITUTION', @@SESSION.sql_mode='NO_ENGINE_SU
|
||||
|
||||
For more information on sql_mode you can consult the [MySQL doc](http://dev.mysql.com/doc/refman/5.0/fr/server-sql-mode.html "sql Mode")
|
||||
|
||||
Installation
|
||||
------------
|
||||
## Download Thelia 2
|
||||
|
||||
``` bash
|
||||
$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar create-project thelia/thelia path/ 2.0.0-RC1
|
||||
$ php composer.phar create-project thelia/thelia path/ 2.0.0
|
||||
```
|
||||
|
||||
Finish the installation using cli tools :
|
||||
## Install it
|
||||
|
||||
You can install Thelia by two different way
|
||||
|
||||
### Using install wizard
|
||||
|
||||
Installing thelia with the web install wizard allow to create an administrator, add some informations about your shop, etc
|
||||
|
||||
First of all, you have to configure a vhost as describe in [configuration](http://doc.thelia.net/en/documentation/configuration.html) section.
|
||||
|
||||
The install wizard in accessible with your favorite browser :
|
||||
|
||||
``` bash
|
||||
http://yourdomain.tld/[/subdomain_if_needed]/install
|
||||
```
|
||||
|
||||
For example, I have thelia downloaded at http://thelia.net and my vhost is correctly configured, I have to reach this address :
|
||||
|
||||
``` bash
|
||||
http://thelia.net/install
|
||||
```
|
||||
|
||||
### Using cli tools
|
||||
|
||||
``` bash
|
||||
$ php Thelia thelia:install
|
||||
@@ -89,6 +112,12 @@ Thelia documentation is available at http://doc.thelia.net
|
||||
The documentation is also in beta version and some part can be obsolete cause to some refactor.
|
||||
|
||||
|
||||
Roadmap
|
||||
-------
|
||||
|
||||
The Roadmap is available at http://thelia.net/community/roadmap
|
||||
|
||||
|
||||
Contribute
|
||||
----------
|
||||
|
||||
|
||||
4
Thelia
4
Thelia
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
if (php_sapi_name() != 'cli') {
|
||||
throw new \Exception('this script can only be launched with cli sapi');
|
||||
}
|
||||
set_time_limit(0);
|
||||
|
||||
require __DIR__ . '/core/bootstrap.php';
|
||||
|
||||
@@ -1,40 +1,36 @@
|
||||
{
|
||||
"name" : "thelia/thelia",
|
||||
"description" : "Thelia is an ecommerce CMS.",
|
||||
"license" : "GPL-3.0+",
|
||||
"homepage" : "http://thelia.net/v2",
|
||||
"support" : {
|
||||
"forum" : "http://thelia.net/forum",
|
||||
"wiki" : "http://doc.thelia.net"
|
||||
"name": "thelia/thelia",
|
||||
"description": "Thelia is an ecommerce CMS.",
|
||||
"license": "LGPL-3.0+",
|
||||
"homepage": "http://thelia.net/",
|
||||
"support": {
|
||||
"forum": "http://thelia.net/forum",
|
||||
"wiki": "http://doc.thelia.net"
|
||||
},
|
||||
"require":{
|
||||
"require": {
|
||||
"php": ">=5.4",
|
||||
"ircmaxell/password-compat": "1.0.*",
|
||||
"propel/propel": "dev-master",
|
||||
"psr/log" : "1.0",
|
||||
"psr/log": "1.0",
|
||||
"symfony/class-loader": "2.2.*",
|
||||
"symfony/config" : "2.2.*",
|
||||
"symfony/console" : "2.2.*",
|
||||
"symfony/dependency-injection" : "2.2.*",
|
||||
"symfony/event-dispatcher" : "2.2.*",
|
||||
"symfony/http-kernel" : "2.2.*",
|
||||
"symfony/routing" : "2.2.*",
|
||||
"symfony/filesystem" : "2.2.*",
|
||||
"symfony/yaml" : "2.2.*",
|
||||
"symfony/translation" : "2.2.*",
|
||||
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/console": "2.2.*",
|
||||
"symfony/dependency-injection": "2.2.*",
|
||||
"symfony/event-dispatcher": "2.2.*",
|
||||
"symfony/http-kernel": "2.2.*",
|
||||
"symfony/routing": "2.2.*",
|
||||
"symfony/filesystem": "2.2.*",
|
||||
"symfony/yaml": "2.2.*",
|
||||
"symfony/translation": "2.2.*",
|
||||
"symfony-cmf/routing": "1.0.0",
|
||||
|
||||
"symfony/form": "2.2.*",
|
||||
"symfony/validator": "2.3.*",
|
||||
|
||||
"smarty/smarty": "v3.1.14",
|
||||
"kriswallsmith/assetic": "1.2.*@dev",
|
||||
"leafo/lessphp": "0.4.*",
|
||||
"ptachoire/cssembed": "1.0.*",
|
||||
|
||||
"doctrine/cache": "v1.3.0",
|
||||
"simplepie/simplepie": "dev-master",
|
||||
|
||||
"imagine/imagine": "0.*",
|
||||
"symfony/icu": "1.0",
|
||||
"swiftmailer/swiftmailer": "5.0.*",
|
||||
@@ -42,20 +38,20 @@
|
||||
"ensepar/html2pdf": "1.0.1",
|
||||
"symfony/finder": "~2.2"
|
||||
},
|
||||
"require-dev" : {
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*",
|
||||
"fzaninotto/faker": "dev-master",
|
||||
"maximebf/debugbar": "dev-master"
|
||||
},
|
||||
"minimum-stability": "stable",
|
||||
"config" : {
|
||||
"vendor-dir" : "core/vendor",
|
||||
"bin-dir" : "bin"
|
||||
"config": {
|
||||
"vendor-dir": "core/vendor",
|
||||
"bin-dir": "bin"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"": "local/modules/",
|
||||
"Thelia" : "core/lib/"
|
||||
"Thelia": "core/lib/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
@@ -79,7 +75,9 @@
|
||||
"reference": "tags/Smarty_3_1_14/distribution/"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": ["libs/"]
|
||||
"classmap": [
|
||||
"libs/"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
76
composer.lock
generated
76
composer.lock
generated
@@ -3,8 +3,82 @@
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||
],
|
||||
"hash": "92d99dbb21763697accf7050ded155b6",
|
||||
"hash": "d1e1c31ed8e38f2282ab431898cf8b08",
|
||||
"packages": [
|
||||
{
|
||||
"name": "doctrine/cache",
|
||||
"version": "v1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/cache.git",
|
||||
"reference": "e16d7adf45664a50fa86f515b6d5e7f670130449"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/cache/zipball/e16d7adf45664a50fa86f515b6d5e7f670130449",
|
||||
"reference": "e16d7adf45664a50fa86f515b6d5e7f670130449",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/common": ">2.2,<2.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=3.7",
|
||||
"satooshi/php-coveralls": "~0.6"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Doctrine\\Common\\Cache\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jonathan H. Wage",
|
||||
"email": "jonwage@gmail.com",
|
||||
"homepage": "http://www.jwage.com/",
|
||||
"role": "Creator"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com",
|
||||
"homepage": "http://www.instaclick.com"
|
||||
},
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com",
|
||||
"homepage": "http://jmsyst.com",
|
||||
"role": "Developer of wrapped JMSSerializerBundle"
|
||||
}
|
||||
],
|
||||
"description": "Caching library offering an object-oriented API for many cache backends",
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"keywords": [
|
||||
"cache",
|
||||
"caching"
|
||||
],
|
||||
"time": "2013-10-25 19:04:14"
|
||||
},
|
||||
{
|
||||
"name": "ensepar/html2pdf",
|
||||
"version": "1.0.1",
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
/**
|
||||
*
|
||||
* @file
|
||||
* Functions needed for Thelia bootstrap
|
||||
* Thelia essential definitions
|
||||
*/
|
||||
define('DS' , DIRECTORY_SEPARATOR);
|
||||
define('THELIA_ROOT' , rtrim(realpath(dirname(__DIR__)), DS) . DS);
|
||||
@@ -11,6 +19,8 @@ define('THELIA_LOCAL_DIR' , THELIA_ROOT . 'local' . DS);
|
||||
define('THELIA_CONF_DIR' , THELIA_LOCAL_DIR . 'config' . DS);
|
||||
define('THELIA_MODULE_DIR' , THELIA_LOCAL_DIR . 'modules' . DS);
|
||||
define('THELIA_WEB_DIR' , THELIA_ROOT . 'web' . DS);
|
||||
define('THELIA_CACHE_DIR' , THELIA_ROOT . 'cache' . DS);
|
||||
define('THELIA_LOG_DIR' , THELIA_ROOT . 'log' . DS);
|
||||
define('THELIA_TEMPLATE_DIR' , THELIA_ROOT . 'templates' . DS);
|
||||
|
||||
$loader = require __DIR__ . "/vendor/autoload.php";
|
||||
@@ -21,6 +31,7 @@ if (!file_exists(THELIA_CONF_DIR . 'database.yml') && !defined('THELIA_INSTALL_M
|
||||
define('THELIA_INSTALL_MODE', true);
|
||||
} else {
|
||||
$request = \Thelia\Core\HttpFoundation\Request::createFromGlobals();
|
||||
header('location: '.$request->getUriForPath('/install'));
|
||||
header('Location: '.$request->getUriForPath('/install'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -38,7 +27,7 @@ class BaseAction
|
||||
* @param ModelCriteria $query
|
||||
* @param UpdatePositionEvent $event
|
||||
*
|
||||
* @return mixed
|
||||
* @return null
|
||||
*/
|
||||
protected function genericUpdatePosition(ModelCriteria $query, UpdatePositionEvent $event)
|
||||
{
|
||||
|
||||
@@ -1,26 +1,14 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
use Thelia\Core\Event\CachedFileEvent;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
@@ -26,12 +15,14 @@ namespace Thelia\Action;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Thelia\Core\Event\Cart\CartEvent;
|
||||
use Thelia\Core\Event\Currency\CurrencyChangeEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Model\ProductPrice;
|
||||
use Thelia\Model\ProductPriceQuery;
|
||||
use Thelia\Model\Base\ProductSaleElementsQuery;
|
||||
use Thelia\Model\Currency;
|
||||
use Thelia\Model\CartItem;
|
||||
use Thelia\Model\CartItemQuery;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Model\Tools\ProductPriceTools;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -43,6 +34,7 @@ use Thelia\Model\ConfigQuery;
|
||||
*/
|
||||
class Cart extends BaseAction implements EventSubscriberInterface
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* add an article in the current cart
|
||||
@@ -55,6 +47,13 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
$newness = $event->getNewness();
|
||||
$append = $event->getAppend();
|
||||
$quantity = $event->getQuantity();
|
||||
$currency = $cart->getCurrency();
|
||||
$customer = $cart->getCustomer();
|
||||
$discount = 0;
|
||||
|
||||
if (null !== $customer && $customer->getDiscount() > 0) {
|
||||
$discount = $customer->getDiscount();
|
||||
}
|
||||
|
||||
$productSaleElementsId = $event->getProductSaleElementsId();
|
||||
$productId = $event->getProduct();
|
||||
@@ -62,13 +61,16 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
$cartItem = $this->findItem($cart->getId(), $productId, $productSaleElementsId);
|
||||
|
||||
if ($cartItem === null || $newness) {
|
||||
$productPrice = ProductPriceQuery::create()
|
||||
->filterByProductSaleElementsId($productSaleElementsId)
|
||||
->findOne();
|
||||
|
||||
$event->setCartItem(
|
||||
$this->doAddItem($event->getDispatcher(), $cart, $productId, $productPrice->getProductSaleElements(), $quantity, $productPrice)
|
||||
);
|
||||
$productSaleElements = ProductSaleElementsQuery::create()
|
||||
->findPk($productSaleElementsId);
|
||||
|
||||
if (null !== $productSaleElements) {
|
||||
$productPrices = $productSaleElements->getPricesByCurrency($currency, $discount);
|
||||
$event->setCartItem(
|
||||
$this->doAddItem($event->getDispatcher(), $cart, $productId, $productSaleElements, $quantity, $productPrices)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($append && $cartItem !== null) {
|
||||
@@ -136,6 +138,52 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function updateCart(CurrencyChangeEvent $event)
|
||||
{
|
||||
$session = $event->getRequest()->getSession();
|
||||
$cart = $session->getCart();
|
||||
if (null !== $cart) {
|
||||
$this->updateCartPrices($cart, $event->getCurrency());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Refresh article's price
|
||||
*
|
||||
* @param \Thelia\Model\Cart $cart
|
||||
* @param \Thelia\Model\Currency $currency
|
||||
*/
|
||||
public function updateCartPrices(\Thelia\Model\Cart $cart, Currency $currency)
|
||||
{
|
||||
|
||||
$customer = $cart->getCustomer();
|
||||
$discount = 0;
|
||||
|
||||
if (null !== $customer && $customer->getDiscount() > 0) {
|
||||
$discount = $customer->getDiscount();
|
||||
}
|
||||
|
||||
// cart item
|
||||
foreach ($cart->getCartItems() as $cartItem) {
|
||||
$productSaleElements = $cartItem->getProductSaleElements();
|
||||
|
||||
$productPrice = $productSaleElements->getPricesByCurrency($currency, $discount);
|
||||
|
||||
$cartItem
|
||||
->setPrice($productPrice->getPrice())
|
||||
->setPromoPrice($productPrice->getPromoPrice());
|
||||
|
||||
$cartItem->save();
|
||||
}
|
||||
|
||||
// update the currency cart
|
||||
$cart->setCurrencyId($currency->getId());
|
||||
$cart->save();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array of event names this subscriber wants to listen to.
|
||||
*
|
||||
@@ -163,6 +211,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
TheliaEvents::CART_DELETEITEM => array("deleteItem", 128),
|
||||
TheliaEvents::CART_UPDATEITEM => array("changeItem", 128),
|
||||
TheliaEvents::CART_CLEAR => array("clear", 128),
|
||||
TheliaEvents::CHANGE_DEFAULT_CURRENCY => array("updateCart", 128),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -186,15 +235,16 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
/**
|
||||
* try to attach a new item to an existing cart
|
||||
*
|
||||
* @param \Thelia\Model\Cart $cart
|
||||
* @param int $productId
|
||||
* @param \Thelia\Model\ProductSaleElements $productSaleElements
|
||||
* @param float $quantity
|
||||
* @param ProductPrice $productPrice
|
||||
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
|
||||
* @param \Thelia\Model\Cart $cart
|
||||
* @param int $productId
|
||||
* @param \Thelia\Model\ProductSaleElements $productSaleElements
|
||||
* @param float $quantity
|
||||
* @param ProductPriceTools $productPrices
|
||||
*
|
||||
* @return CartItem
|
||||
*/
|
||||
protected function doAddItem(EventDispatcherInterface $dispatcher, \Thelia\Model\Cart $cart, $productId, \Thelia\Model\ProductSaleElements $productSaleElements, $quantity, ProductPrice $productPrice)
|
||||
protected function doAddItem(EventDispatcherInterface $dispatcher, \Thelia\Model\Cart $cart, $productId, \Thelia\Model\ProductSaleElements $productSaleElements, $quantity, ProductPriceTools $productPrices)
|
||||
{
|
||||
$cartItem = new CartItem();
|
||||
$cartItem->setDisptacher($dispatcher);
|
||||
@@ -203,8 +253,8 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
->setProductId($productId)
|
||||
->setProductSaleElementsId($productSaleElements->getId())
|
||||
->setQuantity($quantity)
|
||||
->setPrice($productPrice->getPrice())
|
||||
->setPromoPrice($productPrice->getPromoPrice())
|
||||
->setPrice($productPrices->getPrice())
|
||||
->setPromoPrice($productPrices->getPromoPrice())
|
||||
->setPromo($productSaleElements->getPromo())
|
||||
->setPriceEndOfLife(time() + ConfigQuery::read("cart.priceEOF", 60*60*24*30))
|
||||
->save();
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,31 +1,20 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
use Thelia\Model\CurrencyQuery;
|
||||
use Thelia\Model\Currency as CurrencyModel;
|
||||
|
||||
@@ -98,18 +87,14 @@ class Currency extends BaseAction implements EventSubscriberInterface
|
||||
{
|
||||
|
||||
if (null !== $currency = CurrencyQuery::create()->findPk($event->getCurrencyId())) {
|
||||
// Reset default status
|
||||
CurrencyQuery::create()->filterByByDefault(true)->update(array('ByDefault' => false));
|
||||
|
||||
if ($currency->getByDefault() != $event->getIsDefault()) {
|
||||
|
||||
// Reset default status
|
||||
CurrencyQuery::create()->filterByByDefault(true)->update(array('ByDefault' => false));
|
||||
|
||||
$currency
|
||||
->setDispatcher($event->getDispatcher())
|
||||
->setByDefault($event->getIsDefault())
|
||||
->save()
|
||||
;
|
||||
}
|
||||
$currency
|
||||
->setDispatcher($event->getDispatcher())
|
||||
->setByDefault($event->getIsDefault())
|
||||
->save()
|
||||
;
|
||||
|
||||
$event->setCurrency($currency);
|
||||
}
|
||||
@@ -134,7 +119,7 @@ class Currency extends BaseAction implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function updateRates(EventDispatcherInterface $dispatcher)
|
||||
public function updateRates(ActionEvent $event)
|
||||
{
|
||||
$rates_url = ConfigQuery::read('currency_rate_update_url', 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml');
|
||||
|
||||
@@ -148,7 +133,7 @@ class Currency extends BaseAction implements EventSubscriberInterface
|
||||
|
||||
if (null !== $currency = CurrencyQuery::create()->findOneByCode($code)) {
|
||||
$currency
|
||||
->setDispatcher($dispatcher)
|
||||
->setDispatcher($event->getDispatcher())
|
||||
->setRate($rate)
|
||||
->save()
|
||||
;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
@@ -147,6 +136,11 @@ class Customer extends BaseAction implements EventSubscriberInterface
|
||||
|
||||
public function login(CustomerLoginEvent $event)
|
||||
{
|
||||
$customer = $event->getCustomer();
|
||||
|
||||
if (method_exists($customer, 'clearDispatcher')) {
|
||||
$customer->clearDispatcher();
|
||||
}
|
||||
$this->securityContext->setCustomerUser($event->getCustomer());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +1,14 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
@@ -52,6 +41,9 @@ class Lang extends BaseAction implements EventSubscriberInterface
|
||||
->setCode($event->getCode())
|
||||
->setDateFormat($event->getDateFormat())
|
||||
->setTimeFormat($event->getTimeFormat())
|
||||
->setDecimalSeparator($event->getDecimalSeparator())
|
||||
->setThousandsSeparator($event->getThousandsSeparator())
|
||||
->setDecimals($event->getDecimals())
|
||||
->save();
|
||||
|
||||
$event->setLang($lang);
|
||||
@@ -80,6 +72,9 @@ class Lang extends BaseAction implements EventSubscriberInterface
|
||||
->setLocale($event->getLocale())
|
||||
->setDateFormat($event->getDateFormat())
|
||||
->setTimeFormat($event->getTimeFormat())
|
||||
->setDecimalSeparator($event->getDecimalSeparator())
|
||||
->setThousandsSeparator($event->getThousandsSeparator())
|
||||
->setDecimals($event->getDecimals())
|
||||
->save();
|
||||
|
||||
$event->setLang($lang);
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
@@ -61,9 +50,8 @@ class Module extends BaseAction implements EventSubscriberInterface
|
||||
public function toggleActivation(ModuleToggleActivationEvent $event)
|
||||
{
|
||||
if (null !== $module = ModuleQuery::create()->findPk($event->getModuleId())) {
|
||||
$moduleClass = new \ReflectionClass($module->getFullNamespace());
|
||||
|
||||
$moduleInstance = $moduleClass->newInstance();
|
||||
$moduleInstance = $module->createInstance();
|
||||
|
||||
if ( method_exists($moduleInstance, 'setContainer')) {
|
||||
$moduleInstance->setContainer($this->container);
|
||||
@@ -96,12 +84,11 @@ class Module extends BaseAction implements EventSubscriberInterface
|
||||
}
|
||||
|
||||
try {
|
||||
$reflected = new \ReflectionClass($module->getFullNamespace());
|
||||
$instance = $module->createInstance();
|
||||
|
||||
$instance = $reflected->newInstance();
|
||||
$instance->setContainer($this->container);
|
||||
|
||||
$path = dirname($reflected->getFileName());
|
||||
$path = $module->getAbsoluteBaseDir();
|
||||
|
||||
$instance->destroy($con, $event->getDeleteData());
|
||||
|
||||
@@ -191,6 +178,8 @@ class Module extends BaseAction implements EventSubscriberInterface
|
||||
public function updatePosition(UpdatePositionEvent $event)
|
||||
{
|
||||
$this->genericUpdatePosition(ModuleQuery::create(), $event);
|
||||
|
||||
$this->cacheClear($event->getDispatcher());
|
||||
}
|
||||
|
||||
protected function cacheClear(EventDispatcherInterface $dispatcher)
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
@@ -48,7 +37,6 @@ use Thelia\Model\Order as ModelOrder;
|
||||
use Thelia\Model\OrderAddress;
|
||||
use Thelia\Model\OrderProduct;
|
||||
use Thelia\Model\OrderProductAttributeCombination;
|
||||
use Thelia\Model\OrderStatus;
|
||||
use Thelia\Model\OrderStatusQuery;
|
||||
use Thelia\Tools\I18n;
|
||||
|
||||
@@ -106,7 +94,14 @@ class Order extends BaseAction implements EventSubscriberInterface
|
||||
{
|
||||
$order = $event->getOrder();
|
||||
|
||||
$order->setDeliveryModuleId($event->getDeliveryModule());
|
||||
$deliveryModuleId = $event->getDeliveryModule();
|
||||
|
||||
$order->setDeliveryModuleId($deliveryModuleId);
|
||||
|
||||
// Reset postage cost if the delivery module had been removed
|
||||
if ($deliveryModuleId <= 0) {
|
||||
$order->setPostage(0);
|
||||
}
|
||||
|
||||
$event->setOrder($order);
|
||||
}
|
||||
@@ -206,7 +201,7 @@ class Order extends BaseAction implements EventSubscriberInterface
|
||||
$placedOrder->setInvoiceOrderAddressId($invoiceOrderAddress->getId());
|
||||
|
||||
$placedOrder->setStatusId(
|
||||
OrderStatusQuery::create()->findOneByCode(OrderStatus::CODE_NOT_PAID)->getId()
|
||||
OrderStatusQuery::getNotPaidStatus()->getId()
|
||||
);
|
||||
|
||||
/* memorize discount */
|
||||
@@ -266,6 +261,7 @@ class Order extends BaseAction implements EventSubscriberInterface
|
||||
->setTaxRuleTitle($taxRuleI18n->getTitle())
|
||||
->setTaxRuleDescription($taxRuleI18n->getDescription())
|
||||
->setEanCode($pse->getEanCode())
|
||||
->setCartIemId($cartItem->getId())
|
||||
->setDispatcher($dispatcher)
|
||||
->save($con)
|
||||
;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
@@ -75,7 +64,7 @@ class Product extends BaseAction implements EventSubscriberInterface
|
||||
->setRef($event->getRef())
|
||||
->setLocale($event->getLocale())
|
||||
->setTitle($event->getTitle())
|
||||
->setVisible($event->getVisible())
|
||||
->setVisible($event->getVisible() ? 1 : 0)
|
||||
|
||||
// Set the default tax rule to this product
|
||||
->setTaxRule(TaxRuleQuery::create()->findOneByIsDefault(true))
|
||||
@@ -109,7 +98,7 @@ class Product extends BaseAction implements EventSubscriberInterface
|
||||
->setDescription($event->getDescription())
|
||||
->setChapo($event->getChapo())
|
||||
->setPostscriptum($event->getPostscriptum())
|
||||
->setVisible($event->getVisible())
|
||||
->setVisible($event->getVisible() ? 1 : 0)
|
||||
|
||||
->save()
|
||||
;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Action;
|
||||
|
||||
@@ -1,25 +1,15 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Cart;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
@@ -86,6 +76,7 @@ trait CartTrait
|
||||
//le cookie de panier n'existe pas, il va falloir le créer et faire un enregistrement en base.
|
||||
$cart = $this->createCart($session);
|
||||
}
|
||||
$session->setCart($cart->getId());
|
||||
|
||||
return $cart;
|
||||
}
|
||||
@@ -97,7 +88,8 @@ trait CartTrait
|
||||
protected function createCart(Session $session)
|
||||
{
|
||||
$cart = new CartModel();
|
||||
$cart->setToken($this->generateCookie());
|
||||
$cart->setToken($this->generateCookie($session));
|
||||
$cart->setCurrency($session->getCurrency(true));
|
||||
|
||||
if (null !== $customer = $session->getCustomerUser()) {
|
||||
$cart->setCustomer($customer);
|
||||
@@ -120,7 +112,8 @@ trait CartTrait
|
||||
*/
|
||||
protected function duplicateCart(EventDispatcherInterface $dispatcher, CartModel $cart, Session $session, Customer $customer = null)
|
||||
{
|
||||
$newCart = $cart->duplicate($this->generateCookie(), $customer);
|
||||
$currency = $session->getCurrency();
|
||||
$newCart = $cart->duplicate($this->generateCookie($session), $customer, $currency, $dispatcher);
|
||||
$session->setCart($newCart->getId());
|
||||
|
||||
$cartEvent = new CartEvent($newCart);
|
||||
@@ -130,18 +123,12 @@ trait CartTrait
|
||||
return $cartEvent->getCart();
|
||||
}
|
||||
|
||||
protected function generateCookie()
|
||||
protected function generateCookie(Session $session)
|
||||
{
|
||||
$id = null;
|
||||
if (ConfigQuery::read("cart.session_only", 0) == 0) {
|
||||
$id = uniqid('', true);
|
||||
setcookie(
|
||||
"thelia_cart",
|
||||
$id,
|
||||
time()+ConfigQuery::read("cart.cookie_lifetime", 60*60*24*365),
|
||||
'/'
|
||||
);
|
||||
|
||||
$session->set('cart_use_cookie', $id);
|
||||
}
|
||||
|
||||
return $id;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,27 +1,19 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
use Thelia\Model\Module;
|
||||
|
||||
/**
|
||||
* base class for module commands
|
||||
*
|
||||
@@ -42,7 +34,11 @@ abstract class BaseModuleGenerate extends ContainerAwareCommand
|
||||
'Config',
|
||||
'Model',
|
||||
'Loop',
|
||||
'AdminIncludes',
|
||||
'Command',
|
||||
'Controller',
|
||||
'EventListeners',
|
||||
'I18n',
|
||||
Module::ADMIN_INCLUDES_DIRECTORY_NAME,
|
||||
'templates',
|
||||
);
|
||||
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
@@ -53,6 +42,12 @@ class CacheClear extends ContainerAwareCommand
|
||||
InputOption::VALUE_NONE,
|
||||
"do not clear the assets cache in the web space"
|
||||
)
|
||||
->addOption(
|
||||
'with-images',
|
||||
null,
|
||||
InputOption::VALUE_NONE,
|
||||
'clear images generated in web/cache directory'
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -62,10 +57,15 @@ class CacheClear extends ContainerAwareCommand
|
||||
$cacheDir = $this->getContainer()->getParameter("kernel.cache_dir");
|
||||
|
||||
$this->clearCache($cacheDir, $output);
|
||||
|
||||
if (!$input->getOption("without-assets")) {
|
||||
$this->clearCache(THELIA_WEB_DIR . "assets", $output);
|
||||
}
|
||||
|
||||
if ($input->getOption('with-images')) {
|
||||
$this->clearCache(THELIA_CACHE_DIR, $output);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected function clearCache($dir, OutputInterface $output)
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
@@ -63,9 +52,7 @@ class ModuleActivateCommand extends BaseModuleGenerate
|
||||
}
|
||||
|
||||
try {
|
||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
||||
|
||||
$moduleInstance = $moduleReflection->newInstance();
|
||||
$moduleInstance = $module->createInstance();
|
||||
|
||||
$moduleInstance->activate();
|
||||
} catch (\Exception $e) {
|
||||
|
||||
71
core/lib/Thelia/Command/ModuleDeactivateCommand.php
Executable file
71
core/lib/Thelia/Command/ModuleDeactivateCommand.php
Executable file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
use Thelia\Model\ModuleQuery;
|
||||
|
||||
/**
|
||||
* Deactivates a module
|
||||
*
|
||||
* Class ModuleDeactivateCommand
|
||||
* @package Thelia\Command
|
||||
* @author Nicolas Villa <nicolas@libre-shop.com>
|
||||
*
|
||||
*/
|
||||
class ModuleDeactivateCommand extends BaseModuleGenerate
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName("module:deactivate")
|
||||
->setDescription("Deactivate a module")
|
||||
->addArgument(
|
||||
"module" ,
|
||||
InputArgument::REQUIRED,
|
||||
"module to deactivate"
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$moduleCode = $this->formatModuleName($input->getArgument("module"));
|
||||
|
||||
$module = ModuleQuery::create()->findOneByCode($moduleCode);
|
||||
|
||||
if (null === $module) {
|
||||
throw new \RuntimeException(sprintf("module %s not found", $moduleCode));
|
||||
}
|
||||
|
||||
try {
|
||||
$moduleInstance = $module->createInstance();
|
||||
|
||||
$moduleInstance->deActivate();
|
||||
} catch (\Exception $e) {
|
||||
throw new \RuntimeException(sprintf("Deactivation fail with Exception : [%d] %s", $e->getCode(), $e->getMessage()));
|
||||
}
|
||||
|
||||
//impossible to change output class in CommandTester...
|
||||
if (method_exists($output, "renderBlock")) {
|
||||
$output->renderBlock(array(
|
||||
'',
|
||||
sprintf("Deactivation succeed for module %s", $moduleCode),
|
||||
''
|
||||
), "bg=green;fg=black");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,15 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
@@ -88,6 +78,7 @@ class ModuleGenerateCommand extends BaseModuleGenerate
|
||||
try {
|
||||
$skeletonDir = str_replace("/", DIRECTORY_SEPARATOR, THELIA_ROOT . "/core/lib/Thelia/Command/Skeleton/Module/");
|
||||
|
||||
// config.xml file
|
||||
$fs->copy($skeletonDir . "config.xml", $this->moduleDirectory . DIRECTORY_SEPARATOR . "Config" . DIRECTORY_SEPARATOR . "config.xml");
|
||||
|
||||
$moduleContent = file_get_contents($skeletonDir . "module.xml");
|
||||
@@ -97,6 +88,7 @@ class ModuleGenerateCommand extends BaseModuleGenerate
|
||||
|
||||
file_put_contents($this->moduleDirectory . DIRECTORY_SEPARATOR . "Config". DIRECTORY_SEPARATOR . "module.xml", $moduleContent);
|
||||
|
||||
// PHP Class template
|
||||
$classContent = file_get_contents($skeletonDir . "Class.php.template");
|
||||
|
||||
$classContent = str_replace("%%CLASSNAME%%", $this->module, $classContent);
|
||||
@@ -104,11 +96,31 @@ class ModuleGenerateCommand extends BaseModuleGenerate
|
||||
|
||||
file_put_contents($this->moduleDirectory . DIRECTORY_SEPARATOR . $this->module.".php", $classContent);
|
||||
|
||||
// schema.xml file
|
||||
$schemaContent = file_get_contents($skeletonDir . "schema.xml");
|
||||
|
||||
$schemaContent = str_replace("%%NAMESPACE%%", $this->module, $schemaContent);
|
||||
|
||||
file_put_contents($this->moduleDirectory . DIRECTORY_SEPARATOR . "Config". DIRECTORY_SEPARATOR . "schema.xml", $schemaContent);
|
||||
|
||||
// routing.xml file
|
||||
$routingContent = file_get_contents($skeletonDir . "routing.xml");
|
||||
|
||||
$routingContent = str_replace("%%NAMESPACE%%", $this->module, $routingContent);
|
||||
$routingContent = str_replace("%%CLASSNAME_LOWER%%", strtolower($this->module), $routingContent);
|
||||
|
||||
file_put_contents($this->moduleDirectory . DIRECTORY_SEPARATOR . "Config". DIRECTORY_SEPARATOR . "routing.xml", $routingContent);
|
||||
|
||||
// I18n sample files
|
||||
$fs->copy(
|
||||
$skeletonDir . DIRECTORY_SEPARATOR . "I18n" . DIRECTORY_SEPARATOR . "fr_FR.php",
|
||||
$this->moduleDirectory . DIRECTORY_SEPARATOR . "I18n" . DIRECTORY_SEPARATOR . "fr_FR.php"
|
||||
);
|
||||
|
||||
$fs->copy(
|
||||
$skeletonDir . DIRECTORY_SEPARATOR . "I18n" . DIRECTORY_SEPARATOR . "en_US.php",
|
||||
$this->moduleDirectory . DIRECTORY_SEPARATOR . "I18n" . DIRECTORY_SEPARATOR . "en_US.php"
|
||||
);
|
||||
} catch (\Exception $ex) {
|
||||
$fs->remove($this->moduleDirectory);
|
||||
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command\Output;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace %%NAMESPACE%%;
|
||||
|
||||
4
core/lib/Thelia/Command/Skeleton/Module/I18n/en_US.php
Normal file
4
core/lib/Thelia/Command/Skeleton/Module/I18n/en_US.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return array(
|
||||
// 'an english string' => 'The displayed english string',
|
||||
);
|
||||
4
core/lib/Thelia/Command/Skeleton/Module/I18n/fr_FR.php
Normal file
4
core/lib/Thelia/Command/Skeleton/Module/I18n/fr_FR.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return array(
|
||||
// 'an english string' => 'La traduction française de la chaine',
|
||||
);
|
||||
31
core/lib/Thelia/Command/Skeleton/Module/routing.xml
Normal file
31
core/lib/Thelia/Command/Skeleton/Module/routing.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<!--
|
||||
|
||||
if a /admin/module/%%CLASSNAME_LOWER%%/ route is provided, a "Configuration" button will be displayed
|
||||
for the module in the module list. Clicking this button will invoke this route.
|
||||
|
||||
<route id="my_route_id" path="/admin/module/%%CLASSNAME_LOWER%%">
|
||||
<default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourConfigurationController::methodName</default>
|
||||
</route>
|
||||
|
||||
<route id="my_route_id" path="/admin/module/%%CLASSNAME_LOWER%%/route-name">
|
||||
<default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourAdminController::methodName</default>
|
||||
</route>
|
||||
|
||||
<route id="my_route_id" path="/my/route/name">
|
||||
<default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourOtherController::methodName</default>
|
||||
</route>
|
||||
|
||||
...add as many routes as required.
|
||||
|
||||
<route>
|
||||
...
|
||||
</route>
|
||||
-->
|
||||
|
||||
</routes>
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Command;
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition;
|
||||
|
||||
@@ -38,7 +27,7 @@ use Thelia\Condition\Implementation\ConditionInterface;
|
||||
class ConditionCollection implements Iterator, Countable, ArrayAccess
|
||||
{
|
||||
/** @var array Array of ConditionInterface */
|
||||
protected $conditions = array();
|
||||
protected $conditions = [];
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.0.0)
|
||||
@@ -191,7 +180,7 @@ class ConditionCollection implements Iterator, Countable, ArrayAccess
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$arrayToSerialize = array();
|
||||
$arrayToSerialize = [];
|
||||
/** @var ConditionInterface $condition */
|
||||
foreach ($this as $condition) {
|
||||
$arrayToSerialize[] = $condition->getSerializableCondition();
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition;
|
||||
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition;
|
||||
|
||||
@@ -72,7 +61,7 @@ class ConditionFactory
|
||||
);
|
||||
$collection[] = $conditionNone;
|
||||
}
|
||||
$serializableConditions = array();
|
||||
$serializableConditions = [];
|
||||
/** @var $condition ConditionInterface */
|
||||
foreach ($collection as $condition) {
|
||||
$serializableConditions[] = $condition->getSerializableCondition();
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition;
|
||||
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition;
|
||||
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition\Implementation;
|
||||
|
||||
@@ -29,6 +18,7 @@ use Thelia\Condition\SerializableCondition;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Coupon\FacadeInterface;
|
||||
use Thelia\Exception\InvalidConditionValueException;
|
||||
use Thelia\Model\Base\CurrencyQuery;
|
||||
use Thelia\Model\Currency;
|
||||
use Thelia\Type\FloatType;
|
||||
|
||||
@@ -46,10 +36,10 @@ abstract class ConditionAbstract implements ConditionInterface
|
||||
protected $serviceId = null;
|
||||
|
||||
/** @var array Available Operators (Operators::CONST) */
|
||||
protected $availableOperators = array();
|
||||
protected $availableOperators = [];
|
||||
|
||||
/** @var array Parameters validating parameters against */
|
||||
protected $validators = array();
|
||||
protected $validators = [];
|
||||
|
||||
/** @var FacadeInterface Provide necessary value from Thelia */
|
||||
protected $facade = null;
|
||||
@@ -58,10 +48,10 @@ abstract class ConditionAbstract implements ConditionInterface
|
||||
protected $translator = null;
|
||||
|
||||
/** @var array Operators set by Admin in BackOffice */
|
||||
protected $operators = array();
|
||||
protected $operators = [];
|
||||
|
||||
/** @var array Values set by Admin in BackOffice */
|
||||
protected $values = array();
|
||||
protected $values = [];
|
||||
|
||||
/** @var ConditionEvaluator Conditions validator */
|
||||
protected $conditionValidator = null;
|
||||
@@ -97,9 +87,9 @@ abstract class ConditionAbstract implements ConditionInterface
|
||||
{
|
||||
$this->validators = $this->generateInputs();
|
||||
|
||||
$translatedInputs = array();
|
||||
$translatedInputs = [];
|
||||
foreach ($this->validators as $key => $validator) {
|
||||
$translatedOperators = array();
|
||||
$translatedOperators = [];
|
||||
foreach ($validator['availableOperators'] as $availableOperators) {
|
||||
$translatedOperators[$availableOperators] = Operators::getI18n(
|
||||
$this->translator,
|
||||
@@ -110,7 +100,7 @@ abstract class ConditionAbstract implements ConditionInterface
|
||||
$validator['availableOperators'] = $translatedOperators;
|
||||
$translatedInputs[$key] = $validator;
|
||||
}
|
||||
$validators = array();
|
||||
$validators = [];
|
||||
$validators['inputs'] = $translatedInputs;
|
||||
$validators['setOperators'] = $this->operators;
|
||||
$validators['setValues'] = $this->values;
|
||||
@@ -227,27 +217,21 @@ abstract class ConditionAbstract implements ConditionInterface
|
||||
*/
|
||||
protected function drawBackOfficeInputOperators($inputKey)
|
||||
{
|
||||
$selectHtml = '';
|
||||
$optionHtml = '';
|
||||
$inputs = $this->getValidators();
|
||||
if (isset($inputs['inputs'][$inputKey])) {
|
||||
$operators = $inputs['inputs'][$inputKey]['availableOperators'];
|
||||
foreach ($operators as $key => $operator) {
|
||||
$selected = '';
|
||||
if (isset($this->operators) && isset($this->operators[$inputKey]) && $this->operators[$inputKey] == $key) {
|
||||
$selected = ' selected="selected"';
|
||||
}
|
||||
$optionHtml .= '<option value="' . $key . '" '. $selected . '>' . $operator . '</option>';
|
||||
}
|
||||
$html = '';
|
||||
|
||||
$selectHtml .= '
|
||||
<select class="form-control" id="' . $inputKey . '-operator" name="' . $inputKey . '[operator]">
|
||||
' . $optionHtml . '
|
||||
</select>
|
||||
';
|
||||
$inputs = $this->getValidators();
|
||||
|
||||
if (isset($inputs['inputs'][$inputKey])) {
|
||||
|
||||
$html = $this->facade->getParser()->render('coupon/condition-fragments/condition-selector.html', [
|
||||
'operators' => $inputs['inputs'][$inputKey]['availableOperators'],
|
||||
'value' => isset($this->operators[$inputKey]) ? $this->operators[$inputKey] : '',
|
||||
'inputKey' => $inputKey
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
return $selectHtml;
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -262,26 +246,19 @@ abstract class ConditionAbstract implements ConditionInterface
|
||||
protected function drawBackOfficeBaseInputsText($label, $inputKey)
|
||||
{
|
||||
$operatorSelectHtml = $this->drawBackOfficeInputOperators($inputKey);
|
||||
|
||||
$currentValue = '';
|
||||
if (isset($this->values) && isset($this->values[$inputKey])) {
|
||||
$currentValue = $this->values[$inputKey];
|
||||
}
|
||||
|
||||
$html = '
|
||||
<div id="condition-add-operators-values" class="form-group col-md-6">
|
||||
<label for="operator">' . $label . '</label>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
' . $operatorSelectHtml . '
|
||||
</div>
|
||||
<div class="input-group col-lg-6">
|
||||
<input type="text" class="form-control" id="' . $inputKey . '-value" name="' . $inputKey . '[value]" value="' . $currentValue . '">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
return $html;
|
||||
return $this->facade->getParser()->render('coupon/conditions-fragments/base-input-text.html', [
|
||||
'label' => $label,
|
||||
'inputKey' => $inputKey,
|
||||
'currentValue' => $currentValue,
|
||||
'operatorSelectHtml' => $operatorSelectHtml
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -296,23 +273,39 @@ abstract class ConditionAbstract implements ConditionInterface
|
||||
*/
|
||||
protected function drawBackOfficeInputQuantityValues($inputKey, $max = 10, $min = 0)
|
||||
{
|
||||
$selectHtml = '';
|
||||
$optionHtml = '';
|
||||
for ($i = $min; $i <= $max; $i++) {
|
||||
$selected = '';
|
||||
if (isset($this->values) && isset($this->values[$inputKey]) && $this->values[$inputKey] == $i) {
|
||||
$selected = ' selected="selected"';
|
||||
}
|
||||
$optionHtml .= '<option value="' . $i . '" ' . $selected . '>' . $i . '</option>';
|
||||
}
|
||||
|
||||
$selectHtml .= '
|
||||
<select class="form-control" id="' . $inputKey . '-value" name="' . $inputKey . '[value]">
|
||||
' . $optionHtml . '
|
||||
</select>
|
||||
';
|
||||
|
||||
return $selectHtml;
|
||||
return $this->facade->getParser()->render('coupon/condition-fragments/quantity-selector.html', [
|
||||
'min' => $min,
|
||||
'max' => $max,
|
||||
'value' => isset($this->values[$inputKey]) ? $this->values[$inputKey] : '',
|
||||
'inputKey' => $inputKey
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw the currency input displayed in the BackOffice
|
||||
* allowing Admin to set its Coupon Conditions
|
||||
*
|
||||
* @param string $inputKey Input key (ex: self::INPUT1)
|
||||
*
|
||||
* @return string HTML string
|
||||
*/
|
||||
protected function drawBackOfficeCurrencyInput($inputKey)
|
||||
{
|
||||
$currencies = CurrencyQuery::create()->find();
|
||||
|
||||
$cleanedCurrencies = [];
|
||||
|
||||
/** @var Currency $currency */
|
||||
foreach ($currencies as $currency) {
|
||||
$cleanedCurrencies[$currency->getCode()] = $currency->getSymbol();
|
||||
}
|
||||
|
||||
return $this->facade->getParser()->render('coupon/condition-fragments/currency-selector.html', [
|
||||
'currencies' => $cleanedCurrencies,
|
||||
'value' => isset($this->values[$inputKey]) ? $this->values[$inputKey] : '',
|
||||
'inputKey' => $inputKey
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition\Implementation;
|
||||
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition\Implementation;
|
||||
|
||||
@@ -36,7 +25,7 @@ class MatchForEveryone extends ConditionAbstract
|
||||
protected $serviceId = 'thelia.condition.match_for_everyone';
|
||||
|
||||
/** @var array Available Operators (Operators::CONST) */
|
||||
protected $availableOperators = array();
|
||||
protected $availableOperators = [];
|
||||
|
||||
/**
|
||||
* Check validators relevancy and store them
|
||||
@@ -62,8 +51,8 @@ class MatchForEveryone extends ConditionAbstract
|
||||
*/
|
||||
protected function setValidators()
|
||||
{
|
||||
$this->operators = array();
|
||||
$this->values = array();
|
||||
$this->operators = [];
|
||||
$this->values = [];
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -86,8 +75,8 @@ class MatchForEveryone extends ConditionAbstract
|
||||
public function getName()
|
||||
{
|
||||
return $this->translator->trans(
|
||||
'Everybody can use it (no condition)',
|
||||
array(),
|
||||
'Unconditional usage',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
}
|
||||
@@ -101,8 +90,8 @@ class MatchForEveryone extends ConditionAbstract
|
||||
public function getToolTip()
|
||||
{
|
||||
$toolTip = $this->translator->trans(
|
||||
'Will return always true',
|
||||
array(),
|
||||
'This condition is always true',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
|
||||
@@ -118,8 +107,8 @@ class MatchForEveryone extends ConditionAbstract
|
||||
public function getSummary()
|
||||
{
|
||||
$toolTip = $this->translator->trans(
|
||||
'Will return always true',
|
||||
array(),
|
||||
'Unconditionnal usage',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
|
||||
@@ -133,7 +122,7 @@ class MatchForEveryone extends ConditionAbstract
|
||||
*/
|
||||
protected function generateInputs()
|
||||
{
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition\Implementation;
|
||||
|
||||
@@ -164,7 +153,7 @@ class MatchForTotalAmount extends ConditionAbstract
|
||||
{
|
||||
return $this->translator->trans(
|
||||
'By cart total amount',
|
||||
array(),
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
}
|
||||
@@ -179,7 +168,7 @@ class MatchForTotalAmount extends ConditionAbstract
|
||||
{
|
||||
$toolTip = $this->translator->trans(
|
||||
'Check the total Cart amount in the given currency',
|
||||
array(),
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
|
||||
@@ -219,7 +208,7 @@ class MatchForTotalAmount extends ConditionAbstract
|
||||
protected function generateInputs()
|
||||
{
|
||||
$currencies = CurrencyQuery::create()->find();
|
||||
$cleanedCurrencies = array();
|
||||
$cleanedCurrencies = [];
|
||||
/** @var Currency $currency */
|
||||
foreach ($currencies as $currency) {
|
||||
$cleanedCurrencies[$currency->getCode()] = $currency->getSymbol();
|
||||
@@ -251,7 +240,7 @@ class MatchForTotalAmount extends ConditionAbstract
|
||||
{
|
||||
$labelPrice = $this->facade
|
||||
->getTranslator()
|
||||
->trans('Price', array(), 'condition');
|
||||
->trans('Cart total amount is', [], 'condition');
|
||||
|
||||
$html = $this->drawBackOfficeBaseInputsText($labelPrice, self::INPUT1);
|
||||
|
||||
@@ -269,66 +258,17 @@ class MatchForTotalAmount extends ConditionAbstract
|
||||
*/
|
||||
protected function drawBackOfficeBaseInputsText($label, $inputKey)
|
||||
{
|
||||
$operatorSelectHtml = $this->drawBackOfficeInputOperators(self::INPUT1);
|
||||
$currencySelectHtml = $this->drawBackOfficeCurrencyInput(self::INPUT2);
|
||||
$selectedAmount = '';
|
||||
if (isset($this->values) && isset($this->values[$inputKey])) {
|
||||
$selectedAmount = $this->values[$inputKey];
|
||||
}
|
||||
return $this->facade->getParser()->render('coupon/condition-fragments/cart-total-amount-condition.html', [
|
||||
'label' => $label,
|
||||
'inputKey' => $inputKey,
|
||||
'value' => isset($this->values[$inputKey]) ? $this->values[$inputKey] : '',
|
||||
|
||||
$html = '
|
||||
<label for="operator">' . $label . '</label>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
' . $operatorSelectHtml . '
|
||||
</div>
|
||||
<div class="input-group col-lg-3">
|
||||
<input type="text" class="form-control" id="' . self::INPUT1 . '-value" name="' . self::INPUT1 . '[value]" value="' . $selectedAmount . '">
|
||||
</div>
|
||||
<div class="input-group col-lg-3">
|
||||
<input type="hidden" id="' . self::INPUT2 . '-operator" name="' . self::INPUT2 . '[operator]" value="==" />
|
||||
' . $currencySelectHtml . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
'field_1_name' => self::INPUT1,
|
||||
'field_2_name' => self::INPUT2,
|
||||
|
||||
return $html;
|
||||
'operatorSelectHtml' => $this->drawBackOfficeInputOperators(self::INPUT1),
|
||||
'currencySelectHtml' => $this->drawBackOfficeCurrencyInput(self::INPUT2),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw the currency input displayed in the BackOffice
|
||||
* allowing Admin to set its Coupon Conditions
|
||||
*
|
||||
* @param string $inputKey Input key (ex: self::INPUT1)
|
||||
*
|
||||
* @return string HTML string
|
||||
*/
|
||||
protected function drawBackOfficeCurrencyInput($inputKey)
|
||||
{
|
||||
$optionHtml = '';
|
||||
|
||||
$currencies = CurrencyQuery::create()->find();
|
||||
$cleanedCurrencies = array();
|
||||
/** @var Currency $currency */
|
||||
foreach ($currencies as $currency) {
|
||||
$cleanedCurrencies[$currency->getCode()] = $currency->getSymbol();
|
||||
}
|
||||
|
||||
foreach ($cleanedCurrencies as $key => $cleanedCurrency) {
|
||||
$selected = '';
|
||||
if (isset($this->values) && isset($this->values[$inputKey]) && $this->values[$inputKey] == $key) {
|
||||
$selected = ' selected="selected"';
|
||||
}
|
||||
$optionHtml .= '<option value="' . $key . '" ' . $selected . '>' . $cleanedCurrency . '</option>';
|
||||
}
|
||||
|
||||
$selectHtml = '
|
||||
<select class="form-control" id="' . $inputKey . '-value" name="' . $inputKey . '[value]">
|
||||
' . $optionHtml . '
|
||||
</select>
|
||||
';
|
||||
|
||||
return $selectHtml;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition\Implementation;
|
||||
|
||||
@@ -138,8 +127,8 @@ class MatchForXArticles extends ConditionAbstract
|
||||
public function getName()
|
||||
{
|
||||
return $this->translator->trans(
|
||||
'By number of articles in cart',
|
||||
array(),
|
||||
'Cart item count condition',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
}
|
||||
@@ -153,8 +142,8 @@ class MatchForXArticles extends ConditionAbstract
|
||||
public function getToolTip()
|
||||
{
|
||||
$toolTip = $this->translator->trans(
|
||||
'Check the amount of product in the Cart',
|
||||
array(),
|
||||
'The cart item count should match the condition',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
|
||||
@@ -174,7 +163,7 @@ class MatchForXArticles extends ConditionAbstract
|
||||
);
|
||||
|
||||
$toolTip = $this->translator->trans(
|
||||
'If cart products quantity is <strong>%operator%</strong> %quantity%',
|
||||
'If cart item count is <strong>%operator%</strong> %quantity%',
|
||||
array(
|
||||
'%operator%' => $i18nOperator,
|
||||
'%quantity%' => $this->values[self::INPUT1]
|
||||
@@ -211,7 +200,7 @@ class MatchForXArticles extends ConditionAbstract
|
||||
{
|
||||
$labelQuantity = $this->facade
|
||||
->getTranslator()
|
||||
->trans('Quantity', array(), 'condition');
|
||||
->trans('Cart item count is', [], 'condition');
|
||||
|
||||
$html = $this->drawBackOfficeBaseInputsText($labelQuantity, self::INPUT1);
|
||||
|
||||
@@ -229,24 +218,11 @@ class MatchForXArticles extends ConditionAbstract
|
||||
*/
|
||||
protected function drawBackOfficeBaseInputsText($label, $inputKey)
|
||||
{
|
||||
$operatorSelectHtml = $this->drawBackOfficeInputOperators($inputKey);
|
||||
$quantitySelectHtml = $this->drawBackOfficeInputQuantityValues($inputKey, 20, 1);
|
||||
|
||||
$html = '
|
||||
<div id="condition-add-operators-values" class="form-group col-md-6">
|
||||
<label for="operator">' . $label . '</label>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
' . $operatorSelectHtml . '
|
||||
</div>
|
||||
<div class="input-group col-lg-6">
|
||||
' . $quantitySelectHtml . '
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
return $html;
|
||||
return $this->facade->getParser()->render('coupon/condition-fragments/cart-item-count-condition.html', [
|
||||
'label' => $label,
|
||||
'operatorSelectHtml' => $this->drawBackOfficeInputOperators($inputKey),
|
||||
'quantitySelectHtml' => $this->drawBackOfficeInputQuantityValues($inputKey, 20, 1)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition;
|
||||
|
||||
@@ -65,57 +54,57 @@ abstract class Operators
|
||||
switch ($operator) {
|
||||
case self::INFERIOR:
|
||||
$ret = $translator->trans(
|
||||
'inferior to',
|
||||
array(),
|
||||
'Less than',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
break;
|
||||
case self::INFERIOR_OR_EQUAL:
|
||||
$ret = $translator->trans(
|
||||
'inferior or equal to',
|
||||
array(),
|
||||
'Less than or equals',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
break;
|
||||
case self::EQUAL:
|
||||
$ret = $translator->trans(
|
||||
'equal to',
|
||||
array(),
|
||||
'Equals',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
break;
|
||||
case self::SUPERIOR_OR_EQUAL:
|
||||
$ret = $translator->trans(
|
||||
'superior or equal to',
|
||||
array(),
|
||||
'Greater than or equals',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
break;
|
||||
case self::SUPERIOR:
|
||||
$ret = $translator->trans(
|
||||
'superior to',
|
||||
array(),
|
||||
'Greater than',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
break;
|
||||
case self::DIFFERENT:
|
||||
$ret = $translator->trans(
|
||||
'different from',
|
||||
array(),
|
||||
'Not equals',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
break;
|
||||
case self::IN:
|
||||
$ret = $translator->trans(
|
||||
'in',
|
||||
array(),
|
||||
'In',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
break;
|
||||
case self::OUT:
|
||||
$ret = $translator->trans(
|
||||
'not in',
|
||||
array(),
|
||||
'Not in',
|
||||
[],
|
||||
'condition'
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<?php
|
||||
/**********************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Condition;
|
||||
|
||||
@@ -36,9 +25,9 @@ class SerializableCondition
|
||||
public $conditionServiceId = null;
|
||||
|
||||
/** @var array Operators set by Admin for this Condition */
|
||||
public $operators = array();
|
||||
public $operators = [];
|
||||
|
||||
/** @var array Values set by Admin for this Condition */
|
||||
public $values = array();
|
||||
public $values = [];
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Config;
|
||||
|
||||
@@ -1,26 +1,14 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Config;
|
||||
|
||||
use Symfony\Component\Config\Definition\Processor;
|
||||
|
||||
4
core/lib/Thelia/Config/I18n/cs_CZ.php
Normal file
4
core/lib/Thelia/Config/I18n/cs_CZ.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return array(
|
||||
|
||||
);
|
||||
@@ -1,36 +1,51 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'"%param" parameter cannot be empty in loop type: %type, name: %name' => '"%param" parameter cannot be empty in loop type: %type, name: %name',
|
||||
'"%param" parameter is missing in loop type: %type, name: %name' => '"%param" parameter is missing in loop type: %type, name: %name',
|
||||
'%obj SEO modification' => '%obj SEO modification',
|
||||
'%obj creation' => '%obj creation',
|
||||
'%obj modification' => '%obj modification',
|
||||
'\'%type\' loop class should extends Thelia\Core\Template\Element\BaseLoop' => '\'%type\' loop class should extends Thelia\Core\Template\Element\BaseLoop',
|
||||
'A currency with code "%name" already exists.' => 'A currency with code "%name" already exists.',
|
||||
'A loop named \'%name\' already exists in the current scope.' => 'A loop named \'%name\' already exists in the current scope.',
|
||||
'A message with name "%name" already exists.' => 'A message with name "%name" already exists.',
|
||||
'A product with reference %ref already exists. Please choose another reference.' => 'A product with reference %ref already exists. Please choose another reference.',
|
||||
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.',
|
||||
'A value for attribute "%name" is already present in the combination' => 'A value for attribute "%name" is already present in the combination',
|
||||
'A variable with name "%name" already exists.' => 'A variable with name "%name" already exists.',
|
||||
'Activate logs only for these IP Addresses' => 'Activate logs only for these IP Addresses',
|
||||
'Activate logs only for these files' => 'Activate logs only for these files',
|
||||
'Add to all product templates' => 'Add to all product templates',
|
||||
'Additional address' => 'Additional address',
|
||||
'Address ID not found' => 'Address ID not found',
|
||||
'Address Line 2' => 'Address Line 2',
|
||||
'Address Line 3' => 'Address Line 3',
|
||||
'Address label' => 'Address label',
|
||||
'Administrator ID not found' => 'Administrator ID not found',
|
||||
'Advertise this product as new' => 'Advertise this product as new',
|
||||
'Alerts' => 'Alerts',
|
||||
'Alpha code 2 *' => 'Alpha code 2 *',
|
||||
'Alpha code 3 *' => 'Alpha code 3 *',
|
||||
'Amount removed from the cart' => 'Amount removed from the cart',
|
||||
'Apply exchange rates on price in %sym' => 'Apply exchange rates on price in %sym',
|
||||
'Area' => 'Area',
|
||||
'Attribute ID:Attribute AV ID' => 'Attribute ID:Attribute AV ID',
|
||||
'Auth mode' => 'Auth mode',
|
||||
'Available quantity' => 'Available quantity',
|
||||
'Available quantity *' => 'Available quantity *',
|
||||
'Available shipping zones' => 'Available shipping zones',
|
||||
'Bad tax list JSON' => 'Bad tax list JSON',
|
||||
'Business ID' => 'Business ID',
|
||||
'By cart total amount' => 'By cart total amount',
|
||||
'Cannot find a default country. Please define one.' => 'Cannot find a default country. Please define one.',
|
||||
'Cannot find the shop country. Please select a shop country.' => 'Cannot find the shop country. Please select a shop country.',
|
||||
'Cannot instanciante module "%name%": the namespace is null. Maybe the model is not loaded ?' => 'Cannot instanciante module "%name%": the namespace is null. Maybe the model is not loaded ?',
|
||||
'Cart item count condition' => 'Cart item count condition',
|
||||
'Cart item count is' => 'Cart item count is',
|
||||
'Cart total amount is' => 'Cart total amount is',
|
||||
'Category title *' => 'Category title *',
|
||||
'Cellphone' => 'Cellphone',
|
||||
'Chapo' => 'Chapo',
|
||||
'Check the total Cart amount in the given currency' => 'Check the total Cart amount in the given currency',
|
||||
'City' => 'City',
|
||||
'Combination builder' => 'Combination builder',
|
||||
'Compagny' => 'Compagny',
|
||||
@@ -41,31 +56,53 @@ return array(
|
||||
'Constant amount found in one of the product\'s feature' => 'Constant amount found in one of the product\'s feature',
|
||||
'Content title *' => 'Content title *',
|
||||
'Country' => 'Country',
|
||||
'Country ID not found' => 'Country ID not found',
|
||||
'Country area' => 'Country area',
|
||||
'Country title *' => 'Country title *',
|
||||
'Critical' => 'Critical',
|
||||
'Current Password' => 'Current Password',
|
||||
'Date \'%date\' is invalid, please enter a valid date using %fmt format' => 'Date \'%date\' is invalid, please enter a valid date using %fmt format',
|
||||
'Debug' => 'Debug',
|
||||
'Default folder *' => 'Default folder *',
|
||||
'Default product category *' => 'Default product category *',
|
||||
'Default product sale element' => 'Default product sale element',
|
||||
'Deleting document for %id% with parent id %parentId%' => 'Deleting document for %id% with parent id %parentId%',
|
||||
'Deleting image for %id% with parent id %parentId%' => 'Deleting image for %id% with parent id %parentId%',
|
||||
'Delivery module ID not found' => 'Delivery module ID not found',
|
||||
'Description' => 'Description',
|
||||
'Detailed description' => 'Detailed description',
|
||||
'Disabled' => 'Disabled',
|
||||
'Discount amount' => 'Discount amount',
|
||||
'Document deleted successfully' => 'Document deleted successfully',
|
||||
'Document position updated' => 'Document position updated',
|
||||
'EAN Code' => 'EAN Code',
|
||||
'Email Address' => 'Email Address',
|
||||
'Email address' => 'Email address',
|
||||
'Emergency' => 'Emergency',
|
||||
'Enable remote SMTP use' => 'Enable remote SMTP use',
|
||||
'Encryption' => 'Encryption',
|
||||
'Equals' => 'Equals',
|
||||
'Error during %action process : %error. Exception was %exc' => 'Error during %action process : %error. Exception was %exc',
|
||||
'Error occured while processing order ref. %ref, ID %id: %err' => 'Error occured while processing order ref. %ref, ID %id: %err',
|
||||
'Errors' => 'Errors',
|
||||
'Fail to delete document for %id% with parent id %parentId% (Exception : %e%)' => 'Fail to delete document for %id% with parent id %parentId% (Exception : %e%)',
|
||||
'Fail to delete image for %id% with parent id %parentId% (Exception : %e%)' => 'Fail to delete image for %id% with parent id %parentId% (Exception : %e%)',
|
||||
'Fail to update document position' => 'Fail to update document position',
|
||||
'Fail to update image position' => 'Fail to update image position',
|
||||
'Failed to create instance of module "%name%" when trying to delete module. Module directory has probably been deleted' => 'Failed to create instance of module "%name%" when trying to delete module. Module directory has probably been deleted',
|
||||
'Failed to find a payment Module with ID=%mid for order ID=%oid' => 'Failed to find a payment Module with ID=%mid for order ID=%oid',
|
||||
'Failed to open translation file %file. Please be sure that this file is writable by your Web server' => 'Failed to open translation file %file. Please be sure that this file is writable by your Web server',
|
||||
'Failed to update language definition: %ex' => 'Failed to update language definition: %ex',
|
||||
'Fax' => 'Fax',
|
||||
'Feature value does not match FLOAT format' => 'Feature value does not match FLOAT format',
|
||||
'File is too heavy, please retry with a file having a size less than %size%.' => 'File is too Large, please retry with a file having a size less than %size%.',
|
||||
'First Name' => 'First Name',
|
||||
'Firstname' => 'Firstname',
|
||||
'Fixed Amount Discount' => 'Fixed Amount Discount',
|
||||
'Folder title *' => 'Folder title *',
|
||||
'Full Name' => 'Full Name',
|
||||
'Greater than' => 'Greater than',
|
||||
'Greater than or equals' => 'Greater than or equals',
|
||||
'HTML Message' => 'HTML Message',
|
||||
'Host' => 'Host',
|
||||
'I would like to receive the newsletter or the latest news.' => 'I would like to receive the newsletter or the latest news.',
|
||||
@@ -73,21 +110,41 @@ return array(
|
||||
'ISO 639-1 Code' => 'ISO 639-1 Code',
|
||||
'ISO Code *' => 'ISO Code *',
|
||||
'If a translation is missing or incomplete :' => 'If a translation is missing or incomplete :',
|
||||
'If cart item count is <strong>%operator%</strong> %quantity%' => 'If cart item count is <strong>%operator%</strong> %quantity%',
|
||||
'If cart total amount is <strong>%operator%</strong> %amount% %currency%' => 'If cart total amount is <strong>%operator%</strong> %amount% %currency%',
|
||||
'Image position updated' => 'Image position updated',
|
||||
'Images deleted successfully' => 'Images deleted successfully',
|
||||
'Impossible to delete a customer who already have orders' => 'Impossible to delete a customer who already have orders',
|
||||
'In' => 'In',
|
||||
'Information' => 'Information',
|
||||
'Invalid product_sale_elements' => 'Invalid product_sale_elements',
|
||||
'Invalid value "%value" for "%param" parameter in loop type: %type, name: %name' => 'Invalid value "%value" for "%param" parameter in loop type: %type, name: %name',
|
||||
'Invalid value for walkMode parameter: %value' => 'Invalid value for walkMode parameter: %value',
|
||||
'Is it the default product sale element ?' => 'Is it the default product sale element ?',
|
||||
'Language name' => 'Language name',
|
||||
'Last Name' => 'Last Name',
|
||||
'Lastname' => 'Lastname',
|
||||
'Less than' => 'Less than',
|
||||
'Less than or equals' => 'Less than or equals',
|
||||
'Log format *' => 'Log format *',
|
||||
'Log level *' => 'Log level *',
|
||||
'Login' => 'Login',
|
||||
'Login failed. Please check your username and password.' => 'Login failed. Please check your username and password.',
|
||||
'Loop cannot implements multiple Search Interfaces : `PropelSearchLoopInterface`, `ArraySearchLoopInterface`' => 'Loop cannot implements multiple Search Interfaces : `PropelSearchLoopInterface`, `ArraySearchLoopInterface`',
|
||||
'Loop must implements \'PropelSearchLoopInterface\' to be timestampable' => 'Loop must implements \'PropelSearchLoopInterface\' to be timestampable',
|
||||
'Loop must implements \'PropelSearchLoopInterface\' to be versionable' => 'Loop must implements \'PropelSearchLoopInterface\' to be versionable',
|
||||
'Loop must implements one of the following interfaces : `PropelSearchLoopInterface`, `ArraySearchLoopInterface`' => 'Loop must implements one of the following interfaces : `PropelSearchLoopInterface`, `ArraySearchLoopInterface`',
|
||||
'Loop type \'%type\' is not defined.' => 'Loop type \'%type\' is not defined.',
|
||||
'Make this address as my primary address' => 'Make this address as my primary address',
|
||||
'Message subject' => 'Message subject',
|
||||
'Meta Description' => 'Meta Description',
|
||||
'Meta Keywords' => 'Meta Keywords',
|
||||
'Missing \'name\' parameter in loop arguments' => 'Missing \'name\' parameter in loop arguments',
|
||||
'Missing \'rel\' parameter in ifloop/elseloop arguments' => 'Missing \'rel\' parameter in ifloop/elseloop arguments',
|
||||
'Missing \'rel\' parameter in page loop' => 'Missing \'rel\' parameter in page loop',
|
||||
'Missing \'type\' parameter in loop arguments' => 'Missing \'type\' parameter in loop arguments',
|
||||
'Missing \'type\' parameter in {count} loop arguments' => 'Missing \'type\' parameter in {count} loop arguments',
|
||||
'Module ID not found' => 'Module ID not found',
|
||||
'Name' => 'Name',
|
||||
'Name *' => 'Name *',
|
||||
'Name of the HTML layout file' => 'Name of the HTML layout file',
|
||||
@@ -97,17 +154,27 @@ return array(
|
||||
'New Password' => 'New Password',
|
||||
'No %obj was created.' => 'No %obj was created.',
|
||||
'No %obj was updated.' => 'No %obj was updated.',
|
||||
'No module found for code \'%item\'' => 'No module found for code \'%item\'',
|
||||
'No pagination currently defined for loop name \'%name\'' => 'No pagination currently defined for loop name \'%name\'',
|
||||
'No, I am a new customer.' => 'No, I am a new customer.',
|
||||
'Not equals' => 'Not equals',
|
||||
'Not found' => 'Not found',
|
||||
'Not in' => 'Not in',
|
||||
'Notices' => 'Notices',
|
||||
'Order address ID not found' => 'Order address ID not found',
|
||||
'Order ref. %ref is now unpaid.' => 'Order ref. %ref is now unpaid.',
|
||||
'Order ref. %ref, ID %id has been successfully paid.' => 'Order ref. %ref, ID %id has been successfully paid.',
|
||||
'Page Title' => 'Page Title',
|
||||
'Parent category *' => 'Parent category *',
|
||||
'Parent folder *' => 'Parent folder *',
|
||||
'Password' => 'Password',
|
||||
'Password *' => 'Password *',
|
||||
'Password confirmation' => 'Password confirmation',
|
||||
'Percent Discount' => 'Percent Discount',
|
||||
'Percentage of the product price' => 'Percentage of the product price',
|
||||
'Percentage removed from the cart' => 'Percentage removed from the cart',
|
||||
'Phone' => 'Phone',
|
||||
'Please accept the Terms and conditions in order to register.' => 'Please accept the Terms and conditions in order to register.',
|
||||
'Please check your input: %error' => 'Please check your input: %error',
|
||||
'Please enter your email address' => 'Please enter your email address',
|
||||
'Please enter your password' => 'Please enter your password',
|
||||
'Please specify either \'path\' or \'file\' parameter in {url} function.' => 'Please specify either \'path\' or \'file\' parameter in {url} function.',
|
||||
@@ -117,12 +184,14 @@ return array(
|
||||
'Preferred locale' => 'Preferred locale',
|
||||
'Prevent mailing template modification or deletion, except for super-admin' => 'Prevent mailing template modification or deletion, except for super-admin',
|
||||
'Prevent variable modification or deletion, except for super-admin' => 'Prevent variable modification or deletion, except for super-admin',
|
||||
'Price' => 'Price',
|
||||
'Price currency *' => 'Price currency *',
|
||||
'Processing cancelation of payment for order ref. %ref' => 'Processing cancelation of payment for order ref. %ref',
|
||||
'Processing confirmation of order ref. %ref, ID %id' => 'Processing confirmation of order ref. %ref, ID %id',
|
||||
'Prodcut ID *' => 'Prodcut ID *',
|
||||
'Product ID' => 'Product ID',
|
||||
'Product ID *' => 'Product ID *',
|
||||
'Product base price excluding taxes *' => 'Product base price excluding taxes *',
|
||||
'Product base price with taxes' => 'Product base price with taxes',
|
||||
'Product price excluding taxes' => 'Product price excluding taxes',
|
||||
'Product price excluding taxes *' => 'Product price excluding taxes *',
|
||||
'Product price including taxes' => 'Product price including taxes',
|
||||
@@ -133,6 +202,8 @@ return array(
|
||||
'ProductSaleElement modification' => 'ProductSaleElement modification',
|
||||
'Profile' => 'Profile',
|
||||
'Profile Code' => 'Profile Code',
|
||||
'Profile ID not found' => 'Profile ID not found',
|
||||
'Profile `code` already exists' => 'Profile `code` already exists',
|
||||
'Purpose *' => 'Purpose *',
|
||||
'Quantity' => 'Quantity',
|
||||
'Rate from € *' => 'Rate from € *',
|
||||
@@ -140,8 +211,8 @@ return array(
|
||||
'Redirecting to %url' => 'Redirecting to %url',
|
||||
'Reference' => 'Reference',
|
||||
'Reference *' => 'Reference *',
|
||||
'Related loop name \'%name\'\' is not defined.' => 'Related loop name \'%name\'\' is not defined.',
|
||||
'Remember me ?' => 'Remember me ?',
|
||||
'Remove X amount to total cart' => 'Remove X amount to total cart',
|
||||
'Remove X percent to total cart' => 'Remove X percent to total cart',
|
||||
'Replace by the default language' => 'Replace by the default language',
|
||||
'Replace current document by this file' => 'Replace current document by this file',
|
||||
@@ -150,11 +221,16 @@ return array(
|
||||
'Rotated Text File' => 'Rotated Text File',
|
||||
'Sale price excluding taxes' => 'Sale price excluding taxes',
|
||||
'Sale price including taxes' => 'Sale price including taxes',
|
||||
'Saving documents for %parentName% parent id %parentId% (%parentType%)' => 'Saving documents for %parentName% parent id %parentId% (%parentType%)',
|
||||
'Saving images for %parentName% parent id %parentId% (%parentType%)' => 'Saving images for %parentName% parent id %parentId% (%parentType%)',
|
||||
'Shipping zone name' => 'Shipping zone name',
|
||||
'Show redirections *' => 'Show redirections *',
|
||||
'Sorry, an error occured: %msg' => 'Sorry, an error occured: %msg',
|
||||
'Sorry, an error occurred: %err' => 'Sorry, an error occurred: %err',
|
||||
'Sorry, you are not allowed to perform this action.' => 'Sorry, you are not allowed to perform this action.',
|
||||
'Sorry, you\'re not allowed to perform this action' => 'Sorry, you\'re not allowed to perform this action',
|
||||
'Source IP' => 'Source IP',
|
||||
'Stats on %month/%year' => 'Stats on %month/%year',
|
||||
'Store configuration failed.' => 'Store configuration failed.',
|
||||
'Store email address' => 'Store email address',
|
||||
'Store logs into text file' => 'Store logs into text file',
|
||||
@@ -167,65 +243,70 @@ return array(
|
||||
'Summary' => 'Summary',
|
||||
'Symbol *' => 'Symbol *',
|
||||
'System log configuration failed.' => 'System log configuration failed.',
|
||||
'Tax ID not found in tax list JSON' => 'Tax ID not found in tax list JSON',
|
||||
'Tax list is not valid JSON' => 'Tax list is not valid JSON',
|
||||
'Tax rule ID not found' => 'Tax rule ID not found',
|
||||
'Tax rule for this product *' => 'Tax rule for this product *',
|
||||
'Template Name *' => 'Template Name *',
|
||||
'Template file %file cannot be found.' => 'Template file %file cannot be found.',
|
||||
'Text File' => 'Text File',
|
||||
'Text Message' => 'Text Message',
|
||||
'The TaxEngine should be passed to this form before using it.' => 'The TaxEngine should be passed to this form before using it.',
|
||||
'The cart item count should match the condition' => 'The cart item count should match the condition',
|
||||
'The image which replaces an undefined country flag (%file) was not found. Please check unknown-flag-path configuration variable, and check that the image exists.' => 'The image which replaces an undefined country flag (%file) was not found. Please check unknown-flag-path configuration variable, and check that the image exists.',
|
||||
'The loop name \'%name\' is already defined in %className class' => 'The loop name \'%name\' is already defined in %className class',
|
||||
'This category is online.' => 'This category is online.',
|
||||
'This condition is always true' => 'This condition is always true',
|
||||
'This content is online.' => 'This content is online.',
|
||||
'This coupon does not exists' => 'This coupon does not exists',
|
||||
'This coupon will offert a flat percentage off a shopper\'s entire order (not applied to shipping costs or tax rates). If the discount is greater than the total order corst, the customer will only pay the shipping, or nothing if the coupon also provides free shipping.' => 'This coupon will offert a flat percentage off a shopper\'s entire order (not applied to shipping costs or tax rates). If the discount is greater than the total order corst, the customer will only pay the shipping, or nothing if the coupon also provides free shipping.',
|
||||
'This coupon will subtracts a set amount from the total cost of an order. If the discount is greater than the total order corst, the customer will only pay the shipping, or nothing if the coupon also provides free shipping.' => 'This coupon will subtracts a set amount from the total cost of an order. If the discount is greater than the total order corst, the customer will only pay the shipping, or nothing if the coupon also provides free shipping.',
|
||||
'This email already exists.' => 'This email already exists.',
|
||||
'This email does not exists' => 'This email does not exists',
|
||||
'This extension must be installed and loaded' => 'This extension must be installed and loaded',
|
||||
'This folder is online.' => 'This folder is online.',
|
||||
'This login already exists' => 'This login already exists',
|
||||
'This product is on sale' => 'This product is on sale',
|
||||
'This product is online' => 'This product is online',
|
||||
'This product_sale_elements_id does not exists for this product : %d' => 'This product_sale_elements_id does not exists for this product : %d',
|
||||
'This template is in use in some of your products, and cannot be deleted. Delete it from all your products and try again.' => 'This template is in use in some of your products, and cannot be deleted. Delete it from all your products and try again.',
|
||||
'This value should not be blank.' => 'This value should not be blank.',
|
||||
'Timeout' => 'Timeout',
|
||||
'Title' => 'Title',
|
||||
'Title *' => 'Title *',
|
||||
'Title ID not found' => 'Title ID not found',
|
||||
'Type' => 'Type',
|
||||
'Unable to process your request. Please try again (%err).' => 'Unable to process your request. Please try again (%err).',
|
||||
'Unavailable' => 'Unavailable',
|
||||
'Unconditional usage' => 'Unconditional usage',
|
||||
'Unconditionnal usage' => 'Unconditionnal usage',
|
||||
'Undefined loop argument "%name"' => 'Undefined loop argument "%name"',
|
||||
'Undefined search mode \'%mode\'' => 'Undefined search mode \'%mode\'',
|
||||
'Undefined translation type: %item' => 'Undefined translation type: %item',
|
||||
'Unknown order ID: %id' => 'Unknown order ID: %id',
|
||||
'Unsupported magic method %name. only getArgname() is supported.' => 'Unsupported magic method %name. only getArgname() is supported.',
|
||||
'Username' => 'Username',
|
||||
'Username *' => 'Username *',
|
||||
'Value' => 'Value',
|
||||
'Value *' => 'Value *',
|
||||
'Warnings' => 'Warnings',
|
||||
'Weight' => 'Weight',
|
||||
'Weight *' => 'Weight *',
|
||||
'Yes, I have a password :' => 'Yes, I have a password :',
|
||||
'You are already registered!' => 'You are already registered!',
|
||||
'You can only upload images (.png, .jpg, .jpeg, .gif)' => 'You can only upload images (.png, .jpg, .jpeg, .gif)',
|
||||
'Your Email Address' => 'Your Email Address',
|
||||
'Your Message' => 'Your Message',
|
||||
'Your current password does not match.' => 'Your current password does not match.',
|
||||
'Zip code' => 'Zip code',
|
||||
'date format' => 'date format',
|
||||
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'delivery module %s is not a Thelia\Module\DeliveryModuleInterface',
|
||||
'language locale' => 'language locale',
|
||||
'mailing system modification' => 'mailing system modification',
|
||||
'shipping area name' => 'shipping area name',
|
||||
'time format' => 'time format',
|
||||
'This value should not be blank.' => 'This value should not be blank.',
|
||||
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.',
|
||||
'Administrator ID not found' => 'Administrator ID not found',
|
||||
'This login already exists' => 'This login already exists',
|
||||
'password confirmation is not the same as password field' => 'password confirmation is not the same as password field',
|
||||
'password must be composed of at least 4 characters' => 'password must be composed of at least 4 characters',
|
||||
'this product id does not exists : %d' => 'this product id does not exists : %d',
|
||||
'This product_sale_elements_id does not exists for this product : %d' => 'This product_sale_elements_id does not exists for this product : %d',
|
||||
'payment module %s is not a Thelia\Module\PaymentModuleInterface' => 'payment module %s is not a Thelia\Module\PaymentModuleInterface',
|
||||
'permanent discount (in percent)' => 'permanent discount (in percent)',
|
||||
'quantity value is not valid' => 'quantity value is not valid',
|
||||
'Please accept the Terms and conditions in order to register.' => 'Please accept the Terms and conditions in order to register.',
|
||||
'This email already exists.' => 'This email already exists.',
|
||||
'This email does not exists' => 'This email does not exists',
|
||||
'Your current password does not match.' => 'Your current password does not match.',
|
||||
'Module ID not found' => 'Module ID not found',
|
||||
'You are already registered!' => 'You are already registered!',
|
||||
'Address ID not found' => 'Address ID not found',
|
||||
'Delivery module ID not found' => 'Delivery module ID not found',
|
||||
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'delivery module %s is not a Thelia\Module\DeliveryModuleInterface',
|
||||
'Order address ID not found' => 'Order address ID not found',
|
||||
'Title ID not found' => 'Title ID not found',
|
||||
'Country ID not found' => 'Country ID not found',
|
||||
'Profile `code` already exists' => 'Profile `code` already exists',
|
||||
'Profile ID not found' => 'Profile ID not found',
|
||||
'The TaxEngine should be passed to this form before using it.' => 'The TaxEngine should be passed to this form before using it.',
|
||||
'Tax rule ID not found' => 'Tax rule ID not found',
|
||||
'Tax list is not valid JSON' => 'Tax list is not valid JSON',
|
||||
'Bad tax list JSON' => 'Bad tax list JSON',
|
||||
'Tax ID not found in tax list JSON' => 'Tax ID not found in tax list JSON',
|
||||
'Please check your input: %s' => 'Please check your input: %s',
|
||||
'Sorry, an error occured: %s' => 'Sorry, an error occured: %s',
|
||||
'this product id does not exists : %d' => 'this product id does not exists : %d',
|
||||
'time format' => 'time format',
|
||||
);
|
||||
|
||||
@@ -1,36 +1,51 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'"%param" parameter cannot be empty in loop type: %type, name: %name' => 'Le paramètre "%param" ne peut être vide dans la boucle type: %type, nom: %name ',
|
||||
'"%param" parameter is missing in loop type: %type, name: %name' => 'Le paramètre "%param" est absent dans la boucle type: %type, nom: %name ',
|
||||
'%obj SEO modification' => 'Modification SEO de %obj',
|
||||
'%obj creation' => 'Création de %obj',
|
||||
'%obj modification' => 'Modification de %obj',
|
||||
'\'%type\' loop class should extends Thelia\Core\Template\Element\BaseLoop' => 'La classe de boucle \'%type\' doit hériter de Thelia\Core\Template\Element\BaseLoop ',
|
||||
'A currency with code "%name" already exists.' => 'Une devise avec la code "%name" existe déjà',
|
||||
'A loop named \'%name\' already exists in the current scope.' => 'Une boucle nommée \'%name\' existe déjà dans le scope courant',
|
||||
'A message with name "%name" already exists.' => 'Un message avec le nom "%name" existe déjà.',
|
||||
'A product with reference %ref already exists. Please choose another reference.' => 'Un produit portant la référfence %ref existe déja. Merci de choisir une autre référence.',
|
||||
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'Un utilisateur existe déjà avec cette adresse email. Connectez-vous ou demandez une réinitialisation de votre mot de passe.',
|
||||
'A value for attribute "%name" is already present in the combination' => 'Une valeur pour la déclinaison "%name" est déjà présente dans la combinaison',
|
||||
'A variable with name "%name" already exists.' => 'Une variable avec le nom "%name" existe déjà.',
|
||||
'Activate logs only for these IP Addresses' => 'Activer les logs uniquement pour ces adresses IP',
|
||||
'Activate logs only for these files' => 'Activer les logs uniquement pour ces fichiers',
|
||||
'Add to all product templates' => 'Ajouter à tous les templates produit',
|
||||
'Additional address' => 'Adresse complémentaire',
|
||||
'Address Line 2' => 'Adresse 1',
|
||||
'Address Line 3' => 'Adresse 2',
|
||||
'Address label' => 'Adresse',
|
||||
'Address ID not found' => 'ID de l\'adresse non trouvé',
|
||||
'Address Line 2' => 'Adresse suite',
|
||||
'Address Line 3' => 'Adresse suite',
|
||||
'Address label' => 'Libellé',
|
||||
'Administrator ID not found' => 'ID de l\'administrateur not trouvé',
|
||||
'Advertise this product as new' => 'Afficher ce produit comme nouveau',
|
||||
'Alerts' => 'Alertes',
|
||||
'Alpha code 2 *' => 'Code Alpha 2 *',
|
||||
'Alpha code 3 *' => 'Code Alpha 3 *',
|
||||
'Amount removed from the cart' => 'Montant déduit du panier',
|
||||
'Apply exchange rates on price in %sym' => 'Appliquer le taux de change sur le prix en %sym',
|
||||
'Area' => 'Zone',
|
||||
'Attribute ID:Attribute AV ID' => 'Déclinaison ID : Valeur de déclinaison ID',
|
||||
'Auth mode' => 'Mode d\'authentification',
|
||||
'Available quantity' => 'Quantité disponible',
|
||||
'Available quantity *' => 'Quantité disponible *',
|
||||
'Available shipping zones' => 'Zones de livraison disponibles',
|
||||
'Bad tax list JSON' => 'Mauvais JSON de la liste des taxes',
|
||||
'Business ID' => 'ID du business',
|
||||
'By cart total amount' => 'Montant total du panier',
|
||||
'Cannot find a default country. Please define one.' => 'Impossible de trouver un pays par défaut. Veuillez en définir un.',
|
||||
'Cannot find the shop country. Please select a shop country.' => 'Impossible de trouver le pays du magasin. Veuillez en sélectionner un.',
|
||||
'Cannot instanciante module "%name%": the namespace is null. Maybe the model is not loaded ?' => 'Ne peut instancier le module "%name%": le namespace est null. Peut-être que le modèle n\'est pas chargé ?',
|
||||
'Cart item count condition' => 'Nombre d\'articles dans le panier',
|
||||
'Cart item count is' => 'Le nombre d\'articles dans le panier est',
|
||||
'Cart total amount is' => 'Le total du panier est',
|
||||
'Category title *' => 'Titre de la catégorie *',
|
||||
'Cellphone' => 'Numéro de portable',
|
||||
'Chapo' => 'Chapeau',
|
||||
'Check the total Cart amount in the given currency' => 'Applique une condition sur le montant total du panier dans la devise indiquée.',
|
||||
'City' => 'Ville',
|
||||
'Combination builder' => 'générateur de combinaison',
|
||||
'Compagny' => 'Société',
|
||||
@@ -41,31 +56,53 @@ return array(
|
||||
'Constant amount found in one of the product\'s feature' => 'Montant fixe trouvé depuis une caractéristique produit',
|
||||
'Content title *' => 'Titre du contenu *',
|
||||
'Country' => 'Pays',
|
||||
'Country ID not found' => 'ID du pays non trouvé',
|
||||
'Country area' => 'Zone du pays',
|
||||
'Country title *' => 'Pays *',
|
||||
'Critical' => 'Critique',
|
||||
'Current Password' => 'Mot de passe actuel.',
|
||||
'Date \'%date\' is invalid, please enter a valid date using %fmt format' => 'La date \'%date\' est incorrecte, merci d\'indiquer une date au format %fmt',
|
||||
'Debug' => 'Debug',
|
||||
'Default folder *' => 'Dossier par défaut *',
|
||||
'Default product category *' => 'Catégorie du produit par défaut *',
|
||||
'Default product sale element' => 'Product Sale Element par défaut',
|
||||
'Deleting document for %id% with parent id %parentId%' => 'Suppression du document %id% avec l\'ID parent %parentId%',
|
||||
'Deleting image for %id% with parent id %parentId%' => 'Suppression de l\'image %id% avec l\'ID parent %parentId%',
|
||||
'Delivery module ID not found' => 'Id du module de livraison non trouvé',
|
||||
'Description' => 'Description',
|
||||
'Detailed description' => 'Description détaillée',
|
||||
'Disabled' => 'Désactivé',
|
||||
'Discount amount' => 'Montant de la remise',
|
||||
'Document deleted successfully' => 'Le document a été supprimé.',
|
||||
'Document position updated' => 'La position du document a été modfiée',
|
||||
'EAN Code' => 'Code EAN',
|
||||
'Email Address' => 'Adresse mail',
|
||||
'Email address' => 'Adresse e-mail',
|
||||
'Emergency' => 'Urgence',
|
||||
'Enable remote SMTP use' => 'Activer l\'utilisation d\'un serveur SMTP distant.',
|
||||
'Encryption' => 'Chiffrement',
|
||||
'Equals' => 'Egal à',
|
||||
'Error during %action process : %error. Exception was %exc' => 'Erreur lors de %action: %error. Exception: %exc ',
|
||||
'Error occured while processing order ref. %ref, ID %id: %err' => 'Un erreur est survenue paedant le traitement de la commande ref. %ref, ID %id; %err',
|
||||
'Errors' => 'Erreurs',
|
||||
'Fail to delete document for %id% with parent id %parentId% (Exception : %e%)' => 'Echec lors de la suppression du document %id% avec l\'ID parent %parentId% (Exception : %e%)',
|
||||
'Fail to delete image for %id% with parent id %parentId% (Exception : %e%)' => 'Echec lors de la suppression de l\'image %id% avec l\'ID parent %parentId% (Exception : %e%)',
|
||||
'Fail to update document position' => 'La position du document e n\'a pas pu être modfiée',
|
||||
'Fail to update image position' => 'La position de l\'image n\'a pas pu être modfiée',
|
||||
'Failed to create instance of module "%name%" when trying to delete module. Module directory has probably been deleted' => 'Ne peut créer une instance du module "%name%" lors de la suppression du module. Le répertoire du module à sans doute été supprimé manuellement.',
|
||||
'Failed to find a payment Module with ID=%mid for order ID=%oid' => 'Ne peut trouver le module de paiement ID=%mid pour la commande ID=%oid ',
|
||||
'Failed to open translation file %file. Please be sure that this file is writable by your Web server' => 'L\'ouverture du fichier %file a échoué. Merci de vérifier que ce fichier est accessible en écriture pour votre serveur Web.',
|
||||
'Failed to update language definition: %ex' => 'Erreur lors de la mise à jour de la définition de la langue : %ex',
|
||||
'Fax' => 'Fax',
|
||||
'Feature value does not match FLOAT format' => 'valeur de caractéristique n\'est pas un FLOAT',
|
||||
'File is too heavy, please retry with a file having a size less than %size%.' => 'La taille du fichier est trop importante, et doit être inféreiure à %size%.',
|
||||
'First Name' => 'Prénom',
|
||||
'Firstname' => 'Prénom',
|
||||
'Fixed Amount Discount' => 'Remise d\'un montant fixe',
|
||||
'Folder title *' => 'Titre du dossier *',
|
||||
'Full Name' => 'Nom complet',
|
||||
'Greater than' => 'Supérieur à',
|
||||
'Greater than or equals' => 'Supérieur ou égal à',
|
||||
'HTML Message' => 'Message au format HTML',
|
||||
'Host' => 'Nom de l\'hôte',
|
||||
'I would like to receive the newsletter or the latest news.' => 'Je souhaite recevoir la lettre d\'information ou les dernières actualités.',
|
||||
@@ -73,21 +110,41 @@ return array(
|
||||
'ISO 639-1 Code' => 'Code ISO 639-1',
|
||||
'ISO Code *' => 'Code ISO *',
|
||||
'If a translation is missing or incomplete :' => 'Si une traduction est manquante ou incomplète :',
|
||||
'If cart item count is <strong>%operator%</strong> %quantity%' => 'Le nombre d\'articles dans le panier est <strong>%operator%</strong> %quantity% ',
|
||||
'If cart total amount is <strong>%operator%</strong> %amount% %currency%' => 'Si le total du panier est <strong>%operator%</strong> %amount% %currency% ',
|
||||
'Image position updated' => 'La position de l\'image a été modfiée',
|
||||
'Images deleted successfully' => 'L\'image a été supprimée.',
|
||||
'Impossible to delete a customer who already have orders' => 'Impossible de supprimer un client si celui-ci a déjà une commande',
|
||||
'In' => 'Compris dans',
|
||||
'Information' => 'Information',
|
||||
'Invalid product_sale_elements' => 'product_sale_elements invalide',
|
||||
'Invalid value "%value" for "%param" parameter in loop type: %type, name: %name' => 'La valeur "%value" est invalide pour le paramètre "%param" dans la boucle type: %type, nom: %name ',
|
||||
'Invalid value for walkMode parameter: %value' => 'Valeur incorrecte pour le paramètre walkMode : %value',
|
||||
'Is it the default product sale element ?' => 'Product Sale Element par défaut ?',
|
||||
'Language name' => 'Nom de la langue',
|
||||
'Last Name' => 'Nom',
|
||||
'Lastname' => 'Nom',
|
||||
'Less than' => 'Inférieur à',
|
||||
'Less than or equals' => 'Inférieur ou égal à',
|
||||
'Log format *' => 'Format des logs *',
|
||||
'Log level *' => 'Niveau de log *',
|
||||
'Login' => 'Connexion',
|
||||
'Login failed. Please check your username and password.' => 'Erreur de login. Veuillez vérifier votre login et votre mot de passe.',
|
||||
'Loop cannot implements multiple Search Interfaces : `PropelSearchLoopInterface`, `ArraySearchLoopInterface`' => 'Une boucle ne peut implémenter plusieurs Search Interfaces : `PropelSearchLoopInterface`, `ArraySearchLoopInterface`',
|
||||
'Loop must implements \'PropelSearchLoopInterface\' to be timestampable' => 'Les classes \'boucle\' doivent implémenter \'PropelSearchLoopInterface\' pour être horodatables',
|
||||
'Loop must implements \'PropelSearchLoopInterface\' to be versionable' => 'Les classes \'boucle\' doivent implémenter \'PropelSearchLoopInterface\' pour être versonnables',
|
||||
'Loop must implements one of the following interfaces : `PropelSearchLoopInterface`, `ArraySearchLoopInterface`' => 'Une boucle doit implémenter au moins une de ces interfaces : `PropelSearchLoopInterface`, `ArraySearchLoopInterface`',
|
||||
'Loop type \'%type\' is not defined.' => 'La boucle de type \'%type\' n\'existe pas.',
|
||||
'Make this address as my primary address' => 'Choisir cette adresse comme adresse par défaut',
|
||||
'Message subject' => 'Sujet',
|
||||
'Meta Description' => 'Meta description',
|
||||
'Meta Keywords' => 'Meta keywords',
|
||||
'Missing \'name\' parameter in loop arguments' => 'Le paramètre obligatoire \'name\' est absent des paramètre de la boucle',
|
||||
'Missing \'rel\' parameter in ifloop/elseloop arguments' => 'Le paramètre obligatoire \'rel\' est absent des paramètre de la boucle ifloop/elseloop',
|
||||
'Missing \'rel\' parameter in page loop' => 'Le paramètre obligatoire \'rel\' est absent des paramètre de la boucle \'page\'',
|
||||
'Missing \'type\' parameter in loop arguments' => 'Le paramètre obligatoire \'type\' est absent des paramètre de la boucle ',
|
||||
'Missing \'type\' parameter in {count} loop arguments' => 'Le paramètre obligatoire \'type\' est absent des paramètre de la boucle {count}',
|
||||
'Module ID not found' => 'Id du module non trouvé',
|
||||
'Name' => 'Nom',
|
||||
'Name *' => 'Nom *',
|
||||
'Name of the HTML layout file' => 'Nom du layout HTML',
|
||||
@@ -97,17 +154,27 @@ return array(
|
||||
'New Password' => 'Nouveau mot de passe.',
|
||||
'No %obj was created.' => 'aucun %obj n\'a été créé.',
|
||||
'No %obj was updated.' => 'Aucun %obj mis à jour',
|
||||
'No module found for code \'%item\'' => 'Aucun module trouvé pour \'%item\' ',
|
||||
'No pagination currently defined for loop name \'%name\'' => 'La pagination n\'est pas définie pour la boucle \'%name\'',
|
||||
'No, I am a new customer.' => 'Non, je suis un nouveau client.',
|
||||
'Not equals' => 'Différent de',
|
||||
'Not found' => 'Non trouvé.',
|
||||
'Not in' => 'Non compris dans',
|
||||
'Notices' => 'Notices',
|
||||
'Order address ID not found' => 'ID de l\'adresse de la commande non trouvé',
|
||||
'Order ref. %ref is now unpaid.' => 'La commande %ref, ID %id est désormais non payée',
|
||||
'Order ref. %ref, ID %id has been successfully paid.' => 'La commande ref. %ref, ID %id a été correctement payée',
|
||||
'Page Title' => 'Titre de la page',
|
||||
'Parent category *' => 'Catégorie parente *',
|
||||
'Parent folder *' => 'Dossier parent *',
|
||||
'Password' => 'Mot de passe',
|
||||
'Password *' => 'Mot de passe *',
|
||||
'Password confirmation' => 'Confirmation du mot de passe.',
|
||||
'Percent Discount' => 'Remise en pourcentage de la commande',
|
||||
'Percentage of the product price' => 'Pourcentage du prix du produit',
|
||||
'Percentage removed from the cart' => 'Pourcentage déduit du panier',
|
||||
'Phone' => 'Téléphone',
|
||||
'Please accept the Terms and conditions in order to register.' => 'Veuillez accepter les termes et conditions pour vous inscrire.',
|
||||
'Please check your input: %error' => 'Merci de vérifier votre saisie: %error',
|
||||
'Please enter your email address' => 'Renseignez votre adresse mail',
|
||||
'Please enter your password' => 'Entrez votre mot de passe.',
|
||||
'Please specify either \'path\' or \'file\' parameter in {url} function.' => 'Veuillez spécifier soit le paramètre \'chemin\' ou \'fichier\' dans la fonction {url}',
|
||||
@@ -117,12 +184,14 @@ return array(
|
||||
'Preferred locale' => 'locale souhaitée',
|
||||
'Prevent mailing template modification or deletion, except for super-admin' => 'Prévenir la suppression ou la modification ds templates de mail, excepté pour les super-administrateurs.',
|
||||
'Prevent variable modification or deletion, except for super-admin' => 'Prévenir la suppression ou la modification de variables, excepté pour les super-administrateurs.',
|
||||
'Price' => 'Prix',
|
||||
'Price currency *' => 'Devise *',
|
||||
'Processing cancelation of payment for order ref. %ref' => 'Traitement de l\'annulation du paiement de la commande %ref, ID %id',
|
||||
'Processing confirmation of order ref. %ref, ID %id' => 'Traitement de la confirmation de la commande %ref, ID %id',
|
||||
'Prodcut ID *' => 'ID du produit *',
|
||||
'Product ID' => 'ID produit',
|
||||
'Product ID *' => 'ID produit *',
|
||||
'Product base price excluding taxes *' => 'Prix du produit Hors Taxe *',
|
||||
'Product base price with taxes' => 'Prix du produit TTC',
|
||||
'Product price excluding taxes' => 'Prix du produit Hors Taxes',
|
||||
'Product price excluding taxes *' => 'prix HT',
|
||||
'Product price including taxes' => 'Prix du produit taxes incluses',
|
||||
@@ -133,14 +202,17 @@ return array(
|
||||
'ProductSaleElement modification' => 'Modification de ProductSaleElement.',
|
||||
'Profile' => 'Profil',
|
||||
'Profile Code' => 'Profil',
|
||||
'Profile ID not found' => 'ID du profil non trouvé',
|
||||
'Profile `code` already exists' => 'Le `code` du profil existe déjà',
|
||||
'Purpose *' => 'Objet',
|
||||
'Quantity' => 'Quantité',
|
||||
'Rate from € *' => 'Taux à partie de l\'€ *',
|
||||
'Redirecting ...' => 'Redirection ...',
|
||||
'Redirecting to %url' => 'Redirection vers %url',
|
||||
'Reference' => 'Référence',
|
||||
'Reference *' => 'Référence *',
|
||||
'Related loop name \'%name\'\' is not defined.' => 'La boucle \'%name\' n\'est pas définie.',
|
||||
'Remember me ?' => 'Se souvenir de moi ?',
|
||||
'Remove X amount to total cart' => 'Enlève un montant fixe du total du panier',
|
||||
'Remove X percent to total cart' => 'Enlève un pourcentage du panier total',
|
||||
'Replace by the default language' => 'Remplacer par la langue par défaut',
|
||||
'Replace current document by this file' => 'Remplacer le document courant par ce fichier',
|
||||
@@ -149,11 +221,16 @@ return array(
|
||||
'Rotated Text File' => 'Rotation du fichier texte',
|
||||
'Sale price excluding taxes' => 'Prix de vente Hors Taxes',
|
||||
'Sale price including taxes' => 'Prix de vente Toutes Taxes Comprises',
|
||||
'Saving documents for %parentName% parent id %parentId% (%parentType%)' => 'Enregistrement des documents pour %parentName% ID parent %parentId% (%parentType%)',
|
||||
'Saving images for %parentName% parent id %parentId% (%parentType%)' => 'Enregistrement des images pour %parentName% ID parent %parentId% (%parentType%)',
|
||||
'Shipping zone name' => 'Nom de la zone de livraison',
|
||||
'Show redirections *' => 'Montrer les redirections *',
|
||||
'Sorry, an error occured: %msg' => 'Désolé, une erreur est survenue : %msg',
|
||||
'Sorry, an error occurred: %err' => 'Désolé, une erreur est survenue: %err',
|
||||
'Sorry, you are not allowed to perform this action.' => 'Désolé, vous n\'êtes pas autorisé à réaliser cette action.',
|
||||
'Sorry, you\'re not allowed to perform this action' => 'Désolé, vous n\'êtes pas autorisé à réaliser cette action.',
|
||||
'Source IP' => 'IP source',
|
||||
'Stats on %month/%year' => 'Statistiques pour %month/%year ',
|
||||
'Store configuration failed.' => 'Erreur de configuration du magasin.',
|
||||
'Store email address' => 'Adresse mail du magasin',
|
||||
'Store logs into text file' => 'Conserver les logs dans des fichiers texte',
|
||||
@@ -166,65 +243,70 @@ return array(
|
||||
'Summary' => 'Résumé',
|
||||
'Symbol *' => 'Symbole *',
|
||||
'System log configuration failed.' => 'Erreur du configurateur de log system.',
|
||||
'Tax ID not found in tax list JSON' => 'ID de la taxe non trouvé dans le JSON de la liste des taxes',
|
||||
'Tax list is not valid JSON' => 'Le JSON de la liste des taxes n\'est pas valide',
|
||||
'Tax rule ID not found' => 'ID de la règle de taxe non trouvé',
|
||||
'Tax rule for this product *' => 'Règle de taxe pour ce produit *',
|
||||
'Template Name *' => 'Nom du template *',
|
||||
'Template file %file cannot be found.' => 'Le fichier %file n\'a pas été trouvé dans le template. ',
|
||||
'Text File' => 'Fichier texte',
|
||||
'Text Message' => 'Message au format texte',
|
||||
'The TaxEngine should be passed to this form before using it.' => 'Le moteur de taxe doit être passé au formulaire avant d\'être utilisé.',
|
||||
'The cart item count should match the condition' => 'Le nombre d\'articles dans le panier doit vérifier la condition',
|
||||
'The image which replaces an undefined country flag (%file) was not found. Please check unknown-flag-path configuration variable, and check that the image exists.' => 'L\'image qui remplace un drapeau de pays manquant (%file) n\'a pas été trouvée. Merci de vérifier la variable de configuration unknown-flag-path.',
|
||||
'The loop name \'%name\' is already defined in %className class' => 'La boucle \'%name\' est déjà définir dans la classe %className',
|
||||
'This category is online.' => 'Cette catégorie est en ligne.',
|
||||
'This condition is always true' => 'Cette condition est troujours vérifiée',
|
||||
'This content is online.' => 'Ce contenu est en ligne.',
|
||||
'This coupon does not exists' => 'Ce code promo n\'existe pas',
|
||||
'This coupon will offert a flat percentage off a shopper\'s entire order (not applied to shipping costs or tax rates). If the discount is greater than the total order corst, the customer will only pay the shipping, or nothing if the coupon also provides free shipping.' => 'Ce code promo retire le pourcentage indiqué du total de la commande, hors frais de port et taxes. Si la remise est supérieur au total de la commande, seul le port sera facturé, à moins que le code promo n\'offre aussi les frais port.',
|
||||
'This coupon will subtracts a set amount from the total cost of an order. If the discount is greater than the total order corst, the customer will only pay the shipping, or nothing if the coupon also provides free shipping.' => 'Ce code promo retire le montant indiqué du total de la commande, hors frais de port et taxes. Si la remise est supérieur au total de la commande, seul le port sera facturé, à moins que le code promo n\'offre aussi les frais port.',
|
||||
'This email already exists.' => 'Cette adresse email existe déjà',
|
||||
'This email does not exists' => 'Cette adresse email n\'existe pas',
|
||||
'This extension must be installed and loaded' => 'Cette extension doit être installée et chargée.',
|
||||
'This folder is online.' => 'Ce dossier est en ligne.',
|
||||
'This login already exists' => 'Cet identifiant existe déjà',
|
||||
'This product is on sale' => 'Ce produit est en promo',
|
||||
'This product is online' => 'Ce produit est en ligne',
|
||||
'This product_sale_elements_id does not exists for this product : %d' => 'Le product_sale_elements_id n\'existe pas pour ce produit : %d',
|
||||
'This template is in use in some of your products, and cannot be deleted. Delete it from all your products and try again.' => 'Ce template est utilisé par des produits, et ne peut être supprimé. Retirez-le de tous vos produits, et ré-essayez.',
|
||||
'This value should not be blank.' => 'Cette valeur ne doit pas être vide.',
|
||||
'Timeout' => 'Délai d\'attente expiré',
|
||||
'Title' => 'Titre',
|
||||
'Title *' => 'Titre *',
|
||||
'Title ID not found' => 'ID de la civilité non trouvé',
|
||||
'Type' => 'Type',
|
||||
'Unable to process your request. Please try again (%err).' => 'Echec lors du traitement de votre requête. Merci de ré-essayer (%err).',
|
||||
'Unavailable' => 'Non disponible.',
|
||||
'Unconditional usage' => 'Utilisable sans conditions',
|
||||
'Unconditionnal usage' => 'Utilisable sans conditions',
|
||||
'Undefined loop argument "%name"' => 'Argument de boucle invalide: "%name" ',
|
||||
'Undefined search mode \'%mode\'' => 'Mode de recherche \'%mode\' invalide',
|
||||
'Undefined translation type: %item' => 'Type de traduction inconnu:%item ',
|
||||
'Unknown order ID: %id' => 'La commande ID %id est inconnue.',
|
||||
'Unsupported magic method %name. only getArgname() is supported.' => 'La méthode magique %name n\'est pas supportée. Seule get<argname>() est supporté..',
|
||||
'Username' => 'Nom d\'utilisateur',
|
||||
'Username *' => 'Nom d\'utilisateur *',
|
||||
'Value' => 'Valeur',
|
||||
'Value *' => 'Valeur *',
|
||||
'Warnings' => 'Avertissements',
|
||||
'Weight' => 'Poids',
|
||||
'Weight *' => 'Poids *',
|
||||
'Yes, I have a password :' => 'Oui, j\'ai un mot de passe :',
|
||||
'You are already registered!' => 'Vous êtes déjà enregistré !',
|
||||
'You can only upload images (.png, .jpg, .jpeg, .gif)' => 'Seules les images sont autorisées (.png, .jpg, .jpeg, .gif)',
|
||||
'Your Email Address' => 'Votre adresse mail',
|
||||
'Your Message' => 'Votre message',
|
||||
'Your current password does not match.' => 'Votre mot de passe actuel ne correspond pas',
|
||||
'Zip code' => 'Code postal',
|
||||
'date format' => 'Format de date',
|
||||
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'le module de livraison %s n\'est pas un Thelia\Module\DeliveryModuleInterface',
|
||||
'language locale' => 'Langue locale',
|
||||
'mailing system modification' => 'Modification du système d\'envoi de mail.',
|
||||
'shipping area name' => 'Nom de la zone de livraison',
|
||||
'time format' => 'Format d\'heure',
|
||||
'This value should not be blank.' => 'Cette valeur ne doit pas être vide.',
|
||||
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'Un utilisateur existe déjà avec cette adresse email. Connectez-vous ou demandez une réinitialisation de votre mot de passe.',
|
||||
'Administrator ID not found' => 'ID de l\'administrateur not trouvé',
|
||||
'This login already exists' => 'Cet identifiant existe déjà',
|
||||
'password confirmation is not the same as password field' => 'le mot de passe de confirmation n\'est pas le même que le champ mot de passe',
|
||||
'password must be composed of at least 4 characters' => 'le mot de passe doit être composé d\'au moins 4 caractères',
|
||||
'this product id does not exists : %d' => 'l\'id du produit %d n\'existe pas',
|
||||
'This product_sale_elements_id does not exists for this product : %d' => 'Le product_sale_elements_id n\'existe pas pour ce produit : %d',
|
||||
'payment module %s is not a Thelia\Module\PaymentModuleInterface' => 'Le module de paiement %s n\'est pas une instance de Thelia\Module\PaymentModuleInterface ',
|
||||
'permanent discount (in percent)' => 'Remise permanente (en pourcentage)',
|
||||
'quantity value is not valid' => 'la valeur de la quantité n\'est pas valide',
|
||||
'Please accept the Terms and conditions in order to register.' => 'Veuillez accepter les termes et conditions pour vous inscrire.',
|
||||
'This email already exists.' => 'Cette adresse email existe déjà',
|
||||
'This email does not exists' => 'Cette adresse email n\'existe pas',
|
||||
'Your current password does not match.' => 'Votre mot de passe actuel ne correspond pas',
|
||||
'Module ID not found' => 'Id du module non trouvé',
|
||||
'You are already registered!' => 'Vous êtes déjà enregistré !',
|
||||
'Address ID not found' => 'ID de l\'adresse non trouvé',
|
||||
'Delivery module ID not found' => 'Id du module de livraison non trouvé',
|
||||
'delivery module %s is not a Thelia\Module\DeliveryModuleInterface' => 'le module de livraison %s n\'est pas un Thelia\Module\DeliveryModuleInterface',
|
||||
'Order address ID not found' => 'ID de l\'adresse de la commande non trouvé',
|
||||
'Title ID not found' => 'ID de la civilité non trouvé',
|
||||
'Country ID not found' => 'ID du pays non trouvé',
|
||||
'Profile `code` already exists' => 'Le `code` du profil existe déjà',
|
||||
'Profile ID not found' => 'ID du profil non trouvé',
|
||||
'The TaxEngine should be passed to this form before using it.' => 'Le moteur de taxe doit être passé au formulaire avant d\'être utilisé.',
|
||||
'Tax rule ID not found' => 'ID de la règle de taxe non trouvé',
|
||||
'Tax list is not valid JSON' => 'Le JSON de la liste des taxes n\'est pas valide',
|
||||
'Bad tax list JSON' => 'Mauvais JSON de la liste des taxes',
|
||||
'Tax ID not found in tax list JSON' => 'ID de la taxe non trouvé dans le JSON de la liste des taxes',
|
||||
'Please check your input: %s' => 'Veuillez vérifier votre saisie: %s',
|
||||
'Sorry, an error occured: %s' => 'Désolé, une erreur est survenue: %s',
|
||||
'this product id does not exists : %d' => 'l\'id du produit %d n\'existe pas',
|
||||
'time format' => 'Format d\'heure',
|
||||
);
|
||||
|
||||
@@ -1,26 +1,201 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
return array(
|
||||
|
||||
'%obj SEO modification' => 'modifiche SEO %obj',
|
||||
'%obj creation' => 'creazione di %obj ',
|
||||
'%obj modification' => 'modifica %obj',
|
||||
'A currency with code "%name" already exists.' => 'Una moneta con il codice "%name" esiste già.',
|
||||
'A message with name "%name" already exists.' => 'Un messaggio con il nome "%name" esiste già.',
|
||||
'A variable with name "%name" already exists.' => 'Una variabile con il nome "%name" esiste già.',
|
||||
'Activate logs only for these IP Addresses' => 'Attivare log solo per questi indirizzi IP',
|
||||
'Activate logs only for these files' => 'Attivare log solo per questi file',
|
||||
'Add to all product templates' => 'Aggiungere a tutti i template di prodotto',
|
||||
'Additional address' => 'Indirizzo addizionale',
|
||||
'Address Line 2' => 'Indirizzo linea 2',
|
||||
'Address Line 3' => 'Indirizzo linea 3',
|
||||
'Address label' => 'Etichetta dell\'indirizzo',
|
||||
'Advertise this product as new' => 'Pubblicizzare questo prodotto come nuovo',
|
||||
'Alerts' => 'Avvisi',
|
||||
'Alpha code 2 *' => 'Alpha code 2 *',
|
||||
'Alpha code 3 *' => 'Alpha code 3 *',
|
||||
'Amount removed from the cart' => 'Importo rimosso dal carrello',
|
||||
'Apply exchange rates on price in %sym' => 'Applicare i tassi di cambio sui prezzi in %sym',
|
||||
'Area' => 'Zona',
|
||||
'Attribute ID:Attribute AV ID' => 'Attribute ID:Attribute AV ID',
|
||||
'Auth mode' => 'Auth mode',
|
||||
'Available quantity' => 'Quantità disponibile',
|
||||
'Available quantity *' => 'Quantità disponibile *',
|
||||
'Business ID' => 'Business ID',
|
||||
'Cannot find a default country. Please define one.' => 'Non riusciamo a trovare un paese predefinito. Per favore, definirne uno.',
|
||||
'Cannot find the shop country. Please select a shop country.' => 'Non riusciamo a trovare il paese di negozio. Si prega di selezionare un paese per il negozio.',
|
||||
'Category title *' => 'Titolo della categoria *',
|
||||
'Cellphone' => 'Cellulare',
|
||||
'Chapo' => 'Chapo',
|
||||
'City' => 'Città',
|
||||
'Combination builder' => 'Generatore di combinazione',
|
||||
'Compagny' => 'Azienda',
|
||||
'Company' => 'Azienda',
|
||||
'Company Name' => 'Nome della società',
|
||||
'Conclusion' => 'Conclusione',
|
||||
'Constant amount' => 'Importo costante',
|
||||
'Constant amount found in one of the product\'s feature' => 'Importo costante trovato in una delle caratteristiche del prodotto',
|
||||
'Content title *' => 'Titolo del contenuto *',
|
||||
'Country' => 'Paese',
|
||||
'Country area' => 'Zona del paese',
|
||||
'Country title *' => 'Titolo del paese *',
|
||||
'Critical' => 'Critico',
|
||||
'Current Password' => 'Password attuale',
|
||||
'Debug' => 'Eseguire il debug',
|
||||
'Default folder *' => 'Cartella predefinita *',
|
||||
'Default product category *' => 'Categoria di prodotto predefinita *',
|
||||
'Default product sale element' => 'Elemento predefinito di vendita per il prodotto',
|
||||
'Description' => 'Descrizione',
|
||||
'Detailed description' => 'Descrizione dettagliata',
|
||||
'Disabled' => 'Disattivato',
|
||||
'EAN Code' => 'Codice EAN',
|
||||
'Email Address' => 'Indirizzo email',
|
||||
'Email address' => 'Indirizzo email',
|
||||
'Emergency' => 'Emergenza',
|
||||
'Enable remote SMTP use' => 'Abilitare l\'utilizzo di un SMTP remoto',
|
||||
'Encryption' => 'Criptaggio',
|
||||
'Errors' => 'Errori',
|
||||
'Failed to update language definition: %ex' => 'Impossibile aggiornare la definizione del linguaggio: %ex',
|
||||
'Fax' => 'Fax',
|
||||
'Feature value does not match FLOAT format' => 'Il valore della caratteristica non corrisponde al formato FLOAT',
|
||||
'First Name' => 'Nome',
|
||||
'Firstname' => 'Nome',
|
||||
'Folder title *' => 'Titolo della cartella *',
|
||||
'Full Name' => 'Nome e cognome',
|
||||
'HTML Message' => 'Messaggio HTML',
|
||||
'Host' => 'Host',
|
||||
'I would like to receive the newsletter or the latest news.' => 'Vorrei ricevere la newsletter o le ultime notizie.',
|
||||
'ISO 4217 code *' => 'Codice ISO 4217 *',
|
||||
'ISO 639-1 Code' => 'Codice ISO 639-1',
|
||||
'ISO Code *' => 'Codice ISO *',
|
||||
'If a translation is missing or incomplete :' => 'Se una traduzione è incompleta o mancante :',
|
||||
'Information' => 'Informazioni',
|
||||
'Invalid product_sale_elements' => 'Product_sale_elements non valido',
|
||||
'Invalid value for walkMode parameter: %value' => 'Valore non valido per il parametro walkMode: %value',
|
||||
'Is it the default product sale element ?' => 'È l\'elemento predefinito di vendita del prodotto?',
|
||||
'Language name' => 'Nome della lingua',
|
||||
'Last Name' => 'Cognome',
|
||||
'Lastname' => 'Cognome',
|
||||
'Log format *' => 'Formato di registro *',
|
||||
'Log level *' => 'Livello del registro *',
|
||||
'Login' => 'Login',
|
||||
'Login failed. Please check your username and password.' => 'Accesso non riuscito. Si prega di controllare il nome dell\'utente e la password.',
|
||||
'Make this address as my primary address' => 'Fare questo indirizzo come mio indirizzo primario',
|
||||
'Message subject' => 'Oggetto del messaggio',
|
||||
'Meta Description' => 'Meta descrizione',
|
||||
'Meta Keywords' => 'Meta Keywords',
|
||||
'Name' => 'Nome',
|
||||
'Name *' => 'Nome *',
|
||||
'Name of the HTML layout file' => 'Nome del layout HTML',
|
||||
'Name of the HTML template file' => 'Nome del file del template HTML',
|
||||
'Name of the text layout file' => 'Nome del file del layout del testo',
|
||||
'Name of the text template file' => 'Nome del testo del file del template',
|
||||
'New Password' => 'Nuova Password',
|
||||
'No %obj was created.' => 'È stato creato nessuno %obj.',
|
||||
'No %obj was updated.' => 'Nessun %obj è stato aggiornato.',
|
||||
'No, I am a new customer.' => 'No, sono un nuovo cliente.',
|
||||
'Notices' => 'Avvisi',
|
||||
'Page Title' => 'Titolo della pagina',
|
||||
'Parent category *' => 'Categoria superiore *',
|
||||
'Parent folder *' => 'Cartella superiore *',
|
||||
'Password' => 'Password',
|
||||
'Password *' => 'Password *',
|
||||
'Password confirmation' => 'Conferma della password',
|
||||
'Percentage of the product price' => 'Percentuale del prezzo del prodotto',
|
||||
'Percentage removed from the cart' => 'Percentuale rimosso dal carrello',
|
||||
'Phone' => 'Telefono',
|
||||
'Please enter your email address' => 'Inserisci il tuo indirizzo email',
|
||||
'Please enter your password' => 'Per favore inserisci la password',
|
||||
'Please specify either \'path\' or \'file\' parameter in {url} function.' => 'Specificare il parametro \'percorso\' o \'file\' nella funzione {url}.',
|
||||
'Port' => 'Spedizione',
|
||||
'Post Scriptum' => 'Post Scriptum',
|
||||
'Postage' => 'Spese di spedizione',
|
||||
'Preferred locale' => 'Impostazioni internazionali preferite',
|
||||
'Prevent mailing template modification or deletion, except for super-admin' => 'Prevenire modifiche o cancellazione del template di mailing, ad eccezione del super-admin',
|
||||
'Prevent variable modification or deletion, except for super-admin' => 'Prevenire modifiche o cancellazione della variabile, ad eccezione del super-admin',
|
||||
'Price' => 'Prezzo',
|
||||
'Price currency *' => 'Prezzo della moneta *',
|
||||
'Prodcut ID *' => 'ID prodotto *',
|
||||
'Product ID' => 'ID prodotto',
|
||||
'Product ID *' => 'ID Prodotto *',
|
||||
'Product base price excluding taxes *' => 'Prezzo di base del prodotto escluse le tasse *',
|
||||
'Product price excluding taxes' => 'Prezzo del prodotto escluse le tasse',
|
||||
'Product price excluding taxes *' => 'Prezzo del prodotto escluse le tasse *',
|
||||
'Product price including taxes' => 'Prezzo del prodotto tasse incluse',
|
||||
'Product reference *' => 'Riferimento del prodotto *',
|
||||
'Product sale element ID *' => 'ID del prodotto venduto *',
|
||||
'Product template' => 'Template del prodotto',
|
||||
'Product title *' => 'Titolo del prodotto *',
|
||||
'ProductSaleElement modification' => 'modifica del ProductSaleElement',
|
||||
'Profile' => 'Profilo',
|
||||
'Profile Code' => 'Codice del profilo',
|
||||
'Purpose *' => 'Scopo *',
|
||||
'Quantity' => 'Quantità',
|
||||
'Rate from € *' => 'Tasso da € *',
|
||||
'Redirecting ...' => 'Reindirizzamento ...',
|
||||
'Redirecting to %url' => 'Reindirizzamento a %url',
|
||||
'Reference' => 'Riferimento',
|
||||
'Reference *' => 'Riferimento *',
|
||||
'Remember me ?' => 'Ricordati di me?',
|
||||
'Remove X amount to total cart' => 'Rimuovere una quantità di X al totale del carrello',
|
||||
'Remove X percent to total cart' => 'Rimuovi X percento al totale del carrello',
|
||||
'Replace by the default language' => 'Sostituire la lingua predefinita',
|
||||
'Replace current document by this file' => 'Sostituire l\'attuale documento da questo file',
|
||||
'Replace current image by this file' => 'Sostituire l\'immagine per questo file',
|
||||
'Rewriten URL' => 'URL riscritta',
|
||||
'Rotated Text File' => 'File di testo ruotato',
|
||||
'Sale price excluding taxes' => 'Prezzo di vendita escluse le tasse',
|
||||
'Sale price including taxes' => 'Prezzo di vendita tasse incluse',
|
||||
'Show redirections *' => 'Visualizza redirezioni *',
|
||||
'Sorry, an error occured: %msg' => 'Siamo spiacenti, errore: %msg',
|
||||
'Sorry, you are not allowed to perform this action.' => 'Siamo spiacenti, non è consentito eseguire questa azione.',
|
||||
'Sorry, you\'re not allowed to perform this action' => 'Siamo spiacenti, non sei autorizzato ad eseguire questa azione',
|
||||
'Source IP' => 'IP di origine',
|
||||
'Store configuration failed.' => 'La registrazione della configurazione è fallita.',
|
||||
'Store email address' => 'Indirizzo email del negozio',
|
||||
'Store logs into text file' => 'Archiviare i log in un file di testo',
|
||||
'Store logs into text file, up to a certian size, then a new file is created' => 'Archiviare i log in un file di testo, fino ad una certa dimensione, dopo viene creato un nuovo file',
|
||||
'Store name' => 'Nome del negozio',
|
||||
'Street Address' => 'Indirizzo',
|
||||
'Street Address ' => 'Indirizzo ',
|
||||
'Strictly use the requested language' => 'Utilizzare rigorosamente la lingua richiesta',
|
||||
'Subject' => 'Oggetto',
|
||||
'Summary' => 'Riassunto',
|
||||
'Symbol *' => 'Simbolo *',
|
||||
'System log configuration failed.' => 'Non e riuscito la configurazione del registro di sistema.',
|
||||
'Tax rule for this product *' => 'Regola fiscale per questo prodotto *',
|
||||
'Template Name *' => 'Nome del template *',
|
||||
'Template file %file cannot be found.' => 'File del template %file non vengono trovati.',
|
||||
'Text File' => 'File di testo',
|
||||
'Text Message' => 'Messaggio di testo',
|
||||
'This category is online.' => 'Questa categoria è online.',
|
||||
'This content is online.' => 'Questo contenuto è online.',
|
||||
'This extension must be installed and loaded' => 'Questa estensione deve essere installata e caricata',
|
||||
'This folder is online.' => 'Questa cartella è online.',
|
||||
'This product is on sale' => 'Questo prodotto è in vendita',
|
||||
'This product is online' => 'Questo prodotto è online',
|
||||
'Timeout' => 'Timeout',
|
||||
'Title' => 'Titolo',
|
||||
'Title *' => 'Titolo *',
|
||||
'Type' => 'Tipo',
|
||||
'Username' => 'Nome dell\'utente',
|
||||
'Username *' => 'Nome dell\'utente *',
|
||||
'Value' => 'Valore',
|
||||
'Value *' => 'Valore *',
|
||||
'Warnings' => 'Avvertenze',
|
||||
'Weight' => 'Peso',
|
||||
'Weight *' => 'Peso *',
|
||||
'Yes, I have a password :' => 'Sì, ho una password :',
|
||||
'Your Email Address' => 'Indirizzo Email',
|
||||
'Your Message' => 'Il tuo messaggio',
|
||||
'Zip code' => 'Codice postale',
|
||||
'date format' => 'Formato della data',
|
||||
'language locale' => 'Impostazione regionale della lingua',
|
||||
'mailing system modification' => 'modifica del sistema di mailing',
|
||||
'shipping area name' => 'nome dell\'area di spedizione',
|
||||
'time format' => 'Formato dell\'ora',
|
||||
);
|
||||
|
||||
4
core/lib/Thelia/Config/I18n/ru_RU.php
Normal file
4
core/lib/Thelia/Config/I18n/ru_RU.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return array(
|
||||
|
||||
);
|
||||
@@ -12,6 +12,7 @@
|
||||
<command class="Thelia\Command\ModuleGenerateModelCommand"/>
|
||||
<command class="Thelia\Command\ModuleGenerateSqlCommand"/>
|
||||
<command class="Thelia\Command\ModuleActivateCommand"/>
|
||||
<command class="Thelia\Command\ModuleDeactivateCommand"/>
|
||||
<command class="Thelia\Command\CreateAdminUser"/>
|
||||
<command class="Thelia\Command\ReloadDatabaseCommand"/>
|
||||
<command class="Thelia\Command\GenerateResources"/>
|
||||
|
||||
@@ -96,6 +96,10 @@
|
||||
<service id="mailer" class="Thelia\Mailer\MailerFactory">
|
||||
<argument type="service" id="event_dispatcher"/>
|
||||
</service>
|
||||
|
||||
<service id="response.listener" class="Thelia\Core\EventListener\ResponseListener">
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
</config>
|
||||
|
||||
@@ -122,6 +122,11 @@
|
||||
<form name="thelia.system-logs.configuration" class="Thelia\Form\SystemLogConfigurationForm"/>
|
||||
|
||||
<form name="thelia.admin.module.modification" class="Thelia\Form\ModuleModificationForm"/>
|
||||
|
||||
<form name="thelia.cache.flush" class="Thelia\Form\Cache\CacheFlushForm"/>
|
||||
<form name="thelia.assets.flush" class="Thelia\Form\Cache\AssetsFlushForm"/>
|
||||
<form name="thelia.images-and-documents-cache.flush" class="Thelia\Form\Cache\ImagesAndDocumentsCacheFlushForm"/>
|
||||
|
||||
</forms>
|
||||
|
||||
</config>
|
||||
|
||||
@@ -16,10 +16,20 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\HomeController::defaultAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.home.view" path="/admin/latest-thelia-version">
|
||||
<default key="_controller">Thelia\Controller\Admin\HomeController::getLatestTheliaVersion</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.home.stats" path="/admin/home/stats">
|
||||
<default key="_controller">Thelia\Controller\Admin\HomeController::loadStatsAjaxAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.news-feed" path="/admin/ajax/thelia_news_feed">
|
||||
<default key="_controller">Thelia\Controller\Admin\AdminController::processTemplateAction</default>
|
||||
<default key="template">ajax/thelia_news_feed</default>
|
||||
<default key="not-logged">1</default>
|
||||
</route>
|
||||
|
||||
<!-- end home -->
|
||||
|
||||
<!-- Route to the administration login page -->
|
||||
@@ -340,6 +350,10 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\ProductController::priceCaclulator</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.product.calculate-raw-price" path="/admin/product/calculate-raw-price">
|
||||
<default key="_controller">Thelia\Controller\Admin\ProductController::calculatePrice</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.product.load-converted-prices" path="/admin/product/load-converted-prices">
|
||||
<default key="_controller">Thelia\Controller\Admin\ProductController::loadConvertedPrices</default>
|
||||
</route>
|
||||
@@ -498,10 +512,6 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\CouponController::updateAction</default>
|
||||
<requirement key="couponId">\d+</requirement>
|
||||
</route>
|
||||
<route id="admin.coupon.read" path="/admin/coupon/read/{couponId}">
|
||||
<default key="_controller">Thelia\Controller\Admin\CouponController::readAction</default>
|
||||
<requirement key="couponId">\d+</requirement>
|
||||
</route>
|
||||
<route id="admin.coupon.draw.inputs.ajax" path="/admin/coupon/draw/inputs/{couponServiceId}">
|
||||
<default key="_controller">Thelia\Controller\Admin\CouponController::getBackOfficeInputsAjaxAction</default>
|
||||
<requirement key="couponServiceId">.*</requirement>
|
||||
@@ -535,6 +545,10 @@
|
||||
|
||||
<!-- Routes to the Config (system variables) controller -->
|
||||
|
||||
<route id="admin.configuration.index" path="/admin/configuration">
|
||||
<default key="_controller">Thelia\Controller\Admin\ConfigurationController::indexAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.variables.default" path="/admin/configuration/variables">
|
||||
<default key="_controller">Thelia\Controller\Admin\ConfigController::defaultAction</default>
|
||||
</route>
|
||||
@@ -763,9 +777,9 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\ShippingZoneController::indexAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.shipping-zones.update.view" path="/admin/configuration/shipping_zones/update/{shipping_zones_id}" methods="get">
|
||||
<route id="admin.configuration.shipping-zones.update.view" path="/admin/configuration/shipping_zones/update/{delivery_module_id}" methods="get">
|
||||
<default key="_controller">Thelia\Controller\Admin\ShippingZoneController::updateAction</default>
|
||||
<requirement key="shipping_zones_id">\d+</requirement>
|
||||
<requirement key="delivery_module_id">\d+</requirement>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.shipping-zones.area.add" path="/admin/configuration/shipping_zones/area/add" methods="post">
|
||||
@@ -977,6 +991,25 @@
|
||||
|
||||
<!-- end feature and feature routes management -->
|
||||
|
||||
<!-- cache route management -->
|
||||
<route id="admin.configuration.advanced" path="/admin/configuration/advanced">
|
||||
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::defaultAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.advanced.flush-cache" path="/admin/configuration/advanced/flush-cache">
|
||||
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::flushCacheAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.advanced.flush-assets" path="/admin/configuration/advanced/flush-assets">
|
||||
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::flushAssetsAction</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.configuration.advanced.flush-images-and-documents" path="/admin/configuration/advanced/flush-images-and-documents">
|
||||
<default key="_controller">Thelia\Controller\Admin\AdvancedConfigurationController::flushImagesAndDocumentsAction</default>
|
||||
</route>
|
||||
|
||||
<!-- and cache route management -->
|
||||
|
||||
<!-- Modules rule management -->
|
||||
|
||||
<route id="admin.module" path="/admin/modules">
|
||||
@@ -1125,6 +1158,16 @@
|
||||
<default key="_controller">Thelia\Controller\Admin\TranslationsController::updateAction</default>
|
||||
</route>
|
||||
|
||||
<!-- export management -->
|
||||
|
||||
<route id="export.main" path="/admin/export">
|
||||
<default key="_controller">Thelia\Controller\Admin\ExportController::indexAction</default>
|
||||
</route>
|
||||
|
||||
<route id="export.customer.newsletter" path="/admin/export/customer/newsletter">
|
||||
<default key="_controller">Thelia\Controller\Admin\CustomerExportController::NewsletterExportAction</default>
|
||||
</route>
|
||||
|
||||
<!-- The default route, to display a template -->
|
||||
|
||||
<route id="admin.processTemplate" path="/admin/{template}">
|
||||
|
||||
@@ -38,6 +38,11 @@
|
||||
</call>
|
||||
</service>
|
||||
|
||||
<service id="smarty.plugin.cartpostage" class="Thelia\Core\Template\Smarty\Plugins\CartPostage" scope="request">
|
||||
<tag name="thelia.parser.register_plugin"/>
|
||||
<argument type="service" id="service_container" />
|
||||
</service>
|
||||
|
||||
<service id="smarty.plugin.type" class="Thelia\Core\Template\Smarty\Plugins\Type" scope="request">
|
||||
<tag name="thelia.parser.register_plugin"/>
|
||||
</service>
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
@@ -335,15 +324,17 @@ abstract class AbstractCrudController extends BaseAdminController
|
||||
$error_msg = $ex->getMessage();
|
||||
}
|
||||
|
||||
$this->setupFormErrorContext(
|
||||
$this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)),
|
||||
$error_msg,
|
||||
$creationForm,
|
||||
$ex
|
||||
);
|
||||
if (false !== $error_msg) {
|
||||
$this->setupFormErrorContext(
|
||||
$this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)),
|
||||
$error_msg,
|
||||
$creationForm,
|
||||
$ex
|
||||
);
|
||||
|
||||
// At this point, the form has error, and should be redisplayed.
|
||||
return $this->renderList();
|
||||
// At this point, the form has error, and should be redisplayed.
|
||||
return $this->renderList();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -435,15 +426,17 @@ abstract class AbstractCrudController extends BaseAdminController
|
||||
$error_msg = $ex->getMessage();*/
|
||||
}
|
||||
|
||||
// At this point, the form has errors, and should be redisplayed.
|
||||
$this->setupFormErrorContext(
|
||||
$this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
|
||||
$error_msg,
|
||||
$changeForm,
|
||||
$ex
|
||||
);
|
||||
if (false !== $error_msg) {
|
||||
// At this point, the form has errors, and should be redisplayed.
|
||||
$this->setupFormErrorContext(
|
||||
$this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
|
||||
$error_msg,
|
||||
$changeForm,
|
||||
$ex
|
||||
);
|
||||
|
||||
return $this->renderEditionTemplate();
|
||||
return $this->renderEditionTemplate();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
@@ -157,13 +146,14 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
|
||||
/**
|
||||
* Update SEO modification, and either go back to the object list, or stay on the edition page.
|
||||
*
|
||||
* @return Thelia\Core\HttpFoundation\Response the response
|
||||
* @return \Thelia\Core\HttpFoundation\Response the response
|
||||
*/
|
||||
public function processUpdateSeoAction()
|
||||
{
|
||||
// Check current user authorization
|
||||
if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE))
|
||||
if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
// Error (Default: false)
|
||||
$error_msg = false;
|
||||
@@ -221,14 +211,16 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
|
||||
$this->getParserContext()->addForm($changeForm);
|
||||
}
|
||||
|
||||
$this->setupFormErrorContext(
|
||||
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
|
||||
$error_msg,
|
||||
$updateSeoForm,
|
||||
$ex
|
||||
);
|
||||
if (false !== $error_msg) {
|
||||
$this->setupFormErrorContext(
|
||||
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
|
||||
$error_msg,
|
||||
$updateSeoForm,
|
||||
$ex
|
||||
);
|
||||
|
||||
// At this point, the form has errors, and should be redisplayed.
|
||||
return $this->renderEditionTemplate();
|
||||
// At this point, the form has errors, and should be redisplayed.
|
||||
return $this->renderEditionTemplate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
|
||||
@@ -1,38 +1,26 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Core\Security\Resource\AdminResources;
|
||||
use Thelia\Model\AdminLogQuery;
|
||||
|
||||
class AdminLogsController extends BaseAdminController
|
||||
{
|
||||
const RESOURCE_CODE = "admin.admin-logs";
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
if (null !== $response = $this->checkAuth(self::RESOURCE_CODE, array(), AccessManager::VIEW)) return $response;
|
||||
if (null !== $response = $this->checkAuth(AdminResources::ADMIN_LOG, array(), AccessManager::VIEW)) return $response;
|
||||
|
||||
// Render the edition template.
|
||||
return $this->render('admin-logs');
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
|
||||
use Thelia\Core\Event\Cache\CacheEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
use Thelia\Core\Security\Resource\AdminResources;
|
||||
use Thelia\Form\Cache\AssetsFlushForm;
|
||||
use Thelia\Form\Cache\CacheFlushForm;
|
||||
use Thelia\Form\Cache\ImagesAndDocumentsCacheFlushForm;
|
||||
use Thelia\Log\Tlog;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
|
||||
/**
|
||||
* Class CacheController
|
||||
* @package Thelia\Controller\Admin
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class AdvancedConfigurationController extends BaseAdminController
|
||||
{
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
if (null !== $result = $this->checkAuth(AdminResources::ADVANCED_CONFIGURATION, [], AccessManager::VIEW)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
return $this->render('advanced-configuration');
|
||||
}
|
||||
|
||||
public function flushCacheAction()
|
||||
{
|
||||
if (null !== $result = $this->checkAuth(AdminResources::ADVANCED_CONFIGURATION, [], AccessManager::UPDATE)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$form = new CacheFlushForm($this->getRequest());
|
||||
try {
|
||||
$this->validateForm($form);
|
||||
|
||||
$event = new CacheEvent($this->container->getParameter("kernel.cache_dir"));
|
||||
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Tlog::getInstance()->addError(sprintf("Flush cache error: %s", $e->getMessage()));
|
||||
}
|
||||
|
||||
$this->redirectToRoute('admin.configuration.advanced');
|
||||
}
|
||||
|
||||
public function flushAssetsAction()
|
||||
{
|
||||
if (null !== $result = $this->checkAuth(AdminResources::ADVANCED_CONFIGURATION, [], AccessManager::UPDATE)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$form = new AssetsFlushForm($this->getRequest());
|
||||
try {
|
||||
$this->validateForm($form);
|
||||
|
||||
$event = new CacheEvent(THELIA_WEB_DIR . "assets");
|
||||
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Tlog::getInstance()->addError(sprintf("Flush assets error: %s", $e->getMessage()));
|
||||
}
|
||||
|
||||
$this->redirectToRoute('admin.configuration.advanced');
|
||||
}
|
||||
|
||||
public function flushImagesAndDocumentsAction()
|
||||
{
|
||||
if (null !== $result = $this->checkAuth(AdminResources::ADVANCED_CONFIGURATION, [], AccessManager::UPDATE)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$form = new ImagesAndDocumentsCacheFlushForm($this->getRequest());
|
||||
try {
|
||||
$this->validateForm($form);
|
||||
|
||||
$event = new CacheEvent(THELIA_WEB_DIR . ConfigQuery::read('image_cache_dir_from_web_root', 'cache'));
|
||||
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||
|
||||
$event = new CacheEvent(THELIA_WEB_DIR . ConfigQuery::read('document_cache_dir_from_web_root', 'cache'));
|
||||
$this->dispatch(TheliaEvents::CACHE_CLEAR, $event);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Tlog::getInstance()->addError(sprintf("Flush images and document error: %s", $e->getMessage()));
|
||||
}
|
||||
|
||||
$this->redirectToRoute('admin.configuration.advanced');
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,13 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* 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 <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
@@ -275,7 +264,7 @@ class AreaController extends AbstractCrudController
|
||||
// Check current user authorization
|
||||
if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) return $response;
|
||||
$request = $this->getRequest();
|
||||
$removeCountryEvent = new AreaRemoveCountryEvent($request->request->get('areai_id', 0), $request->request->get('country_id', 0));
|
||||
$removeCountryEvent = new AreaRemoveCountryEvent($request->request->get('area_id', 0), $request->request->get('country_id', 0));
|
||||
|
||||
$this->dispatch(TheliaEvents::AREA_REMOVE_COUNTRY, $removeCountryEvent);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user