Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1baf154332 | ||
|
|
c190a832b3 | ||
|
|
613196299c | ||
|
|
c77fddce5d | ||
|
|
ba5538a12e | ||
|
|
688b119176 | ||
|
|
8bc6952c47 | ||
|
|
e934791af3 | ||
|
|
c0ab78d4ff | ||
|
|
38bf33f873 | ||
|
|
ad7b4f5bf9 | ||
|
|
9b66df95e2 | ||
|
|
a4be207ff6 | ||
|
|
df471fbf55 | ||
|
|
8a530b309e | ||
|
|
08e8b1e00d | ||
|
|
c05e737f69 | ||
|
|
fe7a125a48 | ||
|
|
714bb25193 | ||
|
|
09cb96dab6 | ||
|
|
184c9d352e | ||
|
|
a69aa9fd3c | ||
|
|
a6c04366bc | ||
|
|
d2c57a03c3 | ||
|
|
fbb6a871ad | ||
|
|
5bc2b64eed | ||
|
|
31aa435bb7 | ||
|
|
cd680b497e | ||
|
|
a6fbbe852f | ||
|
|
bd4398bff5 | ||
|
|
6d921b6ea0 | ||
|
|
450768f50b | ||
|
|
fe741245fe | ||
|
|
4389e58c29 | ||
|
|
0fc758e481 | ||
|
|
d5fc9e6527 | ||
|
|
c43b7d7818 | ||
|
|
ed3ef17b00 | ||
|
|
8111cbb53c | ||
|
|
bb09a64ed6 | ||
|
|
898cd02628 | ||
|
|
17812bb7d4 | ||
|
|
25c9cbdf6e | ||
|
|
a0bf4a30b9 | ||
|
|
148b210e15 | ||
|
|
30c03547fa | ||
|
|
c23a05f132 | ||
|
|
656f34b0d1 | ||
|
|
77cfdc5094 | ||
|
|
042fd1611d | ||
|
|
6333b5c0d0 | ||
|
|
1abde37668 | ||
|
|
44d49911a9 | ||
|
|
ed881352d0 | ||
|
|
6204d24fef | ||
|
|
5322607a96 | ||
|
|
aea7340012 | ||
|
|
40e069c117 | ||
|
|
4f5785f307 | ||
|
|
5c6f98a696 | ||
|
|
d7613e2e76 | ||
|
|
8c27a470c6 | ||
|
|
d4d25c5d81 | ||
|
|
5fcb00ed3a | ||
|
|
6cf6e1cf60 | ||
|
|
1609d719ab | ||
|
|
0ab658eecd | ||
|
|
4b43213169 | ||
|
|
5bb54071f9 | ||
|
|
af9ac2ff4d | ||
|
|
213d720a33 | ||
|
|
2ed9af044e | ||
|
|
dc8164b1d8 | ||
|
|
6f848e87ea | ||
|
|
4cef2421bd | ||
|
|
d9de1869da | ||
|
|
37a2bc6ebf | ||
|
|
07d2d348dc | ||
|
|
265afeefca | ||
|
|
96104ecbf5 | ||
|
|
ee08617823 | ||
|
|
60cbdb8f4f | ||
|
|
03556e9432 | ||
|
|
e55e96950b | ||
|
|
7515e9e6cc | ||
|
|
2d25e03545 | ||
|
|
98615296ca | ||
|
|
6494b47f05 | ||
|
|
972d70011d | ||
|
|
32e6484105 | ||
|
|
f290c3a25c | ||
|
|
fd12b63428 | ||
|
|
d23d99ccb8 | ||
|
|
2ca41bd6cd | ||
|
|
0da2fa8dcd | ||
|
|
9a1341ed0d | ||
|
|
a05a619670 | ||
|
|
d425ee9563 | ||
|
|
b3c42487b5 | ||
|
|
d30e37174b | ||
|
|
6d3280828f | ||
|
|
2ed0a00ef0 | ||
|
|
a0203b82b1 | ||
|
|
8bc079d756 | ||
|
|
2948916fc4 | ||
|
|
dddf29ebc2 | ||
|
|
b23654f10d | ||
|
|
d0b5e395f3 | ||
|
|
eed6ff4b5a | ||
|
|
3f705d2434 | ||
|
|
7aadfacf10 | ||
|
|
33e81f46d5 | ||
|
|
0f6dd838c0 | ||
|
|
4f35fa4c1a | ||
|
|
345a0752aa | ||
|
|
9bc69fedb0 | ||
|
|
af6513bb2a | ||
|
|
d1a5803e74 | ||
|
|
ca6337f31a | ||
|
|
bc39b930b0 | ||
|
|
79aa52f4a2 | ||
|
|
68d9b26721 | ||
|
|
c4442a9eef | ||
|
|
7abd718eda | ||
|
|
9be7d9b0f9 | ||
|
|
85f9330df2 | ||
|
|
161863abe9 | ||
|
|
b8b794e9ca | ||
|
|
cb844cdaca | ||
|
|
bc4b3dac15 | ||
|
|
76e5b93a45 | ||
|
|
7cd6898585 | ||
|
|
2e9ca44e22 | ||
|
|
4c4984f182 | ||
|
|
ad38878a8b | ||
|
|
fc41a01686 | ||
|
|
765a144478 | ||
|
|
c8ec4882c6 | ||
|
|
f35893a330 | ||
|
|
e6112c4290 | ||
|
|
eb89723851 | ||
|
|
9b8da8655f | ||
|
|
92366eb6f9 | ||
|
|
9f2aeec5d1 | ||
|
|
ab6e72b359 | ||
|
|
c87916d793 | ||
|
|
357368c78c | ||
|
|
302f0abe9d | ||
|
|
b9dbf36e34 | ||
|
|
d4bbdd7207 | ||
|
|
792f3bb601 | ||
|
|
b82e02125b | ||
|
|
f4b42a63a9 | ||
|
|
dbd39f3a5b | ||
|
|
0bae768129 | ||
|
|
96a4370bc3 | ||
|
|
103a83d6ea | ||
|
|
d1dc4d6acd | ||
|
|
353580a558 | ||
|
|
2da2e00d6f | ||
|
|
a6a9ffe39a | ||
|
|
078a9767e3 | ||
|
|
48cae79ca0 | ||
|
|
f24f940e2e | ||
|
|
db0f0888cc | ||
|
|
5bccd3fdae | ||
|
|
42a1b6d5c4 | ||
|
|
3d7a80671a | ||
|
|
650c0105b7 | ||
|
|
3269a37da6 | ||
|
|
f879b2e9b4 | ||
|
|
9315b2a7ca | ||
|
|
940fe0857d | ||
|
|
41daac1092 | ||
|
|
5934747ae0 | ||
|
|
7648ec01aa | ||
|
|
56e60c2964 | ||
|
|
27014976fa | ||
|
|
e5b0d70057 | ||
|
|
12a93524bb | ||
|
|
5a56ca9c8b | ||
|
|
4e060b9bbd | ||
|
|
3b929f100c | ||
|
|
4559e93222 | ||
|
|
d3ae8702a4 | ||
|
|
34f6d4d8db | ||
|
|
ce3e4c4d91 | ||
|
|
69cec80e2d | ||
|
|
26d31d53c4 | ||
|
|
2ffab71fc2 | ||
|
|
8b77d82ca9 | ||
|
|
4caf11a1af | ||
|
|
1f033138cd | ||
|
|
6fbaafca4c | ||
|
|
146abf31de | ||
|
|
178f977814 | ||
|
|
c4afd303f7 | ||
|
|
89d0a35643 | ||
|
|
784865bf4d | ||
|
|
91d66ffb53 | ||
|
|
693096d497 | ||
|
|
be3801174b | ||
|
|
554e2f240a | ||
|
|
324c0a556d | ||
|
|
be85673853 | ||
|
|
875d98bca5 | ||
|
|
82bc3f0916 | ||
|
|
db513d6770 | ||
|
|
196bea5553 | ||
|
|
292266ed40 | ||
|
|
8cfd8b0cc6 | ||
|
|
9ced871cb5 | ||
|
|
9cae65593b | ||
|
|
1b64465a67 | ||
|
|
ce8517413d | ||
|
|
cc1e75637d | ||
|
|
a9b20ea99b | ||
|
|
af6cf4ba34 | ||
|
|
cf51d8372e | ||
|
|
53937e3cd0 | ||
|
|
9b6642a038 | ||
|
|
37c3fc05c7 | ||
|
|
dbf3e5947c | ||
|
|
267a408cdf | ||
|
|
996db45b8b | ||
|
|
9ac039d5f5 | ||
|
|
ec464f577e | ||
|
|
3054f8ead1 | ||
|
|
579c75edab | ||
|
|
120dad2619 | ||
|
|
0b69d51315 | ||
|
|
bda8d65d95 | ||
|
|
05edba121a | ||
|
|
268518b827 | ||
|
|
8c883798b5 | ||
|
|
82c4d22b71 | ||
|
|
d34be78f9f | ||
|
|
fe164465c2 | ||
|
|
5cbfabb82f | ||
|
|
bf76ea0315 | ||
|
|
c8a3a63d49 | ||
|
|
da841a720b | ||
|
|
5d71df9a7d | ||
|
|
6fed7f3683 | ||
|
|
07836fb3a0 | ||
|
|
cc4b3125a9 | ||
|
|
96855cd5a2 | ||
|
|
eda2ae82f8 | ||
|
|
85f8e3db2f | ||
|
|
caccf77b10 | ||
|
|
1329c12383 | ||
|
|
c1b0ad7a93 | ||
|
|
893dd895e9 | ||
|
|
60323ad2e9 | ||
|
|
95cd7e50e7 | ||
|
|
da15ef9a17 | ||
|
|
de9201d30d | ||
|
|
685ddc4eba | ||
|
|
1778c4e75c | ||
|
|
2296ab35cd | ||
|
|
4a6132d0c4 | ||
|
|
f80cf204ab | ||
|
|
a203e94ce8 | ||
|
|
39dbafc042 | ||
|
|
eeeaaa8e08 | ||
|
|
ef8f8582d0 | ||
|
|
0920ce9e80 | ||
|
|
bb649ae062 | ||
|
|
7a0821fc10 | ||
|
|
cb33d75eaa | ||
|
|
25e6aa0590 | ||
|
|
8b761fa766 | ||
|
|
88ed4999ba | ||
|
|
a8fd55fa4b | ||
|
|
10a644578b | ||
|
|
2c504d45bc | ||
|
|
5c4e749522 | ||
|
|
5cee198eb5 | ||
|
|
06c0e7fcef | ||
|
|
17e71862ac | ||
|
|
5e8ca44e86 | ||
|
|
f85427e8cc | ||
|
|
a57aabec11 | ||
|
|
bc5a853b3c | ||
|
|
40301f8d6b | ||
|
|
f5b703e65e | ||
|
|
a2b2540b1b | ||
|
|
15cac106e8 | ||
|
|
b032f35bae | ||
|
|
05b35a13ba | ||
|
|
66e42ea71a | ||
|
|
a1e8eccb95 | ||
|
|
c781df84f5 | ||
|
|
4cabe99f19 | ||
|
|
ef4a9f83ba | ||
|
|
bd67a69c13 | ||
|
|
0330483fc5 | ||
|
|
8ef26dfbf6 | ||
|
|
21e32ce611 | ||
|
|
efe90062c9 | ||
|
|
33a7743691 | ||
|
|
d3c705ab91 | ||
|
|
f438395033 | ||
|
|
421ad89e45 | ||
|
|
f9a0664810 | ||
|
|
0489bf4945 | ||
|
|
4e4576ec97 | ||
|
|
adebadfbc8 | ||
|
|
afe750bb38 | ||
|
|
4f9189b8c6 | ||
|
|
ac29a13664 | ||
|
|
5534f2b30f | ||
|
|
6cdc8aa6da | ||
|
|
01a92dd2dd | ||
|
|
b11bc0e2b9 | ||
|
|
02c6b751dd | ||
|
|
b840032589 | ||
|
|
8f7543bd47 | ||
|
|
117ab13cac | ||
|
|
221fcde595 | ||
|
|
8911b22129 | ||
|
|
9ab66d1e47 | ||
|
|
e89c91369a | ||
|
|
7207d46fbe | ||
|
|
9c5fa67d60 | ||
|
|
7e8847ff97 | ||
|
|
03124ab1ef | ||
|
|
a524d05be1 | ||
|
|
e9854a8a0e | ||
|
|
88da6433b6 | ||
|
|
e25a53352b | ||
|
|
683a0c3bf3 | ||
|
|
b661125ebf | ||
|
|
68ebd15045 | ||
|
|
1e84944e64 | ||
|
|
b9ab4849d6 | ||
|
|
710d1f1275 | ||
|
|
5a3a7d238c | ||
|
|
d9afd88155 | ||
|
|
e353808db3 | ||
|
|
6277b71d20 | ||
|
|
18d4e2ec46 | ||
|
|
85683fd9f0 | ||
|
|
ebd0c527ea | ||
|
|
224c24a2fd | ||
|
|
8ea01ea0d4 | ||
|
|
e9863b0675 | ||
|
|
25cd7f07f8 | ||
|
|
b4a4edc58e | ||
|
|
53fefc8564 | ||
|
|
cccf6974d7 | ||
|
|
5099be5d19 | ||
|
|
66b217dddb | ||
|
|
81196865b9 | ||
|
|
0c669115c9 | ||
|
|
e7bb178aa0 | ||
|
|
631030d398 | ||
|
|
5b02eb8bc2 | ||
|
|
78449538bb | ||
|
|
83ac1683e0 | ||
|
|
4ab7d66963 | ||
|
|
37e26eca29 | ||
|
|
f740bf2632 | ||
|
|
66f454db3d | ||
|
|
c512507298 | ||
|
|
ed1f586643 | ||
|
|
00f922254a | ||
|
|
2e78d28ec6 | ||
|
|
ba3a4325bb | ||
|
|
ec8b982671 | ||
|
|
ae9f0b46c7 | ||
|
|
70912a0237 | ||
|
|
00a5b44f63 | ||
|
|
3d2a10f295 | ||
|
|
3f8a46a984 | ||
|
|
2ce4285d7a | ||
|
|
f09026be73 | ||
|
|
92c22de458 | ||
|
|
345fb9e7bf | ||
|
|
94555d9fa5 | ||
|
|
e0a7aeab6b | ||
|
|
d76b060d2a | ||
|
|
c9ee83cc46 | ||
|
|
eb1609d270 | ||
|
|
b2cd94475c | ||
|
|
15f21f853b | ||
|
|
848153a05f | ||
|
|
99aab49ae3 | ||
|
|
5543a4f795 | ||
|
|
de4ad1d4b7 | ||
|
|
4959263cfe | ||
|
|
e6d67bdbb6 | ||
|
|
f455965bea | ||
|
|
42ed7b598d | ||
|
|
4963d29389 | ||
|
|
57584f5efa | ||
|
|
79fda741cd | ||
|
|
e60df09495 | ||
|
|
96040e1cb5 | ||
|
|
e930b9b8ed | ||
|
|
69384f57f1 | ||
|
|
7bed77fec3 | ||
|
|
10296817c9 | ||
|
|
c121c6d616 | ||
|
|
730a905cfb | ||
|
|
804e6c3177 | ||
|
|
ccf4344a2d | ||
|
|
90ce1a292d | ||
|
|
80ca466e13 | ||
|
|
12a842837b | ||
|
|
04e576623f | ||
|
|
070fb96dc4 | ||
|
|
4cdacec76a | ||
|
|
d5337f4f44 | ||
|
|
35dcc6370c | ||
|
|
be43898e5a | ||
|
|
28c8e30784 | ||
|
|
902d753628 | ||
|
|
00045a755b | ||
|
|
7ac72c91bd | ||
|
|
a09ed72ec0 | ||
|
|
83d14fae1d | ||
|
|
5b4edc3a28 | ||
|
|
9665f40bc7 | ||
|
|
7b4de2882c | ||
|
|
bf0542beb4 | ||
|
|
5b478b2134 | ||
|
|
608ab040b8 | ||
|
|
39c2a58307 | ||
|
|
2400fc08ea | ||
|
|
9939577f01 | ||
|
|
4f99dfd2d6 | ||
|
|
04e3f3f6f5 | ||
|
|
8157f836a3 | ||
|
|
1f1a6ff898 | ||
|
|
05268a42d4 | ||
|
|
9b3961238c | ||
|
|
fd5894d680 | ||
|
|
e25bf37349 | ||
|
|
8479ef58ee | ||
|
|
f74b6c667c | ||
|
|
c053d6332b | ||
|
|
acaca2f327 | ||
|
|
a5d3dfed09 | ||
|
|
596de63ab5 | ||
|
|
019be0aeff | ||
|
|
c5a07b8c1a | ||
|
|
7247e325a4 | ||
|
|
14cdbef06e | ||
|
|
9a3f623393 | ||
|
|
3cee49d012 | ||
|
|
a98846bc57 | ||
|
|
8ba7ebd80b | ||
|
|
1cf5ddd038 | ||
|
|
284a9acae6 | ||
|
|
adba38898a | ||
|
|
fbf01834f8 | ||
|
|
4250fddbe4 | ||
|
|
b1e130854f | ||
|
|
cd5a54afd1 | ||
|
|
756f1aa10e | ||
|
|
ca80cbc4b1 | ||
|
|
87af65d2e2 | ||
|
|
6b24f5203d | ||
|
|
3259b70a3c | ||
|
|
4815e5d2f5 | ||
|
|
9039939c7d | ||
|
|
b6515eaa17 | ||
|
|
5900ba8d1c | ||
|
|
04be7149e5 | ||
|
|
0d50493737 | ||
|
|
6ea5d45b39 | ||
|
|
0b374458ec | ||
|
|
88823dc5eb | ||
|
|
c72240fb9f | ||
|
|
b7baa30c6c | ||
|
|
d7eba5476f | ||
|
|
fa8e87432a | ||
|
|
0cca874c81 | ||
|
|
af786b1e0a | ||
|
|
ccec86cb0b | ||
|
|
18e8b087d3 | ||
|
|
0817e3bc08 | ||
|
|
b76c949926 | ||
|
|
18c576ff5b | ||
|
|
3e76816edb | ||
|
|
3b6b4c174c | ||
|
|
54b631fc78 | ||
|
|
4efb673969 | ||
|
|
d69c97f145 | ||
|
|
a8263ee9ad | ||
|
|
2c960d9bee | ||
|
|
747cfd729b | ||
|
|
e8ad797150 | ||
|
|
49c1f7e870 | ||
|
|
ae58669d4a | ||
|
|
13f0dc7403 | ||
|
|
2107741896 | ||
|
|
c4c69c3aee | ||
|
|
0ffbb332c5 | ||
|
|
e0a39bed57 | ||
|
|
98f5c3629a | ||
|
|
34428a7dab | ||
|
|
f9258b8779 | ||
|
|
c8d1619d0a | ||
|
|
77a78537e7 | ||
|
|
4bdeb8dce7 | ||
|
|
1728cd923b | ||
|
|
96bf42e183 | ||
|
|
90a3cc6a45 | ||
|
|
7149dacb74 | ||
|
|
a30d9539a2 | ||
|
|
f8117d50ce | ||
|
|
22d1771142 | ||
|
|
793cdb720c | ||
|
|
8d8593d3de | ||
|
|
9158cadf6c | ||
|
|
2366a2cc8a | ||
|
|
100703b2f8 | ||
|
|
24421b248f | ||
|
|
7767a81011 | ||
|
|
a920359f1d | ||
|
|
66dc8389dd | ||
|
|
218236c1ee | ||
|
|
f0c11404bb | ||
|
|
e930b5d08f | ||
|
|
0f56795f2f | ||
|
|
ea35da0a1a | ||
|
|
fce1d9a60d | ||
|
|
f4d03c95db | ||
|
|
a22276d161 | ||
|
|
d16dfdab01 | ||
|
|
62c3e09cc6 | ||
|
|
b37a36eba5 | ||
|
|
58f7fb1c03 | ||
|
|
cd14749055 | ||
|
|
656f87440d | ||
|
|
b57854c3da | ||
|
|
22d4e61e54 | ||
|
|
2ce01cc89e | ||
|
|
78a39a3fbc | ||
|
|
8f2f4b3be4 | ||
|
|
121d9abc2c | ||
|
|
ee34eeab59 | ||
|
|
7c9d4ee5db | ||
|
|
d62949ed65 | ||
|
|
356348f90a | ||
|
|
a3f9f55291 | ||
|
|
aebc243b87 | ||
|
|
c45bbc958c | ||
|
|
1384d579d4 | ||
|
|
57ff2be0e5 | ||
|
|
116221b382 | ||
|
|
0835613ee2 | ||
|
|
f07f7712af | ||
|
|
7fca32e3dc | ||
|
|
13b93ddaef | ||
|
|
db081565c3 | ||
|
|
0a30c492fd | ||
|
|
bca8b9d275 | ||
|
|
6e027b2d19 | ||
|
|
26624d9f2f | ||
|
|
02fac949bf | ||
|
|
ae796bedfa | ||
|
|
b51a097ae0 | ||
|
|
9e54583319 | ||
|
|
d3529c7d73 | ||
|
|
a1d01b0986 | ||
|
|
f03879cdf2 | ||
|
|
d30f381961 | ||
|
|
57dcc5b694 | ||
|
|
e056653fed | ||
|
|
ad4c7dec2b | ||
|
|
f782f88006 | ||
|
|
bd28cc6e4b | ||
|
|
9665448bd2 | ||
|
|
ff0bdb5532 | ||
|
|
6b62f6c3ed | ||
|
|
34c85b6114 | ||
|
|
8b459e499e | ||
|
|
a90af8cd44 | ||
|
|
7eec6c7294 | ||
|
|
acb7dd35ed | ||
|
|
691d6b3851 | ||
|
|
785834c4e1 | ||
|
|
f2233e08d0 | ||
|
|
096bc90802 | ||
|
|
412cae1d51 | ||
|
|
63737a93ec | ||
|
|
14615f68cf | ||
|
|
6a8af608ed | ||
|
|
7e2e5caf20 | ||
|
|
d2a11f04a4 | ||
|
|
87bd54df2d | ||
|
|
8fce66e370 | ||
|
|
eb398f1a9f | ||
|
|
9db5f5729a | ||
|
|
d6df4781c5 | ||
|
|
a4c8e9823f | ||
|
|
66757871af | ||
|
|
9986903af7 | ||
|
|
da117efe58 | ||
|
|
6a5d3f8e0e | ||
|
|
27780c81b4 | ||
|
|
791b15dc07 | ||
|
|
a33e23e100 | ||
|
|
a32bd610ab | ||
|
|
fdcd40e055 | ||
|
|
4f2683dfa6 | ||
|
|
cc0dd39784 | ||
|
|
f9dac67c18 | ||
|
|
fe2542ef07 | ||
|
|
39d14f3713 | ||
|
|
c766c393a1 | ||
|
|
4f9c604d33 | ||
|
|
ce5109ea1d | ||
|
|
4c5328f03d | ||
|
|
00ae6f21d9 | ||
|
|
9273c14e87 | ||
|
|
4e39c6d41e | ||
|
|
863e540c0d | ||
|
|
988f0480eb | ||
|
|
c17d577131 | ||
|
|
63a11e0bb4 | ||
|
|
cfb8b89481 | ||
|
|
3ce1a5e5d9 | ||
|
|
ace372812d | ||
|
|
b519556a62 | ||
|
|
bb704d1550 | ||
|
|
b269ebe1a9 | ||
|
|
f01147ebd8 | ||
|
|
b8184785d1 | ||
|
|
0c0fa767b5 | ||
|
|
4ec108f632 | ||
|
|
fb4b137f65 | ||
|
|
723320062b | ||
|
|
e6b13787f3 | ||
|
|
810692e577 | ||
|
|
8c991aea82 | ||
|
|
d084167163 | ||
|
|
29ec710ed1 | ||
|
|
d94785b76a | ||
|
|
23a13e7121 | ||
|
|
d7bd6c7181 | ||
|
|
b87f534566 | ||
|
|
b2ba507b03 | ||
|
|
506117423f | ||
|
|
26c3e81764 | ||
|
|
7a20095102 | ||
|
|
e6cdcfd266 | ||
|
|
303bfdd00c | ||
|
|
a606873630 | ||
|
|
09cb7eff9b | ||
|
|
7a54d4b647 | ||
|
|
78db02cafb | ||
|
|
ba1e9b59e5 | ||
|
|
31bc0a7867 | ||
|
|
367496bfe8 | ||
|
|
ff27b55c3a | ||
|
|
1effa0b026 | ||
|
|
951a6ba171 | ||
|
|
8fbd0cc439 | ||
|
|
fe99abfc57 | ||
|
|
30ea30c6f4 | ||
|
|
d5dfb4cfdb | ||
|
|
758a0cead8 | ||
|
|
a711041580 | ||
|
|
4e3dbfb5cb | ||
|
|
f691d01bce | ||
|
|
e1c0bcf502 | ||
|
|
17285402c3 | ||
|
|
cd815caaed | ||
|
|
93a3b6f617 | ||
|
|
75a19e7e26 | ||
|
|
84941bc9a3 | ||
|
|
248efe091c | ||
|
|
7828d5990c | ||
|
|
8dbc25825e | ||
|
|
f7ffb002df | ||
|
|
cab8b2b251 | ||
|
|
681302369f | ||
|
|
ad370ee93c | ||
|
|
d2cfbf4c88 | ||
|
|
6ecc41aef2 | ||
|
|
15d23c2bef | ||
|
|
0dacaa5802 | ||
|
|
2cd8a77b6c | ||
|
|
d29a1efd19 | ||
|
|
c7fe97d5d3 | ||
|
|
b572d67367 | ||
|
|
bb73414e79 | ||
|
|
3a72ee0d5d | ||
|
|
6c39413878 | ||
|
|
a342ee66f2 | ||
|
|
e832255c15 | ||
|
|
0992092a83 | ||
|
|
7dc2d930ac | ||
|
|
cfd04410e3 | ||
|
|
eb86772dd5 | ||
|
|
2628e92f50 | ||
|
|
7af140d285 | ||
|
|
cf395ce0ca | ||
|
|
2500044f02 | ||
|
|
e5a9972694 | ||
|
|
ca50c363a3 | ||
|
|
61d4e45a1a | ||
|
|
aabef58c30 | ||
|
|
65858ff28c | ||
|
|
055f87d757 | ||
|
|
0473de59d3 | ||
|
|
248c4e9c9e | ||
|
|
dc35aaa83c | ||
|
|
9bc7869e2b | ||
|
|
a594a9a21d | ||
|
|
75cbe6f6ec | ||
|
|
93a30017e8 | ||
|
|
6034497158 | ||
|
|
f12b0a3b3d | ||
|
|
c15f528f78 | ||
|
|
06a0953eef | ||
|
|
6723ecce83 | ||
|
|
d975f571b3 | ||
|
|
5761c8af29 | ||
|
|
71d5f6fbe5 | ||
|
|
33d172e720 | ||
|
|
66e01b5f67 | ||
|
|
f39226c85e | ||
|
|
3940cb70ce | ||
|
|
d6937e9d94 | ||
|
|
2eaea9cb80 | ||
|
|
040ff69c10 | ||
|
|
c5a85a4cfa | ||
|
|
713fd39fcc | ||
|
|
511cfac95a | ||
|
|
b0f363bcc3 | ||
|
|
c9592c4101 | ||
|
|
38cc37536d | ||
|
|
e0d1459701 | ||
|
|
9fae45b209 | ||
|
|
2acb3d6f5f | ||
|
|
71bd9ce8a1 | ||
|
|
3ab0e214b5 | ||
|
|
1fe456ce71 | ||
|
|
15a5e7fa6c | ||
|
|
f106616521 | ||
|
|
73728fe9b4 | ||
|
|
b08fb5ab7f | ||
|
|
8bf12a6daa | ||
|
|
b2a616aba3 | ||
|
|
2016c46568 | ||
|
|
9e5da97084 | ||
|
|
8c0a47ef3a | ||
|
|
2f17afcc30 | ||
|
|
b5a0c212de | ||
|
|
073808a853 | ||
|
|
73adcdf9b0 | ||
|
|
4f7f921120 | ||
|
|
868eaa32fd | ||
|
|
b284210026 | ||
|
|
8d4efa7dec | ||
|
|
a37c3bfea2 | ||
|
|
2f361c3bde | ||
|
|
7597decfba | ||
|
|
1dec53057d | ||
|
|
954d067119 | ||
|
|
f5a192e27e | ||
|
|
8abbcecc54 | ||
|
|
a1923c21a7 | ||
|
|
f8408b1099 | ||
|
|
744a221075 | ||
|
|
e8b686d928 | ||
|
|
649cb9af43 | ||
|
|
8343cb58d5 | ||
|
|
1b72cbdee1 | ||
|
|
b06cb8d6e2 | ||
|
|
7c160a8073 | ||
|
|
647070205b | ||
|
|
0296058d15 | ||
|
|
03d4350fca | ||
|
|
c51c83edc0 | ||
|
|
acc15c9e55 | ||
|
|
2ea9ef528f | ||
|
|
9074e8ed52 | ||
|
|
e7f6e0f2b9 | ||
|
|
e802d2669a | ||
|
|
6d3bed914a | ||
|
|
3c2973aa02 | ||
|
|
ce3e408315 | ||
|
|
fd02884d76 | ||
|
|
a6a2c63aa9 | ||
|
|
351e8f0eda | ||
|
|
a5f5a7fad7 | ||
|
|
b8cf0fe3e4 | ||
|
|
81e6d2c488 | ||
|
|
ff23b59fe2 | ||
|
|
b3b7a1f9b9 | ||
|
|
249808e175 | ||
|
|
099ad93161 | ||
|
|
88545619f2 | ||
|
|
259f1e5fe7 | ||
|
|
ddbd363946 | ||
|
|
49ab58a185 | ||
|
|
0b6ce64392 | ||
|
|
8e198c6e74 | ||
|
|
5de4802237 | ||
|
|
042356615a | ||
|
|
7be37af016 | ||
|
|
7a2eeea33f | ||
|
|
53b29b879b | ||
|
|
b029115994 | ||
|
|
1341b40e5b | ||
|
|
d3e2a6811a | ||
|
|
991938edad | ||
|
|
ae4ebb9a1f | ||
|
|
2128d67569 | ||
|
|
51179caeff | ||
|
|
64648e0826 | ||
|
|
0b98d953d2 | ||
|
|
7b10eb5f32 | ||
|
|
17d3312a60 | ||
|
|
d1b864fa6f | ||
|
|
923216dfa4 | ||
|
|
fd36dd7130 | ||
|
|
74b71ae1fb | ||
|
|
a1311dba2d | ||
|
|
98a0e4ddc1 | ||
|
|
52b881723f | ||
|
|
28a95c3dd0 | ||
|
|
bd3b4657f4 | ||
|
|
be6d51c91f | ||
|
|
99f70c236e | ||
|
|
be8152e15b | ||
|
|
17f7f1ade9 | ||
|
|
486e156a91 | ||
|
|
20095a4276 | ||
|
|
1997bf6efb | ||
|
|
718e6a3b55 | ||
|
|
aa894d037b | ||
|
|
4d56b1a250 | ||
|
|
8f02c15e0b | ||
|
|
851fcb1dc0 | ||
|
|
b45cc923ad | ||
|
|
72d36e4878 | ||
|
|
d3cb83022b | ||
|
|
5582d8a1a9 | ||
|
|
d8c4a9013a | ||
|
|
f38fbe8d1a | ||
|
|
09db9501ae | ||
|
|
7a5a1eae90 | ||
|
|
1af491ee06 | ||
|
|
eac104f017 | ||
|
|
98d07a75a0 | ||
|
|
5eb6a331cd | ||
|
|
5c42986c13 | ||
|
|
b63dbdeb83 | ||
|
|
dc45e6c19a | ||
|
|
d782798926 | ||
|
|
c6038d7e92 | ||
|
|
5068e5a413 | ||
|
|
a2e58f645c | ||
|
|
125cb023e6 | ||
|
|
ed3fb8daaa | ||
|
|
5f26752083 | ||
|
|
97245ef94a | ||
|
|
447d86b6c6 | ||
|
|
9eb888533c | ||
|
|
5959b96b2e | ||
|
|
9c778c181f | ||
|
|
9b10959334 | ||
|
|
3d6119fc64 | ||
|
|
6a01c12854 | ||
|
|
6e559febd0 | ||
|
|
f2953a3b6c | ||
|
|
1cd518a67c | ||
|
|
0f8348b77a | ||
|
|
1c16baec21 | ||
|
|
7842e563d0 | ||
|
|
0819f09899 | ||
|
|
59fc3c388f | ||
|
|
5b0354f7ce | ||
|
|
fb5e6841a8 | ||
|
|
13e466a268 | ||
|
|
e91b3d8a2c | ||
|
|
5d044d3e91 | ||
|
|
dce088b5b4 | ||
|
|
c0cb57d5f8 | ||
|
|
676cbfbf49 | ||
|
|
02b59d164d | ||
|
|
03943fe896 | ||
|
|
ece13322e1 | ||
|
|
e1bb609176 | ||
|
|
3cfcf0124b | ||
|
|
aee0fa85e6 | ||
|
|
943f83f2ee | ||
|
|
817c319620 | ||
|
|
641d2b296b | ||
|
|
3c1c6fb7e0 | ||
|
|
dce26dab08 | ||
|
|
8a1bf45ae0 | ||
|
|
07007e3a02 | ||
|
|
23743b6561 | ||
|
|
f0d03142f3 | ||
|
|
d8c404bda7 | ||
|
|
9327d5d6be | ||
|
|
a706fa1cea | ||
|
|
a50320270a | ||
|
|
f5590a4230 | ||
|
|
3caca74140 | ||
|
|
a6150e4e28 | ||
|
|
58c9e3baa5 | ||
|
|
6eeeb37b9e | ||
|
|
f87876d494 | ||
|
|
eb3b7e564b | ||
|
|
b37c0dc297 | ||
|
|
5db490c0e2 | ||
|
|
fb0ce1bcbd | ||
|
|
9099ec040f | ||
|
|
9413d97e45 | ||
|
|
41a79ee53f | ||
|
|
ea78daf330 | ||
|
|
5e0505cf05 | ||
|
|
5867b2ff20 | ||
|
|
6e5469b9e3 | ||
|
|
8fc6e8f3ab | ||
|
|
f6dd6ced3b | ||
|
|
a0a405e974 | ||
|
|
35e7fa4c4d | ||
|
|
0119a39358 | ||
|
|
7f38dfdb1f | ||
|
|
5cefe6f822 | ||
|
|
24c58e35ed | ||
|
|
9357b43172 | ||
|
|
3622a3362c | ||
|
|
2342294493 | ||
|
|
2efce57799 | ||
|
|
8a5ee83850 | ||
|
|
640d07e356 | ||
|
|
01e1f8af09 | ||
|
|
369a94466a | ||
|
|
db52d33267 | ||
|
|
528392a746 | ||
|
|
a8faffe2ce | ||
|
|
d1a6dc44bb | ||
|
|
3b221c3b44 | ||
|
|
e87f6d9bc6 | ||
|
|
b867115dd7 | ||
|
|
476a2959fd | ||
|
|
0fd642237f | ||
|
|
5565791f61 | ||
|
|
346d047c1d | ||
|
|
deb1f96b0c | ||
|
|
0289bb6b3e | ||
|
|
51c48dc083 | ||
|
|
54eedabc12 | ||
|
|
4e3ffe58cc | ||
|
|
98e4df8889 | ||
|
|
6f3d6f2635 | ||
|
|
7b10496294 | ||
|
|
5e5e16a056 | ||
|
|
7c9d5e5efa | ||
|
|
0445e6f140 | ||
|
|
f219a108bd | ||
|
|
14a0d8eb84 | ||
|
|
c9ff52e949 | ||
|
|
9ef9e6a7b6 | ||
|
|
fa55df1634 | ||
|
|
28e689b25f | ||
|
|
2cadcf694c | ||
|
|
d04c50ce77 | ||
|
|
788364120e | ||
|
|
462df22866 | ||
|
|
e47e2f4c51 | ||
|
|
6fa6a37361 | ||
|
|
97df2a2095 | ||
|
|
b2b29c4270 | ||
|
|
3e46c466a8 | ||
|
|
32b0f72b74 | ||
|
|
d7d2e08050 | ||
|
|
7b35975139 | ||
|
|
40fb308337 | ||
|
|
add5ab42ea | ||
|
|
70bec3b36d | ||
|
|
7c24c50d9b | ||
|
|
6f375155d2 | ||
|
|
9ea230bb0a | ||
|
|
12420b5b67 | ||
|
|
021272870f | ||
|
|
fa866d7057 | ||
|
|
baf17b2ed4 | ||
|
|
e806afacb2 | ||
|
|
785232d450 | ||
|
|
7447131226 | ||
|
|
19d6ec53e4 | ||
|
|
2239cfe7ae | ||
|
|
9a511f6775 | ||
|
|
1aed09363b | ||
|
|
b8c048c47b | ||
|
|
753f07f69a | ||
|
|
1f6dceea85 | ||
|
|
df596c0889 | ||
|
|
034e6a7e7f | ||
|
|
8d51b1e56e | ||
|
|
a4965d51d2 | ||
|
|
a2036766ed | ||
|
|
92df33378e | ||
|
|
d22dee0237 | ||
|
|
90d54cae7a | ||
|
|
e321f30f4e | ||
|
|
47402f886a | ||
|
|
24630365bd | ||
|
|
92ddfdef29 | ||
|
|
e9322d3938 | ||
|
|
42595bf71c | ||
|
|
dd23a5ceaf | ||
|
|
cd3dce4a82 | ||
|
|
8562c2c9b4 | ||
|
|
cf48d1793b | ||
|
|
168bda9273 | ||
|
|
4584db99fe | ||
|
|
208bc3d810 | ||
|
|
04c342a1b9 | ||
|
|
adcdca708d | ||
|
|
a0560569a4 | ||
|
|
4f26efba41 | ||
|
|
cb24a781b3 | ||
|
|
062f497b0b | ||
|
|
dbcff517b4 | ||
|
|
40057f1f74 | ||
|
|
9c47a9b59d |
+5
-299
@@ -66,11 +66,6 @@ if (Tools::isSubmit('installBoughtModule'))
|
|||||||
die(displayJavascriptAlert('Module copied to disk'));
|
die(displayJavascriptAlert('Module copied to disk'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayJavascriptAlert($s)
|
|
||||||
{
|
|
||||||
echo '<script type="text/javascript">alert(\''.addslashes($s).'\');</script>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('ajaxReferrers'))
|
if (Tools::isSubmit('ajaxReferrers'))
|
||||||
{
|
{
|
||||||
require(_PS_CONTROLLER_DIR_.'admin/AdminReferrersController.php');
|
require(_PS_CONTROLLER_DIR_.'admin/AdminReferrersController.php');
|
||||||
@@ -84,8 +79,6 @@ if (Tools::isSubmit('getAvailableFields') AND Tools::isSubmit('entity'))
|
|||||||
$jsonArray = array();
|
$jsonArray = array();
|
||||||
$import = new AdminImportController();
|
$import = new AdminImportController();
|
||||||
|
|
||||||
$languages = Language::getLanguages(false);
|
|
||||||
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
|
||||||
$fields = $import->getAvailableFields(true);
|
$fields = $import->getAvailableFields(true);
|
||||||
foreach ($fields AS $field)
|
foreach ($fields AS $field)
|
||||||
$jsonArray[] = '{"field":"'.addslashes($field).'"}';
|
$jsonArray[] = '{"field":"'.addslashes($field).'"}';
|
||||||
@@ -136,16 +129,6 @@ if (Tools::isSubmit('ajaxStates') AND Tools::isSubmit('id_country'))
|
|||||||
die($list);
|
die($list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tools::isSubmit('submitCustomerNote') AND $id_customer = (int)Tools::getValue('id_customer'))
|
|
||||||
{
|
|
||||||
$note = html_entity_decode(Tools::getValue('note'));
|
|
||||||
if (!empty($note) AND !Validate::isCleanHtml($note))
|
|
||||||
die ('error:validation');
|
|
||||||
if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer SET `note` = "'.pSQL($note, true).'" WHERE id_customer = '.(int)$id_customer.' LIMIT 1'))
|
|
||||||
die ('error:update');
|
|
||||||
die('ok');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::getValue('form_language_id'))
|
if (Tools::getValue('form_language_id'))
|
||||||
{
|
{
|
||||||
if (!($context->cookie->employee_form_lang = (int)(Tools::getValue('form_language_id'))))
|
if (!($context->cookie->employee_form_lang = (int)(Tools::getValue('form_language_id'))))
|
||||||
@@ -153,74 +136,6 @@ if (Tools::getValue('form_language_id'))
|
|||||||
die ('Form language updated.');
|
die ('Form language updated.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tools::getValue('submitPublishProduct'))
|
|
||||||
{
|
|
||||||
if (Tools::getIsset('id_product'))
|
|
||||||
{
|
|
||||||
$id_product = (int)(Tools::getValue('id_product'));
|
|
||||||
$id_tab_catalog = (int)(Tab::getIdFromClassName('AdminProducts'));
|
|
||||||
$token = Tools::getAdminToken('AdminProducts'.(int)($id_tab_catalog).(int)$context->employee->id);
|
|
||||||
$bo_product_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminProducts&id_product='.$id_product.'&updateproduct&token='.$token;
|
|
||||||
|
|
||||||
if (Tools::getValue('redirect'))
|
|
||||||
die($bo_product_url);
|
|
||||||
|
|
||||||
$profileAccess = Profile::getProfileAccess($context->employee->id_profile, $id_tab_catalog);
|
|
||||||
if($profileAccess['edit'])
|
|
||||||
{
|
|
||||||
$product = new Product((int)(Tools::getValue('id_product')));
|
|
||||||
if (!Validate::isLoadedObject($product))
|
|
||||||
die('error: invalid id');
|
|
||||||
|
|
||||||
$product->active = 1;
|
|
||||||
|
|
||||||
if ($product->save())
|
|
||||||
die($bo_product_url);
|
|
||||||
else
|
|
||||||
die('error: saving');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
die('error: permissions');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
die ('error: parameters');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::getValue('submitPublishCMS'))
|
|
||||||
{
|
|
||||||
if (Tools::getIsset('id_cms'))
|
|
||||||
{
|
|
||||||
$id_cms = (int)(Tools::getValue('id_cms'));
|
|
||||||
$id_tab_cms = (int)(Tab::getIdFromClassName('AdminCmsContent'));
|
|
||||||
$token = Tools::getAdminToken('AdminCmsContent'.(int)($id_tab_cms).(int)$context->employee->id);
|
|
||||||
$bo_cms_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminCmsContent&id_cms='.(int)$id_cms.'&updatecms&token='.$token;
|
|
||||||
|
|
||||||
if (Tools::getValue('redirect'))
|
|
||||||
die($bo_cms_url);
|
|
||||||
|
|
||||||
$profileAccess = Profile::getProfileAccess($context->employee->id_profile, $id_tab_cms);
|
|
||||||
if($profileAccess['edit'])
|
|
||||||
{
|
|
||||||
$cms = new CMS((int)(Tools::getValue('id_cms')));
|
|
||||||
if (!Validate::isLoadedObject($cms))
|
|
||||||
die('error: invalid id');
|
|
||||||
|
|
||||||
$cms->active = 1;
|
|
||||||
|
|
||||||
if ($cms->save())
|
|
||||||
die($bo_cms_url);
|
|
||||||
else
|
|
||||||
die('error: saving');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
die('error: permissions');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
die ('error: parameters');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('submitTrackClickOnHelp'))
|
if (Tools::isSubmit('submitTrackClickOnHelp'))
|
||||||
{
|
{
|
||||||
$label = Tools::getValue('label');
|
$label = Tools::getValue('label');
|
||||||
@@ -230,36 +145,6 @@ if (Tools::isSubmit('submitTrackClickOnHelp'))
|
|||||||
HelpAccess::trackClick($label, $version);
|
HelpAccess::trackClick($label, $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tools::isSubmit('saveImportMatchs'))
|
|
||||||
{
|
|
||||||
$match = implode('|', Tools::getValue('type_value'));
|
|
||||||
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'import_match` (
|
|
||||||
`id_import_match` ,
|
|
||||||
`name` ,
|
|
||||||
`match`,
|
|
||||||
`skip`
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NULL ,
|
|
||||||
\''.pSQL(Tools::getValue('newImportMatchs')).'\',
|
|
||||||
\''.pSQL($match).'\',
|
|
||||||
\''.pSQL(Tools::getValue('skip')).'\'
|
|
||||||
)');
|
|
||||||
|
|
||||||
die('{"id" : "'.Db::getInstance()->Insert_ID().'"}');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('deleteImportMatchs'))
|
|
||||||
{
|
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'import_match` WHERE `id_import_match` = '.(int)Tools::getValue('idImportMatchs'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('loadImportMatchs'))
|
|
||||||
{
|
|
||||||
$return = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'import_match` WHERE `id_import_match` = '.(int)Tools::getValue('idImportMatchs'));
|
|
||||||
die('{"id" : "'.$return[0]['id_import_match'].'", "matchs" : "'.$return[0]['match'].'", "skip" : "'.$return[0]['skip'].'"}');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('toggleScreencast'))
|
if (Tools::isSubmit('toggleScreencast'))
|
||||||
{
|
{
|
||||||
if (Validate::isLoadedObject($context->employee))
|
if (Validate::isLoadedObject($context->employee))
|
||||||
@@ -269,190 +154,6 @@ if (Tools::isSubmit('toggleScreencast'))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tools::isSubmit('getHookableList'))
|
|
||||||
{
|
|
||||||
/* PrestaShop demo mode */
|
|
||||||
if (_PS_MODE_DEMO_)
|
|
||||||
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
|
|
||||||
/* PrestaShop demo mode*/
|
|
||||||
|
|
||||||
if (!count(Tools::getValue('hooks_list')))
|
|
||||||
die('{"hasError" : true, "errors" : ["Live Edit : no module on this page"]}');
|
|
||||||
|
|
||||||
$modules_list = Tools::getValue('modules_list');
|
|
||||||
$hooks_list = Tools::getValue('hooks_list');
|
|
||||||
$hookableList = array();
|
|
||||||
|
|
||||||
foreach ($modules_list as $module)
|
|
||||||
{
|
|
||||||
$module = trim($module);
|
|
||||||
if (!$module)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
$moduleInstance = Module::getInstanceByName($module);
|
|
||||||
foreach ($hooks_list as $hook_name)
|
|
||||||
{
|
|
||||||
$hook_name = trim($hook_name);
|
|
||||||
if (!$hook_name)
|
|
||||||
continue;
|
|
||||||
if (!array_key_exists($hook_name, $hookableList))
|
|
||||||
$hookableList[$hook_name] = array();
|
|
||||||
if ($moduleInstance->isHookableOn($hook_name))
|
|
||||||
array_push($hookableList[$hook_name], str_replace('_', '-', $module));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
$hookableList['hasError'] = false;
|
|
||||||
die(Tools::jsonEncode($hookableList));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('getHookableModuleList'))
|
|
||||||
{
|
|
||||||
/* PrestaShop demo mode */
|
|
||||||
if (_PS_MODE_DEMO_)
|
|
||||||
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
|
|
||||||
/* PrestaShop demo mode*/
|
|
||||||
|
|
||||||
include('../init.php');
|
|
||||||
$hook_name = Tools::getValue('hook');
|
|
||||||
$hookableModulesList = array();
|
|
||||||
$modules = Db::getInstance()->executeS('SELECT id_module, name FROM `'._DB_PREFIX_.'module` ');
|
|
||||||
foreach ($modules as $module)
|
|
||||||
{
|
|
||||||
if (file_exists(_PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php'))
|
|
||||||
{
|
|
||||||
include_once(_PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php');
|
|
||||||
$mod = new $module['name']();
|
|
||||||
if ($mod->isHookableOn($hook_name))
|
|
||||||
$hookableModulesList[] = array('id' => (int)$mod->id, 'name' => $mod->displayName, 'display' => Hook::exec($hook_name, array(), (int)$mod->id));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
die(Tools::jsonEncode($hookableModulesList));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('saveHook'))
|
|
||||||
{
|
|
||||||
/* PrestaShop demo mode */
|
|
||||||
if (_PS_MODE_DEMO_)
|
|
||||||
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
|
|
||||||
|
|
||||||
$hooks_list = explode(',', Tools::getValue('hooks_list'));
|
|
||||||
$id_shop = (int)Tools::getValue('id_shop');
|
|
||||||
if (!$id_shop)
|
|
||||||
$id_shop = Context::getContext()->shop->id;
|
|
||||||
|
|
||||||
$res = true;
|
|
||||||
$hookableList = array();
|
|
||||||
// $_POST['hook'] is an array of id_module
|
|
||||||
$hooks_list = Tools::getValue('hook');
|
|
||||||
foreach ($hooks_list as $id_hook => $modules)
|
|
||||||
{
|
|
||||||
// 1st, drop all previous hooked modules
|
|
||||||
$sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module`
|
|
||||||
WHERE `id_hook` = '.(int)$id_hook.'
|
|
||||||
AND id_shop = '.$id_shop;
|
|
||||||
$res &= Db::getInstance()->execute($sql);
|
|
||||||
|
|
||||||
$i = 1;
|
|
||||||
$value = '';
|
|
||||||
$ids = array();
|
|
||||||
// then prepare sql query to rehook all chosen modules(id_module, id_shop, id_hook, position)
|
|
||||||
// position is i (autoincremented)
|
|
||||||
foreach ($modules as $id_module)
|
|
||||||
{
|
|
||||||
if (!in_array($id_module, $ids))
|
|
||||||
{
|
|
||||||
$ids[] = $id_module;
|
|
||||||
$value .= '('.(int)$id_module.', '.$id_shop.', '.(int)$id_hook.', '.$i.'),';
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
$value = rtrim($value, ',');
|
|
||||||
$res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook_module`
|
|
||||||
(id_module, id_shop, id_hook, position)
|
|
||||||
VALUES '.$value);
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($res)
|
|
||||||
$hasError = true;
|
|
||||||
else
|
|
||||||
$hasError = false;
|
|
||||||
die('{"hasError" : false, "errors" : ""}');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('getAdminHomeElement'))
|
|
||||||
{
|
|
||||||
$result = array();
|
|
||||||
|
|
||||||
$protocol = Tools::usingSecureMode() ? 'https' : 'http';
|
|
||||||
$isoUser = Context::getContext()->language->iso_code;
|
|
||||||
$isoCountry = Context::getContext()->country->iso_code;
|
|
||||||
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 5)));
|
|
||||||
|
|
||||||
// SCREENCAST
|
|
||||||
if (@fsockopen('api.prestashop.com', 80, $errno, $errst, 3))
|
|
||||||
$result['screencast'] = 'OK';
|
|
||||||
else
|
|
||||||
$result['screencast'] = 'NOK';
|
|
||||||
|
|
||||||
// PREACTIVATION
|
|
||||||
$content = @file_get_contents($protocol.'://api.prestashop.com/partner/preactivation/preactivation-block.php?version=1.0&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&protocol='.$protocol.'&url='.urlencode($_SERVER['HTTP_HOST']).'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&date_creation='._PS_CREATION_DATE_.'&v='._PS_VERSION_.'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context);
|
|
||||||
if (!$content)
|
|
||||||
$result['partner_preactivation'] = 'NOK';
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$content = explode('|', $content);
|
|
||||||
if ($content[0] == 'OK' && Validate::isCleanHtml($content[2]) && Validate::isCleanHtml($content[1]))
|
|
||||||
{
|
|
||||||
$result['partner_preactivation'] = $content[2];
|
|
||||||
$content[1] = explode('#%#', $content[1]);
|
|
||||||
foreach ($content[1] as $partnerPopUp)
|
|
||||||
if ($partnerPopUp)
|
|
||||||
{
|
|
||||||
$partnerPopUp = explode('%%', $partnerPopUp);
|
|
||||||
if (!Configuration::get('PS_PREACTIVATION_'.strtoupper($partnerPopUp[0])))
|
|
||||||
{
|
|
||||||
$result['partner_preactivation'] .= $partnerPopUp[1];
|
|
||||||
Configuration::updateValue('PS_PREACTIVATION_'.strtoupper($partnerPopUp[0]), 'TRUE');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$result['partner_preactivation'] = 'NOK';
|
|
||||||
}
|
|
||||||
|
|
||||||
// PREACTIVATION PAYPAL WARNING
|
|
||||||
$content = @file_get_contents('https://api.prestashop.com/partner/preactivation/preactivation-warnings.php?version=1.0&partner=paypal&iso_country='.Tools::strtolower(Context::getContext()->country->iso_code).'&iso_lang='.Tools::strtolower(Context::getContext()->language->iso_code).'&id_lang='.(int)Context::getContext()->language->id.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context);
|
|
||||||
$content = explode('|', $content);
|
|
||||||
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
|
|
||||||
Configuration::updateValue('PS_PREACTIVATION_PAYPAL_WARNING', $content[1]);
|
|
||||||
else
|
|
||||||
Configuration::updateValue('PS_PREACTIVATION_PAYPAL_WARNING', '');
|
|
||||||
|
|
||||||
// DISCOVER PRESTASHOP
|
|
||||||
$content = @file_get_contents($protocol.'://api.prestashop.com/partner/prestashop/prestashop-link.php?iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id, false, $stream_context);
|
|
||||||
if (!$content)
|
|
||||||
$result['discover_prestashop'] = 'NOK';
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$content = explode('|', $content);
|
|
||||||
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
|
|
||||||
$result['discover_prestashop'] = $content[1];
|
|
||||||
else
|
|
||||||
$result['discover_prestashop'] = 'NOK';
|
|
||||||
|
|
||||||
if (@fsockopen('api.prestashop.com', 80, $errno, $errst, 3))
|
|
||||||
$result['discover_prestashop'] .= '<iframe frameborder="no" style="margin: 0px; padding: 0px; width: 315px; height: 290px;" src="'.$protocol.'://api.prestashop.com/rss/news2.php?v='._PS_VERSION_.'&lang='.$isoUser.'"></iframe>';
|
|
||||||
|
|
||||||
$content = @file_get_contents($protocol.'://api.prestashop.com/partner/paypal/paypal-tips.php?protocol='.$protocol.'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id, false, $stream_context);
|
|
||||||
$content = explode('|', $content);
|
|
||||||
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
|
|
||||||
$result['discover_prestashop'] .= $content[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
die(Tools::jsonEncode($result));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Tools::isSubmit('getChildrenCategories') && Tools::isSubmit('id_category_parent'))
|
if (Tools::isSubmit('getChildrenCategories') && Tools::isSubmit('id_category_parent'))
|
||||||
{
|
{
|
||||||
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id, null, Tools::getValue('use_shop_context'));
|
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id, null, Tools::getValue('use_shop_context'));
|
||||||
@@ -627,3 +328,8 @@ if (Tools::isSubmit('getZones'))
|
|||||||
$array = array('hasError' => false, 'errors' => '', 'data' => $html);
|
$array = array('hasError' => false, 'errors' => '', 'data' => $html);
|
||||||
die(Tools::jsonEncode($html));
|
die(Tools::jsonEncode($html));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function displayJavascriptAlert($s)
|
||||||
|
{
|
||||||
|
echo '<script type="text/javascript">alert(\''.addslashes($s).'\');</script>';
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* 2007-2012 PrestaShop
|
|
||||||
*
|
|
||||||
* NOTICE OF LICENSE
|
|
||||||
*
|
|
||||||
* This source file is subject to the Open Software License (OSL 3.0)
|
|
||||||
* that is bundled with this package in the file LICENSE.txt.
|
|
||||||
* It is also available through the world-wide-web at this URL:
|
|
||||||
* http://opensource.org/licenses/osl-3.0.php
|
|
||||||
* If you did not receive a copy of the license and are unable to
|
|
||||||
* obtain it through the world-wide-web, please send an email
|
|
||||||
* to license@prestashop.com so we can send you a copy immediately.
|
|
||||||
*
|
|
||||||
* DISCLAIMER
|
|
||||||
*
|
|
||||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
|
||||||
* versions in the future. If you wish to customize PrestaShop for your
|
|
||||||
* needs please refer to http://www.prestashop.com for more information.
|
|
||||||
*
|
|
||||||
* @author PrestaShop SA <contact@prestashop.com>
|
|
||||||
* @copyright 2007-2012 PrestaShop SA
|
|
||||||
* @version Release: $Revision: 6844 $
|
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
|
||||||
*/
|
|
||||||
define('_PS_ADMIN_DIR_', getcwd());
|
|
||||||
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
|
||||||
|
|
||||||
/* Getting cookie or logout */
|
|
||||||
require_once(dirname(__FILE__).'/init.php');
|
|
||||||
if (Tools::getValue('token') != Tools::getAdminTokenLite('AdminEmails'))
|
|
||||||
die(Tools::displayError());
|
|
||||||
$smtpChecked = (trim($_POST['mailMethod']) == 'smtp');
|
|
||||||
$smtpServer = $_POST['smtpSrv'];
|
|
||||||
$content = urldecode($_POST['testMsg']);
|
|
||||||
$content = utf8_encode(html_entity_decode($content));
|
|
||||||
$subject = urldecode($_POST['testSubject']);
|
|
||||||
$type = 'text/html';
|
|
||||||
$to = $_POST['testEmail'];
|
|
||||||
$from = Configuration::get('PS_SHOP_EMAIL');
|
|
||||||
$smtpLogin = $_POST['smtpLogin'];
|
|
||||||
$smtpPassword = (!empty($_POST['smtpPassword'])) ? urldecode($_POST['smtpPassword']) : Configuration::get('PS_MAIL_PASSWD');
|
|
||||||
$smtpPort = $_POST['smtpPort'];
|
|
||||||
$smtpEncryption = $_POST['smtpEnc'];
|
|
||||||
|
|
||||||
$result = Mail::sendMailTest(Tools::htmlentitiesUTF8($smtpChecked), Tools::htmlentitiesUTF8($smtpServer), Tools::htmlentitiesUTF8($content), Tools::htmlentitiesUTF8($subject), Tools::htmlentitiesUTF8($type), Tools::htmlentitiesUTF8($to), Tools::htmlentitiesUTF8($from), Tools::htmlentitiesUTF8($smtpLogin), Tools::htmlentitiesUTF8($smtpPassword), Tools::htmlentitiesUTF8($smtpPort), Tools::htmlentitiesUTF8($smtpEncryption));
|
|
||||||
die($result === true ? 'ok' : $result);
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* 2007-2012 PrestaShop
|
|
||||||
*
|
|
||||||
* NOTICE OF LICENSE
|
|
||||||
*
|
|
||||||
* This source file is subject to the Open Software License (OSL 3.0)
|
|
||||||
* that is bundled with this package in the file LICENSE.txt.
|
|
||||||
* It is also available through the world-wide-web at this URL:
|
|
||||||
* http://opensource.org/licenses/osl-3.0.php
|
|
||||||
* If you did not receive a copy of the license and are unable to
|
|
||||||
* obtain it through the world-wide-web, please send an email
|
|
||||||
* to license@prestashop.com so we can send you a copy immediately.
|
|
||||||
*
|
|
||||||
* DISCLAIMER
|
|
||||||
*
|
|
||||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
|
||||||
* versions in the future. If you wish to customize PrestaShop for your
|
|
||||||
* needs please refer to http://www.prestashop.com for more information.
|
|
||||||
*
|
|
||||||
* @author PrestaShop SA <contact@prestashop.com>
|
|
||||||
* @copyright 2007-2012 PrestaShop SA
|
|
||||||
* @version Release: $Revision$
|
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @since 1.5.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('_PS_ADMIN_DIR_', getcwd());
|
|
||||||
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
|
||||||
|
|
||||||
if (!Context::getContext()->employee->id)
|
|
||||||
Tools::redirectAdmin('index.php?controller=AdminLogin');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Functions allowed
|
|
||||||
*/
|
|
||||||
$functions = array(
|
|
||||||
'id_supply_order' => 'exportSupplyOrder',
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Depending on $_GET, call the corresponding function
|
|
||||||
*/
|
|
||||||
foreach ($functions as $var => $function)
|
|
||||||
{
|
|
||||||
if (isset($_GET[$var]))
|
|
||||||
{
|
|
||||||
call_user_func($function);
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function used for SupplyOrder
|
|
||||||
*/
|
|
||||||
function exportSupplyOrder()
|
|
||||||
{
|
|
||||||
//@TODO Checks if employee has enough access to export
|
|
||||||
if (!isset($_GET['id_supply_order']))
|
|
||||||
die (Tools::displayError('Missing supply order ID'));
|
|
||||||
|
|
||||||
$id_supply_order = (int)$_GET['id_supply_order'];
|
|
||||||
$supply_order = new SupplyOrder($id_supply_order);
|
|
||||||
|
|
||||||
if (!Validate::isLoadedObject($supply_order))
|
|
||||||
die(Tools::displayError('Cannot find this supply order in the database'));
|
|
||||||
|
|
||||||
$details = $supply_order->getEntriesCollection($supply_order->id_lang);
|
|
||||||
exportCSV($details, 'supply_order_'.$supply_order->reference.'_details');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Main function to export CSV
|
|
||||||
* @param object|Array $object
|
|
||||||
* @param string $template
|
|
||||||
*/
|
|
||||||
function exportCSV(&$object, $filename)
|
|
||||||
{
|
|
||||||
$csv = new CSV($object, $filename);
|
|
||||||
$csv->export();
|
|
||||||
}
|
|
||||||
@@ -251,14 +251,14 @@ function checkingTab($tab)
|
|||||||
{
|
{
|
||||||
if (isset(AdminTab::$tabParenting[$tab]))
|
if (isset(AdminTab::$tabParenting[$tab]))
|
||||||
Tools::redirectAdmin('?tab='.AdminTab::$tabParenting[$tab].'&token='.Tools::getAdminTokenLite(AdminTab::$tabParenting[$tab]));
|
Tools::redirectAdmin('?tab='.AdminTab::$tabParenting[$tab].'&token='.Tools::getAdminTokenLite(AdminTab::$tabParenting[$tab]));
|
||||||
echo sprintf(Tools::displayError('Tab %s cannot be found.'),$tab);
|
echo sprintf(Tools::displayError('Page %s cannot be found.'),$tab);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Class file is included in Dispatcher::dispatch() function
|
// Class file is included in Dispatcher::dispatch() function
|
||||||
if (!class_exists($tab, false) OR !$row['id_tab'])
|
if (!class_exists($tab, false) OR !$row['id_tab'])
|
||||||
{
|
{
|
||||||
echo sprintf(Tools::displayError('Tab file %s cannot be found.'),$tab);
|
echo sprintf(Tools::displayError('The class %s cannot be found.'),$tab);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$adminObj = new $tab;
|
$adminObj = new $tab;
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ echo '
|
|||||||
if (Shop::isFeatureActive())
|
if (Shop::isFeatureActive())
|
||||||
{
|
{
|
||||||
echo '<div class="multishop_toolbar">
|
echo '<div class="multishop_toolbar">
|
||||||
<span class="text_multishop">'.translate('Multishop configuration for').'</span>'.
|
<span class="text_multishop">'.translate('Multistore configuration for').'</span>'.
|
||||||
Helper::renderShopList();
|
Helper::renderShopList();
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -499,3 +499,31 @@ ul.listForm li {padding-bottom:3px;}
|
|||||||
.selected-line {background:#fff1b5;}
|
.selected-line {background:#fff1b5;}
|
||||||
|
|
||||||
#changedFiles ul{list-style-type: square; padding-left: 40px;}
|
#changedFiles ul{list-style-type: square; padding-left: 40px;}
|
||||||
|
|
||||||
|
.tooltip { position: relative; }
|
||||||
|
.tooltip .tooltip_content {
|
||||||
|
z-index: 100;
|
||||||
|
text-align: left;
|
||||||
|
display: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
position: absolute;
|
||||||
|
padding: 5px 5px;
|
||||||
|
background: black;
|
||||||
|
color: white;
|
||||||
|
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
.tooltip .tooltip_label { cursor: pointer; }
|
||||||
|
.tooltip .title { text-align: center; padding-bottom: 5px; display: block; font-weight: bold }
|
||||||
|
.tooltip:hover .tooltip_content { display: block; }
|
||||||
|
.tooltip_button {
|
||||||
|
border: 1px solid silver;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0 3px;
|
||||||
|
background: -moz-linear-gradient(top, #ddd, #aaa);
|
||||||
|
background: -o-linear-gradient(top, #ddd, #aaa);
|
||||||
|
background: -webkit-linear-gradient(top, #ddd, #aaa);
|
||||||
|
background: linear-gradient(top, #ddd, #aaa);
|
||||||
|
color: #666
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,29 +147,29 @@ a.module_toggle_all{color: #268CCD;}
|
|||||||
/*toolbarBox*/
|
/*toolbarBox*/
|
||||||
.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
|
.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
|
||||||
.toolbarBox .pageTitle { margin-left:10px; line-height:48px}
|
.toolbarBox .pageTitle { margin-left:10px; line-height:48px}
|
||||||
.toolbarBox .pageTitle h3 {font-size: 2em; font-weight: bold; line-height: 48px; margin: 0; padding: 0;}
|
.toolbarBox .pageTitle h3 {font-size: 2em; font-weight: bold; line-height: 48px; margin: 0; padding: 0}
|
||||||
.toolbarBox ul.cc_button {float:right;margin:0;padding:0;}
|
.toolbarBox ul.cc_button {float:right;margin:0;padding:0}
|
||||||
.toolbarBox ul.cc_button li {color: #666666; float: left; height: 48px; list-style: none outside none; padding: 1px 1px 3px 4px; text-align: center;}
|
.toolbarBox ul.cc_button li {color: #666666; float: left; height: 48px; list-style: none outside none; padding: 1px 1px 3px 4px; text-align: center}
|
||||||
.toolbarBox a.toolbar_btn { border-width: 1px;font-size:11px;cursor: pointer; display: block; float: left; padding: 1px 5px; white-space: nowrap; text-shadow: 0 1px 0 #ffffff;;}
|
.toolbarBox a.toolbar_btn { border-width: 1px;font-size:11px;cursor: pointer; display: block; float: left; padding: 1px 5px; white-space: nowrap; text-shadow: 0 1px 0 #ffffff}
|
||||||
.toolbarBox a.toolbar_btn:hover {}
|
.toolbarBox a.toolbar_btn:hover {}
|
||||||
.toolbarBox .toolbar_btn span{ display: block;float: none;height: 32px;margin: 0 auto;width: 32px;}
|
.toolbarBox .toolbar_btn span{ display: block;float: none;height: 32px;margin: 0 auto;width: 32px}
|
||||||
.toolbarBox .process-icon-delete { background-image: url('../img/process-icon-delete.png');}
|
.toolbarBox .process-icon-delete { background-image: url('../img/process-icon-delete.png')}
|
||||||
.toolbarBox .process-icon-duplicate { background-image: url('../img/process-icon-duplicate.png');}
|
.toolbarBox .process-icon-duplicate { background-image: url('../img/process-icon-duplicate.png')}
|
||||||
.toolbarBox .process-icon-preview { background-image: url('../img/process-icon-preview.png');}
|
.toolbarBox .process-icon-preview { background-image: url('../img/process-icon-preview.png')}
|
||||||
.toolbarBox .process-icon-stats { background-image: url('../img/process-icon-stats.png');}
|
.toolbarBox .process-icon-stats { background-image: url('../img/process-icon-stats.png')}
|
||||||
.toolbarBox .process-icon-cancel { background-image: url('../img/process-icon-cancel.png');}
|
.toolbarBox .process-icon-cancel { background-image: url('../img/process-icon-cancel.png')}
|
||||||
.toolbarBox .process-icon-new, .toolbarBox .process-icon-newAttributes{ background-image: url('../img/process-icon-new.png');}
|
.toolbarBox .process-icon-new, .toolbarBox .process-icon-newAttributes{ background-image: url('../img/process-icon-new.png')}
|
||||||
.toolbarBox .process-icon-save, .toolbarBox .process-icon-save-settings { background-image: url('../img/process-icon-save.png');}
|
.toolbarBox .process-icon-save, .toolbarBox .process-icon-save-settings { background-image: url('../img/process-icon-save.png')}
|
||||||
.toolbarBox .process-icon-save-and-stay { background-image: url('../img/process-icon-save-and-stay.png');}
|
.toolbarBox .process-icon-save-and-stay { background-image: url('../img/process-icon-save-and-stay.png')}
|
||||||
.toolbarBox .process-icon-edit { background-image: url('../img/process-icon-edit.png');}
|
.toolbarBox .process-icon-edit { background-image: url('../img/process-icon-edit.png')}
|
||||||
.toolbarBox .process-icon-back { background-image: url('../img/process-icon-back.png');}
|
.toolbarBox .process-icon-back { background-image: url('../img/process-icon-back.png')}
|
||||||
.toolbarBox .process-icon-refresh-index { background-image: url('../img/process-icon-refresh-index.png');}
|
.toolbarBox .process-icon-refresh-index { background-image: url('../img/process-icon-refresh-index.png')}
|
||||||
.toolbarBox .process-icon-refresh-cache { background-image: url('../img/process-icon-refresh-cache.png');}
|
.toolbarBox .process-icon-refresh-cache { background-image: url('../img/process-icon-refresh-cache.png')}
|
||||||
.toolbarBox .process-icon-save-calendar { background-image: url('../img/process-icon-save-calendar.png');}
|
.toolbarBox .process-icon-save-calendar { background-image: url('../img/process-icon-save-calendar.png')}
|
||||||
.toolbarBox .process-icon-new-module { background-image: url('../img/process-icon-new-module.png');}
|
.toolbarBox .process-icon-new-module { background-image: url('../img/process-icon-new-module.png')}
|
||||||
.toolbarBox .process-icon-new-module-addon { background-image: url('../img/process-icon-new-module-addon.png');}
|
.toolbarBox .process-icon-new-module-addon { background-image: url('../img/process-icon-new-module-addon.png')}
|
||||||
|
|
||||||
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1;}
|
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1}
|
||||||
|
|
||||||
/*button upload files*/
|
/*button upload files*/
|
||||||
.qq-upload-button {background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent;
|
.qq-upload-button {background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent;
|
||||||
@@ -231,7 +231,8 @@ form#product, form#access_form{ background-color:#ebedf4; border:1px solid #cc
|
|||||||
#moduleContainer .moduleDesc .metadata dl dt { font-weight:bold; padding-right:5px;}
|
#moduleContainer .moduleDesc .metadata dl dt { font-weight:bold; padding-right:5px;}
|
||||||
#moduleContainer .moduleDesc p.desc { color:#666; font-size:12px; display:block; clear:both;}
|
#moduleContainer .moduleDesc p.desc { color:#666; font-size:12px; display:block; clear:both;}
|
||||||
#moduleContainer .setup {background-color:#6db300; font-size:10px; color:#fff; text-transform:uppercase; position:relative; left:10px; padding:0px 4px; display: inline-block; border-radius:3px;}
|
#moduleContainer .setup {background-color:#6db300; font-size:10px; color:#fff; text-transform:uppercase; position:relative; left:10px; padding:0px 4px; display: inline-block; border-radius:3px;}
|
||||||
#moduleContainer .setup.non-install { background-color:#ec7000;}
|
#moduleContainer .setup.non-install { border: solid 1px #ec7000; background-color: #ffedb1; color: #ec7000}
|
||||||
|
#moduleContainer .setup.must-have { background-color: #ec7000;}
|
||||||
#moduleContainer .setup.off{ background-color:#ccc;}
|
#moduleContainer .setup.off{ background-color:#ccc;}
|
||||||
#moduleContainer .row-actions-module span { padding-right:5px;}
|
#moduleContainer .row-actions-module span { padding-right:5px;}
|
||||||
#moduleContainer .row-actions-module span a { font-size:12px;}
|
#moduleContainer .row-actions-module span a { font-size:12px;}
|
||||||
@@ -243,7 +244,6 @@ form#product, form#access_form{ background-color:#ebedf4; border:1px solid #cc
|
|||||||
#moduleContainer .moduleName {font-size:12px; color:#3A6EA7;font-weight:bold;}
|
#moduleContainer .moduleName {font-size:12px; color:#3A6EA7;font-weight:bold;}
|
||||||
#moduleContainer .moduleFavDesc { font-family:Georgia; font-style:italic; color:#666;}
|
#moduleContainer .moduleFavDesc { font-family:Georgia; font-style:italic; color:#666;}
|
||||||
|
|
||||||
|
|
||||||
/*FOOTER*/
|
/*FOOTER*/
|
||||||
#footer {height:40px; font-size:12px;clear:both;font-size:0.9em;color:#666666}
|
#footer {height:40px;padding-top:5px;font-size:12px;clear:both;font-size:0.9em;color:#666666}
|
||||||
#footer .footer_link, #footer .footer_link:hover {color:#D41958;}
|
#footer .footer_link, #footer .footer_link:hover {color:#D41958;}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
perfect_access_js_gestion(this, perm, id_tab, tabsize, tabnumber, table, '{$id_tab_access}');
|
perfect_access_js_gestion(this, perm, id_tab, tabsize, tabnumber, table);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{$link->getAdminLink('AdminAccess')}",
|
url: "{$link->getAdminLink('AdminAccess')}",
|
||||||
@@ -122,15 +122,16 @@
|
|||||||
var perm = tout[1];
|
var perm = tout[1];
|
||||||
var id_profile = tout[2];
|
var id_profile = tout[2];
|
||||||
var enabled = $(this).is(':checked') ? 1 : 0;
|
var enabled = $(this).is(':checked') ? 1 : 0;
|
||||||
|
var enabled_attr = $(this).is(':checked') ? true : false;
|
||||||
var table = 'table#table_module_'+id_profile;
|
var table = 'table#table_module_'+id_profile;
|
||||||
|
|
||||||
if (id_module == -1)
|
if (id_module == -1)
|
||||||
$(table+' .ajax-ma-'+perm).each(function(key, value) {
|
$(table+' .ajax-ma-'+perm).each(function(key, value) {
|
||||||
$(this).attr("checked", enabled);
|
$(this).attr("checked", enabled_attr);
|
||||||
});
|
});
|
||||||
else if (!enabled)
|
else if (!enabled)
|
||||||
$(table+' #ajax-ma-'+perm+'-master').each(function(key, value) {
|
$(table+' #ajax-ma-'+perm+'-master').each(function(key, value) {
|
||||||
$(this).attr("checked", enabled);
|
$(this).attr("checked", enabled_attr);
|
||||||
});
|
});
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -203,7 +204,7 @@
|
|||||||
<table class="table float" cellspacing="0" style="margin-right:50px" id="table_{$profile.id_profile}">
|
<table class="table float" cellspacing="0" style="margin-right:50px" id="table_{$profile.id_profile}">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="center">
|
<th class="center">
|
||||||
{l s='Tabs'}
|
{l s='Menus'}
|
||||||
</th>
|
</th>
|
||||||
<th class="center">
|
<th class="center">
|
||||||
<input type="checkbox" name="1" id="viewall"
|
<input type="checkbox" name="1" id="viewall"
|
||||||
@@ -253,7 +254,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{if !count($tabs)}
|
{if !count($tabs)}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6">{l s='No tab'}</td>
|
<td colspan="6">{l s='No menu'}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{else}
|
{else}
|
||||||
{foreach $tabs AS $tab}
|
{foreach $tabs AS $tab}
|
||||||
|
|||||||
@@ -37,11 +37,9 @@
|
|||||||
if (!isNaN(element_price) && element_price > 0)
|
if (!isNaN(element_price) && element_price > 0)
|
||||||
{
|
{
|
||||||
if (element_has_tax)
|
if (element_has_tax)
|
||||||
other_element_price = parseFloat(element_price / ((product_tax / 100) + 1));
|
other_element_price = parseFloat(element_price / ((product_tax / 100) + 1)).toFixed(6);
|
||||||
else
|
else
|
||||||
other_element_price = ps_round(parseFloat(element_price * ((product_tax / 100) + 1)), 2);
|
other_element_price = ps_round(parseFloat(element_price * ((product_tax / 100) + 1)), 2).toFixed(2);
|
||||||
|
|
||||||
other_element_price = other_element_price.toFixed(2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#related_to_'+element.attr('name')).val(other_element_price);
|
$('#related_to_'+element.attr('name')).val(other_element_price);
|
||||||
@@ -78,9 +76,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left; width: 570px;">
|
<div style="float: left; width: 570px;">
|
||||||
<div class="hint" style="width: 570px; padding-left: 45px; margin-bottom: 15px; display: block; position: inherit;">{l s='The Combinations Generator is a tool which allows you to easily create a series of combinations by selecting the related attributes. For example, if you are selling T-Shirts, in 3 different sizes and 2 different colors, the Generator will create 6 combinations for you.'}</div>
|
<div class="hint" style="width: 570px; padding-left: 45px; margin-bottom: 15px; display: block; position: inherit;">{l s='The Combinations Generator is a tool which allows you to easily create a series of combinations by selecting the related attributes. For example, if you are selling T-Shirts in 3 different sizes and 2 different colors, the Generator will create 6 combinations for you.'}</div>
|
||||||
<p>{l s='You are currently generating combinations for the following product:'} <b>{$product_name|escape:'htmlall':'UTF-8'}</b></p>
|
<p>{l s='You are currently generating combinations for the following product:'} <b>{$product_name|escape:'htmlall':'UTF-8'}</b></p>
|
||||||
<h4>{l s='Step 1: On the left side, Select the attributes you want to use (Holding down the "CTRL" Key on your keyboard and validating by clicking on "Add"'}</h4>
|
<h4>{l s='Step 1: On the left side, Select the attributes you want to use (Hold down the "CTRL" Key on your keyboard and validate by clicking on "Add")'}</h4>
|
||||||
<div>
|
<div>
|
||||||
{foreach $attribute_groups as $k => $attribute_group}
|
{foreach $attribute_groups as $k => $attribute_group}
|
||||||
{if isset($attribute_js[$attribute_group['id_attribute_group']])}
|
{if isset($attribute_js[$attribute_group['id_attribute_group']])}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<div class="warn width2" style="float: left;">
|
<div class="warn width2" style="float: left;">
|
||||||
<p>{l s='How to restore a database Backup in 10 easy steps:'}</p>
|
<p>{l s='How to restore a database Backup in 10 easy steps:'}</p>
|
||||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
|
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
|
||||||
<li>{l s='Set "Enable Shop" to "No" in the Preferences > Maintenance tab.'}</li>
|
<li>{l s='Set "Enable Shop" to "No" in the "Maintenance" page under the "Preferences" menu.'}</li>
|
||||||
<li>{l s='Download the Backup from the list below or from your FTP server (in the folder "admin/backups").'}</li>
|
<li>{l s='Download the Backup from the list below or from your FTP server (in the folder "admin/backups").'}</li>
|
||||||
<li>{l s='Check the Backup integrity: look for errors, incomplete file, etc. Be sure to verify all your data.'}</li>
|
<li>{l s='Check the Backup integrity: look for errors, incomplete file, etc. Be sure to verify all your data.'}</li>
|
||||||
<li>{l s='Ask your hosting provider for "phpMyAdmin" access to your database'}</li>
|
<li>{l s='Ask your hosting provider for "phpMyAdmin" access to your database'}</li>
|
||||||
|
|||||||
@@ -28,6 +28,16 @@
|
|||||||
|
|
||||||
{block name="override_header"}
|
{block name="override_header"}
|
||||||
|
|
||||||
|
{if isset($backup_url) && isset($backup_weight)}
|
||||||
|
<fieldset>
|
||||||
|
<legend><img src="../img/admin/AdminBackup.gif" alt="" class="icon" /> {l s='Download'}</legend>
|
||||||
|
<p style="font-size: 13px;">
|
||||||
|
<a href="{$backup_url}"><img src="../img/admin/AdminBackup.gif" alt="" class="icon" /></a>
|
||||||
|
<b><a href="{$backup_url}">{l s='Download the Backup file'} ({$backup_weight}{l s='MB'})</a></b><br /><br />
|
||||||
|
{l s='Tip: You can also download this file over your FTP. Backup files are located in "admin/backups" directory.'}</p>
|
||||||
|
</fieldset><br /><br />
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="error width1" style="float: left; margin-right: 10px;">
|
<div class="error width1" style="float: left; margin-right: 10px;">
|
||||||
<p>{l s='Disclaimer before creating a new Backup'}</p>
|
<p>{l s='Disclaimer before creating a new Backup'}</p>
|
||||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px; padding-left: 10px;">
|
<ol style="font-size: 11px; font-weight: normal; line-height: 20px; padding-left: 10px;">
|
||||||
@@ -52,7 +62,7 @@
|
|||||||
<div class="warn width2" style="float: left;">
|
<div class="warn width2" style="float: left;">
|
||||||
<p>{l s='How to restore a database Backup in 10 easy steps:'}</p>
|
<p>{l s='How to restore a database Backup in 10 easy steps:'}</p>
|
||||||
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
|
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
|
||||||
<li>{l s='Set "Enable Shop" to "No" in the Preferences > Maintenance tab.'}</li>
|
<li>{l s='Set "Enable Shop" to "No" in the "Maintenance" page under the "Preferences" menu.'}</li>
|
||||||
<li>{l s='Download the Backup from the list below or from your FTP server (in the folder "admin/backups").'}</li>
|
<li>{l s='Download the Backup from the list below or from your FTP server (in the folder "admin/backups").'}</li>
|
||||||
<li>{l s='Check the Backup integrity: look for errors, incomplete file, etc. Be sure to verify all your data.'}</li>
|
<li>{l s='Check the Backup integrity: look for errors, incomplete file, etc. Be sure to verify all your data.'}</li>
|
||||||
<li>{l s='Ask your hosting provider for "phpMyAdmin" access to your database'}</li>
|
<li>{l s='Ask your hosting provider for "phpMyAdmin" access to your database'}</li>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<input type="text" id="customerFilter" name="customerFilter" value="{$customerFilter|escape:'htmlall':'UTF-8'}" style="width:400px" />
|
<input type="text" id="customerFilter" name="customerFilter" value="{$customerFilter|escape:'htmlall':'UTF-8'}" style="width:400px" />
|
||||||
<p class="preference_description">{l s='Optional, the cart rule will be available for everyone if you leave this field blank.'}</p>
|
<p class="preference_description">{l s='Optional, the cart rule will be available for everyone if you leave this field blank.'}</p>
|
||||||
</div>
|
</div>
|
||||||
<label>{l s='Validity'}</label>
|
<label>{l s='Valid'}</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<strong>{l s='from'}</strong>
|
<strong>{l s='from'}</strong>
|
||||||
<input type="text" class="datepicker" name="date_from"
|
<input type="text" class="datepicker" name="date_from"
|
||||||
@@ -55,20 +55,6 @@
|
|||||||
<div id="country_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
<div id="country_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
|
||||||
<p><strong>{l s='Selected countries'}</strong></p>
|
|
||||||
<select name="country_select[]" id="country_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
|
||||||
{foreach from=$countries.selected item='country'}
|
|
||||||
<option value="{$country.id_country|intval}"> {$country.name|escape}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select><br /><br />
|
|
||||||
<a
|
|
||||||
id="country_select_remove"
|
|
||||||
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
|
||||||
>
|
|
||||||
{l s='Remove'} >>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td style="padding-left:20px;">
|
<td style="padding-left:20px;">
|
||||||
<p><strong>{l s='Unselected countries'}</strong></p>
|
<p><strong>{l s='Unselected countries'}</strong></p>
|
||||||
<select id="country_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
<select id="country_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
@@ -80,7 +66,21 @@
|
|||||||
id="country_select_add"
|
id="country_select_add"
|
||||||
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
>
|
>
|
||||||
<< {l s='Add'}
|
{l s='Add'} >>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p><strong>{l s='Selected countries'}</strong></p>
|
||||||
|
<select name="country_select[]" id="country_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
|
{foreach from=$countries.selected item='country'}
|
||||||
|
<option value="{$country.id_country|intval}"> {$country.name|escape}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select><br /><br />
|
||||||
|
<a
|
||||||
|
id="country_select_remove"
|
||||||
|
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
|
>
|
||||||
|
<< {l s='Remove'}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -93,20 +93,6 @@
|
|||||||
<div id="carrier_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
<div id="carrier_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
|
||||||
<p><strong>{l s='Selected carriers'}</strong></p>
|
|
||||||
<select name="carrier_select[]" id="carrier_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
|
||||||
{foreach from=$carriers.selected item='carrier'}
|
|
||||||
<option value="{$carrier.id_carrier|intval}"> {$carrier.name|escape}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select><br /><br />
|
|
||||||
<a
|
|
||||||
id="carrier_select_remove"
|
|
||||||
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
|
||||||
>
|
|
||||||
{l s='Remove'} >>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td style="padding-left:20px;">
|
<td style="padding-left:20px;">
|
||||||
<p><strong>{l s='Unselected carriers'}</strong></p>
|
<p><strong>{l s='Unselected carriers'}</strong></p>
|
||||||
<select id="carrier_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
<select id="carrier_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
@@ -118,7 +104,21 @@
|
|||||||
id="carrier_select_add"
|
id="carrier_select_add"
|
||||||
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
>
|
>
|
||||||
<< {l s='Add'}
|
{l s='Add'} >>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p><strong>{l s='Selected carriers'}</strong></p>
|
||||||
|
<select name="carrier_select[]" id="carrier_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
|
{foreach from=$carriers.selected item='carrier'}
|
||||||
|
<option value="{$carrier.id_carrier|intval}"> {$carrier.name|escape}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select><br /><br />
|
||||||
|
<a
|
||||||
|
id="carrier_select_remove"
|
||||||
|
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
|
>
|
||||||
|
<< {l s='Remove'}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -132,20 +132,6 @@
|
|||||||
<div id="group_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
<div id="group_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
|
||||||
<p><strong>{l s='Selected groups'}</strong></p>
|
|
||||||
<select name="group_select[]" id="group_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
|
||||||
{foreach from=$groups.selected item='group'}
|
|
||||||
<option value="{$group.id_group|intval}"> {$group.name|escape}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select><br /><br />
|
|
||||||
<a
|
|
||||||
id="group_select_remove"
|
|
||||||
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
|
||||||
>
|
|
||||||
{l s='Remove'} >>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td style="padding-left:20px;">
|
<td style="padding-left:20px;">
|
||||||
<p><strong>{l s='Unselected groups'}</strong></p>
|
<p><strong>{l s='Unselected groups'}</strong></p>
|
||||||
<select id="group_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
<select id="group_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
@@ -157,7 +143,21 @@
|
|||||||
id="group_select_add"
|
id="group_select_add"
|
||||||
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
>
|
>
|
||||||
<< {l s='Add'}
|
{l s='Add'} >>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p><strong>{l s='Selected groups'}</strong></p>
|
||||||
|
<select name="group_select[]" id="group_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
|
{foreach from=$groups.selected item='group'}
|
||||||
|
<option value="{$group.id_group|intval}"> {$group.name|escape}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select><br /><br />
|
||||||
|
<a
|
||||||
|
id="group_select_remove"
|
||||||
|
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
|
>
|
||||||
|
<< {l s='Remove'}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -171,20 +171,6 @@
|
|||||||
<div id="cart_rule_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
<div id="cart_rule_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
|
||||||
<p><strong>{l s='Combinable cart rules'}</strong></p>
|
|
||||||
<select name="cart_rule_select[]" id="cart_rule_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
|
||||||
{foreach from=$cart_rules.selected item='cart_rule'}
|
|
||||||
<option value="{$cart_rule.id_cart_rule|intval}"> {$cart_rule.name|escape}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select><br /><br />
|
|
||||||
<a
|
|
||||||
id="cart_rule_select_remove"
|
|
||||||
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
|
||||||
>
|
|
||||||
{l s='Remove'} >>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td style="padding-left:20px;">
|
<td style="padding-left:20px;">
|
||||||
<p><strong>{l s='Uncombinable cart rules'}</strong></p>
|
<p><strong>{l s='Uncombinable cart rules'}</strong></p>
|
||||||
<select id="cart_rule_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple="">
|
<select id="cart_rule_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple="">
|
||||||
@@ -196,7 +182,21 @@
|
|||||||
id="cart_rule_select_add"
|
id="cart_rule_select_add"
|
||||||
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
>
|
>
|
||||||
<< {l s='Add'}
|
{l s='Add'} >>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p><strong>{l s='Combinable cart rules'}</strong></p>
|
||||||
|
<select name="cart_rule_select[]" id="cart_rule_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
|
{foreach from=$cart_rules.selected item='cart_rule'}
|
||||||
|
<option value="{$cart_rule.id_cart_rule|intval}"> {$cart_rule.name|escape}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select><br /><br />
|
||||||
|
<a
|
||||||
|
id="cart_rule_select_remove"
|
||||||
|
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
|
>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -221,20 +221,6 @@
|
|||||||
<div id="shop_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
<div id="shop_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
|
||||||
<p><strong>{l s='Selected shops'}</strong></p>
|
|
||||||
<select name="shop_select[]" id="shop_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
|
||||||
{foreach from=$shops.selected item='shop'}
|
|
||||||
<option value="{$shop.id_shop|intval}"> {$shop.name|escape}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select><br /><br />
|
|
||||||
<a
|
|
||||||
id="shop_select_remove"
|
|
||||||
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
|
||||||
>
|
|
||||||
{l s='Remove'} >>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td style="padding-left:20px;">
|
<td style="padding-left:20px;">
|
||||||
<p><strong>{l s='Unselected shops'}</strong></p>
|
<p><strong>{l s='Unselected shops'}</strong></p>
|
||||||
<select id="shop_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
<select id="shop_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
@@ -246,7 +232,21 @@
|
|||||||
id="shop_select_add"
|
id="shop_select_add"
|
||||||
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
>
|
>
|
||||||
<< {l s='Add'}
|
{l s='Add'} >>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p><strong>{l s='Selected shops'}</strong></p>
|
||||||
|
<select name="shop_select[]" id="shop_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||||
|
{foreach from=$shops.selected item='shop'}
|
||||||
|
<option value="{$shop.id_shop|intval}"> {$shop.name|escape}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select><br /><br />
|
||||||
|
<a
|
||||||
|
id="shop_select_remove"
|
||||||
|
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
|
>
|
||||||
|
<< {l s='Remove'}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -54,6 +54,6 @@
|
|||||||
name: '{$language.name|escape:'quotes'}'
|
name: '{$language.name|escape:'quotes'}'
|
||||||
};
|
};
|
||||||
{/foreach}
|
{/foreach}
|
||||||
displayFlags(languages, {$defaultLanguage});
|
displayFlags(languages, {$id_lang_default});
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="themes/default/template/controllers/cart_rules/form.js"></script>
|
<script type="text/javascript" src="themes/default/template/controllers/cart_rules/form.js"></script>
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<div class="translatable">
|
<div class="translatable">
|
||||||
{foreach from=$languages item=language}
|
{foreach from=$languages item=language}
|
||||||
<div class="lang_{$language.id_lang|intval}" style="display:{if $language.id_lang == $defaultLanguage}block{else}none{/if};float:left">
|
<div class="lang_{$language.id_lang|intval}" style="display:{if $language.id_lang == $id_lang_default}block{else}none{/if};float:left">
|
||||||
<input type="text" id="name_{$language.id_lang|intval}" name="name_{$language.id_lang|intval}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang|intval)}" style="width:400px" />
|
<input type="text" id="name_{$language.id_lang|intval}" name="name_{$language.id_lang|intval}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang|intval)|escape:html:'UTF-8'}" style="width:400px" />
|
||||||
<sup>*</sup>
|
<sup>*</sup>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|||||||
+19
-19
@@ -1,5 +1,23 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td style="padding-left:20px">
|
||||||
|
<p><strong>{l s='Unselected'}</strong></p>
|
||||||
|
<select
|
||||||
|
id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_1"
|
||||||
|
style="border:1px solid #AAAAAA;width:400px;height:160px"
|
||||||
|
multiple
|
||||||
|
>
|
||||||
|
{foreach from=$product_rule_itemlist.unselected item='item'}
|
||||||
|
<option value="{$item.id|intval}"> {$item.name}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select><br /><br />
|
||||||
|
<a
|
||||||
|
id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add"
|
||||||
|
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
|
>
|
||||||
|
{l s='Add'} >>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p><strong>{l s='Selected'}</strong></p>
|
<p><strong>{l s='Selected'}</strong></p>
|
||||||
<select
|
<select
|
||||||
@@ -17,25 +35,7 @@
|
|||||||
id="product_rule_select_{$product_rule_group_id}_{$product_rule_id}_remove"
|
id="product_rule_select_{$product_rule_group_id}_{$product_rule_id}_remove"
|
||||||
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
||||||
>
|
>
|
||||||
{l s='Remove'} >>
|
<< {l s='Remove'}
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td style="padding-left:20px">
|
|
||||||
<p><strong>{l s='Unselected'}</strong></p>
|
|
||||||
<select
|
|
||||||
id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_1"
|
|
||||||
style="border:1px solid #AAAAAA;width:400px;height:160px"
|
|
||||||
multiple
|
|
||||||
>
|
|
||||||
{foreach from=$product_rule_itemlist.unselected item='item'}
|
|
||||||
<option value="{$item.id|intval}"> {$item.name}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select><br /><br />
|
|
||||||
<a
|
|
||||||
id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add"
|
|
||||||
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
|
|
||||||
>
|
|
||||||
<< {l s='Add'}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<h2><img src="../img/admin/vcard.png" />{l s='Customer information'}</h2>
|
<h2><img src="../img/admin/vcard.png" />{l s='Customer information'}</h2>
|
||||||
<span style="font-size: 14px;">
|
<span style="font-size: 14px;">
|
||||||
{if $customer->id}
|
{if $customer->id}
|
||||||
<a href="{$link->getAdminLink('AdminCustomers')}&id_customer={$customer->id}&viewcustomer">{$customer->firstname} {$customer->lastname}</a></span>
|
<a href="{$link->getAdminLink('AdminCustomers')|escape:'htmlall':'UTF-8'}&id_customer={$customer->id}&viewcustomer">{$customer->firstname} {$customer->lastname}</a></span>
|
||||||
{l s='#'}{$customer->id}<br />
|
{l s='#'}{$customer->id}<br />
|
||||||
<a style="text-decoration: underline; color:#268CCD;" href="mailto:{$customer->email}">{$customer->email}</a> <br /><br />
|
<a style="text-decoration: underline; color:#268CCD;" href="mailto:{$customer->email}">{$customer->email}</a> <br /><br />
|
||||||
{l s='Account registration date:'} {dateFormat date=$customer->date_add}<br />
|
{l s='Account registration date:'} {dateFormat date=$customer->date_add}<br />
|
||||||
@@ -51,12 +51,12 @@
|
|||||||
<h2><img src="../img/admin/cart.gif" /> {l s='Order information'}</h2>
|
<h2><img src="../img/admin/cart.gif" /> {l s='Order information'}</h2>
|
||||||
<span>
|
<span>
|
||||||
{if $order->id}
|
{if $order->id}
|
||||||
<a href="{$link->getAdminLink('AdminOrders')}&id_order={$order->id}&vieworder"> {l s='Order #%d' sprintf=$order->id|string_format:"%06d"}</a></span>
|
<a href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&id_order={$order->id}&vieworder"> {l s='Order #%d' sprintf=$order->id|string_format:"%06d"}</a></span>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
{l s='Made on:'} {dateFormat date=$order->date_add}<br /><br /><br /><br />
|
{l s='Made on:'} {dateFormat date=$order->date_add}<br /><br /><br /><br />
|
||||||
{else}
|
{else}
|
||||||
{l s='No order created from this cart'}</span>
|
{l s='No order created from this cart'}</span>
|
||||||
<p><a class="button" href="{$link->getAdminLink('AdminOrders')}&id_cart={$cart->id}&addorder">{l s='Create an order with from cart'}</a></p>
|
{if $customer->id}<p><a class="button" href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&id_cart={$cart->id}&addorder">{l s='Create an order with from cart'}</a></p>{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<br style="clear:both;" />
|
<br style="clear:both;" />
|
||||||
@@ -77,12 +77,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach from=$products item='product'}
|
{foreach from=$products item='product'}
|
||||||
{if isset($customized_datas[$product.id_product][$product.id_product_attribute])}
|
{if isset($customized_datas[$product.id_product][$product.id_product_attribute][$product.id_address_delivery])}
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">{$product.image}</td>
|
<td align="center">{$product.image}</td>
|
||||||
<td><a href="{$link->getAdminLink('AdminProducts')}&id_product={$product.id_product}&updateproduct">
|
<td><a href="{$link->getAdminLink('AdminProducts')|escape:'htmlall':'UTF-8'}&id_product={$product.id_product}&updateproduct">
|
||||||
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
|
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
|
||||||
{if $product.reference}$this->l('Ref:') {$product.reference}{/if}
|
{if $product.reference}{l s='Ref:'} {$product.reference}{/if}
|
||||||
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
|
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
<td align="center" class="productQuantity">{$product.qty_in_stock}</td>
|
<td align="center" class="productQuantity">{$product.qty_in_stock}</td>
|
||||||
<td align="right">{displayWtPriceWithCurrency price=$product.total_customization_wt currency=$currency}</td>
|
<td align="right">{displayWtPriceWithCurrency price=$product.total_customization_wt currency=$currency}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{foreach from=$customized_datas[$product.id_product][$product.id_product_attribute] item='customization'}
|
{foreach from=$customized_datas[$product.id_product][$product.id_product_attribute][$product.id_address_delivery] item='customization'}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
{foreach from=$customization.datas key='type' item='datas'}
|
{foreach from=$customization.datas key='type' item='datas'}
|
||||||
@@ -125,14 +125,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="center">{$product.image}</td>
|
<td align="center">{$product.image}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{$link->getAdminLink('AdminProducts')}&id_product={$product.id_product}&updateproduct">
|
<a href="{$link->getAdminLink('AdminProducts')|escape:'htmlall':'UTF-8'}&id_product={$product.id_product}&updateproduct">
|
||||||
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
|
<span class="productName">{$product.name}</span>{if isset($product.attributes)}<br />{$product.attributes}{/if}<br />
|
||||||
{if $product.reference}{l s='Ref:'} {$product.reference}{/if}
|
{if $product.reference}{l s='Ref:'} {$product.reference}{/if}
|
||||||
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
|
{if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">{displayWtPriceWithCurrency price=$product.product_price currency=$currency}</td>
|
<td align="center">{displayWtPriceWithCurrency price=$product.product_price currency=$currency}</td>
|
||||||
<td align="center" class="productQuantity">{math equation='x - y' x=$product.cart_quantity y=$product.customization_quantity}</td>
|
<td align="center" class="productQuantity">{math equation='x - y' x=$product.cart_quantity y=$product.customization_quantity|intval}</td>
|
||||||
<td align="center" class="productQuantity">{$product.qty_in_stock}</td>
|
<td align="center" class="productQuantity">{$product.qty_in_stock}</td>
|
||||||
<td align="right">{displayWtPriceWithCurrency price=$product.product_total currency=$currency}</td>
|
<td align="right">{displayWtPriceWithCurrency price=$product.product_total currency=$currency}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{foreach from=$discounts item='discount'}
|
{foreach from=$discounts item='discount'}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{$link->getAdminLink('AdminDiscounts')}&id_discount={$discount.id_discount}&updatediscount">{$discount.name}</a></td>
|
<td><a href="{$link->getAdminLink('AdminDiscounts')|escape:'htmlall':'UTF-8'}&id_discount={$discount.id_discount}&updatediscount">{$discount.name}</a></td>
|
||||||
<td align="center">- {displayWtPriceWithCurrency price=$discount.value_real currency=$currency}</td>
|
<td align="center">- {displayWtPriceWithCurrency price=$discount.value_real currency=$currency}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|||||||
@@ -25,6 +25,29 @@
|
|||||||
*}
|
*}
|
||||||
{extends file="helpers/form/form.tpl"}
|
{extends file="helpers/form/form.tpl"}
|
||||||
|
|
||||||
|
{block name="input"}
|
||||||
|
{if $input.type == 'file'}
|
||||||
|
{if isset($input.display_image) && $input.display_image}
|
||||||
|
{if isset($fields_value.image) && $fields_value.image}
|
||||||
|
<div id="image">
|
||||||
|
{$fields_value.image}
|
||||||
|
<p align="center">{l s='File size'} {$fields_value.size}kb</p>
|
||||||
|
{if $shared_category}
|
||||||
|
<p class="warn">{l s='If you delete this picture it\'s will be deleted for all shared shop'}</p>
|
||||||
|
{/if}
|
||||||
|
<br>
|
||||||
|
<a href="{$current}&{$identifier}={$form_id}&token={$token}&{if $shared_category}forcedeleteImage=1{else}deleteImage=1{/if}">
|
||||||
|
<img src="../img/admin/delete.gif" alt="{l s='Delete'}" /> {l s='Delete'}
|
||||||
|
</a>
|
||||||
|
</div><br />
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
<input type="file" name="{$input.name}" {if isset($input.id)}id="{$input.id}"{/if} />
|
||||||
|
{if !empty($input.hint)}<span class="hint" name="help_box">{$input.hint}<span class="hint-pointer"> </span></span>{/if}
|
||||||
|
{else}
|
||||||
|
{$smarty.block.parent}
|
||||||
|
{/if}
|
||||||
|
{/block}
|
||||||
{block name="description"}
|
{block name="description"}
|
||||||
{$smarty.block.parent}
|
{$smarty.block.parent}
|
||||||
{if ($input.name == 'groupBox')}
|
{if ($input.name == 'groupBox')}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resetLayout(defaultLayout, type) {
|
function resetLayout(defaultLayout, type) {
|
||||||
if (confirm("{l s='Are you sure you want to restore the default address format for this country?'}"))
|
if (confirm("{l s='Are you sure you want to restore the default address format for this country?' js=1}"))
|
||||||
$("#ordered_fields").val(unescape(defaultLayout.replace(/\+/g, " ")));
|
$("#ordered_fields").val(unescape(defaultLayout.replace(/\+/g, " ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+22
-1
@@ -45,7 +45,7 @@
|
|||||||
<select name="id_employee_forward" style="vertical-align: middle;">
|
<select name="id_employee_forward" style="vertical-align: middle;">
|
||||||
<option value="-1">{l s='-- Choose --'}</option>
|
<option value="-1">{l s='-- Choose --'}</option>
|
||||||
{foreach $employees as $employee}
|
{foreach $employees as $employee}
|
||||||
<option value="{$employee.id_employee}"> {$employee.firstname|substr:0:1}. {$employee.lastname}</option>
|
<option value="{$employee.id_employee}"> {Tools::substr($employee.firstname, 0, 1)}. {$employee.lastname}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<option value="0">{l s='Someone else'}</option>
|
<option value="0">{l s='Someone else'}</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -147,6 +147,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var timer;
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('select[name=id_employee_forward]').change(function(){
|
$('select[name=id_employee_forward]').change(function(){
|
||||||
if ($(this).val() >= 0)
|
if ($(this).val() >= 0)
|
||||||
@@ -164,7 +165,27 @@
|
|||||||
$(this).val('');
|
$(this).val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
timer = setInterval("markAsRead()", 3000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function markAsRead()
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: 'ajax-tab.php',
|
||||||
|
async: true,
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
controller: 'AdminCustomerThreads',
|
||||||
|
action: 'markAsRead',
|
||||||
|
token : '{$token}',
|
||||||
|
id_thread: {$id_customer_thread}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
clearInterval(timer);
|
||||||
|
timer = null;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
{if !empty($message.id_product) && empty($message.id_employee)}
|
{if !empty($message.id_product) && empty($message.id_employee)}
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{l s='Product #'}</dt>
|
<dt>{l s='Product #'}</dt>
|
||||||
<dd><a href="index.php?tab=AdminOrders&id_order={$id_order_product}&vieworder&token={getAdminToken tab='AdminOrders'}" title="{l s='View order'}">
|
<dd><a href="index.php?tab=AdminProducts&id_product={$message.id_product}&updateproduct&token={getAdminToken tab='AdminProducts'}" title="{l s='View order'}">
|
||||||
{$message.id_product} <img src="../img/admin/search.gif" alt="{l s='view'}" />
|
{$message.id_product} <img src="../img/admin/search.gif" alt="{l s='view'}" />
|
||||||
</a></dd>
|
</a></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@@ -30,13 +30,13 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function saveCustomerNote()
|
function saveCustomerNote()
|
||||||
{
|
{
|
||||||
$('#note_feedback').html('<img src="../img/loader.gif" />').show();
|
$('#note_feedback').html('<img src="../img/loader.gif" alt="" />').show();
|
||||||
var noteContent = $('#noteContent').val();
|
var noteContent = $('#noteContent').val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "ajax.php",
|
url: "index.php",
|
||||||
data: "submitCustomerNote=1&id_customer={$customer->id}¬e="+noteContent,
|
data: "token={getAdminToken tab='AdminCustomers'}&tab=AdminCustomers&ajax=1&action=updateCustomerNote&id_customer={$customer->id}¬e="+noteContent,
|
||||||
async : true,
|
async : true,
|
||||||
success: function(r) {
|
success: function(r) {
|
||||||
$('#note_feedback').html('').hide();
|
$('#note_feedback').html('').hide();
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<div class="info-customer-left">
|
<div class="info-customer-left">
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<a href="{$current}&addcustomer&id_customer={$customer->id}&token={$token}">
|
<a href="{$current}&updatecustomer&id_customer={$customer->id}&token={$token}">
|
||||||
<img src="../img/admin/edit.gif" />
|
<img src="../img/admin/edit.gif" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
<div>
|
<div>
|
||||||
{l s='This customer is registered as'} <b>{l s='guest'}</b>
|
{l s='This customer is registered as'} <b>{l s='guest'}</b>
|
||||||
{if !$customer_exists}
|
{if !$customer_exists}
|
||||||
<form method="POST" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
|
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
|
||||||
<input type="hidden" name="id_lang" value="{$id_lang}" />
|
<input type="hidden" name="id_lang" value="{$id_lang}" />
|
||||||
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform to customer account'}" /></p>
|
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform to customer account'}" /></p>
|
||||||
{l s='This feature generates a random password and sends an e-mail to the customer'}
|
{l s='This feature generates a random password and sends an e-mail to the customer'}
|
||||||
@@ -161,9 +161,9 @@
|
|||||||
{if $groups AND count($groups)}
|
{if $groups AND count($groups)}
|
||||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="10px"></col>
|
<col width="10px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="70px"></col>
|
<col width="70px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th height="39px" class="right">{l s='ID'}</th>
|
<th height="39px" class="right">{l s='ID'}</th>
|
||||||
@@ -192,13 +192,13 @@
|
|||||||
</h3>
|
</h3>
|
||||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%; text-align:left;">
|
<table cellspacing="0" cellpadding="0" class="table" style="width:100%; text-align:left;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="10px"></col>
|
<col width="10px">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
<col width="80px"></col>
|
<col width="80px">
|
||||||
<col width="70px"></col>
|
<col width="70px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th height="39px" class="center">{l s='ID'}</th>
|
<th height="39px" class="center">{l s='ID'}</th>
|
||||||
@@ -229,13 +229,13 @@
|
|||||||
<h3 style="color:red;font-weight:normal;">{l s='Invalid orders:'} {$count_ko}</h3>
|
<h3 style="color:red;font-weight:normal;">{l s='Invalid orders:'} {$count_ko}</h3>
|
||||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="10px"></col>
|
<col width="10px">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width="52px"></col>
|
<col width="52px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th height="39px" class="center">{l s='ID'}</th>
|
<th height="39px" class="center">{l s='ID'}</th>
|
||||||
@@ -270,10 +270,10 @@
|
|||||||
<h2>{l s='Products'} ({count($products)})</h2>
|
<h2>{l s='Products'} ({count($products)})</h2>
|
||||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="60px"></col>
|
<col width="60px">
|
||||||
<col width="70px"></col>
|
<col width="70px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th height="39px" class="center">{l s='Date'}</th>
|
<th height="39px" class="center">{l s='Date'}</th>
|
||||||
@@ -297,12 +297,12 @@
|
|||||||
{if count($addresses)}
|
{if count($addresses)}
|
||||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="120px"></col>
|
<col width="120px">
|
||||||
<col width="120px"></col>
|
<col width="120px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width="170px"></col>
|
<col width="170px">
|
||||||
<col width="70px"></col>
|
<col width="70px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th height="39px">{l s='Company'}</th>
|
<th height="39px">{l s='Company'}</th>
|
||||||
@@ -371,11 +371,11 @@
|
|||||||
{if $carts AND count($carts)}
|
{if $carts AND count($carts)}
|
||||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%">
|
<table cellspacing="0" cellpadding="0" class="table" style="width:100%">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
<col width="150px"></col>
|
<col width="150px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="70px"></col>
|
<col width="70px">
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th height="39px" class="center">{l s='ID'}</th>
|
<th height="39px" class="center">{l s='ID'}</th>
|
||||||
@@ -404,9 +404,9 @@
|
|||||||
<h2>{l s='Products'} ({count($interested)})</h2>
|
<h2>{l s='Products'} ({count($interested)})</h2>
|
||||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="10px"></col>
|
<col width="10px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
{foreach $interested as $key => $p}
|
{foreach $interested as $key => $p}
|
||||||
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '{$p['url']}'">
|
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '{$p['url']}'">
|
||||||
@@ -426,11 +426,11 @@
|
|||||||
<h2>{l s='Last connections'}</h2>
|
<h2>{l s='Last connections'}</h2>
|
||||||
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="150px"></col>
|
<col width="150px">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="150px"></col>
|
<col width="150px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th height="39px;">{l s='Date'}</th>
|
<th height="39px;">{l s='Date'}</th>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
{if $input['type'] == 'modules'}
|
{if $input['type'] == 'modules'}
|
||||||
<div style="{if !$form_id}display:none{/if}">
|
<div style="{if !$form_id}display:none{/if}">
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
<label>{l s='Modules restrictions:'}</label>
|
<label>{l s='Module restrictions:'}</label>
|
||||||
</div>
|
</div>
|
||||||
{elseif $input['type'] == 'group_discount_category'}
|
{elseif $input['type'] == 'group_discount_category'}
|
||||||
<div style="{if !$form_id}display:none{/if}">
|
<div style="{if !$form_id}display:none{/if}">
|
||||||
|
|||||||
@@ -44,14 +44,15 @@
|
|||||||
<p>{l s='To receive PrestaShop update warnings, you need to activate'} <b>allow_url_fopen</b> [<a href="http://www.php.net/manual/{$isoUser}/ref.filesystem.php">{l s='more info on php.net'}</a>]</p>
|
<p>{l s='To receive PrestaShop update warnings, you need to activate'} <b>allow_url_fopen</b> [<a href="http://www.php.net/manual/{$isoUser}/ref.filesystem.php">{l s='more info on php.net'}</a>]</p>
|
||||||
<p>{l s='If you don\'t know how to do this, please contact your hosting provider!'}</p><br />
|
<p>{l s='If you don\'t know how to do this, please contact your hosting provider!'}</p><br />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $employee->bo_show_screencast}
|
{if $employee->bo_show_screencast}
|
||||||
<div id="adminpresentation" style="display:block;">
|
<div id="adminpresentation" style="display:block">
|
||||||
<h2>{l s='Video'}</h2>
|
<h2>{l s='Video'}</h2>
|
||||||
<div id="video">
|
<div id="video">
|
||||||
<a href="{$protocol}://screencasts.prestashop.com/v1.5/screencast.php?iso_lang={$isoUser}" id="screencast_fancybox"><img height="128" width="220" src="../img/admin/preview_fr.jpg" /><span class="mask-player"></span></a>
|
<a href="{$protocol}://screencasts.prestashop.com/v1.5/screencast.php?iso_lang={$isoUser}" id="screencast_fancybox"><img height="128" width="220" src="../img/admin/preview_fr.jpg" /><span class="mask-player"></span></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="video-content">
|
<div id="video-content">
|
||||||
<p>{l s='Take part in the e-commerce adventure with PrestaShop, the fast, powerful, and customizable e-commerce solution. With more than 275 features, PrestaShop will help you create a world of opportunities without limits. Discover the solution that has already conquered more than 120,000 merchants worldwide!'}</p>
|
<p>{l s='Take part in the e-commerce adventure with PrestaShop, the fast, powerful, and customizable e-commerce solution. With more than 275 features, PrestaShop will help you create a world of opportunities without limits. Discover the solution that already powers more than 120,000 active stores worldwide!'}</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer_iframe_home">
|
<div id="footer_iframe_home">
|
||||||
<!--<a href="#">{l s='View more video tutorials'}</a>-->
|
<!--<a href="#">{l s='View more video tutorials'}</a>-->
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
<div style="display: none">
|
<div style="display: none">
|
||||||
<div id="upload_file_import" style="padding-left: 10px; background-color: #EBEDF4; border: 1px solid #CCCED7">
|
<div id="upload_file_import" style="padding-left: 10px; background-color: #EBEDF4; border: 1px solid #CCCED7">
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
<form action="{$current}&token={$token}" method="POST" enctype="multipart/form-data">
|
<form action="{$current}&token={$token}" method="post" enctype="multipart/form-data">
|
||||||
<label class="clear" style="width:160px; text-align: left;">{l s='Select your CSV file'} </label>
|
<label class="clear" style="width:160px; text-align: left;">{l s='Select your CSV file'} </label>
|
||||||
<div class="margin-form" style="padding-left:190px;">
|
<div class="margin-form" style="padding-left:190px;">
|
||||||
<input name="file" type="file" />
|
<input name="file" type="file" />
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
{block name="override_tpl"}
|
{block name="override_tpl"}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var errorEmpty = "{l s='Please name your matching configuration to save.'}"
|
var errorEmpty = "{l s='Please name your matching configuration to save.'}"
|
||||||
|
var token = '{$token}';
|
||||||
</script>
|
</script>
|
||||||
<div id="container-customer">
|
<div id="container-customer">
|
||||||
<h2>{l s='View your data'}</h2>
|
<h2>{l s='View your data'}</h2>
|
||||||
|
|||||||
@@ -78,22 +78,23 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><img src="../img/t/AdminInformation.gif" alt="" /> {l s='Information about your configuration'}</legend>
|
<legend><img src="../img/t/AdminInformation.gif" alt="" /> {l s='Information about your configuration'}</legend>
|
||||||
<h3>{l s='Server information'}</h3>
|
<h3>{l s='Server information'}</h3>
|
||||||
<p>
|
|
||||||
<b>{l s='Prestashop version'}:</b> {$version.ps|escape:'htmlall':'UTF-8'}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{if count($uname)}
|
{if count($uname)}
|
||||||
<p>
|
<p>
|
||||||
<b>{l s='Server information'}:</b> {$uname|escape:'htmlall':'UTF-8'}
|
<b>{l s='Server information'}:</b> {$uname|escape:'htmlall':'UTF-8'}
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>{l s='Server software version'}:</b> {$version.server|escape:'htmlall':'UTF-8'}
|
<b>{l s='Server software version'}:</b> {$version.server|escape:'htmlall':'UTF-8'}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>{l s='PHP version'}:</b> {$version.php|escape:'htmlall':'UTF-8'}
|
<b>{l s='PHP version'}:</b> {$version.php|escape:'htmlall':'UTF-8'}
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>{l s='Memory limit'}:</b> {$version.memory_limit|escape:'htmlall':'UTF-8'}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>{l s='Max execution time'}:</b> {$version.max_execution_time|escape:'htmlall':'UTF-8'}
|
||||||
|
</p>
|
||||||
{if $apache_instaweb}
|
{if $apache_instaweb}
|
||||||
<p style="color:red;font-weight:700">{l s='PageSpeed module for Apache installed (mod_instaweb)'}</p>
|
<p style="color:red;font-weight:700">{l s='PageSpeed module for Apache installed (mod_instaweb)'}</p>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -112,6 +113,9 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h3>{l s='Store information'}</h3>
|
<h3>{l s='Store information'}</h3>
|
||||||
|
<p>
|
||||||
|
<b>{l s='Prestashop version'}:</b> {$shop.ps|escape:'htmlall':'UTF-8'}
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>{l s='Shop URL'}:</b> {$shop.url|escape:'htmlall':'UTF-8'}
|
<b>{l s='Shop URL'}:</b> {$shop.url|escape:'htmlall':'UTF-8'}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button fl margin-right-5" />
|
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button fl margin-right-5" />
|
||||||
|
|
||||||
<p class="fl no-margin hide ajax-loader">
|
<p class="fl no-margin hide ajax-loader">
|
||||||
<img src="../img/loader.gif">
|
<img src="../img/loader.gif" alt="" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="fr no-margin">
|
<p class="fr no-margin">
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
<input type="submit" name="submit" value="{l s='Send'}" class="button fl margin-right-5" />
|
<input type="submit" name="submit" value="{l s='Send'}" class="button fl margin-right-5" />
|
||||||
|
|
||||||
<p class="fl no-margin hide ajax-loader">
|
<p class="fl no-margin hide ajax-loader">
|
||||||
<img src="../img/loader.gif">
|
<img src="../img/loader.gif" alt="" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="fr no-margin">
|
<p class="fr no-margin">
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<input type="radio" name="{$key}" id="{$key}_off" value="0" {if !$field['value']} checked="checked"{/if}{if isset($field['js']['off'])} {$field['js']['off']}{/if}/>
|
<input type="radio" name="{$key}" id="{$key}_off" value="0" {if !$field['value']} checked="checked"{/if}{if isset($field['js']['off'])} {$field['js']['off']}{/if}/>
|
||||||
<label class="t" for="{$key}_off"> {l s='No'}</label>
|
<label class="t" for="{$key}_off"> {l s='No'}</label>
|
||||||
{if !$field['mod_rewrite']}
|
{if !$field['mod_rewrite']}
|
||||||
<span class="warning_mod_rewrite">{l s='URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URL you must activate this mod.'}</span>
|
<span class="warning_mod_rewrite">{l s='URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URLs you must activate this mod.'}</span>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
|
|
||||||
|
{if $add_permission eq '1'}
|
||||||
{if isset($logged_on_addons)}
|
{if isset($logged_on_addons)}
|
||||||
|
|
||||||
<!--start addons login-->
|
<!--start addons login-->
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
|
|
||||||
<!--start filter module-->
|
<!--start filter module-->
|
||||||
<style>.ac_results { border:1px solid #C2C4D9; }</style>
|
<style>.ac_results { border:1px solid #C2C4D9; }</style>
|
||||||
@@ -87,8 +87,9 @@
|
|||||||
|
|
||||||
<select name="module_type" id="module_type_filter" {if $showTypeModules ne 'allModules' && $showTypeModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
<select name="module_type" id="module_type_filter" {if $showTypeModules ne 'allModules' && $showTypeModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
|
||||||
<option value="allModules" {if $showTypeModules eq 'allModules'}selected="selected"{/if}>{l s='All Modules'}</option>
|
<option value="allModules" {if $showTypeModules eq 'allModules'}selected="selected"{/if}>{l s='All Modules'}</option>
|
||||||
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Native Modules'}</option>
|
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Free Modules'}</option>
|
||||||
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partner Modules'}</option>
|
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partner Modules (Free)'}</option>
|
||||||
|
<option value="mustHaveModules" {if $showTypeModules eq 'mustHaveModules'}selected="selected"{/if}>{l s='Must Have'}</option>
|
||||||
{if isset($logged_on_addons)}<option value="addonsModules" {if $showTypeModules eq 'addonsModules'}selected="selected"{/if}>{l s='Modules purchased on Addons'}</option>{/if}
|
{if isset($logged_on_addons)}<option value="addonsModules" {if $showTypeModules eq 'addonsModules'}selected="selected"{/if}>{l s='Modules purchased on Addons'}</option>{/if}
|
||||||
<optgroup label="{l s='Authors'}">
|
<optgroup label="{l s='Authors'}">
|
||||||
{foreach from=$list_modules_authors key=module_author item=status}
|
{foreach from=$list_modules_authors key=module_author item=status}
|
||||||
|
|||||||
@@ -28,14 +28,17 @@
|
|||||||
<div class="toolbarBox toolbarHead">
|
<div class="toolbarBox toolbarHead">
|
||||||
|
|
||||||
<ul class="cc_button">
|
<ul class="cc_button">
|
||||||
|
{if $add_permission eq '1'}
|
||||||
<li>
|
<li>
|
||||||
<a id="desc-module-new" class="toolbar_btn" href="#top_container" onclick="$('#module_install').slideToggle();" title="{l s='Add new module'}">
|
<a id="desc-module-new" class="toolbar_btn" href="#top_container" onclick="$('#module_install').slideToggle();" title="{l s='Add new module'}">
|
||||||
<span class="process-icon-new-module" ></span>
|
<span class="process-icon-new-module" ></span>
|
||||||
<div>{l s='Add new module'}</div>
|
<div>{l s='Add new module'}</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<div class="pageTitle">
|
<div class="pageTitle">
|
||||||
<h3><span id="current_obj" style="font-weight: normal;"><span class="breadcrumb item-0">Module</span> : <span class="breadcrumb item-1">{l s='List of modules'}</span></span></h3>
|
<h3><span id="current_obj" style="font-weight: normal;"><span class="breadcrumb item-0">Module</span> : <span class="breadcrumb item-1">{l s='List of modules'}</span></span></h3>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{if $add_permission eq '1'}
|
||||||
<div id="module_install" style="width:500px;margin-top:5px;{if !isset($smarty.post.downloadflag)}display: none;{/if}">
|
<div id="module_install" style="width:500px;margin-top:5px;{if !isset($smarty.post.downloadflag)}display: none;{/if}">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><img src="../img/admin/add.gif" alt="{l s='Add a new module'}" class="middle" /> {l s='Add a new module'}</legend>
|
<legend><img src="../img/admin/add.gif" alt="{l s='Add a new module'}" class="middle" /> {l s='Add a new module'}</legend>
|
||||||
@@ -63,5 +66,5 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
},
|
},
|
||||||
beforeSend: function(xhr)
|
beforeSend: function(xhr)
|
||||||
{
|
{
|
||||||
$('#moduleContainer').html('<img src="../img/loader.gif" border="0">');
|
$('#moduleContainer').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||||
},
|
},
|
||||||
success : function(data)
|
success : function(data)
|
||||||
{
|
{
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
},
|
},
|
||||||
beforeSend: function(xhr)
|
beforeSend: function(xhr)
|
||||||
{
|
{
|
||||||
$('#addons_loading').html('<img src="../img/loader.gif" border="0">');
|
$('#addons_loading').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||||
},
|
},
|
||||||
success : function(data)
|
success : function(data)
|
||||||
{
|
{
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
},
|
},
|
||||||
beforeSend: function(xhr)
|
beforeSend: function(xhr)
|
||||||
{
|
{
|
||||||
$('#addons_loading').html('<img src="../img/loader.gif" border="0">');
|
$('#addons_loading').html('<img src="../img/loader.gif" alt="" border="0" />');
|
||||||
},
|
},
|
||||||
success : function(data)
|
success : function(data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,7 +48,17 @@
|
|||||||
<td><img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}"></td>
|
<td><img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}"></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
|
<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
|
||||||
<h3>{$module->displayName}{if isset($module->id) && $module->id gt 0}<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>{else}<span class="setup non-install">{l s='Not installed'}</span>{/if}</h3>
|
<h3>{$module->displayName}
|
||||||
|
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||||
|
<span class="setup must-have">{l s='Must Have'}</span>
|
||||||
|
{else}
|
||||||
|
{if isset($module->id) && $module->id gt 0}
|
||||||
|
<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>
|
||||||
|
{else}
|
||||||
|
<span class="setup non-install">{l s='Not installed'}</span>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
</h3>
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
{if isset($module->author) && !empty($module->author)}
|
{if isset($module->author) && !empty($module->author)}
|
||||||
<dl class="">
|
<dl class="">
|
||||||
@@ -76,10 +86,20 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul id="list-action-button">
|
<ul id="list-action-button">
|
||||||
|
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||||
|
<li>
|
||||||
|
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span><img src="../img/admin/cart_addons.png"> {displayPrice price=$module->price currency=$module->id_currency}</span></a>
|
||||||
|
</li>
|
||||||
|
{else}
|
||||||
{if $module->id && isset($module->version_addons) && $module->version_addons}
|
{if $module->id && isset($module->version_addons) && $module->version_addons}
|
||||||
<li><a href="{$module->options.update_url}" class="button updated"><span>{l s='Update it!'}</span></a></li>
|
<li><a href="{$module->options.update_url}" class="button updated"><span>{l s='Update it!'}</span></a></li>
|
||||||
{/if}
|
{/if}
|
||||||
<li><a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed"><span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span></a></li>
|
<li>
|
||||||
|
<a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed">
|
||||||
|
<span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -72,11 +72,11 @@
|
|||||||
<a name="{$hook['name']}"/>
|
<a name="{$hook['name']}"/>
|
||||||
<table cellpadding="0" cellspacing="0" class="table widthfull space {if $hook['module_count'] >= 2} tableDnD{/if}" id="{$hook['id_hook']}">
|
<table cellpadding="0" cellspacing="0" class="table widthfull space {if $hook['module_count'] >= 2} tableDnD{/if}" id="{$hook['id_hook']}">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="10"></col>
|
<col width="10">
|
||||||
<col width="30"></col>
|
<col width="30">
|
||||||
<col width="40"></col>
|
<col width="40">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="50"></col>
|
<col width="50">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr class="nodrag nodrop"><th colspan="5"> {if $hook['module_count'] && $can_move}
|
<tr class="nodrag nodrop"><th colspan="5"> {if $hook['module_count'] && $can_move}
|
||||||
<input type="checkbox" id="Ghook{$hook['id_hook']}" style="margin-right: 2px;" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/>
|
<input type="checkbox" id="Ghook{$hook['id_hook']}" style="margin-right: 2px;" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
{if $product.customizedDatas}
|
{if $product.customizedDatas}
|
||||||
<tr class="customized customized-{$product.id_order_detail}">
|
<tr class="customized customized-{$product.id_order_detail}">
|
||||||
<input type="hidden" class="edit_product_id_order_detail" value="{$product.id_order_detail}" />
|
<input type="hidden" class="edit_product_id_order_detail" value="{$product.id_order_detail}" />
|
||||||
<td align="center">{if ($product.image->id)}{$product.image_tag}{else}'--'{/if}</td>
|
<td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{else}--{/if}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
|
<a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
|
||||||
<span class="productName">{$product['product_name']} - {l s='customized'}</span><br />
|
<span class="productName">{$product['product_name']} - {l s='customized'}</span><br />
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
<form method="POST" action="{$current_index}&viewOrder&id_order={$order->id|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
|
||||||
<label>{l s='Name'}</label>
|
<label>{l s='Name'}</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<input type="text" name="discount_name" value="" />
|
<input type="text" name="discount_name" value="" />
|
||||||
@@ -74,4 +74,4 @@
|
|||||||
<input class="button" type="submit" name="submitNewVoucher" value="{l s='Add'}" />
|
<input class="button" type="submit" name="submitNewVoucher" value="{l s='Add'}" />
|
||||||
<a href="#" id="cancel_add_voucher">{l s='Cancel'}</a>
|
<a href="#" id="cancel_add_voucher">{l s='Cancel'}</a>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
|
||||||
|
|||||||
@@ -60,12 +60,12 @@
|
|||||||
<td class="document_number">
|
<td class="document_number">
|
||||||
{if get_class($document) eq 'OrderInvoice'}
|
{if get_class($document) eq 'OrderInvoice'}
|
||||||
{if isset($document->is_delivery)}
|
{if isset($document->is_delivery)}
|
||||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')}&submitAction=generateDeliverySlipPDF&id_order_invoice={$document->id}">
|
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order_invoice={$document->id}">
|
||||||
{else}
|
{else}
|
||||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
|
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
|
||||||
{/if}
|
{/if}
|
||||||
{elseif get_class($document) eq 'OrderSlip'}
|
{elseif get_class($document) eq 'OrderSlip'}
|
||||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
|
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
|
||||||
{/if}
|
{/if}
|
||||||
{if get_class($document) eq 'OrderInvoice'}
|
{if get_class($document) eq 'OrderInvoice'}
|
||||||
{if isset($document->is_delivery)}
|
{if isset($document->is_delivery)}
|
||||||
@@ -82,16 +82,18 @@
|
|||||||
--
|
--
|
||||||
{else}
|
{else}
|
||||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||||
{if $document->getGlobalRestPaid()}
|
{if $document->getTotalPaid()}
|
||||||
<span style="color:red;font-weight:bold;">
|
<span style="color:red;font-weight:bold;">
|
||||||
{if $document->getGlobalRestPaid() >= 0}
|
{if $document->getRestPaid() > 0}
|
||||||
({displayPrice price=$document->getGlobalRestPaid() currency=$currency->id} {l s='not paid'})
|
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
|
||||||
{else}
|
{else if $document->getRestPaid() < 0}
|
||||||
({displayPrice price=-$document->getGlobalRestPaid() currency=$currency->id} {l s='overpaid'})
|
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
{elseif get_class($document) eq 'OrderSlip'}
|
||||||
|
{displayPrice price=$document->amount currency=$currency->id}
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td class="right document_action">
|
<td class="right document_action">
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
{* Generate HTML code for printing Invoice Icon with link *}
|
{* Generate HTML code for printing Invoice Icon with link *}
|
||||||
<span style="width:20px; margin-right:5px;">
|
<span style="width:20px; margin-right:5px;">
|
||||||
{if ($order_state->invoice || $order->invoice_number)}
|
{if ($order_state->invoice || $order->invoice_number)}
|
||||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')}&submitAction=generateInvoicePDF&id_order={$order->id}"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>
|
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>
|
||||||
{else}
|
{else}
|
||||||
-
|
-
|
||||||
{/if}
|
{/if}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
{* Generate HTML code for printing Delivery Icon with link *}
|
{* Generate HTML code for printing Delivery Icon with link *}
|
||||||
<span style="width:20px;">
|
<span style="width:20px;">
|
||||||
{if ($order_state->delivery || $order->delivery_number)}
|
{if ($order_state->delivery || $order->delivery_number)}
|
||||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')}&submitAction=generateDeliverySlipPDF&id_order={$order->id}"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
||||||
{else}
|
{else}
|
||||||
-
|
-
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -57,13 +57,43 @@
|
|||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
{if ($order->hasBeenPaid())}<td align="center" class="productQuantity">{$product['product_quantity_refunded']}</td>{/if}
|
{if ($order->hasBeenPaid())}
|
||||||
{if ($order->hasBeenDelivered())}<td align="center" class="productQuantity">{$product['product_quantity_return']}</td>{/if}
|
<td align="center" class="productQuantity">
|
||||||
|
{$product['product_quantity_refunded']}
|
||||||
|
{if count($product['refund_history'])}
|
||||||
|
<span class="tooltip">
|
||||||
|
<span class="tooltip_label tooltip_button">+</span>
|
||||||
|
<div class="tooltip_content">
|
||||||
|
<span class="title">{l s='Refund history'}</span>
|
||||||
|
{foreach $product['refund_history'] as $refund}
|
||||||
|
{l s='%1s - %2s' sprintf=[{dateFormat date=$refund.date_add}, {displayPrice price=$refund.amount_tax_incl}]}<br />
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
{/if}
|
||||||
|
{if $order->hasBeenDelivered() || $order->hasProductReturned()}
|
||||||
|
<td align="center" class="productQuantity">
|
||||||
|
{$product['product_quantity_return']}
|
||||||
|
{if count($product['return_history'])}
|
||||||
|
<span class="tooltip">
|
||||||
|
<span class="tooltip_label tooltip_button">+</span>
|
||||||
|
<div class="tooltip_content">
|
||||||
|
<span class="title">{l s='Return history'}</span>
|
||||||
|
{foreach $product['return_history'] as $return}
|
||||||
|
{l s='%1s - %2s - %3s' sprintf=[{dateFormat date=$return.date_add}, $return.product_quantity, $return.state]}<br />
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
{/if}
|
||||||
<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>
|
<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>
|
||||||
<td align="center" class="total_product">
|
<td align="center" class="total_product">
|
||||||
{displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id}
|
{displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id}
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2" style="display: none;" class="add_product_fields"> </th>
|
<td colspan="2" style="display: none;" class="add_product_fields"> </td>
|
||||||
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
|
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
|
||||||
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$product['product_quantity_return']}" />
|
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$product['product_quantity_return']}" />
|
||||||
<input type="hidden" name="totalQty" id="totalQty" value="{$product['product_quantity']}" />
|
<input type="hidden" name="totalQty" id="totalQty" value="{$product['product_quantity']}" />
|
||||||
|
|||||||
@@ -25,11 +25,11 @@
|
|||||||
*}
|
*}
|
||||||
<table class="table" width="100%" cellspacing="0" cellpadding="0" id="shipping_table">
|
<table class="table" width="100%" cellspacing="0" cellpadding="0" id="shipping_table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="15%"></col>
|
<col width="15%">
|
||||||
<col width="15%"></col>
|
<col width="15%">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="10%"></col>
|
<col width="10%">
|
||||||
<col width="20%"></col>
|
<col width="20%">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<span id="shipping_number_show">{if $line.url && $line.tracking_number}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}</span>
|
<span id="shipping_number_show">{if $line.url && $line.tracking_number}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}</span>
|
||||||
{if $line.can_edit}
|
{if $line.can_edit}
|
||||||
<form style="display: inline;" method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$order->id|escape:'htmlall':'UTF-8'}">
|
<form style="display: inline;" method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id|escape:'htmlall':'UTF-8'}">
|
||||||
<span class="shipping_number_edit" style="display:none;">
|
<span class="shipping_number_edit" style="display:none;">
|
||||||
<input type="hidden" name="id_order_carrier" value="{$line.id_order_carrier|htmlentities}" />
|
<input type="hidden" name="id_order_carrier" value="{$line.id_order_carrier|htmlentities}" />
|
||||||
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
|
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var id_cart = '';
|
var id_cart = {$cart->id|intval};
|
||||||
var id_customer = '';
|
var id_customer = '';
|
||||||
var changed_shipping_price = false;
|
var changed_shipping_price = false;
|
||||||
var shipping_price_selected_carrier = '';
|
var shipping_price_selected_carrier = '';
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
$('#product').typeWatch({
|
$('#product').typeWatch({
|
||||||
captureLength: 1,
|
captureLength: 1,
|
||||||
highlight: true,
|
highlight: true,
|
||||||
wait: 100,
|
wait: 750,
|
||||||
callback: function(){ searchProducts(); }
|
callback: function(){ searchProducts(); }
|
||||||
});
|
});
|
||||||
$('#payment_module_name').change(function() {
|
$('#payment_module_name').change(function() {
|
||||||
@@ -69,10 +69,10 @@
|
|||||||
$('#id_currency').change(function() {
|
$('#id_currency').change(function() {
|
||||||
updateCurrency();
|
updateCurrency();
|
||||||
});
|
});
|
||||||
$('#id_lang').change(function() {
|
$('#id_lang').change(function(){
|
||||||
updateLang();
|
updateLang();
|
||||||
});
|
});
|
||||||
$('#delivery_option,#carrier_recycled_package,#order_gift,#gift_message,#id_address_delivery').change(function() {
|
$('#delivery_option,#carrier_recycled_package,#order_gift,#gift_message').change(function() {
|
||||||
updateDeliveryOption();
|
updateDeliveryOption();
|
||||||
});
|
});
|
||||||
$('#shipping_price').change(function() {
|
$('#shipping_price').change(function() {
|
||||||
@@ -132,14 +132,14 @@
|
|||||||
add_cart_rule(data.id_cart_rule);
|
add_cart_rule(data.id_cart_rule);
|
||||||
});
|
});
|
||||||
{if $cart->id}
|
{if $cart->id}
|
||||||
setupCustomer('{$cart->id_customer}');
|
setupCustomer({$cart->id_customer|intval});
|
||||||
useCart('{$cart->id}');
|
useCart('{$cart->id|intval}');
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
$('.delete_product').live('click', function(e) {
|
$('.delete_product').live('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var to_delete = $(this).attr('rel').split('_');
|
var to_delete = $(this).attr('rel').split('_');
|
||||||
deleteProduct(to_delete[1], to_delete[2]);
|
deleteProduct(to_delete[1], to_delete[2], to_delete[3]);
|
||||||
});
|
});
|
||||||
$('.delete_discount').live('click', function(e) {
|
$('.delete_discount').live('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
if ($(this).val() != cart_quantity[$(this).attr('rel')])
|
if ($(this).val() != cart_quantity[$(this).attr('rel')])
|
||||||
{
|
{
|
||||||
var product = $(this).attr('rel').split('_');
|
var product = $(this).attr('rel').split('_');
|
||||||
updateQty(product[0], product[1], $(this).val() - cart_quantity[$(this).attr('rel')]);
|
updateQty(product[0], product[1], product[2], $(this).val() - cart_quantity[$(this).attr('rel')]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('.increaseqty_product, .decreaseqty_product').live('click', function(e) {
|
$('.increaseqty_product, .decreaseqty_product').live('click', function(e) {
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
var sign = '';
|
var sign = '';
|
||||||
if ($(this).hasClass('decreaseqty_product'))
|
if ($(this).hasClass('decreaseqty_product'))
|
||||||
sign = '-';
|
sign = '-';
|
||||||
updateQty(product[0], product[1], sign+1);
|
updateQty(product[0], product[1],product[2], sign+1);
|
||||||
});
|
});
|
||||||
$('#id_product').live('keydown', function(e) {
|
$('#id_product').live('keydown', function(e) {
|
||||||
$(this).click();
|
$(this).click();
|
||||||
@@ -234,10 +234,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/*$('.fancybox').live('click', function(e) {
|
|
||||||
$(this).fancybox().trigger('click');
|
|
||||||
return false;
|
|
||||||
});*/
|
|
||||||
resetBind();
|
resetBind();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -355,7 +351,7 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url: "{$link->getAdminLink('AdminCarts')}",
|
url: "{$link->getAdminLink('AdminCarts')}",
|
||||||
async: true,
|
async: false,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data : {
|
data : {
|
||||||
ajax: "1",
|
ajax: "1",
|
||||||
@@ -400,7 +396,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteProduct(id_product, id_product_attribute)
|
function deleteProduct(id_product, id_product_attribute, id_customization)
|
||||||
{
|
{
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
@@ -414,6 +410,7 @@
|
|||||||
action: "deleteProduct",
|
action: "deleteProduct",
|
||||||
id_product: id_product,
|
id_product: id_product,
|
||||||
id_product_attribute: id_product_attribute,
|
id_product_attribute: id_product_attribute,
|
||||||
|
id_customization: id_customization,
|
||||||
id_cart: id_cart,
|
id_cart: id_cart,
|
||||||
id_customer: id_customer
|
id_customer: id_customer
|
||||||
},
|
},
|
||||||
@@ -470,14 +467,15 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url : "{$link->getAdminLink('AdminCarts')}",
|
url : "{$link->getAdminLink('AdminCarts')}",
|
||||||
async: true,
|
async: false,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data : {
|
data : {
|
||||||
ajax: "1",
|
ajax: "1",
|
||||||
token: "{getAdminToken tab='AdminCarts'}",
|
token: "{getAdminToken tab='AdminCarts'}",
|
||||||
tab: "AdminCarts",
|
tab: "AdminCarts",
|
||||||
action: "searchCarts",
|
action: "searchCarts",
|
||||||
id_customer: id_customer
|
id_customer: id_customer,
|
||||||
|
id_cart: id_cart
|
||||||
},
|
},
|
||||||
success : function(res)
|
success : function(res)
|
||||||
{
|
{
|
||||||
@@ -555,7 +553,10 @@
|
|||||||
|
|
||||||
if(res.found)
|
if(res.found)
|
||||||
{
|
{
|
||||||
|
if (!customization_errors)
|
||||||
$('#products_err').hide();
|
$('#products_err').hide();
|
||||||
|
else
|
||||||
|
customization_errors = false;
|
||||||
$('#products_found').show();
|
$('#products_found').show();
|
||||||
products_found += '<label>{l s='Product:'}</label><select id="id_product" onclick="display_product_attributes();display_product_customizations();">';
|
products_found += '<label>{l s='Product:'}</label><select id="id_product" onclick="display_product_attributes();display_product_customizations();">';
|
||||||
attributes_html += '<label>{l s='Combination:'}</label>';
|
attributes_html += '<label>{l s='Combination:'}</label>';
|
||||||
@@ -563,14 +564,15 @@
|
|||||||
products_found += '<option '+(this.combinations.length > 0 ? 'rel="'+this.qty_in_stock+'"' : '')+' value="'+this.id_product+'">'+this.name+(this.combinations.length == 0 ? ' - '+this.formatted_price : '')+'</option>';
|
products_found += '<option '+(this.combinations.length > 0 ? 'rel="'+this.qty_in_stock+'"' : '')+' value="'+this.id_product+'">'+this.name+(this.combinations.length == 0 ? ' - '+this.formatted_price : '')+'</option>';
|
||||||
attributes_html += '<select class="id_product_attribute" id="ipa_'+this.id_product+'" style="display:none;">';
|
attributes_html += '<select class="id_product_attribute" id="ipa_'+this.id_product+'" style="display:none;">';
|
||||||
var id_product = this.id_product;
|
var id_product = this.id_product;
|
||||||
|
stock[id_product] = new Array();
|
||||||
if (this.customizable == '1')
|
if (this.customizable == '1')
|
||||||
{
|
{
|
||||||
customization_html += '<fieldset class="width3"><legend>{l s='Customization'}</legend><form id="customization_'+id_product+'" class="id_customization" method="post" enctype="multipart/form-data" action="'+admin_cart_link+'" style="display:none;">';
|
customization_html += '<fieldset class="width3"><legend>{l s='Customization'}</legend><form id="customization_'+id_product+'" class="id_customization" method="post" enctype="multipart/form-data" action="'+admin_cart_link+'" style="display:none;">';
|
||||||
customization_html += '<input type="hidden" name="id_product" value="'+id_product+'"';
|
customization_html += '<input type="hidden" name="id_product" value="'+id_product+'" />';
|
||||||
customization_html += '<input type="hidden" name="id_cart" value="'+id_cart+'"';
|
customization_html += '<input type="hidden" name="id_cart" value="'+id_cart+'" />';
|
||||||
customization_html += '<input type="hidden" name="action" value="updateCustomizationFields"';
|
customization_html += '<input type="hidden" name="action" value="updateCustomizationFields" />';
|
||||||
customization_html += '<input type="hidden" name="id_customer" value="'+id_customer+'"';
|
customization_html += '<input type="hidden" name="id_customer" value="'+id_customer+'" />';
|
||||||
customization_html += '<input type="hidden" name="ajax" value="1"';
|
customization_html += '<input type="hidden" name="ajax" value="1" />';
|
||||||
$.each(this.customization_fields, function() {
|
$.each(this.customization_fields, function() {
|
||||||
customization_html += '<p><label for="customization_'+id_product+'_'+this.id_customization_field+'">';
|
customization_html += '<p><label for="customization_'+id_product+'_'+this.id_customization_field+'">';
|
||||||
if (this.required == 1)
|
if (this.required == 1)
|
||||||
@@ -587,10 +589,10 @@
|
|||||||
|
|
||||||
$.each(this.combinations, function() {
|
$.each(this.combinations, function() {
|
||||||
attributes_html += '<option rel="'+this.qty_in_stock+'" '+(this.default_on == 1 ? 'selected="selected"' : '')+' value="'+this.id_product_attribute+'">'+this.attributes+' - '+this.formatted_price+'</option>';
|
attributes_html += '<option rel="'+this.qty_in_stock+'" '+(this.default_on == 1 ? 'selected="selected"' : '')+' value="'+this.id_product_attribute+'">'+this.attributes+' - '+this.formatted_price+'</option>';
|
||||||
|
stock[id_product][this.id_product_attribute] = this.qty_in_stock;
|
||||||
});
|
});
|
||||||
|
|
||||||
stock[this.id_product] = this.stock;
|
stock[this.id_product][0] = this.stock[0];
|
||||||
|
|
||||||
attributes_html += '</select>';
|
attributes_html += '</select>';
|
||||||
});
|
});
|
||||||
products_found += '</select>';
|
products_found += '</select>';
|
||||||
@@ -637,17 +639,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCartProducts(products)
|
function updateCartProducts(products, gifts)
|
||||||
{
|
{
|
||||||
var cart_content = '';
|
var cart_content = '';
|
||||||
$.each(products, function() {
|
$.each(products, function() {
|
||||||
cart_quantity[this.id_product+'_'+this.id_product_attribute] = this.cart_quantity;
|
cart_quantity[Number(this.id_product)+'_'+Number(this.id_product_attribute)+'_'+Number(this.id_customization)] = this.cart_quantity;
|
||||||
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td><td><input type="text" size="7" rel="'+this.id_product+'_'+this.id_product_attribute+'" class="product_unit_price" value="'+this.price+'" /> <span class="currency_sign"></span></td><td>';
|
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td><td><input type="text" size="7" rel="'+this.id_product+'_'+this.id_product_attribute+'" class="product_unit_price" value="'+this.price+'" /> <span class="currency_sign"></span></td><td>';
|
||||||
cart_content += '<div style="float:left;"><a href="#" class="increaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'" ><img src="../img/admin/up.gif" /></a><br /><a href="#" class="decreaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'"><img src="../img/admin/down.gif" /></a></div>';
|
cart_content += '<div style="float:left;"><a href="#" class="increaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><img src="../img/admin/up.gif" /></a><br /><a href="#" class="decreaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'"><img src="../img/admin/down.gif" /></a></div>';
|
||||||
cart_content += '<div style="float:left;"><input type="text" rel="'+this.id_product+'_'+this.id_product_attribute+'" class="cart_quantity" size="2" value="'+this.cart_quantity+'" />';
|
cart_content += '<div style="float:left;"><input type="text" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" class="cart_quantity" size="2" value="'+this.cart_quantity+'" />';
|
||||||
cart_content += '<a href="#" class="delete_product" rel="delete_'+this.id_product+'_'+this.id_product_attribute+'" ><img src="../img/admin/delete.gif" /></a>';
|
cart_content += '<a href="#" class="delete_product" rel="delete_'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><img src="../img/admin/delete.gif" /></a>';
|
||||||
cart_content += '</div></td><td>'+this.total+' <span class="currency_sign"></span></td></tr>';
|
cart_content += '</div></td><td>'+this.total+' <span class="currency_sign"></span></td></tr>';
|
||||||
});
|
});
|
||||||
|
$.each(gifts, function() {
|
||||||
|
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td>';
|
||||||
|
cart_content += '<td>{l s='Gift !'}</td><td>'+this.cart_quantity+'</td><td>{l s='Gift !'}</td></tr>';
|
||||||
|
});
|
||||||
$('#customer_cart tbody').html(cart_content);
|
$('#customer_cart tbody').html(cart_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -674,7 +680,7 @@
|
|||||||
|
|
||||||
function displaySummary(jsonSummary)
|
function displaySummary(jsonSummary)
|
||||||
{
|
{
|
||||||
updateCartProducts(jsonSummary.summary.products);
|
updateCartProducts(jsonSummary.summary.products, jsonSummary.summary.gift_products);
|
||||||
updateCartVouchers(jsonSummary.summary.discounts);
|
updateCartVouchers(jsonSummary.summary.discounts);
|
||||||
updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice);
|
updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice);
|
||||||
|
|
||||||
@@ -722,7 +728,7 @@
|
|||||||
resetBind();
|
resetBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateQty(id_product, id_product_attribute, qty)
|
function updateQty(id_product, id_product_attribute, id_customization, qty)
|
||||||
{
|
{
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
@@ -736,6 +742,7 @@
|
|||||||
action: "updateQty",
|
action: "updateQty",
|
||||||
id_product: id_product,
|
id_product: id_product,
|
||||||
id_product_attribute: id_product_attribute,
|
id_product_attribute: id_product_attribute,
|
||||||
|
id_customization: id_customization,
|
||||||
qty: qty,
|
qty: qty,
|
||||||
id_customer: id_customer,
|
id_customer: id_customer,
|
||||||
id_cart: id_cart,
|
id_cart: id_cart,
|
||||||
@@ -773,7 +780,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$('#products_err').hide();
|
$('#products_err').hide();
|
||||||
updateQty(id_product, $('#ipa_'+id_product+' option:selected').val(), $('#qty').val());
|
updateQty(id_product, $('#ipa_'+id_product+' option:selected').val(), 0, $('#qty').val());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -932,6 +939,7 @@
|
|||||||
success : function(res)
|
success : function(res)
|
||||||
{
|
{
|
||||||
displaySummary(res);
|
displaySummary(res);
|
||||||
|
updateDeliveryOption();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -946,14 +954,14 @@
|
|||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<input type="text" id="customer" value="" />
|
<input type="text" id="customer" value="" />
|
||||||
<p>{l s='Search a customer by tapping the first letters of his name'}</p>
|
<p>{l s='Search a customer by tapping the first letters of his name'}</p>
|
||||||
<a class="fancybox button" href="{$link->getAdminLink('AdminCustomers')}&addcustomer&liteDisplaying=1&submitFormAjax=1#">
|
<a class="fancybox button" href="{$link->getAdminLink('AdminCustomers')|escape:'htmlall':'UTF-8'}&addcustomer&liteDisplaying=1&submitFormAjax=1#">
|
||||||
<img src="../img/admin/add.gif" title="new"/><span>{l s='Add new customer'}</span>
|
<img src="../img/admin/add.gif" title="new"/><span>{l s='Add new customer'}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="customers">
|
<div id="customers">
|
||||||
</div>
|
</div>
|
||||||
</fieldset><br />
|
</fieldset><br />
|
||||||
<form action="{$link->getAdminLink('AdminOrders')}&submitAdd{$table}=1" method="post" autocomplete="off">
|
<form action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&submitAdd{$table}=1" method="post" autocomplete="off">
|
||||||
<fieldset id="products_part" style="display:none;"><legend><img src="../img/t/AdminCatalog.gif" />{l s='Cart'}</legend>
|
<fieldset id="products_part" style="display:none;"><legend><img src="../img/t/AdminCatalog.gif" />{l s='Cart'}</legend>
|
||||||
<div>
|
<div>
|
||||||
<label>{l s='Search a product:'} </label>
|
<label>{l s='Search a product:'} </label>
|
||||||
@@ -990,12 +998,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<table cellspacing="0" cellpadding="0" class="table width5" id="customer_cart">
|
<table cellspacing="0" cellpadding="0" class="table width5" id="customer_cart">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="90px"></col>
|
<col width="90px">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1042,10 +1050,10 @@
|
|||||||
<h3>{l s='Carts:'}</h3>
|
<h3>{l s='Carts:'}</h3>
|
||||||
<table cellspacing="0" cellpadding="0" class="table width5">
|
<table cellspacing="0" cellpadding="0" class="table width5">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="10px"></col>
|
<col width="10px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="70px"></col>
|
<col width="70px">
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1063,13 +1071,13 @@
|
|||||||
<h3>{l s='Orders:'}</h3>
|
<h3>{l s='Orders:'}</h3>
|
||||||
<table cellspacing="0" cellpadding="0" class="table width5">
|
<table cellspacing="0" cellpadding="0" class="table width5">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="10px"></col>
|
<col width="10px">
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="90px"></col>
|
<col width="90px">
|
||||||
<col width="100px"></col>
|
<col width="100px">
|
||||||
<col width="250px"></col>
|
<col width="250px">
|
||||||
<col width="50px"></col>
|
<col width="50px">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1095,7 +1103,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<label>{l s='Search a voucher:'} </label>
|
<label>{l s='Search a voucher:'} </label>
|
||||||
<input type="text" id="voucher" value="" />
|
<input type="text" id="voucher" value="" />
|
||||||
<a class="fancybox button" href="{$link->getAdminLink('AdminCartRules')}&addcart_rule&liteDisplaying=1&submitFormAjax=1#"><img src="../img/admin/add.gif" title="new"/>{l s='Add new voucher'}</a>
|
<a class="fancybox button" href="{$link->getAdminLink('AdminCartRules')|escape:'htmlall':'UTF-8'}&addcart_rule&liteDisplaying=1&submitFormAjax=1#"><img src="../img/admin/add.gif" title="new"/>{l s='Add new voucher'}</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<table cellspacing="0" cellpadding="0" class="table" id="voucher_list">
|
<table cellspacing="0" cellpadding="0" class="table" id="voucher_list">
|
||||||
@@ -1131,7 +1139,7 @@
|
|||||||
<div id="address_invoice_detail">
|
<div id="address_invoice_detail">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="fancybox button" id="new_address" href="{$link->getAdminLink('AdminAddresses')}&addaddress&id_customer=42&liteDisplaying=1&submitFormAjax=1#"><img src="../img/admin/add.gif" title="new"/>{l s='Add new address'}</a>
|
<a class="fancybox button" id="new_address" href="{$link->getAdminLink('AdminAddresses')|escape:'htmlall':'UTF-8'}&addaddress&id_customer=42&liteDisplaying=1&submitFormAjax=1#"><img src="../img/admin/add.gif" title="new"/>{l s='Add new address'}</a>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br />
|
<br />
|
||||||
<fieldset id="carriers_part" style="display:none;">
|
<fieldset id="carriers_part" style="display:none;">
|
||||||
@@ -1162,7 +1170,6 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br />
|
<br />
|
||||||
<fieldset id="summary_part" style="display:none;">
|
<fieldset id="summary_part" style="display:none;">
|
||||||
@@ -1215,3 +1222,4 @@
|
|||||||
<div id="loader">
|
<div id="loader">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+6
-7
@@ -33,8 +33,12 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{if $customization_errors|count}
|
{if $customization_errors}
|
||||||
customization_errors = true;
|
parent.customization_errors = true;
|
||||||
|
{else}
|
||||||
|
parent.customization_errors = false;
|
||||||
|
parent.$('#products_err', window.parent.document).hide();
|
||||||
|
{/if}
|
||||||
var id_selected_product = parent.$('#id_product option:selected').val();
|
var id_selected_product = parent.$('#id_product option:selected').val();
|
||||||
if (parent.searchProducts())
|
if (parent.searchProducts())
|
||||||
{
|
{
|
||||||
@@ -42,11 +46,6 @@
|
|||||||
parent.$('#id_product option[value="'+id_selected_product+'"]').attr('selected', true);
|
parent.$('#id_product option[value="'+id_selected_product+'"]').attr('selected', true);
|
||||||
parent.$('#id_product').change();
|
parent.$('#id_product').change();
|
||||||
}
|
}
|
||||||
|
|
||||||
{else}
|
|
||||||
parent.$('#products_err', window.parent.document).hide();
|
|
||||||
customization_errors = false;
|
|
||||||
{/if}
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<div class="bloc-command">
|
<div class="bloc-command">
|
||||||
<div class="button-command">
|
<div class="button-command">
|
||||||
{if (count($invoices_collection))}
|
{if (count($invoices_collection))}
|
||||||
<a class="button" href="{$link->getAdminLink('AdminPdf')}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank">
|
<a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank">
|
||||||
<img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}
|
<img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}
|
||||||
</a>
|
</a>
|
||||||
{else}
|
{else}
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
|
|
||||||
{if (($currentState && $currentState->delivery) || $order->delivery_number)}
|
{if (($currentState && $currentState->delivery) || $order->delivery_number)}
|
||||||
<a class="button" href="{$link->getAdminLink('AdminPdf')}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank">
|
<a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank">
|
||||||
<img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}
|
<img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}
|
||||||
</a>
|
</a>
|
||||||
{else}
|
{else}
|
||||||
@@ -90,6 +90,10 @@
|
|||||||
<dt>{l s='Messages:'}</dt>
|
<dt>{l s='Messages:'}</dt>
|
||||||
<dd>{sizeof($messages)}</dd>
|
<dd>{sizeof($messages)}</dd>
|
||||||
|</dl>
|
|</dl>
|
||||||
|
<dl>
|
||||||
|
<dt><a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{l s='New Customer Messages:'}</a></dt>
|
||||||
|
<dd><a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{sizeof($customer_thread_message)}</a></dd>
|
||||||
|
|</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{l s='Products:'}</dt>
|
<dt>{l s='Products:'}</dt>
|
||||||
<dd id="product_number">{sizeof($products)}</dd>
|
<dd id="product_number">{sizeof($products)}</dd>
|
||||||
@@ -121,10 +125,10 @@
|
|||||||
<!-- History of status -->
|
<!-- History of status -->
|
||||||
<table cellspacing="0" cellpadding="0" class="table history-status" style="width: 100%;">
|
<table cellspacing="0" cellpadding="0" class="table history-status" style="width: 100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="1%"></col>
|
<col width="1%">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="20%"></col>
|
<col width="20%">
|
||||||
<col width="20%"></col>
|
<col width="20%">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
{foreach from=$history item=row key=key}
|
{foreach from=$history item=row key=key}
|
||||||
{if ($key == 0)}
|
{if ($key == 0)}
|
||||||
@@ -155,7 +159,7 @@
|
|||||||
{if ($customer->isGuest())}
|
{if ($customer->isGuest())}
|
||||||
{l s='This order has been placed by a guest.'}
|
{l s='This order has been placed by a guest.'}
|
||||||
{if (!Customer::customerExists($customer->email))}
|
{if (!Customer::customerExists($customer->email))}
|
||||||
<form method="POST" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
|
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
|
||||||
<input type="hidden" name="id_lang" value="{$order->id_lang}" />
|
<input type="hidden" name="id_lang" value="{$order->id_lang}" />
|
||||||
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform guest into customer'}" /></p>
|
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform guest into customer'}" /></p>
|
||||||
{l s='This feature will generate a random password and send an e-mail to the customer'}
|
{l s='This feature will generate a random password and send an e-mail to the customer'}
|
||||||
@@ -198,8 +202,8 @@
|
|||||||
<div style="width: 49%; float:right;">
|
<div style="width: 49%; float:right;">
|
||||||
<div class="button-command-prev-next">
|
<div class="button-command-prev-next">
|
||||||
<b>{l s='Orders'}</b> :
|
<b>{l s='Orders'}</b> :
|
||||||
{if $previousOrder}<a class="button" href="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$previousOrder}">{l s='< Prev'}</a>{/if}
|
{if $previousOrder}<a class="button" href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$previousOrder}">{l s='< Prev'}</a>{/if}
|
||||||
{if $nextOrder}<a class="button" href="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$nextOrder}">{l s='Next >'}</a>{/if}
|
{if $nextOrder}<a class="button" href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$nextOrder}">{l s='Next >'}</a>{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
||||||
@@ -211,7 +215,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="10%">
|
<th width="10%">
|
||||||
{l s='Order n°'}
|
{l s='Order no.'}
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
{l s='Status'}
|
{l s='Status'}
|
||||||
@@ -260,7 +264,7 @@
|
|||||||
<legend><img src="../img/admin/money.gif" /> {l s='Payment'}</legend>
|
<legend><img src="../img/admin/money.gif" /> {l s='Payment'}</legend>
|
||||||
|
|
||||||
{if (!$order->valid && sizeof($currencies) > 1)}
|
{if (!$order->valid && sizeof($currencies) > 1)}
|
||||||
<form method="post" action="{$currentIndex}&viewOrder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
<form method="post" action="{$currentIndex}&viewOrder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||||
<p class="warn">{l s='Don\'t forget to update your conversion rate before make this change.'}</p>
|
<p class="warn">{l s='Don\'t forget to update your conversion rate before make this change.'}</p>
|
||||||
<label>{l s='Don\'t forget to update your conversion rate before make this change.'}</label>
|
<label>{l s='Don\'t forget to update your conversion rate before make this change.'}</label>
|
||||||
<select name="new_currency">
|
<select name="new_currency">
|
||||||
@@ -272,7 +276,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<input type="submit" class="button" name="submitChangeCurrency" value="{l s='Change'}" />
|
<input type="submit" class="button" name="submitChangeCurrency" value="{l s='Change'}" />
|
||||||
</form>
|
</form>
|
||||||
<hr />
|
<hr class="clear"/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if count($order->getOrderPayments()) > 0}
|
{if count($order->getOrderPayments()) > 0}
|
||||||
@@ -293,15 +297,15 @@
|
|||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
<form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||||
<table class="table" width="100%" cellspacing="0" cellpadding="0">
|
<table class="table" width="100%" cellspacing="0" cellpadding="0">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="15%"></col>
|
<col width="15%">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="20%"></col>
|
<col width="20%">
|
||||||
<col width="10%"></col>
|
<col width="10%">
|
||||||
<col width="10%"></col>
|
<col width="10%">
|
||||||
<col width="1%"></col>
|
<col width="1%">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -389,7 +393,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<input type="text" name="payment_transaction_id" value="" />
|
<input type="text" name="payment_transaction_id" value="" />
|
||||||
</td>
|
</td>
|
||||||
<td {if count($not_paid_invoices_collection) <= 0}colspan="2"{/if}>
|
<td>
|
||||||
<input type="text" name="payment_amount" size="5" value="" />
|
<input type="text" name="payment_amount" size="5" value="" />
|
||||||
<select name="payment_currency">
|
<select name="payment_currency">
|
||||||
{foreach from=$currencies item=current_currency}
|
{foreach from=$currencies item=current_currency}
|
||||||
@@ -397,10 +401,10 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
{if count($not_paid_invoices_collection) > 0}
|
{if count($invoices_collection) > 0}
|
||||||
<td>
|
<td>
|
||||||
<select name="payment_invoice" id="payment_invoice">
|
<select name="payment_invoice" id="payment_invoice">
|
||||||
{foreach from=$not_paid_invoices_collection item=invoice}
|
{foreach from=$invoices_collection item=invoice}
|
||||||
<option value="{$invoice->id}" selected="selected">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
|
<option value="{$invoice->id}" selected="selected">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
@@ -473,7 +477,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<span id="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{elseif isset($line.tracking_number)}{$line.tracking_number}{/if}</span>
|
<span id="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{elseif isset($line.tracking_number)}{$line.tracking_number}{/if}</span>
|
||||||
{if $line.can_edit}
|
{if $line.can_edit}
|
||||||
<form style="display: inline;" method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|escape:'htmlall':'UTF-8'}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'htmlall':'UTF-8'}{else}0{/if}">
|
<form style="display: inline;" method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|escape:'htmlall':'UTF-8'}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'htmlall':'UTF-8'}{else}0{/if}">
|
||||||
<span class="shipping_number_edit" style="display:none;">
|
<span class="shipping_number_edit" style="display:none;">
|
||||||
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
|
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
|
||||||
<input type="submit" class="button" name="submitShippingNumber" value="{l s='Update'}" />
|
<input type="submit" class="button" name="submitShippingNumber" value="{l s='Update'}" />
|
||||||
@@ -504,13 +508,13 @@
|
|||||||
<div class="container-command container-command-top-spacing">
|
<div class="container-command container-command-top-spacing">
|
||||||
<!-- Addresses -->
|
<!-- Addresses -->
|
||||||
{if !$order->isVirtual()}
|
{if !$order->isVirtual()}
|
||||||
<div style="width: 49%; float:left;"></contact>
|
<div style="width: 49%; float:left;">
|
||||||
<!-- Shipping address -->
|
<!-- Shipping address -->
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><img src="../img/admin/delivery.gif" alt="{l s='Shipping address'}" />{l s='Shipping address'}</legend>
|
<legend><img src="../img/admin/delivery.gif" alt="{l s='Shipping address'}" />{l s='Shipping address'}</legend>
|
||||||
|
|
||||||
{if $can_edit}
|
{if $can_edit}
|
||||||
<form method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}">
|
<form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}">
|
||||||
<div style="margin-bottom:5px;">
|
<div style="margin-bottom:5px;">
|
||||||
<p>
|
<p>
|
||||||
<select name="id_address">
|
<select name="id_address">
|
||||||
@@ -534,13 +538,13 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div style="width: 49%; float:right;"></contact>
|
<div style="width: 49%; float:right;">
|
||||||
<!-- Invoice address -->
|
<!-- Invoice address -->
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><img src="../img/admin/invoice.gif" alt="{l s='Invoice address'}" />{l s='Invoice address'}</legend>
|
<legend><img src="../img/admin/invoice.gif" alt="{l s='Invoice address'}" />{l s='Invoice address'}</legend>
|
||||||
|
|
||||||
{if $can_edit}
|
{if $can_edit}
|
||||||
<form method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}">
|
<form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&vieworder&id_order={$order->id}">
|
||||||
<div style="margin-bottom:5px;">
|
<div style="margin-bottom:5px;">
|
||||||
<p>
|
<p>
|
||||||
<select name="id_address">
|
<select name="id_address">
|
||||||
@@ -565,7 +569,7 @@
|
|||||||
<div class="clear" style="margin-bottom: 10px;"></div>
|
<div class="clear" style="margin-bottom: 10px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form style="width: 98%" class="container-command-top-spacing" action="{$current_index}&vieworder&token={$smarty.get.token}" method="post" onsubmit="return orderDeleteProduct('{l s='Cannot return this product'}', '{l s='Quantity to cancel is greater than quantity available'}');">
|
<form style="width: 98%" class="container-command-top-spacing" action="{$current_index}&vieworder&token={$smarty.get.token}&id_order={$order->id}" method="post" onsubmit="return orderDeleteProduct('{l s='Cannot return this product'}', '{l s='Quantity to cancel is greater than quantity available'}');">
|
||||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||||
<fieldset style="width: 100%; ">
|
<fieldset style="width: 100%; ">
|
||||||
<div style="display: none">
|
<div style="display: none">
|
||||||
@@ -590,7 +594,7 @@
|
|||||||
<th style="width: 15%; text-align: center">{l s='Unit Price'} <sup>*</sup></th>
|
<th style="width: 15%; text-align: center">{l s='Unit Price'} <sup>*</sup></th>
|
||||||
<th style="width: 4%; text-align: center">{l s='Qty'}</th>
|
<th style="width: 4%; text-align: center">{l s='Qty'}</th>
|
||||||
{if ($order->hasBeenPaid())}<th style="width: 3%; text-align: center">{l s='Refunded'}</th>{/if}
|
{if ($order->hasBeenPaid())}<th style="width: 3%; text-align: center">{l s='Refunded'}</th>{/if}
|
||||||
{if ($order->hasBeenDelivered())}<th style="width: 3%; text-align: center">{l s='Returned'}</th>{/if}
|
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}<th style="width: 3%; text-align: center">{l s='Returned'}</th>{/if}
|
||||||
<th style="width: 10%; text-align: center">{l s='Available quantity'}</th>
|
<th style="width: 10%; text-align: center">{l s='Available quantity'}</th>
|
||||||
<th style="width: 10%; text-align: center">{l s='Total'} <sup>*</sup></th>
|
<th style="width: 10%; text-align: center">{l s='Total'} <sup>*</sup></th>
|
||||||
<th colspan="2" style="display: none;" class="add_product_fields"> </th>
|
<th colspan="2" style="display: none;" class="add_product_fields"> </th>
|
||||||
@@ -658,7 +662,7 @@
|
|||||||
<tr id="total_shipping">
|
<tr id="total_shipping">
|
||||||
<td><b>{l s='Shipping'}</b></td>
|
<td><b>{l s='Shipping'}</b></td>
|
||||||
<td class="amount" align="right">{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td>
|
<td class="amount" align="right">{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}</td>
|
||||||
<td class="partial_refund_fields current-edit" style="display:none;"><input type="text" size="3" name="partialRefundShippingCost" /> €</td>
|
<td class="partial_refund_fields current-edit" style="display:none;"><input type="text" size="3" name="partialRefundShippingCost" value="0" /> €</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="font-size: 20px" id="total_order">
|
<tr style="font-size: 20px" id="total_order">
|
||||||
<td style="font-size: 20px">{l s='Total'}</td>
|
<td style="font-size: 20px">{l s='Total'}</td>
|
||||||
@@ -690,7 +694,7 @@
|
|||||||
</td>
|
</td>
|
||||||
{if $can_edit}
|
{if $can_edit}
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img src="../img/admin/delete.gif" alt="{l s='Delete voucher'}" /></a>
|
<a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img src="../img/admin/delete.gif" alt="{l s='Delete voucher'}" /></a>
|
||||||
</td>
|
</td>
|
||||||
{/if}
|
{/if}
|
||||||
</tr>
|
</tr>
|
||||||
@@ -730,6 +734,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="float: right; width: 160px; display:none;" class="partial_refund_fields">
|
<div style="float: right; width: 160px; display:none;" class="partial_refund_fields">
|
||||||
<div style="text-align:center; margin-top:5px;">
|
<div style="text-align:center; margin-top:5px;">
|
||||||
|
<input type="checkbox" id="generateDiscountRefund" name="generateDiscountRefund" class="button" onclick="toggleShippingCost(this)" /> <label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br />
|
||||||
<input type="submit" name="partialRefund" value="{l s='Partial refund'}" class="button" style="margin-top:8px;" />
|
<input type="submit" name="partialRefund" value="{l s='Partial refund'}" class="button" style="margin-top:8px;" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -744,7 +749,7 @@
|
|||||||
<div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;">
|
<div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;">
|
||||||
<a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer'}</a>
|
<a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer'}</a>
|
||||||
</div>
|
</div>
|
||||||
<a href="{$link->getAdminLink('AdminCustomerThreads')}"><b>{l s='Click here'}</b> {l s='to see all messages'}</a><br>
|
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages'}</a><br>
|
||||||
<div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}">
|
<div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}">
|
||||||
<select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')">
|
<select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')">
|
||||||
<option value="0" selected="selected">-- {l s='Choose a standard message'} --</option>
|
<option value="0" selected="selected">-- {l s='Choose a standard message'} --</option>
|
||||||
|
|||||||
@@ -26,5 +26,5 @@
|
|||||||
|
|
||||||
{* Generate HTML code for printing Invoice Icon with link *}
|
{* Generate HTML code for printing Invoice Icon with link *}
|
||||||
<span style="width:20px; margin-right:5px;">
|
<span style="width:20px; margin-right:5px;">
|
||||||
<a href="{$link->getAdminLink('AdminPdf')}&submitAction=generateInvoicePDF&id_order_invoice={$id_invoice}"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>
|
<a href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$id_invoice}"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>
|
||||||
</span>
|
</span>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="col-right">
|
<td class="col-right">
|
||||||
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminCategories')}&addcategory">
|
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminCategories')|escape:'htmlall':'UTF-8'}&addcategory">
|
||||||
<img src="../img/admin/add.gif" alt="{l s='Create new category'}" title="{l s='Create new category'}" />
|
<img src="../img/admin/add.gif" alt="{l s='Create new category'}" title="{l s='Create new category'}" />
|
||||||
<span>{l s='Create new category'}</span>
|
<span>{l s='Create new category'}</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<option disabled="disabled">----------</option>
|
<option disabled="disabled">----------</option>
|
||||||
</select>
|
</select>
|
||||||
<a class="button bt-icon confirm_leave" style="margin-bottom:0" href="{$link->getAdminLink('AdminManufacturers')}&addmanufacturer">
|
<a class="button bt-icon confirm_leave" style="margin-bottom:0" href="{$link->getAdminLink('AdminManufacturers')|escape:'htmlall':'UTF-8'}&addmanufacturer">
|
||||||
<img src="../img/admin/add.gif" alt="{l s='Create new manufacturer'}" title="{l s='Create new manufacturer'}" />
|
<img src="../img/admin/add.gif" alt="{l s='Create new manufacturer'}" title="{l s='Create new manufacturer'}" />
|
||||||
<span>{l s='Create new manufacturer'}</span>
|
<span>{l s='Create new manufacturer'}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -37,13 +37,13 @@
|
|||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<sup> *</sup>
|
<sup> *</sup>
|
||||||
<p class="preference_description">{l s='Maximum 32 characters.'}</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<p class="margin-form preference_description">{l s='Maximum 32 characters.'}</p>
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
<label>{l s='Description:'} </label>
|
<label>{l s='Description:'} </label>
|
||||||
<div class="margin-form translatable">
|
<div class="margin-form translatable">
|
||||||
{foreach $languages as $language}
|
{foreach $languages as $language}
|
||||||
<div id="attachment_description_{$language.id_lang}" style="display: {if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
<div class="lang_{$language.id_lang}" style="display: {if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
|
||||||
<textarea name="attachment_description_{$language.id_lang}">{$attachment_description[$language.id_lang]|escape:'htmlall':'UTF-8'}</textarea>
|
<textarea name="attachment_description_{$language.id_lang}">{$attachment_description[$language.id_lang]|escape:'htmlall':'UTF-8'}</textarea>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
@@ -90,4 +90,10 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
|
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var iso = '{$iso_tiny_mce}';
|
||||||
|
var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
|
||||||
|
var ad = '{$ad}';
|
||||||
|
</script>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -28,17 +28,24 @@
|
|||||||
<input type="hidden" name="submitted_tabs[]" value="Customization" />
|
<input type="hidden" name="submitted_tabs[]" value="Customization" />
|
||||||
<h4>{l s='Add or modify customizable properties'}</h4>
|
<h4>{l s='Add or modify customizable properties'}</h4>
|
||||||
|
|
||||||
|
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"}
|
||||||
<div class="separation"></div><br />
|
<div class="separation"></div><br />
|
||||||
<table cellpadding="5" style="width:100%">
|
<table cellpadding="5" style="width:100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">{l s='File fields:'}</td>
|
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">
|
||||||
|
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
|
||||||
|
<label>{l s='File fields:'}</label>
|
||||||
|
</td>
|
||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
<input type="text" name="uploadable_files" id="uploadable_files" size="4" value="{$uploadable_files|htmlentities}" />
|
<input type="text" name="uploadable_files" id="uploadable_files" size="4" value="{$uploadable_files|htmlentities}" />
|
||||||
<p class="preference_description">{l s='Number of upload file fields displayed'}</p>
|
<p class="preference_description">{l s='Number of upload file fields displayed'}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">{l s='Text fields:'}</td>
|
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">
|
||||||
|
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
|
||||||
|
<label>{l s='Text fields:'}</label>
|
||||||
|
</td>
|
||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
<input type="text" name="text_fields" id="text_fields" size="4" value="{$text_fields|htmlentities}" />
|
<input type="text" name="text_fields" id="text_fields" size="4" value="{$text_fields|htmlentities}" />
|
||||||
<p class="preference_description">{l s='Number of text fields displayed'}</p>
|
<p class="preference_description">{l s='Number of text fields displayed'}</p>
|
||||||
|
|||||||
@@ -38,22 +38,22 @@
|
|||||||
<br />
|
<br />
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
|
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="300"></col>
|
<col width="300">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="300"></col>
|
<col width="300">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th height="39px">{l s='Feature'}</td>
|
<th height="39px">{l s='Feature'}</th>
|
||||||
<th>{l s='Pre-defined value'}</td>
|
<th>{l s='Pre-defined value'}</th>
|
||||||
<th><u>{l s='or'}</u> {l s='Customized value'}</td>
|
<th><u>{l s='or'}</u> {l s='Customized value'}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{foreach from=$available_features item=available_feature}
|
{foreach from=$available_features item=available_feature}
|
||||||
<table cellpadding="5" style="background-color:#fff; width: 100%;border:1px solid #ccc; border-top:none; padding:4px 6px;">
|
<table cellpadding="5" style="background-color:#fff; width: 100%;border:1px solid #ccc; border-top:none; padding:4px 6px;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="300"></col>
|
<col width="300">
|
||||||
<col width=""></col>
|
<col width="">
|
||||||
<col width="300"></col>
|
<col width="300">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$available_feature.name}</td>
|
<td>{$available_feature.name}</td>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
{else}
|
{else}
|
||||||
<input type="hidden" name="feature_{$available_feature.id_feature}_value" value="0" />
|
<input type="hidden" name="feature_{$available_feature.id_feature}_value" value="0" />
|
||||||
<span>{l s='N/A'} -
|
<span>{l s='N/A'} -
|
||||||
<a href="{$link->getAdminLink('AdminFeatures')}&addfeature_value&id_feature={$available_feature.id_feature}"
|
<a href="{$link->getAdminLink('AdminFeatures')|escape:'htmlall':'UTF-8'}&addfeature_value&id_feature={$available_feature.id_feature}"
|
||||||
class="confirm_leave button"><img src="../img/admin/add.gif" alt="values_first" title="{l s='Add pre-defined values first'}" /> {l s='Add pre-defined values first'}</a>
|
class="confirm_leave button"><img src="../img/admin/add.gif" alt="values_first" title="{l s='Add pre-defined values first'}" /> {l s='Add pre-defined values first'}</a>
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
<div>
|
<div>
|
||||||
<a href="{$link->getAdminLink('AdminFeatures')}&addfeature" class="confirm_leave button">
|
<a href="{$link->getAdminLink('AdminFeatures')|escape:'htmlall':'UTF-8'}&addfeature" class="confirm_leave button">
|
||||||
<img src="../img/admin/add.gif" alt="new_features" title="{l s='Add a new feature'}" /> {l s='Add a new feature'}
|
<img src="../img/admin/add.gif" alt="new_features" title="{l s='Add a new feature'}" /> {l s='Add a new feature'}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var token = '{$token}';
|
var token = '{$token}';
|
||||||
var id_product = {if isset($product->id)}{$product->id}{else}0{/if};
|
var id_product = {if isset($product->id)}{$product->id}{else}0{/if};
|
||||||
var defaultLanguage = {$defaultLanguage};
|
var id_lang_default = {$id_lang_default};
|
||||||
var product_type_pack = {Product::PTYPE_PACK};
|
var product_type_pack = {Product::PTYPE_PACK};
|
||||||
var product_type_virtual = {Product::PTYPE_VIRTUAL};
|
var product_type_virtual = {Product::PTYPE_VIRTUAL};
|
||||||
var product_type_simple = {Product::PTYPE_SIMPLE};
|
var product_type_simple = {Product::PTYPE_SIMPLE};
|
||||||
@@ -237,7 +237,7 @@
|
|||||||
|
|
||||||
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
|
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
|
||||||
<input type="hidden" name="id_product" value="{$id_product}" />
|
<input type="hidden" name="id_product" value="{$id_product}" />
|
||||||
<input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual}" />
|
<input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual|escape:html:'UTF-8'}" />
|
||||||
<div class="tab-pane" id="tabPane1">
|
<div class="tab-pane" id="tabPane1">
|
||||||
{if !$product->active && $product->isAssociatedToShop()}
|
{if !$product->active && $product->isAssociatedToShop()}
|
||||||
<div class="warn draft" >
|
<div class="warn draft" >
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="col-left"><label>{$bullet_common_field} {l s='UPC:'}</label></td>
|
<td class="col-left"><label>{$bullet_common_field} {l s='UPC:'}</label></td>
|
||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
<input size="55" maxlength="12" type="text" name="upc" value="{$product->upc}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(US, Canada)'}</span>
|
<input size="55" maxlength="12" type="text" name="upc" value="{$product->upc|escape:html:'UTF-8'}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(US, Canada)'}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -25,10 +25,10 @@
|
|||||||
*}
|
*}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var Customer = new Object();
|
||||||
var product_url = '{$link->getAdminLink('AdminProducts', true)}';
|
var product_url = '{$link->getAdminLink('AdminProducts', true)}';
|
||||||
|
$(document).ready(function () {
|
||||||
var Customer = {
|
Customer = {
|
||||||
"hiddenField": jQuery('#id_customer'),
|
"hiddenField": jQuery('#id_customer'),
|
||||||
"field": jQuery('#customer'),
|
"field": jQuery('#customer'),
|
||||||
"container": jQuery('#customers'),
|
"container": jQuery('#customers'),
|
||||||
@@ -100,7 +100,8 @@ var Customer = {
|
|||||||
Customer.loader.fadeOut();
|
Customer.loader.fadeOut();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
jQuery(document).ready(Customer.init);
|
Customer.init();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{* END CUSTOMER AUTO-COMPLETE / TO REFACTO *}
|
{* END CUSTOMER AUTO-COMPLETE / TO REFACTO *}
|
||||||
@@ -120,7 +121,7 @@ jQuery(document).ready(Customer.init);
|
|||||||
<label>{l s='Pre-tax wholesale price:'}</label>
|
<label>{l s='Pre-tax wholesale price:'}</label>
|
||||||
</td>
|
</td>
|
||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{$product->wholesale_price|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
|
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{{toolsConvertPrice price=$product->wholesale_price}|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
|
||||||
<p class="preference_description">{l s='The wholesale price at which you bought this product'}</p>
|
<p class="preference_description">{l s='The wholesale price at which you bought this product'}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -131,8 +132,8 @@ jQuery(document).ready(Customer.init);
|
|||||||
<label>{l s='Pre-tax retail price:'}</label>
|
<label>{l s='Pre-tax retail price:'}</label>
|
||||||
</td>
|
</td>
|
||||||
<td style="padding-bottom:5px;">
|
<td style="padding-bottom:5px;">
|
||||||
<input type="hidden" id="priceTEReal" name="price" value="{$product->price}" />
|
<input type="hidden" id="priceTEReal" name="price" value="{toolsConvertPrice price=$product->price}" />
|
||||||
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{$product->price|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix}
|
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{{toolsConvertPrice price=$product->price}|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix}
|
||||||
<p class="preference_description">{l s='The pre-tax retail price to sell this product'}</p>
|
<p class="preference_description">{l s='The pre-tax retail price to sell this product'}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -165,12 +166,12 @@ jQuery(document).ready(Customer.init);
|
|||||||
</option>
|
</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
<a class="button" href="{$link->getAdminLink('AdminTaxRulesGroup')}&addtax_rules_group&id_product={$product->id}" class="confirm_leave">
|
<a class="button" href="{$link->getAdminLink('AdminTaxRulesGroup')|escape:'htmlall':'UTF-8'}&addtax_rules_group&id_product={$product->id}" class="confirm_leave">
|
||||||
<img src="../img/admin/add.gif" alt="{l s='Create'}" title="{l s='Create'}" /> {l s='Create'}
|
<img src="../img/admin/add.gif" alt="{l s='Create'}" title="{l s='Create'}" /> {l s='Create'}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
{if $tax_exclude_taxe_option}
|
{if $tax_exclude_taxe_option}
|
||||||
<span style="margin-left:10px; color:red;">{l s='Taxes are currently disabled'}</span> (<b><a href="{$link->getAdminLink('AdminTaxes')}">{l s='Tax options'}</a></b>)
|
<span style="margin-left:10px; color:red;">{l s='Taxes are currently disabled'}</span> (<b><a href="{$link->getAdminLink('AdminTaxes')|escape:'htmlall':'UTF-8'}">{l s='Tax options'}</a></b>)
|
||||||
<input type="hidden" value="{$product->getIdTaxRulesGroup()}" name="id_tax_rules_group" />
|
<input type="hidden" value="{$product->getIdTaxRulesGroup()}" name="id_tax_rules_group" />
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
@@ -384,7 +385,7 @@ jQuery(document).ready(Customer.init);
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table style="text-align: center;width:100%" class="table" cellpadding="0" cellspacing="0" id="specific_prices_list">
|
<table style="text-align: left;width:100%" class="table" cellpadding="0" cellspacing="0" id="specific_prices_list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="cell border" style="width: 12%;">{l s='Rule'}</th>
|
<th class="cell border" style="width: 12%;">{l s='Rule'}</th>
|
||||||
@@ -394,11 +395,10 @@ jQuery(document).ready(Customer.init);
|
|||||||
<th class="cell border" style="width: 11%;">{l s='Country'}</th>
|
<th class="cell border" style="width: 11%;">{l s='Country'}</th>
|
||||||
<th class="cell border" style="width: 13%;">{l s='Group'}</th>
|
<th class="cell border" style="width: 13%;">{l s='Group'}</th>
|
||||||
<th class="cell border" style="width: 13%;">{l s='Customer'}</th>
|
<th class="cell border" style="width: 13%;">{l s='Customer'}</th>
|
||||||
<th class="cell border" style="width: 12%;">{l s='Price'} {if $country_display_tax_label}{l s='(tax excl.)'}{/if}</th>
|
<th class="cell border" style="width: 13%;">{l s='Fixed price'}</th>
|
||||||
<th class="cell border" style="width: 10%;">{l s='Reduction'}</th>
|
<th class="cell border" style="width: 13%;">{l s='Impact'}</th>
|
||||||
<th class="cell border" style="width: 15%;">{l s='Period'}</th>
|
<th class="cell border" style="width: 15%;">{l s='Period'}</th>
|
||||||
<th class="cell border" style="width: 10%;">{l s='From (quantity)'}</th>
|
<th class="cell border" style="width: 13%;">{l s='From (quantity)'}</th>
|
||||||
<th class="cell border" style="width: 15%;">{l s='Final price'} {if $country_display_tax_label}{l s='(tax excl.)'}{/if}</th>
|
|
||||||
<th class="cell border" style="width: 2%;">{l s='Action'}</th>
|
<th class="cell border" style="width: 2%;">{l s='Action'}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<p>{l s='You can manually specify the quantities for the product/each product combination, or choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}</p>
|
<p>{l s='You can manually specify the quantities for the product/each product combination, or choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}</p>
|
||||||
<p>{l s='In this case, the quantities correspond to the quantitites of the real stock in the warehouses associated to the current shop or current group of shops.'}</p>
|
<p>{l s='In this case, the quantities correspond to the quantitites of the real stock in the warehouses associated to the current shop or current group of shops.'}</p>
|
||||||
<br/>
|
<br/>
|
||||||
<p>{l s='For packs, if it has products that use the advanced stock management, you have to specify a common warehouse for these products in the pack.'}</p>
|
<p>{l s='For packs, if it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}</p>
|
||||||
<p>{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}</p>
|
<p>{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}</p>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<label style="float:none;font-weight:normal" for="depends_on_stock_1">
|
<label style="float:none;font-weight:normal" for="depends_on_stock_1">
|
||||||
{l s='Available quantities for current product and its combinations are based on stock in the warehouses'}
|
{l s='Available quantities for current product and its combinations are based on stock in the warehouses'}
|
||||||
{if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack}
|
{if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack}
|
||||||
- <b>{l s='This requires you to enable the advanced stock management globally or for this product.'}</b>
|
- <b>{l s='This requires you to enable advanced stock management globally or for this product.'}</b>
|
||||||
{else if $product->cache_is_pack}
|
{else if $product->cache_is_pack}
|
||||||
- <b>{l s='This parameter depends on the product(s) in the pack.'}</b>
|
- <b>{l s='This parameter depends on the product(s) in the pack.'}</b>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -117,8 +117,8 @@
|
|||||||
<td valign="top" style="text-align:left;vertical-align:top;">
|
<td valign="top" style="text-align:left;vertical-align:top;">
|
||||||
<table class="table" cellpadding="0" cellspacing="0" style="width:100%;">
|
<table class="table" cellpadding="0" cellspacing="0" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="50"></col>
|
<col width="50">
|
||||||
<col></col>
|
<col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
onmousedown="updateFriendlyURLByName();">{l s='Generate'}</a>
|
onmousedown="updateFriendlyURLByName();">{l s='Generate'}</a>
|
||||||
{l s='Friendly URL from product name.'}<br /><br />
|
{l s='Friendly URL from product name.'}<br /><br />
|
||||||
{l s='Product link will look like this:'}
|
{l s='Product link will look like this:'}
|
||||||
{if $ps_ssl_enabled}https://{else}http://{/if}{$smarty.server.SERVER_NAME}{$smarty.const.__PS_BASE_URI__}{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html</p>
|
{$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-left"><label>{l s='Additional shipping cost:'}</label></td>
|
<td class="col-left"><label>{l s='Additional shipping cost (per quantity):'}</label></td>
|
||||||
<td style="padding-bottom:5px;">{$currency->prefix}<input type="text" name="additional_shipping_cost"
|
<td style="padding-bottom:5px;">{$currency->prefix}<input type="text" name="additional_shipping_cost"
|
||||||
value="{$product->additional_shipping_cost|htmlentities}" />{$currency->suffix}
|
value="{$product->additional_shipping_cost|htmlentities}" />{$currency->suffix}
|
||||||
{if $country_display_tax_label}{l s='tax excl.'}{/if}
|
{if $country_display_tax_label}{l s='tax excl.'}{/if}
|
||||||
@@ -72,12 +72,21 @@
|
|||||||
<label>{l s='Carriers:'}</label>
|
<label>{l s='Carriers:'}</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="padding-bottom:5px;">
|
<td class="padding-bottom:5px;">
|
||||||
<select name="carriers[]" multiple="multiple" size="4" style="height:100px;width:200px;">
|
<select name="carriers[]" id="carriers_restriction" multiple="multiple" size="4" style="height:100px;width:200px;">
|
||||||
{foreach $carrier_list as $carrier}
|
{foreach $carrier_list as $carrier}
|
||||||
<option value="{$carrier.id_reference}" {if isset($carrier.selected) && $carrier.selected}selected="selected"{/if}>{$carrier.name}</option>
|
<option value="{$carrier.id_reference}" {if isset($carrier.selected) && $carrier.selected}selected="selected"{/if}>{$carrier.name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
<br>
|
||||||
|
<button class="button" onclick="unselectAllCarriers(); return false;">{l s='Unselect all'}</button>
|
||||||
<p class="preference_description">{l s='If no carrier selected, all carriers could be used to ship this product.'}</p>
|
<p class="preference_description">{l s='If no carrier selected, all carriers could be used to ship this product.'}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<script>
|
||||||
|
function unselectAllCarriers()
|
||||||
|
{
|
||||||
|
$('#carriers_restriction option').each(function () { $(this).removeAttr('selected')});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<p>{l s='When using the advanced stock management (see Preferences/Products), the values you fill here (prices, references) will be used in the supply orders.'}</p>
|
<p>{l s='When using the advanced stock management (see Preferences/Products), the values you fill here (prices, references) will be used in the supply orders.'}</p>
|
||||||
</div>
|
</div>
|
||||||
<p>{l s='Please choose the suppliers associated with this product, and the default one.'}</p>
|
<p>{l s='Please choose the suppliers associated with this product, and the default one.'}</p>
|
||||||
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminSuppliers')}&addsupplier">
|
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminSuppliers')|escape:'htmlall':'UTF-8'}&addsupplier">
|
||||||
<img src="../img/admin/add.gif" alt="{l s='Create new supplier'}" title="{l s='Create new supplier'}" /><span>{l s='Create new supplier'}</span>
|
<img src="../img/admin/add.gif" alt="{l s='Create new supplier'}" title="{l s='Create new supplier'}" /><span>{l s='Create new supplier'}</span>
|
||||||
</a>
|
</a>
|
||||||
<table cellpadding="5" style="width:100%">
|
<table cellpadding="5" style="width:100%">
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
{* [begin] virtual product *}
|
{* [begin] virtual product *}
|
||||||
<div id="virtual_good" {if !$product->productDownload->id || $product->productDownload->active}style="display:none"{/if} >
|
<div id="virtual_good" {if !$product->productDownload->id || $product->productDownload->active}style="display:none"{/if} >
|
||||||
<div>
|
<div>
|
||||||
<label>{l s='Does this product has an associated file?'}</label>
|
<label>{l s='Does this product have an associated file?'}</label>
|
||||||
<label style="width:50px"><input type="radio" value="1" name="is_virtual_file" {if $product_downloaded}checked="checked"{/if} />{l s='Yes'}</label>
|
<label style="width:50px"><input type="radio" value="1" name="is_virtual_file" {if $product_downloaded}checked="checked"{/if} />{l s='Yes'}</label>
|
||||||
<label style="width:50px;"><input type="radio" value="0" name="is_virtual_file" {if !$product_downloaded}checked="checked"{/if} />{l s='No'}</label>
|
<label style="width:50px;"><input type="radio" value="0" name="is_virtual_file" {if !$product_downloaded}checked="checked"{/if} />{l s='No'}</label>
|
||||||
</div><br />
|
</div><br />
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p>{l s='Please choose the warehouses associated with this product, and the default one.'}</p>
|
<p>{l s='Please choose the warehouses associated with this product, and the default one.'}</p>
|
||||||
|
|
||||||
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminWarehouses')}&addwarehouse">
|
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminWarehouses')|escape:'htmlall':'UTF-8'}&addwarehouse">
|
||||||
<img src="../img/admin/add.gif" alt="{l s='Create new warehouse'}" title="{l s='Create new warehouse'}" /><span>{l s='Create new warehouse'}</span>
|
<img src="../img/admin/add.gif" alt="{l s='Create new warehouse'}" title="{l s='Create new warehouse'}" /><span>{l s='Create new warehouse'}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<li>
|
<li>
|
||||||
{l s='The field `request_uri` is the URL from which the customers come to your website.'}<br />
|
{l s='The field `request_uri` is the URL from which the customers come to your website.'}<br />
|
||||||
{l s='For example, if the visitor accesses a product page, the URL will be'} "{$uri}music-ipods/1-ipod-nano.html".<br />
|
{l s='For example, if the visitor accesses a product page, the URL will be'} "{$uri}music-ipods/1-ipod-nano.html".<br />
|
||||||
{l s='This is interesting because you can add some tags or tokens in the links pointing to your website.'}
|
{l s='This is helpful because you can add some tags or tokens in the links pointing to your website.'}
|
||||||
{l s='For example, you can post a link "%dindex.php?prestashop" in the forum and get statistics by entering "%prestashop" in the field `request_uri`. You will get all the visitors coming from the forum.'}
|
{l s='For example, you can post a link "%dindex.php?prestashop" in the forum and get statistics by entering "%prestashop" in the field `request_uri`. You will get all the visitors coming from the forum.'}
|
||||||
{l s='This method is more reliable than the `http_referer` one, but there is a danger: if a search engine read a page with your link, then it will be displayed in its results and you will have not only the forum visitors, but also the ones from the search engine.'}
|
{l s='This method is more reliable than the `http_referer` one, but there is a danger: if a search engine read a page with your link, then it will be displayed in its results and you will have not only the forum visitors, but also the ones from the search engine.'}
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
{extends file="helpers/list/list_header.tpl"}
|
{extends file="helpers/list/list_header.tpl"}
|
||||||
|
|
||||||
{block name="override_header"}
|
{block name="override_header"}
|
||||||
<script language="javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
|
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
|
||||||
var btn_submit_calendar = $('#submitDatePicker');
|
var btn_submit_calendar = $('#submitDatePicker');
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
{extends file="helpers/view/view.tpl"}
|
{extends file="helpers/view/view.tpl"}
|
||||||
|
|
||||||
{block name="override_tpl"}
|
{block name="override_tpl"}
|
||||||
<script language="javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
|
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
|
||||||
var btn_submit_calendar = $('#submitDatePicker');
|
var btn_submit_calendar = $('#submitDatePicker');
|
||||||
|
|||||||
@@ -28,12 +28,12 @@
|
|||||||
|
|
||||||
{block name="input"}
|
{block name="input"}
|
||||||
{if $input.type == 'text_customer'}
|
{if $input.type == 'text_customer'}
|
||||||
{$customer->firstname} {$customer->lastname}
|
<span class="normal-text">{$customer->firstname} {$customer->lastname}</span>
|
||||||
<p style="clear: both">
|
<p style="clear: both">
|
||||||
<a href="{$url_customer}">{l s='View details on customer page'}</a>
|
<a href="{$url_customer}">{l s='View details on customer page'}</a>
|
||||||
</p>
|
</p>
|
||||||
{elseif $input.type == 'text_order'}
|
{elseif $input.type == 'text_order'}
|
||||||
{$text_order}
|
<span class="normal-text">{$text_order}</span>
|
||||||
<p style="clear: both">
|
<p style="clear: both">
|
||||||
<a href="{$url_order}">{l s='View details on order page'}</a>
|
<a href="{$url_order}">{l s='View details on order page'}</a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ $(function() {
|
|||||||
{/if}
|
{/if}
|
||||||
{if isset($customers)}
|
{if isset($customers)}
|
||||||
{if !$customers}
|
{if !$customers}
|
||||||
<h3>{l s='No customers matching your query'} : {$query}</h3>
|
<h3>{l s='There are no customers matching your query'} : {$query}</h3>
|
||||||
{else}
|
{else}
|
||||||
<h3>{l s='Customer matching your query'} : {$query}</h3>
|
<h3>{l s='Customer matching your query'} : {$query}</h3>
|
||||||
{$customers}
|
{$customers}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="multishop-left">
|
<div class="multishop-left">
|
||||||
<div class="multishop-title">{l s='Multishop tree'}</div>
|
<div class="multishop-title">{l s='Multistore tree'}</div>
|
||||||
{include file="controllers/shop/tree.tpl" selected_tree_id=$selected_tree_id}
|
{include file="controllers/shop/tree.tpl" selected_tree_id=$selected_tree_id}
|
||||||
</div>
|
</div>
|
||||||
<div class="multishop-right">{$content}</div>
|
<div class="multishop-right">{$content}</div>
|
||||||
|
|||||||
@@ -114,6 +114,10 @@
|
|||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
|
var ids_category = new Array();
|
||||||
|
{foreach $ids_category as $key => $id_category}
|
||||||
|
ids_category[{$key}] = {$id_category};
|
||||||
|
{/foreach}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('input[name=useImportData]').click(function() {
|
$('input[name=useImportData]').click(function() {
|
||||||
if ($(this).attr('id') == 'useImportData_on')
|
if ($(this).attr('id') == 'useImportData_on')
|
||||||
@@ -121,5 +125,21 @@
|
|||||||
else
|
else
|
||||||
$('#shop_list, #data_list').slideUp('slow');
|
$('#shop_list, #data_list').slideUp('slow');
|
||||||
});
|
});
|
||||||
|
$('#id_category, #importFromShop').change(function(){
|
||||||
|
shop_id = $('#importFromShop').val();
|
||||||
|
category_id = $('#id_category').val();
|
||||||
|
if (ids_category[shop_id] != category_id)
|
||||||
|
disableProductsDuplication();
|
||||||
|
else
|
||||||
|
enableProductsDuplication();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
function disableProductsDuplication()
|
||||||
|
{
|
||||||
|
$('input[name="importData[product_attribute]"], input[name="importData[image]"], input[name="importData[product]"], input[name="importData[stock_available]"], input[name="importData[discount]"]').removeAttr('checked').attr('disabled', 'disabled');
|
||||||
|
}
|
||||||
|
function enableProductsDuplication()
|
||||||
|
{
|
||||||
|
$('input[name="importData[product_attribute]"], input[name="importData[image]"], input[name="importData[product]"], input[name="importData[stock_available]"], input[name="importData[discount]"]').removeAttr('disabled').attr('checked', 'checked');
|
||||||
|
}
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
{if isset($tr.$key)}
|
{if isset($tr.$key)}
|
||||||
<a href="{$tr.$key}" onmouseover="$(this).css('text-decoration', 'underline')" onmouseout="$(this).css('text-decoration', 'none')" target="_blank">{$tr.$key}</a>
|
<a href="{$tr.$key}" onmouseover="$(this).css('text-decoration', 'underline')" onmouseout="$(this).css('text-decoration', 'none')" target="_blank">{$tr.$key}</a>
|
||||||
{else}
|
{else}
|
||||||
<a href="{$link->getAdminLink('AdminShopUrl')}&id_shop={$tr.$identifier}&addshop_url" class="multishop_warning">{l s='Click here to set an URL for this shop'}</a>
|
<a href="{$link->getAdminLink('AdminShopUrl')|escape:'htmlall':'UTF-8'}&id_shop={$tr.$identifier}&addshop_url" class="multishop_warning">{l s='Click here to set an URL for this shop'}</a>
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
{$smarty.block.parent}
|
{$smarty.block.parent}
|
||||||
|
|||||||
+34
-15
@@ -146,17 +146,27 @@ function toggle_condition_group(id_condition_group)
|
|||||||
}
|
}
|
||||||
function add_condition(id_condition_group, type, value)
|
function add_condition(id_condition_group, type, value)
|
||||||
{
|
{
|
||||||
|
var id_condition = id_condition_group+'_'+type+'_'+value;
|
||||||
|
if (typeof conditions[id_condition] != 'undefined')
|
||||||
|
return false;
|
||||||
var condition = new Array();
|
var condition = new Array();
|
||||||
condition.type = type;
|
condition.type = type;
|
||||||
condition.value = value;
|
condition.value = value;
|
||||||
condition.id_condition_group = id_condition_group;
|
condition.id_condition_group = id_condition_group;
|
||||||
conditions.push(condition);
|
conditions[id_condition] = condition;
|
||||||
|
return id_condition;
|
||||||
|
}
|
||||||
|
function delete_condition(condition)
|
||||||
|
{
|
||||||
|
delete conditions[condition];
|
||||||
|
$('#'+condition).remove();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
function new_condition_group()
|
function new_condition_group()
|
||||||
{
|
{
|
||||||
last_condition_group++;
|
last_condition_group++;
|
||||||
var html = '<div class="condition_group" id="condition_group_'+last_condition_group+'"><h3>{l s='Condition group'} '+last_condition_group+'</h3>';
|
var html = '<div class="condition_group" id="condition_group_'+last_condition_group+'"><h3>{l s='Condition group'} '+last_condition_group+'</h3>';
|
||||||
html += '<table cellspacing="0" cellpadding="0" class="table width3"><thead><tr><th width="196px" height="39">{l s='Type'}</th><th width="300px">{l s='Value'}</th></tr></thead><tbody></tbody></table>';
|
html += '<table cellspacing="0" cellpadding="0" class="table width3"><thead><tr><th width="196px" height="39">{l s='Type'}</th><th width="300px">{l s='Value'}</th><th></th></tr></thead><tbody></tbody></table>';
|
||||||
html += '</div><div class="condition_separator">{l s='OR'}</div><div class="separation"></div>';
|
html += '</div><div class="condition_separator">{l s='OR'}</div><div class="separation"></div>';
|
||||||
$('#condition_group_list').append(html);
|
$('#condition_group_list').append(html);
|
||||||
toggle_condition_group(last_condition_group);
|
toggle_condition_group(last_condition_group);
|
||||||
@@ -170,9 +180,8 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
$('#specific_price_rule_form').live('submit', function(e) {
|
$('#specific_price_rule_form').live('submit', function(e) {
|
||||||
var html = '';
|
var html = '';
|
||||||
$.each(conditions, function() {
|
for (i in conditions)
|
||||||
html += '<input type="hidden" name="condition_group_'+this.id_condition_group+'[]" value="'+this.type+'_'+this.value+'" />';
|
html += '<input type="hidden" name="condition_group_'+conditions[i].id_condition_group+'[]" value="'+conditions[i].type+'_'+conditions[i].value+'" />';
|
||||||
});
|
|
||||||
$('#conditions').append(html);
|
$('#conditions').append(html);
|
||||||
});
|
});
|
||||||
$('#id_feature').change(function() {
|
$('#id_feature').change(function() {
|
||||||
@@ -184,32 +193,42 @@ $(document).ready(function() {
|
|||||||
$('#id_attribute_'+$(this).val()).show();
|
$('#id_attribute_'+$(this).val()).show();
|
||||||
});
|
});
|
||||||
$('#add_condition_category').click(function() {
|
$('#add_condition_category').click(function() {
|
||||||
add_condition(current_id_condition_group, 'category', $('#id_category option:selected').val());
|
var id_condition = add_condition(current_id_condition_group, 'category', $('#id_category option:selected').val());
|
||||||
var html = '<tr><td>{l s='Category'}</td><td>'+$('#id_category option:selected').html()+'</td></tr>';
|
if (!id_condition)
|
||||||
|
return false;
|
||||||
|
var html = '<tr id="'+id_condition+'"><td>{l s='Category'}</td><td>'+$('#id_category option:selected').html()+'</td><td><a href="#" onclick="delete_condition(\''+id_condition+'\');"><img src="../img/admin/delete.gif" /></a></td></tr>';
|
||||||
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#add_condition_manufacturer').click(function() {
|
$('#add_condition_manufacturer').click(function() {
|
||||||
add_condition(current_id_condition_group, 'manufacturer', $('#id_manufacturer option:selected').val());
|
var id_condition = add_condition(current_id_condition_group, 'manufacturer', $('#id_manufacturer option:selected').val());
|
||||||
var html = '<tr><td>{l s='Manufacturer'}</td><td>'+$('#id_manufacturer option:selected').html()+'</td></tr>';
|
if (!id_condition)
|
||||||
|
return false;
|
||||||
|
var html = '<tr id="'+id_condition+'"><td>{l s='Manufacturer'}</td><td>'+$('#id_manufacturer option:selected').html()+'</td><td><a href="#" onclick="delete_condition(\''+id_condition+'\');"><img src="../img/admin/delete.gif" /></a></td></tr>';
|
||||||
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#add_condition_supplier').click(function() {
|
$('#add_condition_supplier').click(function() {
|
||||||
add_condition(current_id_condition_group, 'supplier', $('#id_supplier option:selected').val());
|
var id_condition = add_condition(current_id_condition_group, 'supplier', $('#id_supplier option:selected').val());
|
||||||
var html = '<tr><td>{l s='Supplier'}</td><td>'+$('#id_supplier option:selected').html()+'</td></tr>';
|
if (!id_condition)
|
||||||
|
return false;
|
||||||
|
var html = '<tr id="'+id_condition+'"><td>{l s='Supplier'}</td><td>'+$('#id_supplier option:selected').html()+'</td><td><a href="#" onclick="delete_condition(\''+id_condition+'\');"><img src="../img/admin/delete.gif" /></a></td></tr>';
|
||||||
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#add_condition_attribute').click(function() {
|
$('#add_condition_attribute').click(function() {
|
||||||
add_condition(current_id_condition_group, 'attribute', $('#id_attribute_'+$('#id_attribute_group option:selected').val()+' option:selected').val());
|
var id_condition = add_condition(current_id_condition_group, 'attribute', $('#id_attribute_'+$('#id_attribute_group option:selected').val()+' option:selected').val());
|
||||||
var html = '<tr><td>{l s='Attribute'}</td><td>'+$('#id_attribute_group option:selected').html()+': '+$('#id_attribute_'+$('#id_attribute_group option:selected').val()+' option:selected').html()+'</td></tr>';
|
if (!id_condition)
|
||||||
|
return false;
|
||||||
|
var html = '<tr id="'+id_condition+'"><td>{l s='Attribute'}</td><td>'+$('#id_attribute_group option:selected').html()+': '+$('#id_attribute_'+$('#id_attribute_group option:selected').val()+' option:selected').html()+'</td><td><a href="#" onclick="delete_condition(\''+id_condition+'\');"><img src="../img/admin/delete.gif" /></a></td></tr>';
|
||||||
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#add_condition_feature').click(function() {
|
$('#add_condition_feature').click(function() {
|
||||||
add_condition(current_id_condition_group, 'feature', $('#id_feature_'+$('#id_feature option:selected').val()+' option:selected').val());
|
var id_condition = add_condition(current_id_condition_group, 'feature', $('#id_feature_'+$('#id_feature option:selected').val()+' option:selected').val());
|
||||||
var html = '<tr><td>{l s='Feature'}</td><td>'+$('#id_feature option:selected').html()+': '+$('#id_feature_'+$('#id_feature option:selected').val()+' option:selected').html()+'</td></tr>';
|
if (!id_condition)
|
||||||
|
return false;
|
||||||
|
var html = '<tr id="'+id_condition+'"><td>{l s='Feature'}</td><td>'+$('#id_feature option:selected').html()+': '+$('#id_feature_'+$('#id_feature option:selected').val()+' option:selected').html()+'</td><td><a href="#" onclick="delete_condition(\''+id_condition+'\');"><img src="../img/admin/delete.gif" /></a></td></tr>';
|
||||||
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
$('#condition_group_'+current_id_condition_group+' table tbody').append(html);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
{extends file="helpers/view/view.tpl"}
|
{extends file="helpers/view/view.tpl"}
|
||||||
|
|
||||||
{block name="override_tpl"}
|
{block name="override_tpl"}
|
||||||
<script language="javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
|
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
|
||||||
var btn_submit_calendar = $('#submitDatePicker');
|
var btn_submit_calendar = $('#submitDatePicker');
|
||||||
|
|||||||
@@ -49,13 +49,13 @@
|
|||||||
<h3><a href="?tab=AdminProducts&id_product={$product->id}&updateproduct&token={getAdminToken tab='AdminProducts'}">{$product->name}</a></h3>
|
<h3><a href="?tab=AdminProducts&id_product={$product->id}&updateproduct&token={getAdminToken tab='AdminProducts'}">{$product->name}</a></h3>
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
|
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col></col>
|
<col>
|
||||||
<col width="190"></col>
|
<col width="190">
|
||||||
<col width="190"></col>
|
<col width="190">
|
||||||
<col width="80"></col>
|
<col width="80">
|
||||||
<col width="80"></col>
|
<col width="80">
|
||||||
<col width="80"></col>
|
<col width="80">
|
||||||
<col width="80"></col>
|
<col width="80">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="height:40px;">{l s='Attribute name'}</th>
|
<th style="height:40px;">{l s='Attribute name'}</th>
|
||||||
|
|||||||
+1
-1
@@ -68,7 +68,7 @@ $(document).ready(function() {
|
|||||||
<img src="../img/admin/pdf.gif" alt="{l s='Supply Order State'}">
|
<img src="../img/admin/pdf.gif" alt="{l s='Supply Order State'}">
|
||||||
{l s='Print the supply order form'}
|
{l s='Print the supply order form'}
|
||||||
</legend>
|
</legend>
|
||||||
<a href="{$link->getAdminLink('AdminPdf')}&submitAction=generateSupplyOrderFormPDF&id_supply_order={$supply_order->id}" target="_blank" title="Export as PDF">{l s='Click here to download the supply order form'}.</a>
|
<a href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateSupplyOrderFormPDF&id_supply_order={$supply_order->id}" target="_blank" title="Export as PDF">{l s='Click here to download the supply order form'}.</a>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
*}
|
*}
|
||||||
{extends file="helpers/list/list_header.tpl"}
|
{extends file="helpers/list/list_header.tpl"}
|
||||||
{block name=override_header}
|
{block name=override_header}
|
||||||
<script language="javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('input.quantity_received_today').live('click', function() {
|
$('input.quantity_received_today').live('click', function() {
|
||||||
/* checks checkbox when the input is clicked */
|
/* checks checkbox when the input is clicked */
|
||||||
|
|||||||
@@ -31,31 +31,31 @@
|
|||||||
<h3>{l s='Products'}</h3>
|
<h3>{l s='Products'}</h3>
|
||||||
<table class="double_select">
|
<table class="double_select">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
|
||||||
<select multiple id="select_left" name="products[]">
|
|
||||||
{foreach from=$field.products item='product'}
|
|
||||||
<option value="{$product.id_product}">{$product.name}</option>
|
|
||||||
{/foreach}
|
|
||||||
</select>
|
|
||||||
<span class="hint" name="help_box">{l s='Double-click to move to other column'}<span class="hint-pointer"> </span></span>
|
|
||||||
<br /><br />
|
|
||||||
<a href="#" id="move_to_right" class="multiple_select_remove">
|
|
||||||
{l s='Remove'} >>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td style="padding-left:20px;">
|
<td style="padding-left:20px;">
|
||||||
<select multiple id="select_right">
|
<select multiple id="select_left">
|
||||||
{foreach from=$field.products_unselected item='product'}
|
{foreach from=$field.products_unselected item='product'}
|
||||||
<option value="{$product.id_product}">{$product.name}</option>
|
<option value="{$product.id_product}">{$product.name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
<span class="hint" name="help_box">{l s='Double-click to move to other column'}<span class="hint-pointer"> </span></span>
|
<span class="hint" name="help_box">{l s='Double-click to move to other column'}<span class="hint-pointer"> </span></span>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<a href="#" id="move_to_left" class="multiple_select_add">
|
<a href="#" id="move_to_right" class="multiple_select_add">
|
||||||
<< {l s='Add'}
|
{l s='Add'} >>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<select multiple id="select_right" name="products[]">
|
||||||
|
{foreach from=$field.products item='product'}
|
||||||
|
<option selected="selected" value="{$product.id_product}">{$product.name}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
<span class="hint" name="help_box">{l s='Double-click to move to other column'}<span class="hint-pointer"> </span></span>
|
||||||
|
<br /><br />
|
||||||
|
<a href="#" id="move_to_left" class="multiple_select_remove">
|
||||||
|
<< {l s='Remove'}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
});
|
});
|
||||||
$('#tag_form').submit(function()
|
$('#tag_form').submit(function()
|
||||||
{
|
{
|
||||||
$('#select_left option').each(function(i){
|
$('#select_right option').each(function(i){
|
||||||
$(this).attr("selected", "selected");
|
$(this).attr("selected", "selected");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -68,7 +68,8 @@
|
|||||||
</select>
|
</select>
|
||||||
<select name="theme" style="float:left; margin-right:10px;">
|
<select name="theme" style="float:left; margin-right:10px;">
|
||||||
{foreach $themes as $theme}
|
{foreach $themes as $theme}
|
||||||
<option value="{$theme->directory}">{$theme->name} </option>
|
|
||||||
|
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name} </option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
{foreach $languages as $language}
|
{foreach $languages as $language}
|
||||||
@@ -152,7 +153,7 @@
|
|||||||
|
|
||||||
<select name="theme" style="margin-top:10px;">
|
<select name="theme" style="margin-top:10px;">
|
||||||
{foreach $themes as $theme}
|
{foreach $themes as $theme}
|
||||||
<option value="{$theme->directory}">{$theme->name}</option>
|
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" class="button" name="submitExport" value="{l s='Export'}" />
|
<input type="submit" class="button" name="submitExport" value="{l s='Export'}" />
|
||||||
@@ -176,7 +177,7 @@
|
|||||||
|
|
||||||
<select name="fromTheme">
|
<select name="fromTheme">
|
||||||
{foreach $themes as $theme}
|
{foreach $themes as $theme}
|
||||||
<option value="{$theme->directory}">{$theme->name}</option>
|
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select> <span style="font-style: bold; color: red;">*</span>
|
</select> <span style="font-style: bold; color: red;">*</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -190,7 +191,7 @@
|
|||||||
|
|
||||||
<select name="toTheme">
|
<select name="toTheme">
|
||||||
{foreach $themes as $theme}
|
{foreach $themes as $theme}
|
||||||
<option value="{$theme->directory}">{$theme->name}</option>
|
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
@@ -198,7 +199,7 @@
|
|||||||
<div style="float:left;">
|
<div style="float:left;">
|
||||||
<input type="submit" value="{l s=' Copy '}" name="submitCopyLang" class="button" style="margin:25px 0px 0px 25px;" />
|
<input type="submit" value="{l s=' Copy '}" name="submitCopyLang" class="button" style="margin:25px 0px 0px 25px;" />
|
||||||
</div>
|
</div>
|
||||||
<p style="clear: left; padding: 16px 0px 0px 0px;"><span style="font-style: bold; color: red;">*</span> {l s='Language files (as indicated at Tools > Languages > Edition) must be complete to allow copying of translations'}</p>
|
<p style="clear: left; padding: 16px 0px 0px 0px;"><span style="font-style: bold; color: red;">*</span> {l s='Language files must be complete to allow copying of translations'}</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
{/block}
|
{/block}
|
||||||
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
{block name="override_tpl"}
|
{block name="override_tpl"}
|
||||||
|
|
||||||
{if $post_limit_exceeded}
|
{if !empty($limit_warning)}
|
||||||
<div class="warn">
|
<div class="warn">
|
||||||
{if $limit_warning['error_type'] == 'suhosin'}
|
{if $limit_warning['error_type'] == 'suhosin'}
|
||||||
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
|
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
|
||||||
|
|||||||
+2
-2
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
{block name="override_tpl"}
|
{block name="override_tpl"}
|
||||||
|
|
||||||
{if $post_limit_exceeded}
|
{if !empty($limit_warning)}
|
||||||
<div class="warn">
|
<div class="warn">
|
||||||
{if $limit_warning['error_type'] == 'suhosin'}
|
{if $limit_warning['error_type'] == 'suhosin'}
|
||||||
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
|
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
|
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
|
||||||
{l s='Please ask your hosting provider to increase the suhosin post and request a limit of'}
|
{l s='Please ask your hosting provider to increase the suhosin post and request a limit of'}
|
||||||
{else}
|
{else}
|
||||||
{l s='Warning, your PHP configuration limits the maximum number of fields to post in a form:'}<br/>
|
{l s='Warning, your PHP configuration limits the maximum number of fields to post in a form:'}
|
||||||
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
|
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
|
||||||
{l s='Please ask your hosting provider to increase the this limit to'}
|
{l s='Please ask your hosting provider to increase the this limit to'}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
{$tinyMCE}
|
{$tinyMCE}
|
||||||
|
|
||||||
{if $post_limit_exceeded}
|
{if !empty($limit_warning)}
|
||||||
<div class="warn">
|
<div class="warn">
|
||||||
{if $limit_warning['error_type'] == 'suhosin'}
|
{if $limit_warning['error_type'] == 'suhosin'}
|
||||||
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
|
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
|
||||||
|
|||||||
+3
-3
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
{block name="override_tpl"}
|
{block name="override_tpl"}
|
||||||
|
|
||||||
{if $post_limit_exceeded}
|
{if !empty($limit_warning)}
|
||||||
<div class="warn">
|
<div class="warn">
|
||||||
{if $limit_warning['error_type'] == 'suhosin'}
|
{if $limit_warning['error_type'] == 'suhosin'}
|
||||||
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
|
{l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'}
|
||||||
@@ -108,10 +108,10 @@
|
|||||||
{$missing_translations_module = 0}
|
{$missing_translations_module = 0}
|
||||||
{/if}
|
{/if}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend style="cursor : pointer" onclick="$('#{$theme_name}_{$module_name}_{$template_name}').slideToggle();">{if $theme_name === 'default'}{l s='default'}{else}{$theme_name}{/if} - {$template_name}
|
<legend style="cursor : pointer" onclick="$('#{$theme_name}_{$module_name}_{$template_name|replace:'.':'_'}').slideToggle();">{if $theme_name === 'default'}{l s='default'}{else}{$theme_name}{/if} - {$template_name}
|
||||||
<font color="blue">{$newLang|count}</font> {l s='expressions'} (<font color="red">{$missing_translations_module}</font>)
|
<font color="blue">{$newLang|count}</font> {l s='expressions'} (<font color="red">{$missing_translations_module}</font>)
|
||||||
</legend>
|
</legend>
|
||||||
<div name="{$type}_div" id="{$theme_name}_{$module_name}_{$template_name}" style="display:{if $missing_translations_module}block{else}none{/if}">
|
<div name="{$type}_div" id="{$theme_name}_{$module_name}_{$template_name|replace:'.':'_'}" style="display:{if $missing_translations_module}block{else}none{/if}">
|
||||||
<table cellpadding="2">
|
<table cellpadding="2">
|
||||||
{foreach $newLang as $key => $value}
|
{foreach $newLang as $key => $value}
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -24,7 +24,9 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
|
|
||||||
|
<div style="clear:both;height:0;line-height:0"> </div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="clear:both;height:0;line-height:0"> </div>
|
||||||
</div>
|
</div>
|
||||||
{if $display_footer}
|
{if $display_footer}
|
||||||
{hook h="displayBackOfficeFooter"}
|
{hook h="displayBackOfficeFooter"}
|
||||||
|
|||||||
@@ -81,19 +81,19 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<link rel="shortcut icon" href="{$img_dir}favicon.ico" />
|
<link rel="shortcut icon" href="{$img_dir}favicon.ico" />
|
||||||
{if $display_header}
|
{if isset($displayBackOfficeHeader)}
|
||||||
{hook h="displayBackOfficeHeader"}
|
{$displayBackOfficeHeader}
|
||||||
{/if}
|
{/if}
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<link type="text/css" rel="stylesheet" href="{$base_url}css/admin-ie.css" />
|
<link type="text/css" rel="stylesheet" href="{$base_url}css/admin-ie.css" />
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
{if isset($brightness)}
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
div#header_infos, div#header_infos a#header_shopname, div#header_infos a#header_logout, div#header_infos a#header_foaccess {
|
div#header_infos, div#header_infos a#header_shopname, div#header_infos a#header_logout, div#header_infos a#header_foaccess {ldelim}color:{$brightness}{rdelim}
|
||||||
color:{$brightness}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
{/if}
|
||||||
</head>
|
</head>
|
||||||
<body style="{if $bo_color}background:{$bo_color};{/if}{if $bo_width > 0}text-align:center;{/if}">
|
<body style="{if isset($bo_color) && $bo_color}background:{$bo_color};{/if}{if isset($bo_width) && $bo_width > 0}text-align:center;{/if}">
|
||||||
{if $display_header}
|
{if $display_header}
|
||||||
<div id="ajax_running"><img src="../img/admin/ajax-loader-yellow.gif" alt="" /> {l s='Loading...'}</div>
|
<div id="ajax_running"><img src="../img/admin/ajax-loader-yellow.gif" alt="" /> {l s='Loading...'}</div>
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
{* begin HEADER *}
|
{* begin HEADER *}
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="header_infos">
|
<div id="header_infos">
|
||||||
<a id="header_shopname" href="{$link->getAdminLink('AdminHome')}"><span>{$shop_name}</span></a><div id="notifs_icon_wrapper">
|
<a id="header_shopname" href="{$link->getAdminLink('AdminHome')|escape:'htmlall':'UTF-8'}"><span>{$shop_name}</span></a><div id="notifs_icon_wrapper">
|
||||||
{if {$show_new_orders} == 1}
|
{if {$show_new_orders} == 1}
|
||||||
<div id="orders_notif" class="notifs">
|
<div id="orders_notif" class="notifs">
|
||||||
<span id="orders_notif_number_wrapper" class="number_wrapper">
|
<span id="orders_notif_number_wrapper" class="number_wrapper">
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<h3>{l s='Last orders'}</h3>
|
<h3>{l s='Last orders'}</h3>
|
||||||
<p class="no_notifs">{l s='No new orders has been placed on your shop'}</p>
|
<p class="no_notifs">{l s='No new orders has been placed on your shop'}</p>
|
||||||
<ul id="list_orders_notif"></ul>
|
<ul id="list_orders_notif"></ul>
|
||||||
<p><a href="index.php?controller=AdminOrders&token={getAdminToken tab='AdminOrders'}">{l s='Show all orders'}</a></p>
|
<p><a href="index.php?controller=AdminOrders&token={getAdminToken tab='AdminOrders'}">{l s='Show all orders'}</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
<h3>{l s='Last customers'}</h3>
|
<h3>{l s='Last customers'}</h3>
|
||||||
<p class="no_notifs">{l s='No new customers registered on your shop'}</p>
|
<p class="no_notifs">{l s='No new customers registered on your shop'}</p>
|
||||||
<ul id="list_customers_notif"></ul>
|
<ul id="list_customers_notif"></ul>
|
||||||
<p><a href="index.php?controller=AdminCustomers&token={getAdminToken tab='AdminCustomers'}">{l s='Show all customers'}</a></p>
|
<p><a href="index.php?controller=AdminCustomers&token={getAdminToken tab='AdminCustomers'}">{l s='Show all customers'}</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -138,24 +138,24 @@
|
|||||||
<h3>{l s='Last messages'}</h3>
|
<h3>{l s='Last messages'}</h3>
|
||||||
<p class="no_notifs">{l s='No new messages posted on your shop'}</p>
|
<p class="no_notifs">{l s='No new messages posted on your shop'}</p>
|
||||||
<ul id="list_customer_messages_notif"></ul>
|
<ul id="list_customer_messages_notif"></ul>
|
||||||
<p><a href="index.php?tab=AdminCustomerThreads&token={getAdminToken tab='AdminCustomerThreads'}">{l s='Show all messages'}</a></p>
|
<p><a href="index.php?tab=AdminCustomerThreads&token={getAdminToken tab='AdminCustomerThreads'}">{l s='Show all messages'}</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<span id="employee_links">
|
<div id="employee_links">
|
||||||
<span class="employee_name">{$first_name} {$last_name}</span>
|
<span class="employee_name">{$first_name} {$last_name}</span>
|
||||||
<span class="separator"></span>
|
<span class="separator"> </span>
|
||||||
<a class="employee" href="index.php?controller=AdminEmployees&id_employee={$employee->id}&updateemployee&token={getAdminToken tab='AdminEmployees'}" alt="" /> {l s='My preferences'}</a>
|
<a class="employee" href="index.php?controller=AdminEmployees&id_employee={$employee->id}&updateemployee&token={getAdminToken tab='AdminEmployees'}" alt="">{l s='My preferences'}</a>
|
||||||
<span class="separator"></span><a href="index.php?logout" id="header_logout">
|
<span class="separator"> </span>
|
||||||
<span>{l s='logout'}</span>
|
<a href="index.php?logout" id="header_logout">{l s='logout'}</a>
|
||||||
</a>
|
|
||||||
{if {$base_url}}
|
{if {$base_url}}
|
||||||
<span class="separator"></span> <a href="{$base_url}" id="header_foaccess" target="_blank" title="{l s='View my shop'}"><span>{l s='View my shop'}</span></a>
|
<span class="separator"> </span>
|
||||||
|
<a href="{$base_url}" id="header_foaccess" target="_blank" title="{l s='View my shop'}">{l s='View my shop'}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</div>
|
||||||
<div id="header_search">
|
<div id="header_search">
|
||||||
<form method="post" action="index.php?controller=AdminSearch&token={getAdminToken tab='AdminSearch'}">
|
<form method="post" action="index.php?controller=AdminSearch&token={getAdminToken tab='AdminSearch'}">
|
||||||
<input type="text" name="bo_query" id="bo_query" value="{$bo_query}" />
|
<input type="text" name="bo_query" id="bo_query" value="{$bo_query}" />
|
||||||
<select name="bo_search_type" id="bo_search_type" class="chosen no-search">
|
<select name="bo_search_type" id="bo_search_type" class="chosen no-search">
|
||||||
<option value="0">{l s='everywhere'}</option>
|
<option value="0">{l s='everywhere'}</option>
|
||||||
@@ -178,41 +178,49 @@
|
|||||||
function quickSelect(elt)
|
function quickSelect(elt)
|
||||||
{
|
{
|
||||||
var eltVal = $(elt).val();
|
var eltVal = $(elt).val();
|
||||||
if (eltVal == "0") return false;
|
if (eltVal == "0")
|
||||||
else if (eltVal.substr(eltVal.length - 6) == '_blank') window.open(eltVal.substr(0, eltVal.length - 6), '_blank');
|
return false;
|
||||||
else location.href = eltVal;
|
else if (eltVal.substr(eltVal.length - 6) == '_blank')
|
||||||
|
window.open(eltVal.substr(0, eltVal.length - 6), '_blank');
|
||||||
|
else
|
||||||
|
location.href = eltVal;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<select onchange="quickSelect(this);" id="quick_select" class="chosen no-search">
|
<select onchange="quickSelect(this);" id="quick_select" class="chosen no-search">
|
||||||
<option value="0">{l s='Quick Access'}</option>
|
<option value="0">{l s='Quick Access'}</option>
|
||||||
{foreach $quick_access as $quick}
|
{foreach $quick_access as $quick}
|
||||||
<option value="{$quick.link}{if $quick.new_window}_blank{/if}">» {$quick.name}</option>
|
<option value="{$quick.link|escape:'htmlall':'UTF-8'}{if $quick.new_window}_blank{/if}">» {$quick.name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{if isset($displayBackOfficeTop)}
|
||||||
|
{$displayBackOfficeTop}
|
||||||
|
{/if}
|
||||||
|
</div> {* end header *}
|
||||||
|
|
||||||
{hook h="displayBackOfficeTop"}
|
|
||||||
</div>
|
|
||||||
<ul id="menu">
|
<ul id="menu">
|
||||||
{if !$tab}
|
{if !$tab}
|
||||||
<div class="mainsubtablist" style="display:none">
|
<div class="mainsubtablist" style="display:none">
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{foreach $tabs AS $t}
|
{foreach $tabs AS $t}
|
||||||
|
{if $t.active}
|
||||||
<li class="submenu_size maintab {if $t.current}active{/if}" id="maintab{$t.id_tab}">
|
<li class="submenu_size maintab {if $t.current}active{/if}" id="maintab{$t.id_tab}">
|
||||||
<span class="title">
|
<span class="title">
|
||||||
<img src="{$t.img}" alt="" />{$t.name}
|
<img src="{$t.img}" alt="" />{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}
|
||||||
</span>
|
</span>
|
||||||
<ul class="submenu">
|
<ul class="submenu">
|
||||||
{foreach from=$t.sub_tabs item=t2}
|
{foreach from=$t.sub_tabs item=t2}
|
||||||
<li><a href="{$t2.href}">{$t2.name}</a></li>
|
{if $t2.active}
|
||||||
|
<li><a href="{$t2.href|escape:'htmlall':'UTF-8'}">{if $t2.name eq ''}{$t2.class_name}{else}{$t2.name|escape:'htmlall':'UTF-8'}{/if}</a></li>
|
||||||
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
</div> {* end header *}
|
|
||||||
{/if}
|
{/if}
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div id="content">
|
<div id="content">
|
||||||
@@ -224,7 +232,7 @@
|
|||||||
|
|
||||||
{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
|
{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
|
||||||
<div class="multishop_toolbar">
|
<div class="multishop_toolbar">
|
||||||
<span class="text_multishop">{l s='Multishop configuration for'}</span>
|
<span class="text_multishop">{l s='Multistore configuration for'}</span>
|
||||||
{$shop_list}
|
{$shop_list}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ function check_all_shop() {
|
|||||||
{assign var=checked value=false}
|
{assign var=checked value=false}
|
||||||
{/if}
|
{/if}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td {if $groupData['disable_shops']}style="font-style:italic;background-color:#CFC4FF"{/if}>
|
||||||
<img style="vertical-align:middle;" alt="" src="../img/admin/lv3_{if $j < count($groupData['shops']) - 1}b{else}f{/if}.png" />
|
<img style="vertical-align:middle;" alt="" src="../img/admin/lv3_{if $j < count($groupData['shops']) - 1}b{else}f{/if}.png" />
|
||||||
<label class="child">
|
<label class="child">
|
||||||
<input class="input_shop"
|
<input class="input_shop"
|
||||||
@@ -118,7 +118,9 @@ function check_all_shop() {
|
|||||||
shop_id="{$shopID}"
|
shop_id="{$shopID}"
|
||||||
name="checkBoxShopAsso_{$table}[{$shopID}]"
|
name="checkBoxShopAsso_{$table}[{$shopID}]"
|
||||||
id="checkedBox_{$shopID}"
|
id="checkedBox_{$shopID}"
|
||||||
{if $checked} checked="checked"{/if} />
|
{if $checked} checked="checked"{/if}
|
||||||
|
{if $groupData['disable_shops']} readonly="readonly" onclick="return false"{/if}
|
||||||
|
/>
|
||||||
{$shopData['name']}
|
{$shopData['name']}
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
{foreach $fieldset.form as $key => $field}
|
{foreach $fieldset.form as $key => $field}
|
||||||
{if $key == 'legend'}
|
{if $key == 'legend'}
|
||||||
<legend>
|
<legend>
|
||||||
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title|escape:'htmlall':'UTF-8'}}" />{/if}
|
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title|escape:'htmlall':'UTF-8'}" />{/if}
|
||||||
{$field.title}
|
{$field.title}
|
||||||
</legend>
|
</legend>
|
||||||
{elseif $key == 'description' && $field}
|
{elseif $key == 'description' && $field}
|
||||||
|
|||||||
@@ -23,6 +23,6 @@
|
|||||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
<a href="{$href}" class="default" title="{$action}" {if isset($name)}name="{$name}{/if}">
|
<a href="{$href}" class="default" title="{$action}" {if isset($name)}name="{$name}"{/if}>
|
||||||
<img src="../img/admin/asterisk.gif" alt="{$action}" />
|
<img src="../img/admin/asterisk.gif" alt="{$action}" />
|
||||||
</a>
|
</a>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
{block name="td_content"}
|
{block name="td_content"}
|
||||||
{if isset($params.prefix)}{$params.prefix}{/if}
|
{if isset($params.prefix)}{$params.prefix}{/if}
|
||||||
{if isset($params.color) && isset($tr[$params.color])}
|
{if isset($params.color) && isset($tr[$params.color])}
|
||||||
<span class="color_field" style="background-color: {$tr.color}">
|
<span class="color_field" style="background-color:{$tr.color};color:{if Tools::getBrightness($tr.color) < 128}white{else}#383838{/if}">
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if isset($params.active)}
|
{if isset($params.active)}
|
||||||
|
|||||||
@@ -105,13 +105,12 @@
|
|||||||
<label class="t" for="{$key}_{$k}"> {$v}</label><br />
|
<label class="t" for="{$key}_{$k}"> {$v}</label><br />
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<br />
|
<br />
|
||||||
{*{elseif $field['type'] == 'checkbox'}
|
{elseif $field['type'] == 'checkbox'}
|
||||||
{foreach $field['choices'] AS $k => $v}
|
{foreach $field['choices'] AS $k => $v}
|
||||||
<input type="checkbox" name="{$key}" id="{$key}{$k}_on" value="{$k|intval}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
|
<input type="checkbox" name="{$key}" id="{$key}{$k}_on" value="{$k|intval}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
|
||||||
<label class="t" for="{$key}{$k}_on"> {$v}</label><br />
|
<label class="t" for="{$key}{$k}_on"> {$v}</label><br />
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<br />
|
<br />
|
||||||
*}
|
|
||||||
{elseif $field['type'] == 'text'}
|
{elseif $field['type'] == 'text'}
|
||||||
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
|
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
|
||||||
{if isset($field['suffix'])} {$field['suffix']|strval}{/if}
|
{if isset($field['suffix'])} {$field['suffix']|strval}{/if}
|
||||||
|
|||||||
@@ -38,7 +38,9 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<script language="javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
//<![CDATA[
|
||||||
|
var submited = false
|
||||||
$(function() {
|
$(function() {
|
||||||
//get reference on save link
|
//get reference on save link
|
||||||
btn_save = $('span[class~="process-icon-save"]').parent();
|
btn_save = $('span[class~="process-icon-save"]').parent();
|
||||||
@@ -82,6 +84,11 @@
|
|||||||
//submit the form
|
//submit the form
|
||||||
{block name=formSubmit}
|
{block name=formSubmit}
|
||||||
btn_save.click(function() {
|
btn_save.click(function() {
|
||||||
|
// Avoid double click
|
||||||
|
if (submited)
|
||||||
|
return false;
|
||||||
|
submited = true;
|
||||||
|
|
||||||
//add hidden input to emulate submit button click when posting the form -> field name posted
|
//add hidden input to emulate submit button click when posting the form -> field name posted
|
||||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
|
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
|
||||||
|
|
||||||
@@ -102,6 +109,7 @@
|
|||||||
{/block}
|
{/block}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
<div class="pageTitle">
|
<div class="pageTitle">
|
||||||
@@ -112,7 +120,7 @@
|
|||||||
{* Use strip_tags because if the string already has been through htmlentities using escape will break it *}
|
{* Use strip_tags because if the string already has been through htmlentities using escape will break it *}
|
||||||
<span class="breadcrumb item-{$key} ">{$item|strip_tags}
|
<span class="breadcrumb item-{$key} ">{$item|strip_tags}
|
||||||
{if !$smarty.foreach.title.last}
|
{if !$smarty.foreach.title.last}
|
||||||
<img alt=">" style="margin-right:5px" src="../img/admin/separator_breadcrum.png">
|
<img alt=">" style="margin-right:5px" src="../img/admin/separator_breadcrumb.png" />
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|||||||
@@ -278,9 +278,12 @@ class AddressCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
if (isset(self::$_idCountries[$id_address]))
|
if (isset(self::$_idCountries[$id_address]))
|
||||||
return self::$_idCountries[$id_address];
|
return self::$_idCountries[$id_address];
|
||||||
|
if ($id_address)
|
||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||||
SELECT `id_country`, `id_state`, `vat_number`, `postcode` FROM `'._DB_PREFIX_.'address`
|
SELECT `id_country`, `id_state`, `vat_number`, `postcode` FROM `'._DB_PREFIX_.'address`
|
||||||
WHERE `id_address` = '.(int)$id_address);
|
WHERE `id_address` = '.(int)$id_address);
|
||||||
|
else
|
||||||
|
$result = false;
|
||||||
self::$_idCountries[$id_address] = $result;
|
self::$_idCountries[$id_address] = $result;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class AddressFormatCore extends ObjectModel
|
|||||||
'table' => 'address_format',
|
'table' => 'address_format',
|
||||||
'primary' => 'id_country',
|
'primary' => 'id_country',
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'format' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true),
|
'format' => array('type' => self::TYPE_HTML, 'validate' => 'isGenericName', 'required' => true),
|
||||||
'id_country' => array('type' => self::TYPE_INT),
|
'id_country' => array('type' => self::TYPE_INT),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
+9
-10
@@ -459,12 +459,12 @@ abstract class AdminTabCore
|
|||||||
foreach ($rules['required'] as $field)
|
foreach ($rules['required'] as $field)
|
||||||
if (($value = Tools::getValue($field)) == false && (string)$value != '0')
|
if (($value = Tools::getValue($field)) == false && (string)$value != '0')
|
||||||
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
||||||
$this->_errors[] = $this->l('the field').' <b>'.call_user_func(array($className, 'displayFieldName'), $field, $className).'</b> '.$this->l('is required');
|
$this->_errors[] = sprintf(Tools::displayError('The field %s is required.'), call_user_func(array($className, 'displayFieldName'), $field, $className));
|
||||||
|
|
||||||
/* Checking for multilingual required fields */
|
/* Checking for multilingual required fields */
|
||||||
foreach ($rules['requiredLang'] as $fieldLang)
|
foreach ($rules['requiredLang'] as $fieldLang)
|
||||||
if (($empty = Tools::getValue($fieldLang.'_'.$defaultLanguage->id)) === false || $empty !== '0' && empty($empty))
|
if (($empty = Tools::getValue($fieldLang.'_'.$defaultLanguage->id)) === false || $empty !== '0' && empty($empty))
|
||||||
$this->_errors[] = $this->l('the field').' <b>'.call_user_func(array($className, 'displayFieldName'), $fieldLang, $className).'</b> '.$this->l('is required at least in').' '.$defaultLanguage->name;
|
$this->_errors[] = sprintf(Tools::displayError('The field %1$s is required at least in %2$s.'), call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), $defaultLanguage->name);
|
||||||
|
|
||||||
/* Checking for maximum fields sizes */
|
/* Checking for maximum fields sizes */
|
||||||
foreach ($rules['size'] as $field => $maxLength)
|
foreach ($rules['size'] as $field => $maxLength)
|
||||||
@@ -476,7 +476,6 @@ abstract class AdminTabCore
|
|||||||
foreach ($languages as $language)
|
foreach ($languages as $language)
|
||||||
if (Tools::getValue($fieldLang.'_'.$language['id_lang']) !== false && Tools::strlen(Tools::getValue($fieldLang.'_'.$language['id_lang'])) > $maxLength)
|
if (Tools::getValue($fieldLang.'_'.$language['id_lang']) !== false && Tools::strlen(Tools::getValue($fieldLang.'_'.$language['id_lang'])) > $maxLength)
|
||||||
$this->_errors[] = sprintf(Tools::displayError('field %1$s is too long. (%2$d chars max, html chars including)'), call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), $maxLength);
|
$this->_errors[] = sprintf(Tools::displayError('field %1$s is too long. (%2$d chars max, html chars including)'), call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), $maxLength);
|
||||||
$this->_errors[] = $this->l('the field').' <b>'.call_user_func(array($className, 'displayFieldName'), $fieldLang, $className).' ('.$language['name'].')</b> '.$this->l('is too long').' ('.$maxLength.' '.$this->l('chars max, html chars including').')';
|
|
||||||
|
|
||||||
/* Overload this method for custom checking */
|
/* Overload this method for custom checking */
|
||||||
$this->_childValidation();
|
$this->_childValidation();
|
||||||
@@ -485,15 +484,15 @@ abstract class AdminTabCore
|
|||||||
foreach ($rules['validate'] AS $field => $function)
|
foreach ($rules['validate'] AS $field => $function)
|
||||||
if (($value = Tools::getValue($field)) !== false AND !empty($value) AND ($field != 'passwd'))
|
if (($value = Tools::getValue($field)) !== false AND !empty($value) AND ($field != 'passwd'))
|
||||||
if (!Validate::$function($value))
|
if (!Validate::$function($value))
|
||||||
$this->_errors[] = $this->l('the field').' <b>'.call_user_func(array($className, 'displayFieldName'), $field, $className).'</b> '.$this->l('is invalid');
|
$this->_errors[] = sprintf(Tools::displayError('The field %1$s (%2$s) is invalid.'), call_user_func(array($className, 'displayFieldName'), $field, $className));
|
||||||
|
|
||||||
/* Checking for passwd_old validity */
|
/* Checking for passwd_old validity */
|
||||||
if (($value = Tools::getValue('passwd')) != false)
|
if (($value = Tools::getValue('passwd')) != false)
|
||||||
{
|
{
|
||||||
if ($className == 'Employee' && !Validate::isPasswdAdmin($value))
|
if ($className == 'Employee' && !Validate::isPasswdAdmin($value))
|
||||||
$this->_errors[] = $this->l('the field').' <b>'.call_user_func(array($className, 'displayFieldName'), 'passwd', $className).'</b> '.$this->l('is invalid');
|
$this->_errors[] = sprintf(Tools::displayError('The field %1$s (%2$s) is invalid.'), call_user_func(array($className, 'displayFieldName'), 'passwd', $className));
|
||||||
elseif ($className == 'Customer' && !Validate::isPasswd($value))
|
elseif ($className == 'Customer' && !Validate::isPasswd($value))
|
||||||
$this->_errors[] = $this->l('the field').' <b>'.call_user_func(array($className, 'displayFieldName'), 'passwd', $className).'</b> '.$this->l('is invalid');
|
$this->_errors[] = sprintf(Tools::displayError('The field %1$s (%2$s) is invalid.'), call_user_func(array($className, 'displayFieldName'), 'passwd', $className));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Checking for multilingual fields validity */
|
/* Checking for multilingual fields validity */
|
||||||
@@ -501,7 +500,7 @@ abstract class AdminTabCore
|
|||||||
foreach ($languages as $language)
|
foreach ($languages as $language)
|
||||||
if (($value = Tools::getValue($fieldLang.'_'.$language['id_lang'])) !== false && !empty($value))
|
if (($value = Tools::getValue($fieldLang.'_'.$language['id_lang'])) !== false && !empty($value))
|
||||||
if (!Validate::$function($value))
|
if (!Validate::$function($value))
|
||||||
$this->_errors[] = $this->l('the field').' <b>'.call_user_func(array($className, 'displayFieldName'), $fieldLang, $className).' ('.$language['name'].')</b> '.$this->l('is invalid');
|
$this->_errors[] = sprintf(Tools::displayError('The field %1$s (%2$s) is invalid.'), call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), $language['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1304,10 +1303,10 @@ abstract class AdminTabCore
|
|||||||
$whereShop = Shop::addSqlRestriction($this->shopShareDatas, 'a', $this->shopLinkType);
|
$whereShop = Shop::addSqlRestriction($this->shopShareDatas, 'a', $this->shopLinkType);
|
||||||
}
|
}
|
||||||
|
|
||||||
$assos = Shop::getAssoTables();
|
$asso = Shop::getAssoTable($this->table);
|
||||||
if (isset($assos[$this->table]) && $assos[$this->table]['type'] == 'shop')
|
if ($asso !== false && $assos['type'] == 'shop')
|
||||||
{
|
{
|
||||||
$filterKey = $assos[$this->table]['type'];
|
$filterKey = $asso['type'];
|
||||||
$idenfierShop = Shop::getContextListShopID();
|
$idenfierShop = Shop::getContextListShopID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-18
@@ -50,7 +50,7 @@ class AttributeCore extends ObjectModel
|
|||||||
|
|
||||||
// Lang fields
|
// Lang fields
|
||||||
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
|
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64),
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -73,30 +73,21 @@ class AttributeCore extends ObjectModel
|
|||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
$result = Db::getInstance()->executeS('
|
if (!$this->hasMultishopEntries())
|
||||||
SELECT `id_product_attribute`
|
|
||||||
FROM `'._DB_PREFIX_.'product_attribute_combination`
|
|
||||||
WHERE `'.$this->def['primary'].'` = '.(int)$this->id
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($result === false)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
$combination_ids = array();
|
|
||||||
if (Db::getInstance()->numRows())
|
|
||||||
{
|
{
|
||||||
|
$result = Db::getInstance()->executeS('SELECT id_product_attribute FROM '._DB_PREFIX_.'product_attribute_combination WHERE id_attribute = '.(int)$this->id);
|
||||||
foreach ($result as $row)
|
foreach ($result as $row)
|
||||||
$combination_ids[] = (int)$row['id_product_attribute'];
|
{
|
||||||
|
$combination = new Combination($row['id_product_attribute']);
|
||||||
$combinations = new Collection('Combination');
|
|
||||||
$combinations->where('id_product', '=', $this->id);
|
|
||||||
foreach ($combinations as $combination)
|
|
||||||
$combination->delete();
|
$combination->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete associated restrictions on cart rules
|
||||||
|
CartRule::cleanProductRuleIntegrity('attributes', $this->id);
|
||||||
|
|
||||||
/* Reinitializing position */
|
/* Reinitializing position */
|
||||||
$this->cleanPositions((int)$this->id_attribute_group);
|
$this->cleanPositions((int)$this->id_attribute_group);
|
||||||
|
}
|
||||||
$return = parent::delete();
|
$return = parent::delete();
|
||||||
if ($return)
|
if ($return)
|
||||||
Hook::exec('actionAttributeDelete', array('id_attribute' => $this->id));
|
Hook::exec('actionAttributeDelete', array('id_attribute' => $this->id));
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ class AttributeGroupCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
|
{
|
||||||
|
if (!$this->hasMultishopEntries())
|
||||||
{
|
{
|
||||||
/* Select children in order to find linked combinations */
|
/* Select children in order to find linked combinations */
|
||||||
$attribute_ids = Db::getInstance()->executeS('
|
$attribute_ids = Db::getInstance()->executeS('
|
||||||
@@ -137,6 +139,7 @@ class AttributeGroupCore extends ObjectModel
|
|||||||
IN (SELECT id_attribute FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id.')') === false ||
|
IN (SELECT id_attribute FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id.')') === false ||
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id) === false)
|
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id) === false)
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
$return = parent::delete();
|
$return = parent::delete();
|
||||||
if ($return)
|
if ($return)
|
||||||
Hook::exec('actionAttributeGroupDelete', array('id_attribute_group' => $this->id));
|
Hook::exec('actionAttributeGroupDelete', array('id_attribute_group' => $this->id));
|
||||||
@@ -157,6 +160,7 @@ class AttributeGroupCore extends ObjectModel
|
|||||||
return Db::getInstance()->executeS('
|
return Db::getInstance()->executeS('
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM `'._DB_PREFIX_.'attribute` a
|
FROM `'._DB_PREFIX_.'attribute` a
|
||||||
|
'.Shop::addSqlAssociation('attribute', 'a').'
|
||||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||||
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.')
|
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.')
|
||||||
WHERE a.`id_attribute_group` = '.(int)$id_attribute_group.'
|
WHERE a.`id_attribute_group` = '.(int)$id_attribute_group.'
|
||||||
@@ -176,8 +180,9 @@ class AttributeGroupCore extends ObjectModel
|
|||||||
return array();
|
return array();
|
||||||
|
|
||||||
return Db::getInstance()->executeS('
|
return Db::getInstance()->executeS('
|
||||||
SELECT *
|
SELECT DISTINCT agl.`name`, ag.*, agl.*
|
||||||
FROM `'._DB_PREFIX_.'attribute_group` ag
|
FROM `'._DB_PREFIX_.'attribute_group` ag
|
||||||
|
'.Shop::addSqlAssociation('attribute_group', 'ag').'
|
||||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||||
ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND `id_lang` = '.(int)$id_lang.')
|
ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND `id_lang` = '.(int)$id_lang.')
|
||||||
ORDER BY `name` ASC
|
ORDER BY `name` ASC
|
||||||
|
|||||||
+3
-11
@@ -93,32 +93,24 @@ class Autoload
|
|||||||
// If requested class does not exist, load associated core class
|
// If requested class does not exist, load associated core class
|
||||||
if (isset($this->index[$classname]) && !$this->index[$classname])
|
if (isset($this->index[$classname]) && !$this->index[$classname])
|
||||||
{
|
{
|
||||||
require_once($this->root_dir.$this->index[$classname.'Core']);
|
require($this->root_dir.$this->index[$classname.'Core']);
|
||||||
if (file_exists($this->root_dir.'override/'.$this->index[$classname.'Core']))
|
|
||||||
{
|
|
||||||
$this->generateIndex();
|
|
||||||
require_once($this->root_dir.$this->index[$classname]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Since the classname does not exists (we only have a classCore class), we have to emulate the declaration of this class
|
// Since the classname does not exists (we only have a classCore class), we have to emulate the declaration of this class
|
||||||
$class_infos = new ReflectionClass($classname.'Core');
|
$class_infos = new ReflectionClass($classname.'Core');
|
||||||
eval(($class_infos->isAbstract() ? 'abstract ' : '').'class '.$classname.' extends '.$classname.'Core {}');
|
eval(($class_infos->isAbstract() ? 'abstract ' : '').'class '.$classname.' extends '.$classname.'Core {}');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// request a non Core Class load the associated Core class if exists
|
// request a non Core Class load the associated Core class if exists
|
||||||
if (isset($this->index[$classname.'Core']))
|
if (isset($this->index[$classname.'Core']))
|
||||||
require_once($this->root_dir.$this->index[$classname.'Core']);
|
require_once($this->root_dir.$this->index[$classname.'Core']);
|
||||||
|
|
||||||
if (isset($this->index[$classname]))
|
if (isset($this->index[$classname]))
|
||||||
require_once($this->root_dir.$this->index[$classname]);
|
require_once($this->root_dir.$this->index[$classname]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Call directly ProductCore, ShopCore class
|
// Call directly ProductCore, ShopCore class
|
||||||
else
|
else
|
||||||
require_once($this->root_dir.$this->index[$classname]);
|
require($this->root_dir.$this->index[$classname]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+26
-10
@@ -183,11 +183,9 @@ class CarrierCore extends ObjectModel
|
|||||||
$this->position = Carrier::getHigherPosition() + 1;
|
$this->position = Carrier::getHigherPosition() + 1;
|
||||||
if (!parent::add($autodate, $null_values) || !Validate::isLoadedObject($this))
|
if (!parent::add($autodate, $null_values) || !Validate::isLoadedObject($this))
|
||||||
return false;
|
return false;
|
||||||
if (!Db::getInstance()->executeS('SELECT `id_carrier` FROM `'._DB_PREFIX_.$this->def['table'].'` WHERE `deleted` = 0'))
|
if (!$count = Db::getInstance()->getValue('SELECT count(`id_carrier`) FROM `'._DB_PREFIX_.$this->def['table'].'` WHERE `deleted` = 0'))
|
||||||
return false;
|
return false;
|
||||||
if (!$num_rows = Db::getInstance()->NumRows())
|
if ($count == 1)
|
||||||
return false;
|
|
||||||
if ((int)$num_rows == 1)
|
|
||||||
Configuration::updateValue('PS_CARRIER_DEFAULT', (int)$this->id);
|
Configuration::updateValue('PS_CARRIER_DEFAULT', (int)$this->id);
|
||||||
|
|
||||||
// Register reference
|
// Register reference
|
||||||
@@ -596,7 +594,7 @@ class CarrierCore extends ObjectModel
|
|||||||
|
|
||||||
public static function checkCarrierZone($id_carrier, $id_zone)
|
public static function checkCarrierZone($id_carrier, $id_zone)
|
||||||
{
|
{
|
||||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||||
SELECT c.`id_carrier`
|
SELECT c.`id_carrier`
|
||||||
FROM `'._DB_PREFIX_.'carrier` c
|
FROM `'._DB_PREFIX_.'carrier` c
|
||||||
LEFT JOIN `'._DB_PREFIX_.'carrier_zone` cz ON (cz.`id_carrier` = c.`id_carrier`)
|
LEFT JOIN `'._DB_PREFIX_.'carrier_zone` cz ON (cz.`id_carrier` = c.`id_carrier`)
|
||||||
@@ -849,6 +847,8 @@ class CarrierCore extends ObjectModel
|
|||||||
(SELECT '.(int)$this->id.', `id_tax_rules_group`, `id_shop`
|
(SELECT '.(int)$this->id.', `id_tax_rules_group`, `id_shop`
|
||||||
FROM `'._DB_PREFIX_.'carrier_tax_rules_group_shop`
|
FROM `'._DB_PREFIX_.'carrier_tax_rules_group_shop`
|
||||||
WHERE `id_carrier`='.(int)$old_id.')');
|
WHERE `id_carrier`='.(int)$old_id.')');
|
||||||
|
// Update warehouse_carriers
|
||||||
|
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'warehouse_carrier SET id_carrier='.(int)$this->id.' WHERE id_carrier='.(int)$old_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -991,11 +991,23 @@ class CarrierCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public function getTaxesRate(Address $address)
|
public function getTaxesRate(Address $address)
|
||||||
{
|
{
|
||||||
$tax_manager = TaxManagerFactory::getManager($address, $this->getIdTaxRulesGroup());
|
$tax_calculator = $this->getTaxCalculator($address);
|
||||||
$tax_calculator = $tax_manager->getTaxCalculator();
|
|
||||||
return $tax_calculator->getTotalRate();
|
return $tax_calculator->getTotalRate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the taxes calculator associated to the carrier
|
||||||
|
*
|
||||||
|
* @since 1.5
|
||||||
|
* @param Address $address
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public function getTaxCalculator(Address $address)
|
||||||
|
{
|
||||||
|
$tax_manager = TaxManagerFactory::getManager($address, $this->getIdTaxRulesGroup());
|
||||||
|
return $tax_manager->getTaxCalculator();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This tricky method generates a sql clause to check if ranged data are overloaded by multishop
|
* This tricky method generates a sql clause to check if ranged data are overloaded by multishop
|
||||||
*
|
*
|
||||||
@@ -1144,18 +1156,22 @@ class CarrierCore extends ObjectModel
|
|||||||
$query->select('id_carrier');
|
$query->select('id_carrier');
|
||||||
$query->from('product_carrier', 'pc');
|
$query->from('product_carrier', 'pc');
|
||||||
$query->innerJoin('carrier', 'c', 'c.id_reference = pc.id_carrier_reference AND c.deleted = 0');
|
$query->innerJoin('carrier', 'c', 'c.id_reference = pc.id_carrier_reference AND c.deleted = 0');
|
||||||
$query->where('id_product = '.(int)$product->id);
|
$query->where('pc.id_product = '.(int)$product->id);
|
||||||
$query->where('id_shop = '.(int)$id_shop);
|
$query->where('pc.id_shop = '.(int)$id_shop);
|
||||||
|
|
||||||
$carriers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
$carriers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||||
|
|
||||||
if (!empty($carriers))
|
if (!empty($carriers))
|
||||||
{
|
{
|
||||||
|
//the product is linked with carriers
|
||||||
$carrier_list = array();
|
$carrier_list = array();
|
||||||
foreach ($carriers as $carrier)
|
foreach ($carriers as $carrier) //check if the linked carriers are available in current zone
|
||||||
if (Carrier::checkCarrierZone($carrier['id_carrier'], $id_zone))
|
if (Carrier::checkCarrierZone($carrier['id_carrier'], $id_zone))
|
||||||
$carrier_list[] = $carrier['id_carrier'];
|
$carrier_list[] = $carrier['id_carrier'];
|
||||||
if (!empty($carrier_list))
|
if (!empty($carrier_list))
|
||||||
return $carrier_list;
|
return $carrier_list;
|
||||||
|
else
|
||||||
|
return array();//no linked carrier are available for this zone
|
||||||
}
|
}
|
||||||
|
|
||||||
$carrier_list = array();
|
$carrier_list = array();
|
||||||
|
|||||||
+111
-25
@@ -172,6 +172,8 @@ class CartCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
if (!$this->id_lang)
|
if (!$this->id_lang)
|
||||||
$this->id_lang = Configuration::get('PS_LANG_DEFAULT');
|
$this->id_lang = Configuration::get('PS_LANG_DEFAULT');
|
||||||
|
if (!$this->id_shop)
|
||||||
|
$this->id_shop = Context::getContext()->shop->id;
|
||||||
|
|
||||||
$return = parent::add($autodate);
|
$return = parent::add($autodate);
|
||||||
Hook::exec('actionCartSave');
|
Hook::exec('actionCartSave');
|
||||||
@@ -470,10 +472,11 @@ class CartCore extends ObjectModel
|
|||||||
if (Customization::isFeatureActive())
|
if (Customization::isFeatureActive())
|
||||||
{
|
{
|
||||||
$sql->select('cu.`id_customization`, cu.`quantity` AS customization_quantity');
|
$sql->select('cu.`id_customization`, cu.`quantity` AS customization_quantity');
|
||||||
$sql->leftJoin('customization', 'cu', 'p.`id_product` = cu.`id_product`');
|
$sql->leftJoin('customization', 'cu',
|
||||||
|
'p.`id_product` = cu.`id_product` AND cp.`id_product_attribute` = cu.id_product_attribute AND cu.id_cart='.(int)$this->id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$sql->select('0 AS customization_quantity');
|
$sql->select('0 AS customization_quantity, 0 AS id_customization');
|
||||||
|
|
||||||
if (Combination::isFeatureActive())
|
if (Combination::isFeatureActive())
|
||||||
{
|
{
|
||||||
@@ -498,7 +501,6 @@ class CartCore extends ObjectModel
|
|||||||
'p.`reference` AS reference, p.`supplier_reference` AS supplier_reference, p.`ean13`,
|
'p.`reference` AS reference, p.`supplier_reference` AS supplier_reference, p.`ean13`,
|
||||||
p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity'
|
p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity'
|
||||||
);
|
);
|
||||||
|
|
||||||
$result = Db::getInstance()->executeS($sql);
|
$result = Db::getInstance()->executeS($sql);
|
||||||
|
|
||||||
// Reset the cache before the following return, or else an empty cart will add dozens of queries
|
// Reset the cache before the following return, or else an empty cart will add dozens of queries
|
||||||
@@ -1228,14 +1230,14 @@ class CartCore extends ObjectModel
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getTotalCart($id_cart, $use_tax_display = false)
|
public static function getTotalCart($id_cart, $use_tax_display = false, $type = CART::BOTH)
|
||||||
{
|
{
|
||||||
$cart = new Cart($id_cart);
|
$cart = new Cart($id_cart);
|
||||||
if (!Validate::isLoadedObject($cart))
|
if (!Validate::isLoadedObject($cart))
|
||||||
die(Tools::displayError());
|
die(Tools::displayError());
|
||||||
|
|
||||||
$with_taxes = $use_tax_display ? $cart->_taxCalculationMethod != PS_TAX_EXC : true;
|
$with_taxes = $use_tax_display ? $cart->_taxCalculationMethod != PS_TAX_EXC : true;
|
||||||
return Tools::displayPrice($cart->getOrderTotal($with_taxes), Currency::getCurrencyInstance((int)$cart->id_currency), false);
|
return Tools::displayPrice($cart->getOrderTotal($with_taxes, $type), Currency::getCurrencyInstance((int)$cart->id_currency), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1259,9 +1261,10 @@ class CartCore extends ObjectModel
|
|||||||
*
|
*
|
||||||
* @param boolean $withTaxes With or without taxes
|
* @param boolean $withTaxes With or without taxes
|
||||||
* @param integer $type Total type
|
* @param integer $type Total type
|
||||||
|
* @param boolean $use_cache Allow using cache of the method CartRule::getContextualValue
|
||||||
* @return float Order total
|
* @return float Order total
|
||||||
*/
|
*/
|
||||||
public function getOrderTotal($with_taxes = true, $type = Cart::BOTH, $products = null, $id_carrier = null)
|
public function getOrderTotal($with_taxes = true, $type = Cart::BOTH, $products = null, $id_carrier = null, $use_cache = true)
|
||||||
{
|
{
|
||||||
if (!$this->id)
|
if (!$this->id)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1312,8 +1315,12 @@ class CartCore extends ObjectModel
|
|||||||
if ($type == Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING)
|
if ($type == Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING)
|
||||||
$type = Cart::ONLY_PRODUCTS;
|
$type = Cart::ONLY_PRODUCTS;
|
||||||
|
|
||||||
|
$param_product = true;
|
||||||
if (is_null($products))
|
if (is_null($products))
|
||||||
|
{
|
||||||
|
$param_product = false;
|
||||||
$products = $this->getProducts();
|
$products = $this->getProducts();
|
||||||
|
}
|
||||||
|
|
||||||
if ($type == Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING)
|
if ($type == Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING)
|
||||||
{
|
{
|
||||||
@@ -1444,7 +1451,7 @@ class CartCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
// If the cart rule offers free shipping, add the shipping cost
|
// If the cart rule offers free shipping, add the shipping cost
|
||||||
if ($with_shipping && $cart_rule['obj']->free_shipping)
|
if ($with_shipping && $cart_rule['obj']->free_shipping)
|
||||||
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_SHIPPING), 2);
|
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_SHIPPING, ($param_product ? $package : null), $use_cache), 2);
|
||||||
|
|
||||||
// If the cart rule is a free gift, then add the free gift value only if the gift is in this package
|
// If the cart rule is a free gift, then add the free gift value only if the gift is in this package
|
||||||
if ((int)$cart_rule['obj']->gift_product)
|
if ((int)$cart_rule['obj']->gift_product)
|
||||||
@@ -1458,13 +1465,13 @@ class CartCore extends ObjectModel
|
|||||||
$in_order = true;
|
$in_order = true;
|
||||||
|
|
||||||
if ($in_order)
|
if ($in_order)
|
||||||
$order_total_discount += $cart_rule['obj']->getContextualValue($with_taxes, null, CartRule::FILTER_ACTION_GIFT, $package);
|
$order_total_discount += $cart_rule['obj']->getContextualValue($with_taxes, null, CartRule::FILTER_ACTION_GIFT, $package, $use_cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the cart rule offers a reduction, the amount is prorated (with the products in the package)
|
// If the cart rule offers a reduction, the amount is prorated (with the products in the package)
|
||||||
if ($cart_rule['obj']->reduction_percent > 0 || $cart_rule['obj']->reduction_amount > 0)
|
if ($cart_rule['obj']->reduction_percent > 0 || $cart_rule['obj']->reduction_amount > 0)
|
||||||
{
|
{
|
||||||
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_REDUCTION, $package), 2);
|
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_REDUCTION, $package, $use_cache), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1782,6 +1789,7 @@ class CartCore extends ObjectModel
|
|||||||
* unique_carrier => true, // Does this option use a unique carrier
|
* unique_carrier => true, // Does this option use a unique carrier
|
||||||
* total_price_with_tax => 12.5,
|
* total_price_with_tax => 12.5,
|
||||||
* total_price_without_tax => 12.5,
|
* total_price_without_tax => 12.5,
|
||||||
|
* position => 5, // Average of the carrier position
|
||||||
* ),
|
* ),
|
||||||
* ),
|
* ),
|
||||||
* );
|
* );
|
||||||
@@ -1798,8 +1806,10 @@ class CartCore extends ObjectModel
|
|||||||
$carrier_collection = array();
|
$carrier_collection = array();
|
||||||
$package_list = $this->getPackageList();
|
$package_list = $this->getPackageList();
|
||||||
|
|
||||||
|
// Foreach addresses
|
||||||
foreach ($package_list as $id_address => $packages)
|
foreach ($package_list as $id_address => $packages)
|
||||||
{
|
{
|
||||||
|
// Initialize vars
|
||||||
$delivery_option_list[$id_address] = array();
|
$delivery_option_list[$id_address] = array();
|
||||||
$carriers_price[$id_address] = array();
|
$carriers_price[$id_address] = array();
|
||||||
$common_carriers = null;
|
$common_carriers = null;
|
||||||
@@ -1807,13 +1817,16 @@ class CartCore extends ObjectModel
|
|||||||
$best_grade_carriers = array();
|
$best_grade_carriers = array();
|
||||||
$carriers_instance = array();
|
$carriers_instance = array();
|
||||||
|
|
||||||
|
// Get country
|
||||||
if ($id_address)
|
if ($id_address)
|
||||||
{
|
{
|
||||||
$address = new Address($id_address);
|
$address = new Address($id_address);
|
||||||
$country = new Country($address->id_country);
|
$country = new Country($address->id_country);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
$country = $default_country;
|
$country = $default_country;
|
||||||
|
|
||||||
|
// Foreach packages, get the carriers with best price, best position and best grade
|
||||||
foreach ($packages as $id_package => $package)
|
foreach ($packages as $id_package => $package)
|
||||||
{
|
{
|
||||||
// No carriers available
|
// No carriers available
|
||||||
@@ -1825,6 +1838,7 @@ class CartCore extends ObjectModel
|
|||||||
|
|
||||||
$carriers_price[$id_address][$id_package] = array();
|
$carriers_price[$id_address][$id_package] = array();
|
||||||
|
|
||||||
|
// Get all common carriers for each packages to the same address
|
||||||
if (is_null($common_carriers))
|
if (is_null($common_carriers))
|
||||||
$common_carriers = $package['carrier_list'];
|
$common_carriers = $package['carrier_list'];
|
||||||
else
|
else
|
||||||
@@ -1835,10 +1849,12 @@ class CartCore extends ObjectModel
|
|||||||
$best_grade = null;
|
$best_grade = null;
|
||||||
$best_grade_carrier = null;
|
$best_grade_carrier = null;
|
||||||
|
|
||||||
|
// Foreach carriers of the package, calculate his price, check if it the best price, position and grade
|
||||||
foreach ($package['carrier_list'] as $id_carrier)
|
foreach ($package['carrier_list'] as $id_carrier)
|
||||||
{
|
{
|
||||||
if (!isset($carriers_instance[$id_carrier]))
|
if (!isset($carriers_instance[$id_carrier]))
|
||||||
$carriers_instance[$id_carrier] = new Carrier($id_carrier);
|
$carriers_instance[$id_carrier] = new Carrier($id_carrier);
|
||||||
|
|
||||||
$price_with_tax = $this->getPackageShippingCost($id_carrier, true, $country, $package['product_list']);
|
$price_with_tax = $this->getPackageShippingCost($id_carrier, true, $country, $package['product_list']);
|
||||||
$price_without_tax = $this->getPackageShippingCost($id_carrier, false, $country, $package['product_list']);
|
$price_without_tax = $this->getPackageShippingCost($id_carrier, false, $country, $package['product_list']);
|
||||||
if (is_null($best_price) || $price_with_tax < $best_price)
|
if (is_null($best_price) || $price_with_tax < $best_price)
|
||||||
@@ -1862,9 +1878,11 @@ class CartCore extends ObjectModel
|
|||||||
$best_grade_carriers[$id_package] = $best_grade_carrier;
|
$best_grade_carriers[$id_package] = $best_grade_carrier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset $best_price_carrier, it's now an array
|
||||||
$best_price_carrier = array();
|
$best_price_carrier = array();
|
||||||
$key = '';
|
$key = '';
|
||||||
|
|
||||||
|
// Get the delivery option with the lower price
|
||||||
foreach ($best_price_carriers as $id_package => $id_carrier)
|
foreach ($best_price_carriers as $id_package => $id_carrier)
|
||||||
{
|
{
|
||||||
$key .= $id_carrier.',';
|
$key .= $id_carrier.',';
|
||||||
@@ -1882,6 +1900,7 @@ class CartCore extends ObjectModel
|
|||||||
$best_price_carrier[$id_carrier]['instance'] = $carriers_instance[$id_carrier];
|
$best_price_carrier[$id_carrier]['instance'] = $carriers_instance[$id_carrier];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add the delivery option with best price as best price
|
||||||
$delivery_option_list[$id_address][$key] = array(
|
$delivery_option_list[$id_address][$key] = array(
|
||||||
'carrier_list' => $best_price_carrier,
|
'carrier_list' => $best_price_carrier,
|
||||||
'is_best_price' => true,
|
'is_best_price' => true,
|
||||||
@@ -1889,9 +1908,11 @@ class CartCore extends ObjectModel
|
|||||||
'unique_carrier' => (count($best_price_carrier) <= 1)
|
'unique_carrier' => (count($best_price_carrier) <= 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Reset $best_grade_carrier, it's now an array
|
||||||
$best_grade_carrier = array();
|
$best_grade_carrier = array();
|
||||||
$key = '';
|
$key = '';
|
||||||
|
|
||||||
|
// Get the delivery option with the best grade
|
||||||
foreach ($best_grade_carriers as $id_package => $id_carrier)
|
foreach ($best_grade_carriers as $id_package => $id_carrier)
|
||||||
{
|
{
|
||||||
$key .= $id_carrier.',';
|
$key .= $id_carrier.',';
|
||||||
@@ -1909,15 +1930,16 @@ class CartCore extends ObjectModel
|
|||||||
$best_grade_carrier[$id_carrier]['instance'] = $carriers_instance[$id_carrier];
|
$best_grade_carrier[$id_carrier]['instance'] = $carriers_instance[$id_carrier];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add the delivery option with best grade as best grade
|
||||||
if (!isset($delivery_option_list[$id_address][$key]))
|
if (!isset($delivery_option_list[$id_address][$key]))
|
||||||
$delivery_option_list[$id_address][$key] = array(
|
$delivery_option_list[$id_address][$key] = array(
|
||||||
'carrier_list' => $best_grade_carrier,
|
'carrier_list' => $best_grade_carrier,
|
||||||
'is_best_price' => false,
|
'is_best_price' => false,
|
||||||
'unique_carrier' => (count($best_grade_carrier) <= 1)
|
'unique_carrier' => (count($best_grade_carrier) <= 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
$delivery_option_list[$id_address][$key]['is_best_grade'] = true;
|
$delivery_option_list[$id_address][$key]['is_best_grade'] = true;
|
||||||
|
|
||||||
|
// Get all delivery options with a unique carrier
|
||||||
foreach ($common_carriers as $id_carrier)
|
foreach ($common_carriers as $id_carrier)
|
||||||
{
|
{
|
||||||
$price = 0;
|
$price = 0;
|
||||||
@@ -1956,12 +1978,18 @@ class CartCore extends ObjectModel
|
|||||||
else
|
else
|
||||||
$delivery_option_list[$id_address][$key]['unique_carrier'] = (count($delivery_option_list[$id_address][$key]['carrier_list']) <= 1);
|
$delivery_option_list[$id_address][$key]['unique_carrier'] = (count($delivery_option_list[$id_address][$key]['carrier_list']) <= 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// For each delivery options :
|
||||||
|
// - Set the carrier list
|
||||||
|
// - Calculate the price
|
||||||
|
// - Calculate the average position
|
||||||
foreach ($delivery_option_list as $id_address => $delivery_option)
|
foreach ($delivery_option_list as $id_address => $delivery_option)
|
||||||
foreach ($delivery_option as $key => $value)
|
foreach ($delivery_option as $key => $value)
|
||||||
{
|
{
|
||||||
$total_price_with_tax = 0;
|
$total_price_with_tax = 0;
|
||||||
$total_price_without_tax = 0;
|
$total_price_without_tax = 0;
|
||||||
|
$position = 0;
|
||||||
foreach ($value['carrier_list'] as $id_carrier => $data)
|
foreach ($value['carrier_list'] as $id_carrier => $data)
|
||||||
{
|
{
|
||||||
$total_price_with_tax += $data['price_with_tax'];
|
$total_price_with_tax += $data['price_with_tax'];
|
||||||
@@ -1975,16 +2003,50 @@ class CartCore extends ObjectModel
|
|||||||
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = _THEME_SHIP_DIR_.$id_carrier.'.jpg';
|
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = _THEME_SHIP_DIR_.$id_carrier.'.jpg';
|
||||||
else
|
else
|
||||||
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = false;
|
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = false;
|
||||||
|
|
||||||
|
$position += $carrier_collection[$id_carrier]->position;
|
||||||
}
|
}
|
||||||
$delivery_option_list[$id_address][$key]['total_price_with_tax'] = $total_price_with_tax;
|
$delivery_option_list[$id_address][$key]['total_price_with_tax'] = $total_price_with_tax;
|
||||||
$delivery_option_list[$id_address][$key]['total_price_without_tax'] = $total_price_without_tax;
|
$delivery_option_list[$id_address][$key]['total_price_without_tax'] = $total_price_without_tax;
|
||||||
|
$delivery_option_list[$id_address][$key]['position'] = $position / count($value['carrier_list']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// Sort delivery option list
|
||||||
|
foreach ($delivery_option_list as &$array)
|
||||||
|
uasort ($array, array('Cart', 'sortDeliveryOptionList'));
|
||||||
|
|
||||||
$cache = $delivery_option_list;
|
$cache = $delivery_option_list;
|
||||||
return $delivery_option_list;
|
return $delivery_option_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Sort list of option delivery by parameters define in the BO
|
||||||
|
* @param $option1
|
||||||
|
* @param $option2
|
||||||
|
* @return int -1 if $option 1 must be placed before and 1 if the $option1 must be placed after the $option2
|
||||||
|
*/
|
||||||
|
public static function sortDeliveryOptionList($option1, $option2)
|
||||||
|
{
|
||||||
|
static $order_by_price = null;
|
||||||
|
static $order_way = null;
|
||||||
|
if (is_null($order_by_price))
|
||||||
|
$order_by_price = !Configuration::get('PS_CARRIER_DEFAULT_SORT');
|
||||||
|
if (is_null($order_way))
|
||||||
|
$order_way = Configuration::get('PS_CARRIER_DEFAULT_ORDER');
|
||||||
|
|
||||||
|
if ($order_by_price)
|
||||||
|
if ($order_way)
|
||||||
|
return ($option1['total_price_with_tax'] < $option2['total_price_with_tax']) * 2 - 1; // return -1 or 1
|
||||||
|
else
|
||||||
|
return ($option1['total_price_with_tax'] >= $option2['total_price_with_tax']) * 2 - 1; // return -1 or 1
|
||||||
|
else
|
||||||
|
if ($order_way)
|
||||||
|
return ($option1['position'] < $option2['position']) * 2 - 1; // return -1 or 1
|
||||||
|
else
|
||||||
|
return ($option1['position'] >= $option2['position']) * 2 - 1; // return -1 or 1
|
||||||
|
}
|
||||||
|
|
||||||
public function carrierIsSelected($id_carrier, $id_address)
|
public function carrierIsSelected($id_carrier, $id_address)
|
||||||
{
|
{
|
||||||
$delivery_option = $this->getDeliveryOption();
|
$delivery_option = $this->getDeliveryOption();
|
||||||
@@ -2183,8 +2245,12 @@ class CartCore extends ObjectModel
|
|||||||
* Get the delivery option seleted, or if no delivery option was selected, the cheapest option for each address
|
* Get the delivery option seleted, or if no delivery option was selected, the cheapest option for each address
|
||||||
* @return array delivery option
|
* @return array delivery option
|
||||||
*/
|
*/
|
||||||
public function getDeliveryOption($default_country = null, $dontAutoSeletectOptions = false)
|
public function getDeliveryOption($default_country = null, $dontAutoSeletectOptions = false, $use_cache = true)
|
||||||
{
|
{
|
||||||
|
static $cache = array(0 => false, 1 => false);
|
||||||
|
if ($cache[(int)$dontAutoSeletectOptions] !== false && $use_cache)
|
||||||
|
return $cache[(int)$dontAutoSeletectOptions];
|
||||||
|
|
||||||
$delivery_option_list = $this->getDeliveryOptionList($default_country);
|
$delivery_option_list = $this->getDeliveryOptionList($default_country);
|
||||||
|
|
||||||
// The delivery option was selected
|
// The delivery option was selected
|
||||||
@@ -2200,8 +2266,11 @@ class CartCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($validated)
|
if ($validated)
|
||||||
|
{
|
||||||
|
$cache[(int)$dontAutoSeletectOptions] = $delivery_option;
|
||||||
return $delivery_option;
|
return $delivery_option;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($dontAutoSeletectOptions)
|
if ($dontAutoSeletectOptions)
|
||||||
return false;
|
return false;
|
||||||
@@ -2209,12 +2278,30 @@ class CartCore extends ObjectModel
|
|||||||
// No delivery option selected or delivery option selected is not valid, get the better for all options
|
// No delivery option selected or delivery option selected is not valid, get the better for all options
|
||||||
$delivery_option = array();
|
$delivery_option = array();
|
||||||
foreach ($delivery_option_list as $id_address => $options)
|
foreach ($delivery_option_list as $id_address => $options)
|
||||||
|
{
|
||||||
foreach ($options as $key => $option)
|
foreach ($options as $key => $option)
|
||||||
if ($option['is_best_price'])
|
if (Configuration::get('PS_CARRIER_DEFAULT') == -1 && $option['is_best_price'])
|
||||||
{
|
{
|
||||||
$delivery_option[$id_address] = $key;
|
$delivery_option[$id_address] = $key;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
elseif (Configuration::get('PS_CARRIER_DEFAULT') == -2 && $option['is_best_grade'])
|
||||||
|
{
|
||||||
|
$delivery_option[$id_address] = $key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
elseif ($option['unique_carrier'] && in_array(Configuration::get('PS_CARRIER_DEFAULT'), array_keys($option['carrier_list'])))
|
||||||
|
{
|
||||||
|
$delivery_option[$id_address] = $key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
reset($options);
|
||||||
|
if (!isset($delivery_option[$id_address]))
|
||||||
|
$delivery_option[$id_address] = key($options);
|
||||||
|
}
|
||||||
|
|
||||||
|
$cache[(int)$dontAutoSeletectOptions] = $delivery_option;
|
||||||
|
|
||||||
return $delivery_option;
|
return $delivery_option;
|
||||||
}
|
}
|
||||||
@@ -2230,7 +2317,7 @@ class CartCore extends ObjectModel
|
|||||||
public function getTotalShippingCost($delivery_option = null, $use_tax = true, Country $default_country = null)
|
public function getTotalShippingCost($delivery_option = null, $use_tax = true, Country $default_country = null)
|
||||||
{
|
{
|
||||||
if (is_null($delivery_option))
|
if (is_null($delivery_option))
|
||||||
$delivery_option = $this->getDeliveryOption($default_country);
|
$delivery_option = $this->getDeliveryOption($default_country, false, false);
|
||||||
|
|
||||||
$total_shipping = 0;
|
$total_shipping = 0;
|
||||||
$delivery_option_list = $this->getDeliveryOptionList();
|
$delivery_option_list = $this->getDeliveryOptionList();
|
||||||
@@ -2458,7 +2545,7 @@ class CartCore extends ObjectModel
|
|||||||
$free_fees_price = 0;
|
$free_fees_price = 0;
|
||||||
if (isset($configuration['PS_SHIPPING_FREE_PRICE']))
|
if (isset($configuration['PS_SHIPPING_FREE_PRICE']))
|
||||||
$free_fees_price = Tools::convertPrice((float)$configuration['PS_SHIPPING_FREE_PRICE'], Currency::getCurrencyInstance((int)$this->id_currency));
|
$free_fees_price = Tools::convertPrice((float)$configuration['PS_SHIPPING_FREE_PRICE'], Currency::getCurrencyInstance((int)$this->id_currency));
|
||||||
$orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);
|
$orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING, null, null, false);
|
||||||
if ($orderTotalwithDiscounts >= (float)($free_fees_price) && (float)($free_fees_price) > 0)
|
if ($orderTotalwithDiscounts >= (float)($free_fees_price) && (float)($free_fees_price) > 0)
|
||||||
return $shipping_cost;
|
return $shipping_cost;
|
||||||
|
|
||||||
@@ -2571,7 +2658,7 @@ class CartCore extends ObjectModel
|
|||||||
$total_weight = 0;
|
$total_weight = 0;
|
||||||
foreach ($products as $product)
|
foreach ($products as $product)
|
||||||
{
|
{
|
||||||
if (is_null($product['weight_attribute']))
|
if (!isset($product['weight_attribute']) || is_null($product['weight_attribute']))
|
||||||
$total_weight += $product['weight'] * $product['cart_quantity'];
|
$total_weight += $product['weight'] * $product['cart_quantity'];
|
||||||
else
|
else
|
||||||
$total_weight += $product['weight_attribute'] * $product['cart_quantity'];
|
$total_weight += $product['weight_attribute'] * $product['cart_quantity'];
|
||||||
@@ -2717,7 +2804,6 @@ class CartCore extends ObjectModel
|
|||||||
'formattedAddresses' => $formatted_addresses,
|
'formattedAddresses' => $formatted_addresses,
|
||||||
'products' => array_values($products),
|
'products' => array_values($products),
|
||||||
'gift_products' => $gift_products,
|
'gift_products' => $gift_products,
|
||||||
//'products_raw' => $this->getProducts(false),
|
|
||||||
'discounts' => $cart_rules,
|
'discounts' => $cart_rules,
|
||||||
'is_virtual_cart' => (int)$this->isVirtualCart(),
|
'is_virtual_cart' => (int)$this->isVirtualCart(),
|
||||||
'total_discounts' => $total_discounts,
|
'total_discounts' => $total_discounts,
|
||||||
@@ -2758,9 +2844,8 @@ class CartCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$sql = 'SELECT c.`id_cart`
|
$sql = 'SELECT c.`id_cart`
|
||||||
FROM '._DB_PREFIX_.'cart c
|
FROM '._DB_PREFIX_.'cart c
|
||||||
LEFT JOIN '._DB_PREFIX_.'orders o ON (c.`id_cart` = o.`id_cart`)
|
WHERE c.`id_cart` NOT IN (SELECT o.`id_cart` FROM '._DB_PREFIX_.'orders o)
|
||||||
WHERE c.`id_customer` = '.(int)$id_customer.'
|
AND c.`id_customer` = '.(int)$id_customer.'
|
||||||
AND o.`id_cart` IS NULL
|
|
||||||
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'c').'
|
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'c').'
|
||||||
ORDER BY c.`date_upd` DESC';
|
ORDER BY c.`date_upd` DESC';
|
||||||
|
|
||||||
@@ -2907,14 +2992,14 @@ class CartCore extends ObjectModel
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCustomerCarts($id_customer)
|
public static function getCustomerCarts($id_customer, $with_order = true)
|
||||||
{
|
{
|
||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM '._DB_PREFIX_.'cart c
|
FROM '._DB_PREFIX_.'cart c
|
||||||
WHERE c.`id_customer` = '.(int)$id_customer.'
|
WHERE c.`id_customer` = '.(int)$id_customer.'
|
||||||
|
'.(!$with_order ? 'AND id_cart NOT IN (SELECT id_cart FROM '._DB_PREFIX_.'orders o WHERE o.`id_customer` = '.(int)$id_customer.')' : '').'
|
||||||
ORDER BY c.`date_add` DESC');
|
ORDER BY c.`date_add` DESC');
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function replaceZeroByShopName($echo, $tr)
|
public static function replaceZeroByShopName($echo, $tr)
|
||||||
@@ -3248,7 +3333,8 @@ class CartCore extends ObjectModel
|
|||||||
WHERE `id_cart` = '.(int)$this->id.'
|
WHERE `id_cart` = '.(int)$this->id.'
|
||||||
AND `id_shop` = '.(int)$this->id_shop.'
|
AND `id_shop` = '.(int)$this->id_shop.'
|
||||||
)
|
)
|
||||||
WHERE `id_cart` = '.(int)$this->id.' AND `id_shop` = '.(int)$this->id_shop;
|
WHERE `id_cart` = '.(int)$this->id.'
|
||||||
|
'.(Configuration::get('PS_ALLOW_MULTISHIPPING') ? ' AND `id_shop` = '.(int)$this->id_shop : '');
|
||||||
|
|
||||||
Db::getInstance()->execute($sql);
|
Db::getInstance()->execute($sql);
|
||||||
|
|
||||||
|
|||||||
+114
-40
@@ -97,7 +97,7 @@ class CartRuleCore extends ObjectModel
|
|||||||
'product_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
'product_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||||
'shop_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
'shop_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||||
'free_shipping' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
'free_shipping' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||||
'reduction_percent' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
|
'reduction_percent' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPercentage'),
|
||||||
'reduction_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
|
'reduction_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
|
||||||
'reduction_tax' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
'reduction_tax' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||||
'reduction_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
'reduction_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||||
@@ -252,6 +252,7 @@ class CartRuleCore extends ObjectModel
|
|||||||
$cart_rule['value'] = 0;
|
$cart_rule['value'] = 0;
|
||||||
$cart_rule['minimal'] = $cart_rule['minimum_amount'];
|
$cart_rule['minimal'] = $cart_rule['minimum_amount'];
|
||||||
$cart_rule['cumulable'] = !$cart_rule['cart_rule_restriction'];
|
$cart_rule['cumulable'] = !$cart_rule['cart_rule_restriction'];
|
||||||
|
$cart_rule['id_discount_type'] = false;
|
||||||
if ($cart_rule['free_shipping'])
|
if ($cart_rule['free_shipping'])
|
||||||
$cart_rule['id_discount_type'] = Discount::FREE_SHIPPING;
|
$cart_rule['id_discount_type'] = Discount::FREE_SHIPPING;
|
||||||
elseif ($cart_rule['reduction_percent'] > 0)
|
elseif ($cart_rule['reduction_percent'] > 0)
|
||||||
@@ -401,27 +402,6 @@ class CartRuleCore extends ObjectModel
|
|||||||
return (!$display_error) ? false : Tools::displayError('You cannot use this voucher anymore (usage limit reached)');
|
return (!$display_error) ? false : Tools::displayError('You cannot use this voucher anymore (usage limit reached)');
|
||||||
}
|
}
|
||||||
|
|
||||||
$otherCartRules = $context->cart->getCartRules();
|
|
||||||
if (count($otherCartRules))
|
|
||||||
foreach ($otherCartRules as $otherCartRule)
|
|
||||||
{
|
|
||||||
if ($otherCartRule['id_cart_rule'] == $this->id && !$alreadyInCart)
|
|
||||||
return (!$display_error) ? false : Tools::displayError('This voucher is already in your cart');
|
|
||||||
if ($this->cart_rule_restriction && $otherCartRule['cart_rule_restriction'] && $otherCartRule['id_cart_rule'] != $this->id)
|
|
||||||
{
|
|
||||||
$combinable = Db::getInstance()->getValue('
|
|
||||||
SELECT id_cart_rule_1
|
|
||||||
FROM '._DB_PREFIX_.'cart_rule_combination
|
|
||||||
WHERE (id_cart_rule_1 = '.(int)$this->id.' AND id_cart_rule_2 = '.(int)$otherCartRule['id_cart_rule'].')
|
|
||||||
OR (id_cart_rule_2 = '.(int)$this->id.' AND id_cart_rule_1 = '.(int)$otherCartRule['id_cart_rule'].')');
|
|
||||||
if (!$combinable)
|
|
||||||
{
|
|
||||||
$cart_rule = new CartRule($otherCartRule['cart_rule_restriction'], $context->cart->id_lang);
|
|
||||||
return (!$display_error) ? false : Tools::displayError('This voucher is not combinable with an other voucher already in your cart:').' '.$cart_rule->name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get an intersection of the customer groups and the cart rule groups (if the customer is not logged in, the default group is 1)
|
// Get an intersection of the customer groups and the cart rule groups (if the customer is not logged in, the default group is 1)
|
||||||
if ($this->group_restriction)
|
if ($this->group_restriction)
|
||||||
{
|
{
|
||||||
@@ -508,13 +488,17 @@ class CartRuleCore extends ObjectModel
|
|||||||
// If a product is given for free in this rule and already in the cart, the price is subtracted
|
// If a product is given for free in this rule and already in the cart, the price is subtracted
|
||||||
if ($this->gift_product && $alreadyInCart)
|
if ($this->gift_product && $alreadyInCart)
|
||||||
{
|
{
|
||||||
$in_cart = (bool)Db::getInstance()->getValue('
|
$query = new DbQuery();
|
||||||
SELECT id_product
|
|
||||||
FROM '._DB_PREFIX_.'cart_product
|
$query->select('id_product');
|
||||||
WHERE id_product = '.(int)$this->gift_product.'
|
$query->from('cart_product');
|
||||||
AND id_product_attribute = '.(int)$this->gift_product_attribute.'
|
$query->where('id_product = '.(int)$this->gift_product);
|
||||||
AND id_cart = '.(int)$context->cart->id);
|
$query->where('id_cart = '.(int)$context->cart->id);
|
||||||
if ($in_cart)
|
|
||||||
|
if ((int)$this->gift_product_attribute)
|
||||||
|
$query->where('id_product_attribute = '.(int)$this->gift_product_attribute);
|
||||||
|
|
||||||
|
if (Db::getInstance()->getValue($query))
|
||||||
{
|
{
|
||||||
$ref = false;
|
$ref = false;
|
||||||
$product_price = Product::getPriceStatic(
|
$product_price = Product::getPriceStatic(
|
||||||
@@ -534,6 +518,35 @@ class CartRuleCore extends ObjectModel
|
|||||||
if ($cartTotal < $minimum_amount)
|
if ($cartTotal < $minimum_amount)
|
||||||
return (!$display_error) ? false : Tools::displayError('You have not reached the minimum amount required to use this voucher');
|
return (!$display_error) ? false : Tools::displayError('You have not reached the minimum amount required to use this voucher');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if the voucher is already in the cart of if a non compatible voucher is in the cart
|
||||||
|
// Important note: this MUST be the last check, because if the tested cart rule has priority over a non combinable one in the cart, we will switch them
|
||||||
|
$otherCartRules = $context->cart->getCartRules();
|
||||||
|
if (count($otherCartRules))
|
||||||
|
foreach ($otherCartRules as $otherCartRule)
|
||||||
|
{
|
||||||
|
if ($otherCartRule['id_cart_rule'] == $this->id && !$alreadyInCart)
|
||||||
|
return (!$display_error) ? false : Tools::displayError('This voucher is already in your cart');
|
||||||
|
if ($this->cart_rule_restriction && $otherCartRule['cart_rule_restriction'] && $otherCartRule['id_cart_rule'] != $this->id)
|
||||||
|
{
|
||||||
|
$combinable = Db::getInstance()->getValue('
|
||||||
|
SELECT id_cart_rule_1
|
||||||
|
FROM '._DB_PREFIX_.'cart_rule_combination
|
||||||
|
WHERE (id_cart_rule_1 = '.(int)$this->id.' AND id_cart_rule_2 = '.(int)$otherCartRule['id_cart_rule'].')
|
||||||
|
OR (id_cart_rule_2 = '.(int)$this->id.' AND id_cart_rule_1 = '.(int)$otherCartRule['id_cart_rule'].')');
|
||||||
|
if (!$combinable)
|
||||||
|
{
|
||||||
|
$cart_rule = new CartRule($otherCartRule['cart_rule_restriction'], $context->cart->id_lang);
|
||||||
|
// The cart rules are not combinable and the cart rule currently in the cart has priority over the one tested
|
||||||
|
if ($cart_rule->priority <= $this->priority)
|
||||||
|
return (!$display_error) ? false : Tools::displayError('This voucher is not combinable with an other voucher already in your cart:').' '.$cart_rule->name;
|
||||||
|
// But if the cart rule that is tested has priority over the one in the cart, we remove the one in the cart and keep this new one
|
||||||
|
else
|
||||||
|
$context->cart->removeCartRule($cart_rule->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$display_error)
|
if (!$display_error)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -599,7 +612,7 @@ class CartRuleCore extends ObjectModel
|
|||||||
break;
|
break;
|
||||||
case 'categories':
|
case 'categories':
|
||||||
$cartCategories = Db::getInstance()->executeS('
|
$cartCategories = Db::getInstance()->executeS('
|
||||||
SELECT cp.quantity, cp.`id_product`, catp.`id_category`
|
SELECT cp.quantity, cp.`id_product`, cp.`id_product_attribute`, catp.`id_category`
|
||||||
FROM `'._DB_PREFIX_.'cart_product` cp
|
FROM `'._DB_PREFIX_.'cart_product` cp
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_product` catp ON cp.id_product = catp.id_product
|
LEFT JOIN `'._DB_PREFIX_.'category_product` catp ON cp.id_product = catp.id_product
|
||||||
WHERE cp.`id_cart` = '.(int)$context->cart->id.'
|
WHERE cp.`id_cart` = '.(int)$context->cart->id.'
|
||||||
@@ -607,13 +620,18 @@ class CartRuleCore extends ObjectModel
|
|||||||
$countMatchingProducts = 0;
|
$countMatchingProducts = 0;
|
||||||
$matchingProductsList = array();
|
$matchingProductsList = array();
|
||||||
foreach ($cartCategories as $cartCategory)
|
foreach ($cartCategories as $cartCategory)
|
||||||
if (in_array($cartCategory['id_category'], $productRule['values']))
|
if (in_array($cartCategory['id_category'], $productRule['values'])
|
||||||
|
// We also check that the product is not already in the matching product list, because there are doubles in the query results (when the product is in multiple categories)
|
||||||
|
&& !in_array($cartCategory['id_product'].'-'.$cartCategory['id_product_attribute'], $matchingProductsList))
|
||||||
{
|
{
|
||||||
$countMatchingProducts += $cartCategory['quantity'];
|
$countMatchingProducts += $cartCategory['quantity'];
|
||||||
$matchingProductsList[] = $cartCategory['id_product'].'-0';
|
$matchingProductsList[] = $cartCategory['id_product'].'-'.$cartCategory['id_product_attribute'];
|
||||||
}
|
}
|
||||||
if ($countMatchingProducts < $productRuleGroup['quantity'])
|
if ($countMatchingProducts < $productRuleGroup['quantity'])
|
||||||
return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products');
|
return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products');
|
||||||
|
// Attribute id is not important for this filter in the global list, so the ids are replaced by 0
|
||||||
|
foreach ($matchingProductsList as &$matchingProduct)
|
||||||
|
$matchingProduct = preg_replace('/^([0-9]+)-[0-9]+$/', '$1-0', $matchingProduct);
|
||||||
$eligibleProductsList = CartRule::array_uintersect($eligibleProductsList, $matchingProductsList);
|
$eligibleProductsList = CartRule::array_uintersect($eligibleProductsList, $matchingProductsList);
|
||||||
break;
|
break;
|
||||||
case 'manufacturers':
|
case 'manufacturers':
|
||||||
@@ -699,9 +717,10 @@ class CartRuleCore extends ObjectModel
|
|||||||
*
|
*
|
||||||
* @param bool $use_tax
|
* @param bool $use_tax
|
||||||
* @param Context $context
|
* @param Context $context
|
||||||
|
* @param boolean $use_cache Allow using cache to avoid multiple free gift using multishipping
|
||||||
* @return float|int|string
|
* @return float|int|string
|
||||||
*/
|
*/
|
||||||
public function getContextualValue($use_tax, Context $context = null, $filter = null, $package = null)
|
public function getContextualValue($use_tax, Context $context = null, $filter = null, $package = null, $use_cache = true)
|
||||||
{
|
{
|
||||||
if (!CartRule::isFeatureActive())
|
if (!CartRule::isFeatureActive())
|
||||||
return 0;
|
return 0;
|
||||||
@@ -799,8 +818,12 @@ class CartRuleCore extends ObjectModel
|
|||||||
if ($this->reduction_amount)
|
if ($this->reduction_amount)
|
||||||
{
|
{
|
||||||
$prorata = 1;
|
$prorata = 1;
|
||||||
if (!is_null($package))
|
if (!is_null($package) && count($all_products))
|
||||||
$prorata = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS, $package['products']) / $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS);
|
{
|
||||||
|
$total_products = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS);
|
||||||
|
if ($total_products)
|
||||||
|
$prorata = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS, $package['products']) / $total_products;
|
||||||
|
}
|
||||||
|
|
||||||
$reduction_amount = $this->reduction_amount;
|
$reduction_amount = $this->reduction_amount;
|
||||||
// If we need to convert the voucher value to the cart currency
|
// If we need to convert the voucher value to the cart currency
|
||||||
@@ -878,16 +901,17 @@ class CartRuleCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$id_address = (is_null($package) ? 0 : $package['id_address']);
|
$id_address = (is_null($package) ? 0 : $package['id_address']);
|
||||||
foreach ($package_products as $product)
|
foreach ($package_products as $product)
|
||||||
if ($product['id_product'] == $this->gift_product && $product['id_product_attribute'] == $this->gift_product_attribute)
|
if ($product['id_product'] == $this->gift_product && ($product['id_product_attribute'] == $this->gift_product_attribute || !(int)$this->gift_product_attribute))
|
||||||
{
|
{
|
||||||
// The free gift coupon must be applied to one product only (needed for multi-shipping which manage multiple product lists)
|
// The free gift coupon must be applied to one product only (needed for multi-shipping which manage multiple product lists)
|
||||||
if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product])
|
if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product])
|
||||||
|| CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == $id_address
|
|| CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == $id_address
|
||||||
|| CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0
|
|| CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0
|
||||||
|| $id_address == 0)
|
|| $id_address == 0
|
||||||
|
|| !$use_cache)
|
||||||
{
|
{
|
||||||
$reduction_value += ($use_tax ? $product['price_wt'] : $product['price']);
|
$reduction_value += ($use_tax ? $product['price_wt'] : $product['price']);
|
||||||
if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product]) || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0)
|
if ($use_cache && (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product]) || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0))
|
||||||
CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] = $id_address;
|
CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] = $id_address;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -897,6 +921,15 @@ class CartRuleCore extends ObjectModel
|
|||||||
return $reduction_value;
|
return $reduction_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make sure caches are empty
|
||||||
|
* Must be called before calling multiple time getContextualValue()
|
||||||
|
*/
|
||||||
|
public static function cleanCache()
|
||||||
|
{
|
||||||
|
self::$only_one_gift = array();
|
||||||
|
}
|
||||||
|
|
||||||
protected function getCartRuleCombinations()
|
protected function getCartRuleCombinations()
|
||||||
{
|
{
|
||||||
$array = array();
|
$array = array();
|
||||||
@@ -939,9 +972,9 @@ class CartRuleCore extends ObjectModel
|
|||||||
$shop_list = '';
|
$shop_list = '';
|
||||||
if ($type == 'shop')
|
if ($type == 'shop')
|
||||||
{
|
{
|
||||||
$shop_list = ' AND t.id_shop IN (';
|
|
||||||
$shops = Context::getContext()->employee->getAssociatedShops();
|
$shops = Context::getContext()->employee->getAssociatedShops();
|
||||||
$shop_list .= implode(array_map('intval', $shops), ',').')';
|
if (count($shops))
|
||||||
|
$shop_list = ' AND t.id_shop IN ('.implode(array_map('intval', $shops), ',').') ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Validate::isLoadedObject($this) OR $this->{$type.'_restriction'} == 0)
|
if (!Validate::isLoadedObject($this) OR $this->{$type.'_restriction'} == 0)
|
||||||
@@ -1056,6 +1089,7 @@ class CartRuleCore extends ObjectModel
|
|||||||
ORDER BY priority');
|
ORDER BY priority');
|
||||||
|
|
||||||
$cartRules = ObjectModel::hydrateCollection('CartRule', $result);
|
$cartRules = ObjectModel::hydrateCollection('CartRule', $result);
|
||||||
|
|
||||||
foreach ($cartRules as $cartRule)
|
foreach ($cartRules as $cartRule)
|
||||||
if ($cartRule->checkValidity($context, false, false))
|
if ($cartRule->checkValidity($context, false, false))
|
||||||
$context->cart->addCartRule($cartRule->id);
|
$context->cart->addCartRule($cartRule->id);
|
||||||
@@ -1070,6 +1104,46 @@ class CartRuleCore extends ObjectModel
|
|||||||
return (bool)Configuration::get('PS_CART_RULE_FEATURE_ACTIVE');
|
return (bool)Configuration::get('PS_CART_RULE_FEATURE_ACTIVE');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* When an entity associated to a product rule (product, category, attribute, supplier, manufacturer...) is deleted, the product rules must be updated */
|
||||||
|
public static function cleanProductRuleIntegrity($type, $list)
|
||||||
|
{
|
||||||
|
// Type must be available in the 'type' enum of the table cart_rule_product_rule
|
||||||
|
if (!in_array($type, array('products', 'categories', 'attributes', 'manufacturers', 'suppliers')))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// This check must not be removed because this var is used a few lines below
|
||||||
|
$list = (is_array($list) ? implode(',', array_map('intval', $list)) : (int)$list);
|
||||||
|
if (!preg_match('/^[0-9,]+$/', $list))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Delete associated restrictions on cart rules
|
||||||
|
Db::getInstance()->execute('
|
||||||
|
DELETE crprv
|
||||||
|
FROM `'._DB_PREFIX_.'cart_rule_product_rule` crpr
|
||||||
|
LEFT JOIN `'._DB_PREFIX_.'cart_rule_product_rule_value` crprv ON crpr.`id_product_rule` = crprv.`id_product_rule`
|
||||||
|
WHERE crpr.`type` = "'.pSQL($type).'"
|
||||||
|
AND crprv.`id_item` IN ('.$list.')'); // $list is checked a few lines above
|
||||||
|
|
||||||
|
// Delete the product rules that does not have any values
|
||||||
|
if (Db::getInstance()->Affected_Rows() > 0)
|
||||||
|
Db::getInstance()->execute('
|
||||||
|
DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule`
|
||||||
|
WHERE `id_product_rule` NOT IN (SELECT id_product_rule FROM `'._DB_PREFIX_.'cart_rule_product_rule_value`)');
|
||||||
|
// If the product rules were the only conditions of a product rule group, delete the product rule group
|
||||||
|
if (Db::getInstance()->Affected_Rows() > 0)
|
||||||
|
Db::getInstance()->execute('
|
||||||
|
DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_group`
|
||||||
|
WHERE `id_product_rule_group` NOT IN (SELECT id_product_rule_group FROM `'._DB_PREFIX_.'cart_rule_product_rule`)');
|
||||||
|
// If the product rule group were the only restrictions of a cart rule, update de cart rule restriction cache
|
||||||
|
if (Db::getInstance()->Affected_Rows() > 0)
|
||||||
|
Db::getInstance()->execute('
|
||||||
|
UPDATE `'._DB_PREFIX_.'cart_rule` cr
|
||||||
|
LEFT JOIN `'._DB_PREFIX_.'cart_rule_product_rule_group` crprg ON cr.id_cart_rule = crprg.id_cart_rule
|
||||||
|
SET product_restriction = IF(crprg.id_product_rule_group IS NULL, 0, 1)');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @static
|
* @static
|
||||||
* @param $name
|
* @param $name
|
||||||
|
|||||||
+76
-82
@@ -47,6 +47,9 @@ class CategoryCore extends ObjectModel
|
|||||||
/** @var integer Parent category ID */
|
/** @var integer Parent category ID */
|
||||||
public $id_parent;
|
public $id_parent;
|
||||||
|
|
||||||
|
/** @var integer default Category id */
|
||||||
|
public $id_category_default;
|
||||||
|
|
||||||
/** @var integer Parents number */
|
/** @var integer Parents number */
|
||||||
public $level_depth;
|
public $level_depth;
|
||||||
|
|
||||||
@@ -79,12 +82,6 @@ class CategoryCore extends ObjectModel
|
|||||||
|
|
||||||
public $groupBox;
|
public $groupBox;
|
||||||
|
|
||||||
/** @var boolean does the product have to be removed during the delete process */
|
|
||||||
public $remove_products = true;
|
|
||||||
|
|
||||||
/** @var boolean does the product have to be disable during the delete process */
|
|
||||||
public $disable_products = false;
|
|
||||||
|
|
||||||
protected static $_links = array();
|
protected static $_links = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -101,6 +98,7 @@ class CategoryCore extends ObjectModel
|
|||||||
'level_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
'level_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||||
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true),
|
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true),
|
||||||
'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||||
|
'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||||
'is_root_category' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
'is_root_category' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||||
'position' => array('type' => self::TYPE_INT),
|
'position' => array('type' => self::TYPE_INT),
|
||||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||||
@@ -257,11 +255,17 @@ class CategoryCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_array($this->description))
|
||||||
|
foreach ($this->description as $lang => $description)
|
||||||
|
$this->description[$lang] = Category::getDescriptionClean($description);
|
||||||
|
else
|
||||||
|
$this->description = Category::getDescriptionClean($this->description);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'id' => (int)$this->id_category,
|
'id' => (int)$this->id_category,
|
||||||
'link' => Context::getContext()->link->getCategoryLink($this->id, $this->link_rewrite),
|
'link' => Context::getContext()->link->getCategoryLink($this->id, $this->link_rewrite),
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'desc'=> Category::getDescriptionClean($this->description),
|
'desc'=> $this->description,
|
||||||
'children' => $children
|
'children' => $children
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -298,6 +302,12 @@ class CategoryCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function deleteLite()
|
||||||
|
{
|
||||||
|
// Directly call the parent of delete, in order to avoid recursion
|
||||||
|
return parent::delete();
|
||||||
|
}
|
||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
if ((int)$this->id === 0 || (int)$this->id === 1)
|
if ((int)$this->id === 0 || (int)$this->id === 1)
|
||||||
@@ -305,72 +315,31 @@ class CategoryCore extends ObjectModel
|
|||||||
|
|
||||||
$this->clearCache();
|
$this->clearCache();
|
||||||
|
|
||||||
/* Get childs categories */
|
$all_cat = $this->getAllChildren();
|
||||||
$to_delete = array((int)$this->id);
|
$all_cat[] = $this;
|
||||||
$this->recursiveDelete($to_delete, (int)$this->id);
|
foreach ($all_cat as $cat)
|
||||||
$to_delete = array_unique($to_delete);
|
|
||||||
|
|
||||||
/* Delete category and its child from database */
|
|
||||||
$list = count($to_delete) > 1 ? implode(',', array_map('intval', $to_delete)) : (int)$this->id;
|
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category` WHERE `id_category` IN ('.$list.')');
|
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_lang` WHERE `id_category` IN ('.$list.')');
|
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_product` WHERE `id_category` IN ('.$list.')');
|
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_category` IN ('.$list.')');
|
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_shop` WHERE `id_category` IN ('.$list.')');
|
|
||||||
|
|
||||||
Category::cleanPositions($this->id_parent);
|
|
||||||
|
|
||||||
/* Delete category images and its children images */
|
|
||||||
$tmp_category = new Category();
|
|
||||||
foreach ($to_delete as $id_category)
|
|
||||||
{
|
{
|
||||||
$tmp_category->id = (int)$id_category;
|
$cat->deleteLite();
|
||||||
$tmp_category->deleteImage();
|
if (!$this->hasMultishopEntries())
|
||||||
}
|
|
||||||
|
|
||||||
/* Delete or link products which were not in others categories */
|
|
||||||
$result = Db::getInstance()->executeS('
|
|
||||||
SELECT `id_product`
|
|
||||||
FROM `'._DB_PREFIX_.'product`
|
|
||||||
WHERE `id_product` NOT IN (SELECT `id_product` FROM `'._DB_PREFIX_.'category_product`)
|
|
||||||
');
|
|
||||||
foreach ($result as $p)
|
|
||||||
{
|
{
|
||||||
$product = new Product((int)$p['id_product']);
|
$cat->deleteImage();
|
||||||
if (Validate::isLoadedObject($product))
|
$cat->cleanGroups();
|
||||||
{
|
$cat->cleanAssoProducts();
|
||||||
if ($this->remove_products || $this->id_parent == 0)
|
// Delete associated restrictions on cart rules
|
||||||
$product->delete();
|
CartRule::cleanProductRuleIntegrity('categories', array($cat->id));
|
||||||
else
|
Category::cleanPositions($cat->id_parent);
|
||||||
{
|
/* Delete Categories in GroupReduction */
|
||||||
if ($this->disable_products)
|
if (GroupReduction::getGroupReductionByCategoryId((int)$cat->id))
|
||||||
$product->active = 0;
|
GroupReduction::deleteCategory($cat->id);
|
||||||
|
|
||||||
$product->addToCategories($this->id_parent);
|
|
||||||
$product->save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Set category default to Home category where categorie no more exists */
|
|
||||||
$result = Db::getInstance()->execute('
|
|
||||||
UPDATE `'._DB_PREFIX_.'product_shop`
|
|
||||||
SET `id_category_default` = '.(int)Configuration::get('PS_HOME_CATEGORY').'
|
|
||||||
WHERE `id_category_default`
|
|
||||||
NOT IN (SELECT `id_category` FROM `'._DB_PREFIX_.'category`)
|
|
||||||
');
|
|
||||||
|
|
||||||
/* Rebuild the nested tree */
|
/* Rebuild the nested tree */
|
||||||
if (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree)
|
if (!$this->hasMultishopEntries() && (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree))
|
||||||
Category::regenerateEntireNtree();
|
Category::regenerateEntireNtree();
|
||||||
|
|
||||||
Hook::exec('actionCategoryDelete', array('category' => $this));
|
Hook::exec('actionCategoryDelete', array('category' => $this));
|
||||||
|
|
||||||
/* Delete Categories in GroupReduction */
|
|
||||||
foreach ($to_delete as $category)
|
|
||||||
if (GroupReduction::getGroupReductionByCategoryId((int)$category))
|
|
||||||
GroupReduction::deleteCategory($category);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,7 +375,7 @@ class CategoryCore extends ObjectModel
|
|||||||
|
|
||||||
$parent_category = new Category($this->id_parent);
|
$parent_category = new Category($this->id_parent);
|
||||||
if (!Validate::isLoadedObject($parent_category))
|
if (!Validate::isLoadedObject($parent_category))
|
||||||
die('parent category does not exist');
|
throw new PrestaShopException('Parent category does not exist');
|
||||||
return $parent_category->level_depth + 1;
|
return $parent_category->level_depth + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,11 +461,12 @@ class CategoryCore extends ObjectModel
|
|||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM `'._DB_PREFIX_.'category` c
|
FROM `'._DB_PREFIX_.'category` c
|
||||||
|
'.Shop::addSqlAssociation('category', 'c').'
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').'
|
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').'
|
||||||
WHERE 1 '.$sql_filter.' '.($id_lang ? 'AND `id_lang` = '.(int)$id_lang : '').'
|
WHERE 1 '.$sql_filter.' '.($id_lang ? 'AND `id_lang` = '.(int)$id_lang : '').'
|
||||||
'.($active ? 'AND `active` = 1' : '').'
|
'.($active ? 'AND `active` = 1' : '').'
|
||||||
'.(!$id_lang ? 'GROUP BY c.id_category' : '').'
|
'.(!$id_lang ? 'GROUP BY c.id_category' : '').'
|
||||||
'.($sql_sort != '' ? $sql_sort : 'ORDER BY c.`level_depth` ASC, c.`position` ASC').'
|
'.($sql_sort != '' ? $sql_sort : 'ORDER BY c.`level_depth` ASC, category_shop.`position` ASC').'
|
||||||
'.($sql_limit != '' ? $sql_limit : '')
|
'.($sql_limit != '' ? $sql_limit : '')
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -516,9 +486,11 @@ class CategoryCore extends ObjectModel
|
|||||||
SELECT c.`id_category`, cl.`name`
|
SELECT c.`id_category`, cl.`name`
|
||||||
FROM `'._DB_PREFIX_.'category` c
|
FROM `'._DB_PREFIX_.'category` c
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
|
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
|
||||||
|
'.Shop::addSqlAssociation('category', 'c').'
|
||||||
WHERE cl.`id_lang` = '.(int)$id_lang.'
|
WHERE cl.`id_lang` = '.(int)$id_lang.'
|
||||||
|
AND c.`id_category` != '.Configuration::get('PS_ROOT_CATEGORY').'
|
||||||
GROUP BY c.id_category
|
GROUP BY c.id_category
|
||||||
ORDER BY c.`position`');
|
ORDER BY c.`id_category`, category_shop.`position`');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getShopID()
|
public function getShopID()
|
||||||
@@ -633,7 +605,7 @@ class CategoryCore extends ObjectModel
|
|||||||
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pa.`id_product_attribute`, pl.`description`, pl.`description_short`, pl.`available_now`,
|
$sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, product_attribute_shop.`id_product_attribute`, pl.`description`, pl.`description_short`, pl.`available_now`,
|
||||||
pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, i.`id_image`,
|
pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, i.`id_image`,
|
||||||
il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name, t.`rate`, cl.`name` AS category_default,
|
il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name, t.`rate`, cl.`name` AS category_default,
|
||||||
DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(),
|
DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(),
|
||||||
@@ -643,11 +615,11 @@ class CategoryCore extends ObjectModel
|
|||||||
FROM `'._DB_PREFIX_.'category_product` cp
|
FROM `'._DB_PREFIX_.'category_product` cp
|
||||||
LEFT JOIN `'._DB_PREFIX_.'product` p
|
LEFT JOIN `'._DB_PREFIX_.'product` p
|
||||||
ON p.`id_product` = cp.`id_product`
|
ON p.`id_product` = cp.`id_product`
|
||||||
|
'.Shop::addSqlAssociation('product', 'p').'
|
||||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||||
ON (p.`id_product` = pa.`id_product`)
|
ON (p.`id_product` = pa.`id_product`)
|
||||||
'.Shop::addSqlAssociation('product_attribute', 'pa', false).'
|
'.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.`default_on` = 1').'
|
||||||
'.Shop::addSqlAssociation('product', 'p').'
|
'.Product::sqlStock('p', 'product_attribute_shop', false, $context->shop).'
|
||||||
'.Product::sqlStock('p', 'pa', false, $context->shop).'
|
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl
|
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl
|
||||||
ON (product_shop.`id_category_default` = cl.`id_category`
|
ON (product_shop.`id_category_default` = cl.`id_category`
|
||||||
AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').')
|
AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').')
|
||||||
@@ -672,14 +644,14 @@ class CategoryCore extends ObjectModel
|
|||||||
AND tl.`id_lang` = '.(int)$id_lang.')
|
AND tl.`id_lang` = '.(int)$id_lang.')
|
||||||
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m
|
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m
|
||||||
ON m.`id_manufacturer` = p.`id_manufacturer`
|
ON m.`id_manufacturer` = p.`id_manufacturer`
|
||||||
WHERE product_shop.`id_shop` = '.(int)Context::getContext()->shop->id.'
|
WHERE product_shop.`id_shop` = '.(int)$context->shop->id.'
|
||||||
AND (product_attribute_shop.default_on = 1 OR product_attribute_shop.default_on IS NULL)
|
AND ((product_attribute_shop.id_product_attribute IS NOT NULL OR pa.id_product_attribute IS NULL)
|
||||||
|
OR (product_attribute_shop.id_product_attribute IS NULL AND pa.default_on=1))
|
||||||
AND cp.`id_category` = '.(int)$this->id
|
AND cp.`id_category` = '.(int)$this->id
|
||||||
.($active ? ' AND product_shop.`active` = 1' : '')
|
.($active ? ' AND product_shop.`active` = 1' : '')
|
||||||
.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '')
|
.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '')
|
||||||
.($id_supplier ? ' AND p.id_supplier = '.(int)$id_supplier : '');
|
.($id_supplier ? ' AND p.id_supplier = '.(int)$id_supplier : '');
|
||||||
|
|
||||||
$sql .= ' GROUP BY p.`id_product`';
|
|
||||||
if ($random === true)
|
if ($random === true)
|
||||||
{
|
{
|
||||||
$sql .= ' ORDER BY RAND()';
|
$sql .= ' ORDER BY RAND()';
|
||||||
@@ -802,7 +774,7 @@ class CategoryCore extends ObjectModel
|
|||||||
AND c3.`id_category` IN ('.implode(',', array_map('intval', $selected_cat)).')
|
AND c3.`id_category` IN ('.implode(',', array_map('intval', $selected_cat)).')
|
||||||
)' : '0').' AS nbSelectedSubCat
|
)' : '0').' AS nbSelectedSubCat
|
||||||
FROM `'._DB_PREFIX_.'category` c
|
FROM `'._DB_PREFIX_.'category` c
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl');
|
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` '.Shop::addSqlRestrictionOnLang('cl', $id_shop).')';
|
||||||
if (Shop::getContext() == Shop::CONTEXT_SHOP && $use_shop_context)
|
if (Shop::getContext() == Shop::CONTEXT_SHOP && $use_shop_context)
|
||||||
$sql .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')';
|
$sql .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')';
|
||||||
$sql .= ' WHERE `id_lang` = '.(int)$id_lang;
|
$sql .= ' WHERE `id_lang` = '.(int)$id_lang;
|
||||||
@@ -878,11 +850,14 @@ class CategoryCore extends ObjectModel
|
|||||||
|
|
||||||
$result = Db::getInstance()->getRow('
|
$result = Db::getInstance()->getRow('
|
||||||
SELECT cl.`link_rewrite`
|
SELECT cl.`link_rewrite`
|
||||||
FROM `'._DB_PREFIX_.'category` c
|
FROM `'._DB_PREFIX_.'category_lang` cl
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').'
|
|
||||||
WHERE `id_lang` = '.(int)$id_lang.'
|
WHERE `id_lang` = '.(int)$id_lang.'
|
||||||
AND c.`id_category` = '.(int)$id_category);
|
'.Shop::addSqlRestrictionOnLang('cl').'
|
||||||
|
AND cl.`id_category` = '.(int)$id_category
|
||||||
|
);
|
||||||
|
|
||||||
self::$_links[$id_category.'-'.$id_lang] = $result['link_rewrite'];
|
self::$_links[$id_category.'-'.$id_lang] = $result['link_rewrite'];
|
||||||
|
|
||||||
return $result['link_rewrite'];
|
return $result['link_rewrite'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -971,7 +946,7 @@ class CategoryCore extends ObjectModel
|
|||||||
|
|
||||||
$categories = null;
|
$categories = null;
|
||||||
$id_current = $this->id;
|
$id_current = $this->id;
|
||||||
if (count(Category::getCategoriesWithoutParent()) > 1)
|
if (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1)
|
||||||
$context->shop->id_category = Category::getTopCategory()->id;
|
$context->shop->id_category = Category::getTopCategory()->id;
|
||||||
elseif (!$context->shop->id)
|
elseif (!$context->shop->id)
|
||||||
$context->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
|
$context->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
|
||||||
@@ -1033,6 +1008,11 @@ class CategoryCore extends ObjectModel
|
|||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_category` = '.(int)$this->id);
|
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_category` = '.(int)$this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function cleanAssoProducts()
|
||||||
|
{
|
||||||
|
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_product` WHERE `id_category` = '.(int)$this->id);
|
||||||
|
}
|
||||||
|
|
||||||
public function addGroups($groups)
|
public function addGroups($groups)
|
||||||
{
|
{
|
||||||
foreach ($groups as $group)
|
foreach ($groups as $group)
|
||||||
@@ -1168,8 +1148,10 @@ class CategoryCore extends ObjectModel
|
|||||||
* @param mixed $id_category_parent
|
* @param mixed $id_category_parent
|
||||||
* @return boolean true if succeed
|
* @return boolean true if succeed
|
||||||
*/
|
*/
|
||||||
public static function cleanPositions($id_category_parent)
|
public static function cleanPositions($id_category_parent = null)
|
||||||
{
|
{
|
||||||
|
if ($id_category_parent === null)
|
||||||
|
return;
|
||||||
$return = true;
|
$return = true;
|
||||||
|
|
||||||
$id = Context::getContext()->shop->id;
|
$id = Context::getContext()->shop->id;
|
||||||
@@ -1206,12 +1188,12 @@ class CategoryCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function getLastPosition($id_category_parent, $id_shop)
|
public static function getLastPosition($id_category_parent, $id_shop)
|
||||||
{
|
{
|
||||||
return (Db::getInstance()->getValue('
|
return (int)(Db::getInstance()->getValue('
|
||||||
SELECT MAX(cs.`position`)+1
|
SELECT MAX(cs.`position`)
|
||||||
FROM `'._DB_PREFIX_.'category` c
|
FROM `'._DB_PREFIX_.'category` c
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_shop` cs
|
LEFT JOIN `'._DB_PREFIX_.'category_shop` cs
|
||||||
ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')
|
ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')
|
||||||
WHERE c.`id_parent` = '.(int)$id_category_parent));
|
WHERE c.`id_parent` = '.(int)$id_category_parent) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getUrlRewriteInformations($id_category)
|
public static function getUrlRewriteInformations($id_category)
|
||||||
@@ -1259,6 +1241,17 @@ class CategoryCore extends ObjectModel
|
|||||||
return ($this->nleft >= $interval['nleft'] && $this->nright <= $interval['nright']);
|
return ($this->nleft >= $interval['nleft'] && $this->nright <= $interval['nright']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function inShopStatic($id_category, Shop $shop = null)
|
||||||
|
{
|
||||||
|
if (!$shop || !is_object($shop))
|
||||||
|
$shop = Context::getContext()->shop;
|
||||||
|
|
||||||
|
if (!$interval = Category::getInterval($shop->getCategory()))
|
||||||
|
return false;
|
||||||
|
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT nleft, nright FROM `'._DB_PREFIX_.'category` WHERE id_category = '.(int)$id_category);
|
||||||
|
return ($row['nleft'] >= $interval['nleft'] && $row['nright'] <= $interval['nright']);
|
||||||
|
}
|
||||||
|
|
||||||
public function getChildrenWs()
|
public function getChildrenWs()
|
||||||
{
|
{
|
||||||
$id = Context::getContext()->shop->id;
|
$id = Context::getContext()->shop->id;
|
||||||
@@ -1342,6 +1335,7 @@ class CategoryCore extends ObjectModel
|
|||||||
SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, cl.`id_lang`
|
SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, cl.`id_lang`
|
||||||
FROM `'._DB_PREFIX_.'category` c
|
FROM `'._DB_PREFIX_.'category` c
|
||||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
|
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
|
||||||
|
'.Shop::addSqlAssociation('category', 'c').'
|
||||||
WHERE cl.`id_lang` = '.(int)$id_lang.'
|
WHERE cl.`id_lang` = '.(int)$id_lang.'
|
||||||
AND c.`id_category` IN ('.implode(',', array_map('intval', $ids_category)).')
|
AND c.`id_category` IN ('.implode(',', array_map('intval', $ids_category)).')
|
||||||
');
|
');
|
||||||
|
|||||||
+1
-1
@@ -166,7 +166,7 @@ class Curve
|
|||||||
{
|
{
|
||||||
$this->type = '';
|
$this->type = '';
|
||||||
if ($type == 'bars')
|
if ($type == 'bars')
|
||||||
$this->type = 'bars:{show:true}';
|
$this->type = 'bars:{show:true,lineWidth:10}';
|
||||||
if ($type == 'steps')
|
if ($type == 'steps')
|
||||||
$this->type = 'lines:{show:true,steps:true}';
|
$this->type = 'lines:{show:true,steps:true}';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ class CombinationCore extends ObjectModel
|
|||||||
public static $definition = array(
|
public static $definition = array(
|
||||||
'table' => 'product_attribute',
|
'table' => 'product_attribute',
|
||||||
'primary' => 'id_product_attribute',
|
'primary' => 'id_product_attribute',
|
||||||
'multishop' => true,
|
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||||
'location' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64),
|
'location' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64),
|
||||||
@@ -102,6 +101,9 @@ class CombinationCore extends ObjectModel
|
|||||||
if (!parent::delete())
|
if (!parent::delete())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Removes the product from StockAvailable, for the current shop
|
||||||
|
StockAvailable::removeProductFromStockAvailable((int)$this->id_product, (int)$this->id);
|
||||||
|
|
||||||
if (!$this->hasMultishopEntries() && !$this->deleteAssociations())
|
if (!$this->hasMultishopEntries() && !$this->deleteAssociations())
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
@@ -138,7 +140,7 @@ class CombinationCore extends ObjectModel
|
|||||||
$ids_attributes = array();
|
$ids_attributes = array();
|
||||||
foreach ($values as $value)
|
foreach ($values as $value)
|
||||||
$ids_attributes[] = $value['id'];
|
$ids_attributes[] = $value['id'];
|
||||||
return $this->setAttributes($values);
|
return $this->setAttributes($ids_attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getWsProductOptionValues()
|
public function getWsProductOptionValues()
|
||||||
|
|||||||
+41
-41
@@ -93,9 +93,9 @@ class ConfigurationCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function getIdByName($key, $id_shop_group = null, $id_shop = null)
|
public static function getIdByName($key, $id_shop_group = null, $id_shop = null)
|
||||||
{
|
{
|
||||||
if (is_null($id_shop))
|
if ($id_shop === null)
|
||||||
$id_shop = Shop::getContextShopID();
|
$id_shop = Shop::getContextShopID();
|
||||||
if (is_null($id_shop_group))
|
if ($id_shop_group === null)
|
||||||
$id_shop_group = Shop::getContextShopGroupID();
|
$id_shop_group = Shop::getContextShopGroupID();
|
||||||
|
|
||||||
$sql = 'SELECT id_configuration
|
$sql = 'SELECT id_configuration
|
||||||
@@ -146,19 +146,23 @@ class ConfigurationCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function get($key, $id_lang = null, $id_shop_group = null, $id_shop = null)
|
public static function get($key, $id_lang = null, $id_shop_group = null, $id_shop = null)
|
||||||
{
|
{
|
||||||
|
// If conf if not initialized, try manual query
|
||||||
|
if (!self::$_CONF)
|
||||||
|
{
|
||||||
|
Configuration::loadConfiguration();
|
||||||
|
if (!self::$_CONF)
|
||||||
|
return Db::getInstance()->getValue('SELECT `value` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = "'.pSQL($key).'"');
|
||||||
|
}
|
||||||
|
|
||||||
$id_lang = (int)$id_lang;
|
$id_lang = (int)$id_lang;
|
||||||
if (is_null($id_shop))
|
if ($id_shop === null)
|
||||||
$id_shop = Shop::getContextShopID();
|
$id_shop = Shop::getContextShopID();
|
||||||
if (is_null($id_shop_group))
|
if ($id_shop_group === null)
|
||||||
$id_shop_group = Shop::getContextShopGroupID();
|
$id_shop_group = Shop::getContextShopGroupID();
|
||||||
|
|
||||||
if (!isset(self::$_CONF[$id_lang]))
|
if (!isset(self::$_CONF[$id_lang]))
|
||||||
$id_lang = 0;
|
$id_lang = 0;
|
||||||
|
|
||||||
// If conf if not initialized, try manual query
|
|
||||||
if (!self::$_CONF)
|
|
||||||
return Db::getInstance()->getValue('SELECT `value` FROM '._DB_PREFIX_.'configuration WHERE `name` = \''.pSQL($key).'\'');
|
|
||||||
|
|
||||||
if ($id_shop && Configuration::hasKey($key, $id_lang, null, $id_shop))
|
if ($id_shop && Configuration::hasKey($key, $id_lang, null, $id_shop))
|
||||||
return self::$_CONF[$id_lang]['shop'][$id_shop][$key];
|
return self::$_CONF[$id_lang]['shop'][$id_shop][$key];
|
||||||
else if ($id_shop_group && Configuration::hasKey($key, $id_lang, $id_shop_group))
|
else if ($id_shop_group && Configuration::hasKey($key, $id_lang, $id_shop_group))
|
||||||
@@ -203,9 +207,9 @@ class ConfigurationCore extends ObjectModel
|
|||||||
throw new PrestaShopException('keys var is not an array');
|
throw new PrestaShopException('keys var is not an array');
|
||||||
|
|
||||||
$id_lang = (int)$id_lang;
|
$id_lang = (int)$id_lang;
|
||||||
if (is_null($id_shop))
|
if ($id_shop === null)
|
||||||
$id_shop = Shop::getContextShopID();
|
$id_shop = Shop::getContextShopID();
|
||||||
if (is_null($id_shop_group))
|
if ($id_shop_group === null)
|
||||||
$id_shop_group = Shop::getContextShopGroupID();
|
$id_shop_group = Shop::getContextShopGroupID();
|
||||||
|
|
||||||
$results = array();
|
$results = array();
|
||||||
@@ -246,9 +250,9 @@ class ConfigurationCore extends ObjectModel
|
|||||||
if (!Validate::isConfigName($key))
|
if (!Validate::isConfigName($key))
|
||||||
die(Tools::displayError());
|
die(Tools::displayError());
|
||||||
|
|
||||||
if (is_null($id_shop))
|
if ($id_shop === null)
|
||||||
$id_shop = Shop::getContextShopID();
|
$id_shop = Shop::getContextShopID();
|
||||||
if (is_null($id_shop_group))
|
if ($id_shop_group === null)
|
||||||
$id_shop_group = Shop::getContextShopGroupID();
|
$id_shop_group = Shop::getContextShopGroupID();
|
||||||
|
|
||||||
if (!is_array($values))
|
if (!is_array($values))
|
||||||
@@ -293,9 +297,9 @@ class ConfigurationCore extends ObjectModel
|
|||||||
if (!Validate::isConfigName($key))
|
if (!Validate::isConfigName($key))
|
||||||
die(Tools::displayError());
|
die(Tools::displayError());
|
||||||
|
|
||||||
if (is_null($id_shop))
|
if ($id_shop === null)
|
||||||
$id_shop = Shop::getContextShopID();
|
$id_shop = Shop::getContextShopID();
|
||||||
if (is_null($id_shop_group))
|
if ($id_shop_group === null)
|
||||||
$id_shop_group = Shop::getContextShopGroupID();
|
$id_shop_group = Shop::getContextShopGroupID();
|
||||||
|
|
||||||
if (!is_array($values))
|
if (!is_array($values))
|
||||||
@@ -379,17 +383,20 @@ class ConfigurationCore extends ObjectModel
|
|||||||
if (!Validate::isConfigName($key))
|
if (!Validate::isConfigName($key))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$sql = 'DELETE FROM `'._DB_PREFIX_.'configuration_lang`
|
$result = Db::getInstance()->execute('
|
||||||
|
DELETE FROM `'._DB_PREFIX_.'configuration_lang`
|
||||||
WHERE `id_configuration` IN (
|
WHERE `id_configuration` IN (
|
||||||
SELECT `id_configuration`
|
SELECT `id_configuration`
|
||||||
FROM `'._DB_PREFIX_.'configuration`
|
FROM `'._DB_PREFIX_.'configuration`
|
||||||
WHERE `name` = \''.pSQL($key).'\'
|
WHERE `name` = "'.pSQL($key).'"
|
||||||
)';
|
)');
|
||||||
$result = Db::getInstance()->execute($sql);
|
|
||||||
|
$result2 = Db::getInstance()->execute('
|
||||||
|
DELETE FROM `'._DB_PREFIX_.'configuration`
|
||||||
|
WHERE `name` = "'.pSQL($key).'"');
|
||||||
|
|
||||||
|
self::$_CONF = null;
|
||||||
|
|
||||||
$sql = 'DELETE FROM `'._DB_PREFIX_.'configuration`
|
|
||||||
WHERE `name` = \''.pSQL($key).'\'';
|
|
||||||
$result2 = Db::getInstance()->execute($sql);
|
|
||||||
return ($result && $result2);
|
return ($result && $result2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,29 +408,22 @@ class ConfigurationCore extends ObjectModel
|
|||||||
public static function deleteFromContext($key)
|
public static function deleteFromContext($key)
|
||||||
{
|
{
|
||||||
if (Shop::getContext() == Shop::CONTEXT_ALL)
|
if (Shop::getContext() == Shop::CONTEXT_ALL)
|
||||||
$id_shop = $id_shop_group = null;
|
|
||||||
else if (Shop::getContext() == Shop::CONTEXT_GROUP)
|
|
||||||
{
|
|
||||||
$id_shop_group = Shop::getContextShopGroupID();
|
|
||||||
$id_shop = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$id_shop_group = Shop::getContextShopGroupID();
|
|
||||||
$id_shop = Shop::getContextShopID();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$id_shop && !$id_shop_group)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$id = Configuration::getIdByName($key, $id_shop_group, $id_shop);
|
$id_shop = null;
|
||||||
$sql = 'DELETE FROM '._DB_PREFIX_.'configuration
|
$id_shop_group = Shop::getContextShopGroupID();
|
||||||
WHERE id_configuration = '.$id;
|
if (Shop::getContext() == Shop::CONTEXT_SHOP)
|
||||||
Db::getInstance()->execute($sql);
|
$id_shop = Shop::getContextShopID();
|
||||||
|
|
||||||
$sql = 'DELETE FROM '._DB_PREFIX_.'configuration_lang
|
$id = Configuration::getIdByName($key, $id_shop_group, $id_shop);
|
||||||
WHERE id_configuration = '.$id;
|
Db::getInstance()->execute('
|
||||||
Db::getInstance()->execute($sql);
|
DELETE FROM '._DB_PREFIX_.'configuration
|
||||||
|
WHERE id_configuration = '.(int)$id);
|
||||||
|
Db::getInstance()->execute('
|
||||||
|
DELETE FROM '._DB_PREFIX_.'configuration_lang
|
||||||
|
WHERE id_configuration = '.(int)$id);
|
||||||
|
|
||||||
|
self::$_CONF = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -159,27 +159,36 @@ class ConfigurationTestCore
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function test_dir($relative_dir, $recursive = false)
|
public static function test_dir($relative_dir, $recursive = false, &$full_report = null)
|
||||||
{
|
{
|
||||||
$dir = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.ltrim($relative_dir, '/');
|
$dir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($relative_dir, '\\/');
|
||||||
if (!file_exists($dir) || !$dh = opendir($dir))
|
if (!file_exists($dir) || !$dh = opendir($dir))
|
||||||
|
{
|
||||||
|
$full_report = sprintf('Directory %s does not exists or is not writable', $dir); // sprintf for future translation
|
||||||
return false;
|
return false;
|
||||||
$dummy = rtrim($dir, '/').'/'.uniqid();
|
}
|
||||||
if (@file_put_contents($dummy, 'test'))
|
$dummy = rtrim($dir, '\\/').DIRECTORY_SEPARATOR.uniqid();
|
||||||
|
if (false && @file_put_contents($dummy, 'test'))
|
||||||
{
|
{
|
||||||
@unlink($dummy);
|
@unlink($dummy);
|
||||||
if (!$recursive)
|
if (!$recursive)
|
||||||
|
{
|
||||||
|
closedir($dh);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
elseif (!is_writable($dir))
|
elseif (!is_writable($dir))
|
||||||
return false;
|
|
||||||
if ($recursive)
|
|
||||||
{
|
{
|
||||||
while (($file = readdir($dh)) !== false)
|
$full_report = sprintf('Directory %s is not writable', $dir); // sprintf for future translation
|
||||||
if (is_dir($dir.DIRECTORY_SEPARATOR.$file) && $file != '.' && $file != '..' && $file != '.svn')
|
|
||||||
if (!ConfigurationTest::test_dir($relative_dir.DIRECTORY_SEPARATOR.$file, true))
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($recursive)
|
||||||
|
while (($file = readdir($dh)) !== false)
|
||||||
|
if (is_dir($dir.DIRECTORY_SEPARATOR.$file) && $file != '.' && $file != '..' && $file != '.svn')
|
||||||
|
if (!ConfigurationTest::test_dir($relative_dir.DIRECTORY_SEPARATOR.$file, $recursive, $full_report))
|
||||||
|
return false;
|
||||||
|
|
||||||
closedir($dh);
|
closedir($dh);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,12 +66,15 @@ class ContactCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function getContacts($id_lang)
|
public static function getContacts($id_lang)
|
||||||
{
|
{
|
||||||
|
$shop_ids = Shop::getContextListShopID();
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM `'._DB_PREFIX_.'contact` c
|
FROM `'._DB_PREFIX_.'contact` c
|
||||||
'.Shop::addSqlAssociation('contact', 'c', false).'
|
'.Shop::addSqlAssociation('contact', 'c', false).'
|
||||||
LEFT JOIN `'._DB_PREFIX_.'contact_lang` cl ON (c.`id_contact` = cl.`id_contact`)
|
LEFT JOIN `'._DB_PREFIX_.'contact_lang` cl ON (c.`id_contact` = cl.`id_contact`)
|
||||||
WHERE cl.`id_lang` = '.(int)$id_lang.'
|
WHERE cl.`id_lang` = '.(int)$id_lang.'
|
||||||
|
AND contact_shop.`id_shop` IN ('.implode(', ', array_map('intval', $shop_ids)).')
|
||||||
ORDER BY `name` ASC';
|
ORDER BY `name` ASC';
|
||||||
|
|
||||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,55 @@ class ContextCore
|
|||||||
*/
|
*/
|
||||||
public $smarty;
|
public $smarty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ var Mobile Detect
|
||||||
|
*/
|
||||||
|
public $mobile_detect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var boolean|string mobile device of the customer
|
||||||
|
*/
|
||||||
|
protected $mobile_device;
|
||||||
|
|
||||||
|
public function getMobileDevice()
|
||||||
|
{
|
||||||
|
if (is_null($this->mobile_device))
|
||||||
|
{
|
||||||
|
$this->mobile_device = false;
|
||||||
|
if ($this->checkMobileContext())
|
||||||
|
{
|
||||||
|
require_once(_PS_TOOL_DIR_.'mobile_Detect/Mobile_Detect.php');
|
||||||
|
$this->mobile_detect = new Mobile_Detect();
|
||||||
|
switch ((int)Configuration::get('PS_ALLOW_MOBILE_DEVICE'))
|
||||||
|
{
|
||||||
|
case 1: // Only for mobile device
|
||||||
|
if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet())
|
||||||
|
$this->mobile_device = true;
|
||||||
|
break;
|
||||||
|
case 2: // Only for touchpads
|
||||||
|
if ($this->mobile_detect->isTablet() && !$this->mobile_detect->is_mobile())
|
||||||
|
$this->mobile_device = true;
|
||||||
|
break;
|
||||||
|
case 3: // For touchpad or mobile devices
|
||||||
|
if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet())
|
||||||
|
$this->mobile_device = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->mobile_device;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function checkMobileContext()
|
||||||
|
{
|
||||||
|
return isset($_SERVER['HTTP_USER_AGENT'])
|
||||||
|
&& isset(Context::getContext()->cookie)
|
||||||
|
&& (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE')
|
||||||
|
&& @filemtime(_PS_THEME_MOBILE_DIR_)
|
||||||
|
&& !Context::getContext()->cookie->no_mobile;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a singleton context
|
* Get a singleton context
|
||||||
*
|
*
|
||||||
|
|||||||
+21
-6
@@ -59,11 +59,11 @@ class CookieCore
|
|||||||
* @param $name Cookie name before encrypting
|
* @param $name Cookie name before encrypting
|
||||||
* @param $path
|
* @param $path
|
||||||
*/
|
*/
|
||||||
public function __construct($name, $path = '', $expire = null)
|
public function __construct($name, $path = '', $expire = null, $shared_urls = null)
|
||||||
{
|
{
|
||||||
$this->_content = array();
|
$this->_content = array();
|
||||||
$this->_expire = isset($expire) ? (int)($expire) : (time() + 1728000);
|
$this->_expire = isset($expire) ? (int)($expire) : (time() + 1728000);
|
||||||
$this->_name = md5($name);
|
$this->_name = md5(_PS_VERSION_.$name);
|
||||||
$this->_path = trim(Context::getContext()->shop->physical_uri.$path, '/\\').'/';
|
$this->_path = trim(Context::getContext()->shop->physical_uri.$path, '/\\').'/';
|
||||||
if ($this->_path{0} != '/') $this->_path = '/'.$this->_path;
|
if ($this->_path{0} != '/') $this->_path = '/'.$this->_path;
|
||||||
$this->_path = rawurlencode($this->_path);
|
$this->_path = rawurlencode($this->_path);
|
||||||
@@ -71,7 +71,7 @@ class CookieCore
|
|||||||
$this->_path = str_replace('%7E', '~', $this->_path);
|
$this->_path = str_replace('%7E', '~', $this->_path);
|
||||||
$this->_key = _COOKIE_KEY_;
|
$this->_key = _COOKIE_KEY_;
|
||||||
$this->_iv = _COOKIE_IV_;
|
$this->_iv = _COOKIE_IV_;
|
||||||
$this->_domain = $this->getDomain();
|
$this->_domain = $this->getDomain($shared_urls);
|
||||||
if (Configuration::get('PS_CIPHER_ALGORITHM'))
|
if (Configuration::get('PS_CIPHER_ALGORITHM'))
|
||||||
$this->_cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_);
|
$this->_cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_);
|
||||||
else
|
else
|
||||||
@@ -79,7 +79,7 @@ class CookieCore
|
|||||||
$this->update();
|
$this->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDomain()
|
protected function getDomain($shared_urls = null)
|
||||||
{
|
{
|
||||||
$r = '!(?:(\w+)://)?(?:(\w+)\:(\w+)@)?([^/:]+)?(?:\:(\d*))?([^#?]+)?(?:\?([^#]+))?(?:#(.+$))?!i';
|
$r = '!(?:(\w+)://)?(?:(\w+)\:(\w+)@)?([^/:]+)?(?:\:(\d*))?([^#?]+)?(?:\?([^#]+))?(?:#(.+$))?!i';
|
||||||
preg_match ($r, Tools::getHttpHost(false, false), $out);
|
preg_match ($r, Tools::getHttpHost(false, false), $out);
|
||||||
@@ -89,8 +89,23 @@ class CookieCore
|
|||||||
return false;
|
return false;
|
||||||
if (!strstr(Tools::getHttpHost(false, false), '.'))
|
if (!strstr(Tools::getHttpHost(false, false), '.'))
|
||||||
return false;
|
return false;
|
||||||
$domain = $out[4];
|
|
||||||
|
|
||||||
|
$domain = false;
|
||||||
|
if ($shared_urls !== null)
|
||||||
|
{
|
||||||
|
foreach ($shared_urls as $shared_url)
|
||||||
|
{
|
||||||
|
if ($shared_url != $out[4])
|
||||||
|
continue;
|
||||||
|
if (preg_match('/^(?:.*\.)?([^.]*(?:.{2,3})?\..{2,3})$/Ui', $shared_url, $res))
|
||||||
|
{
|
||||||
|
$domain = '.'.$res[1];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$domain)
|
||||||
|
$domain = $out[4];
|
||||||
return $domain;
|
return $domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +309,7 @@ class CookieCore
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$content = 0;
|
$content = 0;
|
||||||
$time = time() - 1;
|
$time = 1;
|
||||||
}
|
}
|
||||||
if (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */
|
if (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */
|
||||||
return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0);
|
return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user