1724 Commits

Author SHA1 Message Date
aFolletete
7b58ec6c0e // CHANGELOG ! Thanks to pizza fix ;)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10642 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:33:52 +00:00
fSerny
a3a06d737b // Pizza fix :D
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10641 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:24:22 +00:00
tDidierjean
1657c1c5b1 // fix category tree if tree but maybe no tree
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10640 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:18:07 +00:00
tDidierjean
dfabd7878a // fix category tree if tree
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10639 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:14:48 +00:00
tDidierjean
ca8fbb4d47 // fix category_tree if no tree
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10638 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:13:15 +00:00
vAugagneur
47b2176b4d //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10637 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:07:30 +00:00
aFolletete
3d39e32c43 // fixed little issue
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10636 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:05:56 +00:00
aFolletete
04a3aab393 // WAOW ! Adding change currency feature in AdminOrdersController ! It's amaizing :D Wonderful ;)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10635 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:04:33 +00:00
mMarinetti
6fb9419dbc // fix product edition page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10634 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:01:45 +00:00
fSerny
76cb8f5e03 // Little fix on admin_order.js
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10633 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 23:01:08 +00:00
vAugagneur
367c863e3a //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10632 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:54:43 +00:00
rGaillard
ffc24ed10b // Fix ajax create account
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10631 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:52:34 +00:00
vAugagneur
c3e7c28220 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10630 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:45:25 +00:00
vAugagneur
c66db0eef1 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10629 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:44:28 +00:00
vAugagneur
bc3f7c89a9 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10628 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:44:15 +00:00
fBrignoli
49b2efe3a5 // John Doe is now "reglo"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10627 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:43:34 +00:00
fSerny
f5aadafc92 [-] BO : Partial refund - part 4
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10626 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:42:17 +00:00
tDidierjean
005913ce3b // add BO translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10625 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:39:26 +00:00
tDidierjean
722223c2a4 // fix generateReference()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10624 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:32:16 +00:00
tDidierjean
dbe72f8f76 // add BO translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10623 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:24:40 +00:00
tDidierjean
d8fcdf19fe // fix AdminController translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10622 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:21:25 +00:00
rGaillard
b7c28b8c48 // Fix shop import stock available
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10621 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:19:48 +00:00
fBrignoli
0ebcc6cb67 // John DOE's order is back!
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10620 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:17:25 +00:00
dMetzger
1af8b45b5f // Toolbar removed from cart rules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10619 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:07:22 +00:00
mMarinetti
8356cb82cf // strtouper(Tools::passwdGen(12)) replace uniqid, and Alain asked me to add "lol"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10618 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:07:08 +00:00
dMetzger
42e3ab3b90 // BO login bug fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10617 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 22:04:01 +00:00
lLefevre
7f14442c89 // added translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10616 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:53:21 +00:00
rGaillard
f59ff65357 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10615 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:51:17 +00:00
bMancone
f4ed4ce3ee // AdminCartRulesController : fixed toolbar in initForm()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10614 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:49:48 +00:00
mMarinetti
b027122859 // removed global $_LANGADM in smartyadmin.config.inc.php (not used)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10613 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:48:02 +00:00
tDidierjean
a69d737ad8 // Fix bug with product quantity update
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10612 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:45:11 +00:00
fSerny
3c7d9ba53b [*] BO : Partial refund - part 3
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10611 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:42:27 +00:00
lLefevre
4eaf942429 // fix bug added and remove attachement in AdminProductsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10610 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:37:18 +00:00
tDidierjean
42134be069 // Fix incorrect translation strings in tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10609 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:33:13 +00:00
vAugagneur
66b1f844e4 [+] BO : login and lost password is now in ajax and convert in AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10608 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:32:11 +00:00
rGaillard
b03a1730f6 // Fix back office order link
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10607 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:27:57 +00:00
bMancone
f1755dc5b2 // Stock : french translations on cover/instant state and mvt
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10606 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:22:10 +00:00
bMancone
48b82a094f // Stock : fixed translations in tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10605 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:20:40 +00:00
mMarinetti
acc401e3e8 // removed looong looong code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10604 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:18:11 +00:00
dMetzger
7648f8ece0 // Order processing bugs fixed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10603 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 21:02:51 +00:00
mMarinetti
e5d25eea83 // fix save and stay in product page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10602 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 20:52:52 +00:00
fSerny
ac24d5ddd8 [-] BO : Load customer and cart in AdminOrderController init to fix a bug with CancelProduct
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10601 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 20:52:37 +00:00
rGaillard
0b3c094698 // Fix PHP notice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10600 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 20:47:50 +00:00
bMancone
00fa12e8f1 // AdminDeliverySlipController : fixed toolbars
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10599 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 20:45:18 +00:00
vSchoener
fb66ab60e3 // Fix missing jquery plugin for the address layout
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10598 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 20:32:44 +00:00
bMancone
c666cd32ab // Stock : updated preferences for advanced stock management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10597 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 20:02:08 +00:00
lLefevre
c4732a431a // fix bug "apply priority management" in AdminProductsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10596 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 20:01:33 +00:00
mDeflotte
f21b8defa1 // BugFix with id_address_delivery
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10595 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 19:27:57 +00:00
dMetzger
c604df470d // Cart rules fixed in admin customers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10594 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 19:22:23 +00:00
rGaillard
15298ee65b // Add license to some module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10593 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 19:20:49 +00:00
vSchoener
2490a1def3 // Update Accounting and fix undefined var
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10592 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 19:13:44 +00:00
mMarinetti
6db9f7dcb0 // fix adminproducts images, layout-ajax improvements
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10591 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:52:33 +00:00
mMarinetti
c8faf79c15 // fix adminproducts images
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10590 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:50:10 +00:00
dSevere
ddcede4ef5 // Product Suppliers : Debug and optimizations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10589 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:48:09 +00:00
mMarinetti
b12517c17c [+] BO : new javascript function doAdminAjax to simplify uses of ajax request (the prototype of this function can evolve before beta)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10588 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:38:50 +00:00
rGaillard
b7fecada80 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10587 b9a71923-0436-4b27-9f14-aed3839534dd 2011-11-23 18:37:38 +00:00
mMarinetti
fdd72b47fa // admincontroller fix when json
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10586 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:36:59 +00:00
tDidierjean
9ebe542fdb // fix product live preview and duplication
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10585 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:33:11 +00:00
dMetzger
c32038a6f4 // Removed the underlined space in the BO list headers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10584 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:20:08 +00:00
rGaillard
d3458a1c26 // Revert good priorities on conditions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10583 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:16:55 +00:00
vChabot
d9b6c6401a // adding the php upgrade to move every orders into order_carrier
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10582 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:10:01 +00:00
vSchoener
e66762fc85 // Update bad javascript var for opc
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10581 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:09:50 +00:00
lLefevre
bcd15e8f6f // Fix bug in AdminCustomersController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10580 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 18:01:07 +00:00
dMetzger
f670f7573f [+] BO : add new feature, Order edition
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10579 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:45:52 +00:00
lLefevre
5660c09d62 // delete btn preview if the shop have not virtual_uri in AdminProductsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10577 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:37:16 +00:00
bMancone
45fbdd8635 // Stock : improved translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10574 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:23:10 +00:00
mDeflotte
3989b708c8 // Delivery option are now auto-selected in the checkout
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10572 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:21:30 +00:00
fBrignoli
ba7ec2dd9d [-] FO : Undefined method getOutOfStock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10571 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:18:09 +00:00
lLefevre
b365c2befa // delete btn preview if the shop have not virtual_uri in AdminProductsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10570 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:14:19 +00:00
tDidierjean
d84b5b2749 // BO menu now uses the new icons
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10569 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:12:18 +00:00
rMalie
69feff1ee1 // Fix stock for multishop on search
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10568 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:07:46 +00:00
lLefevre
cc50d29cc3 // added link for preview in AdminProductsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10566 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:05:29 +00:00
fBrignoli
9c01024080 [-] CO : option "fields" is not required
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10565 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:01:52 +00:00
rMalie
e4654570e9 // Some fix on multishop + stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10564 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 17:00:20 +00:00
lLefevre
38d17b447e // Fix bug in AdminProductsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10562 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 16:49:15 +00:00
vAugagneur
c13021dad0 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10561 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 16:46:46 +00:00
tDidierjean
2d3db2e15d // Add actions to product list and fix product duplication
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10560 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 16:45:14 +00:00
vKham
4804005df2 //new custom stylesheet login, add new images logo module partenaires, admin css
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10559 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 16:45:13 +00:00
rGaillard
1207b5bf40 // Small fixes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10558 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 16:31:53 +00:00
mDeflotte
7ac2f24ff3 // BugFix : use current($array instead of $array[0]
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10557 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 16:22:08 +00:00
lLefevre
74145e0081 // fix bug added action edit and delete in AdminScenesController + norms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10555 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 16:13:23 +00:00
dSevere
2d238bbac7 // Stock Management : Show stock interfaces only if the option is active in the configuration + debug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10554 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 16:07:57 +00:00
bMancone
5735102138 // #PSFV-125 - homeSlider fixed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10553 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:55:49 +00:00
fBrignoli
f3e2225957 // css
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10552 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:41:27 +00:00
bMancone
6db622ece6 // Stock : updated tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10551 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:38:36 +00:00
mMarinetti
67ba2e5df5 // phpdoc fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10550 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:37:50 +00:00
rMalie
3bbbdf8de5 // Fix multishop javascript for preferences and shop url
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10549 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:37:29 +00:00
tDidierjean
5dbd54ff5f // Fix helper translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10548 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:28:05 +00:00
lLefevre
8370b1cd15 // fix bug smarty method in .tpl {l s =''} for {l s=''}
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10547 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:24:04 +00:00
tDidierjean
1d734487ff // Fix google autotranslate
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10546 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:19:53 +00:00
vKham
74fb39ef4b add new images menu heaeder navigation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10544 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:09:36 +00:00
tDidierjean
cb8cec2551 // refactoring AdminTranslations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10542 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:00:48 +00:00
tDidierjean
3e39010a9b // fixes to AdminController:translate() performance
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10541 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 15:00:19 +00:00
bMancone
0367e98504 // Stock : updated styles in templates
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10538 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 14:29:49 +00:00
rGaillard
f8acb56108 // Little change on adminpayment
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10537 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 14:29:40 +00:00
lLefevre
8a5493103d // fix bug change translate AdminTab for AdminController in AdminTranslationsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10536 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 14:25:13 +00:00
bMancone
eb2d92644f // Added translations + new design for AdminStockCover & AdminStockInstantState
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10535 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 14:21:25 +00:00
mDeflotte
a6f7bec80f // Improving carrier option render in the product admin tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10533 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 14:03:23 +00:00
vAugagneur
e710e73009 //new screencast frame
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10532 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 14:03:20 +00:00
mMarinetti
668f3676eb // fix redirect
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10531 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 14:01:28 +00:00
mDeflotte
73e4b5fe56 // BugFix : With Guest Checkout, an alert is displaying each time we increase/decrease the quantity of a product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10530 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:59:14 +00:00
lLefevre
391fea452c // fix added autocomplete in module blocksearch
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10529 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:58:23 +00:00
vChabot
109c38c5e0 // adding combination URL to the cart summary
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10528 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:50:50 +00:00
fSerny
4c83dce8f4 [-] BO : AdminModule Addons Icon now appear in AutoComplete Search
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10527 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:49:15 +00:00
vAugagneur
3359ebb347 //clean footer.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10526 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:39:24 +00:00
dMetzger
bb7050715b // bug fix for the cart rules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10525 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:38:41 +00:00
dSevere
bac9674b03 // not required anymore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10524 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:30:42 +00:00
dMetzger
dce036f929 // 2 bug fixes for the cart rules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10523 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:24:15 +00:00
lLefevre
d764a3c2fe // Added view.tpl in AdminPaiementController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10522 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:22:28 +00:00
lLefevre
a6b66fb288 // Fix bug in AdminPaymentController && added toolbar
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10521 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:21:39 +00:00
dSevere
ad6e5b1cb8 // AdminController and stock management : some debug and updates
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10520 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:15:40 +00:00
tDidierjean
27e910572c // fixes to orders->view product, adminsearch->toolbar, admintaxrules hint
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10519 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:14:07 +00:00
rMalie
0f87f86203 // Fix some bug on multishop + improve display of shop pages
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10518 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 13:09:23 +00:00
vAugagneur
7c7eda3167 //clean header.tpl and footer.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10517 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 12:59:02 +00:00
bMancone
2dbeb55bf1 // AdminProductsController: added new array to translate tabs name. Added translations of fr/admin & SupplyOrderForm(PDF)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10516 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 11:41:25 +00:00
bMancone
9506172dd4 // AdminController: typo (?) in an error message
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10515 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 11:39:51 +00:00
fSerny
79867d0a75 [-] BO : AdminModules fix on Addons Connection
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10514 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 11:31:39 +00:00
vAugagneur
aed1e77b94 //clean header.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10513 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 11:28:31 +00:00
rGaillard
ddcdcd571d // Warning is now displayed for shop without url
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10512 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 11:11:45 +00:00
vSchoener
130cf8ed11 // Update accounting controller due to last commit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10511 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 10:57:07 +00:00
dMetzger
ca68421dae // Translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10510 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 10:49:44 +00:00
rGaillard
3790730861 // Little fix on carts tab filters
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10509 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 10:37:33 +00:00
mDeflotte
6f6f13a4e0 // BugFix : "Please accept Terms of Service" always displayed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10508 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 10:32:29 +00:00
rGaillard
fd06e5c1a1 // Fix online visitors on carts tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10507 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 10:32:13 +00:00
rGaillard
ccaa0542a0 // Configuration feedback is now not displayed when changing shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10505 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 10:19:27 +00:00
rMalie
faa6dda362 // Multishop: redirect 301 to main URL with request uri when a non main URL is triggered
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10504 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 10:18:42 +00:00
rGaillard
06ab93a8f6 // ajax process off adminaccess is now in the controller
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10503 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 10:01:22 +00:00
mDeflotte
4261dbc0df // Multishipping : Refresh carrier list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10502 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 09:57:21 +00:00
rMalie
c45a172559 // Fix admin toolbar: don't go anymore on top page when clicking on toolbar submit actions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10501 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 09:42:53 +00:00
rGaillard
335d5cf93d // Fix displaying name of shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10500 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 09:35:30 +00:00
lLefevre
4427b9a377 // Fix bug in AdminCartsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10499 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 09:28:36 +00:00
vKham
95de65c92f //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10496 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 09:15:27 +00:00
vKham
772083c15d //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10495 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 09:14:42 +00:00
fSerny
8bec694c94 [-] MO : Tnt Carrier (1.2.1) - Small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10494 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 09:13:25 +00:00
rMalie
21666cf39d // Fix html entities on admin template list_footer.tpl for bulkaction
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10490 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 08:49:19 +00:00
dMetzger
63436b787b // CartRule fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10489 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 08:49:05 +00:00
dMetzger
b854caf867 // Avoid some crashes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10488 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 08:39:49 +00:00
vAugagneur
2a0dcf9692 //remove debug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10486 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 08:35:38 +00:00
lLefevre
76f3457e2f // fix added translation for controllers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10485 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 05:59:34 +00:00
fSerny
48a8719d2f [-] MO : TNT Carrier (1.2)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10484 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 00:54:51 +00:00
fSerny
e718fb9c02 [-] MO : TNT Carrier (1.1)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10483 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-23 00:29:59 +00:00
rGaillard
a02f6983f0 // Add multishop association for blocktag module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10482 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 23:02:24 +00:00
rGaillard
1278a064b6 // blockstores is now multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10481 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 22:30:12 +00:00
rGaillard
48776271fd // blockstores is now multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10480 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 22:21:05 +00:00
vAugagneur
c827a9af0e //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10479 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 22:09:22 +00:00
vAugagneur
9aa523fb4d //remove debug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10478 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 22:03:52 +00:00
vAugagneur
9756801649 [+] BO : added new input type tags
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10477 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 21:48:07 +00:00
rGaillard
e02cc320ee // CMS - Add shop filters
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10476 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 21:18:24 +00:00
rGaillard
ad9bf8d324 // Fix blockmanufacturers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10475 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 20:51:40 +00:00
rGaillard
13f63f53f7 // Update blockcontactinfos
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10474 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 20:38:45 +00:00
rGaillard
9d6ab8e70b BlockContact update
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10473 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 20:35:48 +00:00
rGaillard
ef75f20a63 // miss file on last commit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10471 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 20:22:29 +00:00
rGaillard
e84dec5c4a // Blocktopmenu is now compliant with multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10470 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 20:21:58 +00:00
vAugagneur
0242329b30 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10468 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 19:33:19 +00:00
dSevere
844b0f4055 // Product Admin Controller : update toolbar + bugs fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10467 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 19:17:41 +00:00
bMancone
933d1e4d86 // Stock/Supply order : added french translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10466 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 18:51:23 +00:00
bMancone
699ee23d94 // AdminStockMvt : ergonomy
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10465 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 18:50:53 +00:00
lLefevre
5f91af9c4e // fix display AdminLogsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10459 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 17:21:41 +00:00
mDeflotte
5532f12d80 // Multishipping : on opc, on putting multi-shipping to off, the cart is set to one address delivery
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10458 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 17:18:30 +00:00
tDidierjean
4dc0ebb2de // fix AdminStatsTab::displayStats() when no module is active
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10457 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 17:17:19 +00:00
lLefevre
a848e82ae9 // fix bug AdminTranslationsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10456 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 17:14:11 +00:00
lLefevre
cbea65eb66 // fix bug in AdminController method initView()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10455 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 17:00:09 +00:00
lLefevre
41d593618d // fix bug in HelperView
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10454 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:59:03 +00:00
tDidierjean
c5c479dcb7 // Added toolbar to AdminModulesPositions and added full products list on AdminProducts
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10453 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:49:52 +00:00
fBrignoli
cb92bacb97 // Strict standard on initView
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10452 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:45:47 +00:00
dSevere
1934e2ef6a // Product Admin Controller : update interfaces for quantities, suppliers and warehouses + bugs fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10451 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:41:42 +00:00
lLefevre
3ceff1df09 // delete multiple button save in AdminStatsTabController and added juery ui datepicker
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10450 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:36:10 +00:00
rMontagne
f00820e090 //fix UpdateShopAssocImage
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10449 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:29:10 +00:00
bMancone
6d46e7dced // Supply Orders : prices are now correctly converted, depending on the currency of the order/warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10448 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:23:00 +00:00
rMontagne
3439de9ef9 //fix Image.tpl for unique shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10447 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:22:23 +00:00
mDeflotte
49922799e1 // BugFix : Problem with token
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10446 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:09:49 +00:00
lLefevre
40d2a6282b // fix added toolbar in AdminInformationController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10445 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 16:05:08 +00:00
lLefevre
62696d85f9 // fix added toolbar in AdminTranslationsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10444 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 15:54:14 +00:00
vChabot
4334537fe1 // feature position works fine
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10443 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 15:49:59 +00:00
mDeflotte
1962458d39 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10442 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 15:36:01 +00:00
bMancone
e69629b214 // Supply Orders : it is not possible to create an order if the date_delivery_expected is in the past, anymore.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10441 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 15:31:01 +00:00
mDeflotte
642d9b4648 // Revert 10430
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10439 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 15:25:47 +00:00
rMalie
b13b8db639 // Improve menu in new BO (better cursor)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10438 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 15:07:09 +00:00
mDeflotte
e4361ad56b // BugFix Error on clicking carrier option in cart/opc
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10437 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 15:07:08 +00:00
vChabot
71cbc22bc0 // fix bug from 1.4
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10435 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:59:30 +00:00
fSerny
c68c8be6e8 [-] BO : AdminModules - Fix on GetModulesOnDisk and general ergonomy
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10434 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:53:58 +00:00
vChabot
4b15da6656 // attributes position works fine
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10433 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:53:50 +00:00
mDeflotte
3fbdda4b45 // BugFix with a css rule
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10432 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:46:00 +00:00
lLefevre
b0366ed9ac // fix bug in AdminBackupController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10431 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:44:54 +00:00
mDeflotte
0d5421a40c // Dont need to set the id_carrier in class Cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10430 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:41:41 +00:00
bMancone
bbdf6513a8 // Update Supply Order Form (PDF)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10428 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:37:36 +00:00
mMarinetti
2ee0842282 // check if PS_MODE_DEV is defined before checking its value
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10426 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:32:58 +00:00
mMarinetti
4a5f3dc5c9 // autoupgrade will not be present in alpha release
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10425 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:31:56 +00:00
fBrignoli
312d93a601 // deprecated function replaced
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10424 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:29:12 +00:00
rGaillard
2ad9e4aa20 // Fix bugs AdminShopController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10423 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:22:11 +00:00
vAugagneur
663009b3bb //fixed small bug on live edit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10422 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:11:34 +00:00
mDeflotte
da416dea61 // Autoset id_carrier on the cart constructor + Replace a hookExec()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10420 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:09:52 +00:00
mMarinetti
3f649efee7 // restored previous changes since r10392.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10419 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 14:06:55 +00:00
mDeflotte
8c0e148b75 // Re-put Cart->id_carrier + BugFix with shipping cost calculation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10417 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 13:50:53 +00:00
mMarinetti
99e90d5492 // fix required fields
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10415 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 13:29:07 +00:00
mMarinetti
7056c69af1 // fix products informations page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10414 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 13:28:24 +00:00
rMalie
abead31e0f // Apply fix on reduction price from 1.4 to new system on 1.5
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10412 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 13:24:19 +00:00
lLefevre
f632af5e7a // fix bug statsforecast and added toolbar in AdminDbController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10411 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 13:23:23 +00:00
vChabot
9fef06a9bb // correcting merge problem
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10409 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 13:07:47 +00:00
dSevere
e095ebccd3 // Stock Available : bug fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10408 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 12:57:09 +00:00
bMancone
7b394c6cbd // Product names are now correctly displayed in AdminStockManagement & AdminStockCover
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10398 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 12:40:56 +00:00
dSevere
d0c1167d6c // Stock Available : bug fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10395 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 12:39:30 +00:00
fSerny
f0cf51ab64 // Addons connection
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10394 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:54:14 +00:00
rMontagne
9159631b27 Refactoring image system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10393 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:46:02 +00:00
rMontagne
bb524bf7a5 // Refactoring images.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10392 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:35:34 +00:00
rMontagne
b7437fdb3c Refactoring image system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10391 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:34:25 +00:00
mDeflotte
eab460df2d // BugFix id_carrier in cart not defined + choosing address delivery for multishiping on opc
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10389 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:28:22 +00:00
tDidierjean
e0415ec7e2 // Remove deprecated calls to Tools::addJS/CSS in modules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10388 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:24:56 +00:00
bMancone
5b4d337cd6 // Warehouse: shops are now correctly associated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10387 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:23:32 +00:00
fSerny
1723512579 // Change Addons login Position
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10386 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:19:41 +00:00
rGaillard
ed19c60ff8 // Fixed redirect link after logout
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10385 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:17:32 +00:00
fBrignoli
e176ea6dd3 // broken due to merge
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10384 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:11:30 +00:00
lLefevre
7025caef50 // small fixes to BO and norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10383 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-22 09:03:03 +00:00
rMalie
a4b5aa4251 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10382 b9a71923-0436-4b27-9f14-aed3839534dd 2011-11-22 08:48:49 +00:00
fSerny
620653ce13 [*] BO : AdminModules improved performance
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10381 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 23:42:33 +00:00
fSerny
ef9d7c62b6 // Fix on Module Class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10380 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 23:21:49 +00:00
fSerny
c333d84530 [*] BO : Admin Modules now works in Ajax :)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10379 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 21:44:52 +00:00
mMarinetti
2ee1dd5813 // AdminProducts informations fix, saveAndStay fix,
[+] BO : if json, ajax-layout.tpl can generate json with conf, _errors, warnings, informations and page var
// HelpAccess improvement
// now Product does not require quantity anymore

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10377 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 19:26:30 +00:00
dSevere
e05452c7c4 // Product Warehouse location : Manage multiple warehouses and location associated for a product / product attribute
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10376 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 19:10:27 +00:00
dSevere
a9b5f70767 // Product Warehouse location : Manage multiple warehouses and location associated for a product / product attribute
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10375 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 18:43:04 +00:00
bMancone
de6d9c7bbe // Supply Orders: the supply order form is now generated (PDF)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10374 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 18:31:44 +00:00
tDidierjean
5dc1c8a71c // small fixes to BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10372 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 17:49:47 +00:00
vKham
ff30d33e8f // add new images config checklist dashboard
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10370 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 17:32:43 +00:00
vKham
2a83293a54 // new bloc homepage configuration checklist, link
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10368 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 17:24:02 +00:00
lLefevre
20b05a63ee // delete link of list in AdminTrackingController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10367 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 17:21:31 +00:00
lLefevre
e902d3e1dd // added tpl in AdminTrackingController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10366 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 17:11:51 +00:00
fSerny
2190551536 [*] BO : New module interface tab now connected to PrestaShop Addons
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10365 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 17:11:01 +00:00
lLefevre
9e74ede928 // fix bug in AdminTrackingController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10364 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 17:09:51 +00:00
tDidierjean
b10fb843b5 // remove smarty translate addslashes for BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10363 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 16:53:58 +00:00
vSchoener
b45021c243 // update security injections
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10362 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 16:07:40 +00:00
tDidierjean
7ec7dd4bbe // Add BO translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10360 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 15:46:40 +00:00
mMarinetti
8a82865591 // fix tracking
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10359 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 15:46:07 +00:00
rMalie
7a81fbab9c // Fix supplier_order_state metadata in installer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10358 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 15:44:23 +00:00
tDidierjean
e941c6df4a // Fix escaping in AdminTranslations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10357 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 15:39:31 +00:00
fBrignoli
b0247fe0cb // translations iso code was hard coded
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10356 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 15:36:46 +00:00
tDidierjean
18c81442d1 // Fix AdminCmsControllers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10355 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 14:30:26 +00:00
mMarinetti
5c8b5334a8 // removed blank line in layout-ajax.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10354 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 14:28:27 +00:00
rMalie
ecb6e763ff // Fix installer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10353 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 14:27:29 +00:00
mMarinetti
703e77cae2 // removed blank line
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10352 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 14:26:51 +00:00
lLefevre
9a175627e6 // fix bug : delete submit button and change css for box info in AdminGeolocationController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10351 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 14:18:35 +00:00
lLefevre
975bce4de9 // button submit added in toolbar for AdminImportController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10350 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 14:00:24 +00:00
tDidierjean
8a395c2b6e // Changed AdminPDF to lowercase
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10349 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 13:57:27 +00:00
tDidierjean
b654b56035 // Change CMS controllers to lowercase and restore translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10347 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 13:36:45 +00:00
lLefevre
b0fbfbfd88 // fix added leadin link and norm in AdminCategoriesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10346 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 13:34:08 +00:00
rMalie
a27ac5f6ed // Fix installer after merge
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10345 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 13:22:23 +00:00
rMalie
c1e4594a22 // Fix Tools class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10344 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 13:20:51 +00:00
tDidierjean
49a03078ab // AdminFeatures list position
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10342 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 13:09:00 +00:00
fGaillard
983508dd8b // BugFix Invoice / Delivery PDF encoding
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10340 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 12:37:59 +00:00
bMancone
d6470b462b // StockAvailable: synchronizes stock when updating an order (if necessary)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10338 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 11:52:04 +00:00
lLefevre
595c1384f4 // Fix delete multiple toolbar in AdminPerformanceController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10337 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 11:42:42 +00:00
rGaillard
52d4292f76 // File missing in last commit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10335 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 11:07:37 +00:00
rGaillard
9b6824a825 // Replacement of AdminTab by AdminController on modules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10334 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 11:06:35 +00:00
rMalie
9d10de0848 // Merge -> 10309
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10333 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 11:05:10 +00:00
mDeflotte
2537c72189 // BugFix assign var carrier_list on dmin product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10332 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 11:04:16 +00:00
bMancone
276f493dd7 // StockAvailable: updated synchronize() and updated its usage within the different stock controllers when necessary
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10331 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 11:01:33 +00:00
mDeflotte
0ce1e22813 // BugFix with opc and multishipping
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10330 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 10:42:14 +00:00
mMarinetti
f09017dc73 // css harmonization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10329 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 10:29:58 +00:00
lLefevre
1cc95bcce1 // fix bug : delete submit button and merge fieldset in AdminSearchConfController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10328 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 10:23:19 +00:00
tDidierjean
5b908a0844 // fix tpl folder detection in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10327 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 10:11:49 +00:00
lLefevre
c47131aa9f // fix bug display message error or success in AdminAccessController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10326 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 10:11:38 +00:00
fSerny
792452c2e0 // Fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10325 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 10:11:27 +00:00
tDidierjean
eb5cea2726 // Fix translations in BO for tpl folders with underscore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10324 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 09:53:21 +00:00
rGaillard
4abe8efd75 // Improve AdminGroupShopController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10323 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 09:46:01 +00:00
tDidierjean
c16ca27155 // Fix price and required display for options
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10320 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 09:34:37 +00:00
lLefevre
a918295ae3 // fix bug : delete submit button and toolbar not fix in AdminLocalizationController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10319 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 09:33:37 +00:00
vKham
c441358b40 // new icon for adminhome, adminmodules and header
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10318 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 09:21:26 +00:00
rGaillard
f00892539c // Improve AdminShopController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10317 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 09:18:27 +00:00
vKham
3f97d4ab2b // css improvement for adminHome and adminModule
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10316 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 09:15:35 +00:00
fBrignoli
401722bb0b // missing values for shipping, wrapping, discounts
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10315 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 09:07:57 +00:00
rMalie
8cb669fb2c // Fix modules ID on <body> for module controller page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10312 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 08:51:47 +00:00
fBrignoli
67f4bf47da // weird characters in delivery slip template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10311 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 08:37:01 +00:00
fBrignoli
1d47af51d7 [-] PDF : TCPDF cache directory is now in PS_CACHE_DIR
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10310 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 08:35:40 +00:00
mDeflotte
8add301ef3 // Bug with sql query to duplicate product from the cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10308 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-21 08:12:48 +00:00
mMarinetti
4965071c42 // fixed parsing and display for back office (fields values)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10306 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 23:50:27 +00:00
mMarinetti
2406935d7a // fixed parsing and display for back office translations
// die2Exception in AdminTranslationsController 

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10305 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 23:35:21 +00:00
mMarinetti
08a389a760 // fix product edition textarea rte
// minor fix warning if admin translation file doesnt exists

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10304 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 23:06:45 +00:00
tDidierjean
9e8d16ad6a // fix position in list for products, product images. still need to fix display after change position product images
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10302 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 19:47:07 +00:00
mMarinetti
70c92e1d38 // fix translations / retrocompat in AdminController and config/smartyadmin.config.inc.php (AdminTranslationsController will follow)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10301 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 19:10:13 +00:00
tDidierjean
3f12f6b83f // fix BO search
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10300 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 19:02:42 +00:00
tDidierjean
07b109e003 // Fix AdminCarriers list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10299 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 18:37:31 +00:00
rGaillard
53d85ae134 // Shop association improvements
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10298 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 17:13:36 +00:00
rGaillard
d57b3cbcd7 // Fix multishop association on CMS tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10297 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 16:47:34 +00:00
dMetzger
8fdcb10f78 // BO : cart rules form improved
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10294 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 16:18:04 +00:00
rGaillard
14cb2b1ef0 // Miss on last commit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10293 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 16:10:20 +00:00
dMetzger
a98752eb22 // Vouchers are shrinkable again (must be tested more thoroughly)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10292 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 15:53:31 +00:00
rGaillard
e4096bf943 // Constructor of OrderDetail correctly call parent constructor
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10291 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 15:51:33 +00:00
dMetzger
db15eec68b // BO : cart rules form improved
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10290 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-20 14:50:20 +00:00
rGaillard
a25cc16f28 // Module configuration is now displayed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10289 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-19 15:03:20 +00:00
rGaillard
a318ca610f // Add missing }
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10288 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-19 14:10:22 +00:00
rGaillard
bc160bb762 // Fix many smarty notices
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10287 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-19 13:48:31 +00:00
tDidierjean
58c35a2152 // HelperForm : 'p' replaced by 'desc'
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10286 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 18:27:48 +00:00
dSevere
226230f58b // Supply Orders : Move ajax product search in the controller -> ajaxProcessSearchProduct()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10283 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 16:57:10 +00:00
rGaillard
96b9355d9d // Add method method getGlobalValue on Configuration
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10282 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 16:46:56 +00:00
mMarinetti
d6ef55b5ed // fix adminProducts > images
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10281 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 16:42:51 +00:00
rGaillard
c7310f3899 //Block advertising multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10280 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 16:38:33 +00:00
dSevere
a24764b9b3 // Suppliers : Manage multiple suppliers for a product / product attribute + integration with supply orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10279 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 16:29:50 +00:00
fSerny
928e0a5625 [*] BO : New module interface tab now all html is in tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10278 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 16:14:43 +00:00
lLefevre
1bf46b362c // fix delete var no_back and multiple call method initToolbarTitle
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10277 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 16:05:46 +00:00
tDidierjean
fd90a0313d // Fix AdminThemesController thumbnails
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10275 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 15:30:22 +00:00
rGaillard
4cdc2c23db // Fix smarty cache
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10274 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 15:10:23 +00:00
lLefevre
716acbaffa // fix delete assign token in AdminController.php, use function smarty {getAdminToken tab=''}
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10273 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 15:00:58 +00:00
lLefevre
d723813173 // fixed bug assign var smarty and delete content.tpl for AdminGeolocationController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10272 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 14:49:02 +00:00
lLefevre
ae4a223509 // fix added toolbar in HelperOptions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10271 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 14:22:53 +00:00
mDeflotte
eda71ac8fb // BugFix with carrier module and multishipping
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10267 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 14:14:06 +00:00
tDidierjean
174be2bfce // fix module tab dispatch
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10266 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 14:10:23 +00:00
tDidierjean
d9cb7eb475 // Remove unused attributeLang
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10265 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 14:09:17 +00:00
vSchoener
6ae7ef6cbb // Update Accounting, handle errors for Date and fix bug when default_account_number isn't set at all
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10264 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 13:19:13 +00:00
mDeflotte
eae6b9f67b // Bug with carrier table creation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10263 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 13:03:09 +00:00
mDeflotte
107bd4f779 [-] allow_seperated_package need to be an int and not a boolean on class cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10262 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 12:49:25 +00:00
lLefevre
e42cb899ef // fix bug list_skip_action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10260 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 11:57:33 +00:00
mDeflotte
5e6ab08a00 // Merging multishipping branche on 1.5
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10259 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 11:13:31 +00:00
tDidierjean
8a1bd2eb2d // Remove <img> from confirmation messages
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10258 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 11:00:37 +00:00
vChabot
5d825bbbc1 // little fix about carrier with unidentified group
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10256 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 10:54:16 +00:00
lLefevre
611b4f7bde //fix change initForm() method in AdminSlipController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10255 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 10:51:27 +00:00
tDidierjean
90a53b4cf1 // Change customer group for unidentified customers when getting carriers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10254 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 10:50:42 +00:00
lLefevre
df543a4f14 //fix added toolbar in AdminInvoicesController and change initForm() method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10250 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 10:28:21 +00:00
tDidierjean
dd01f32fad // Remove BO themes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10249 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 10:27:07 +00:00
tDidierjean
40339f1add [-] Classes : fix dispatcher for FO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10246 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 10:10:07 +00:00
fBrignoli
7fc0c2330b // additional comment
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10243 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-18 09:32:49 +00:00
mMarinetti
b8812a4161 // sql query improvement for $feature->nbFeatures()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10240 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 18:54:17 +00:00
mMarinetti
5ef065bbca [+] BO : #PSFV-94 - AdminProduct form features
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10239 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 18:52:54 +00:00
mMarinetti
2eb10a760f // removed unused code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10238 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 18:47:32 +00:00
mMarinetti
11f41ed9c2 // small fix on admininformation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10237 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 18:46:27 +00:00
tDidierjean
740ac7c843 // AdminTab compatibility: Dispatcher for BO now search tabs in database, not on the disk. AdminTabs now uses the new BO theme.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10236 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 18:15:07 +00:00
tDidierjean
60272fbce4 // Fix AdminEmailsController settings update and test mail
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10235 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 17:39:27 +00:00
fBrignoli
28ac8e58d5 // default fonts for tcpdf library
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10234 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 17:39:16 +00:00
fBrignoli
e3f0000076 // Fonts removed temporary
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10233 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 17:33:02 +00:00
vChabot
1a76c8975f [*] BO : You have now 3 new default groups. Unidentified group, guest group, and customer group.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10232 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 17:22:15 +00:00
fBrignoli
e5f3c3ca2a [*] PDF : PDF is now rendered by TCPDF throught HTML template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10231 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 17:15:23 +00:00
vAugagneur
ab22eaf449 //fixed small bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10230 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 17:15:09 +00:00
lLefevre
8c99bcf8a4 // fix bug : added accesses in AdminCMSCategoriesController and AdminCMSController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10229 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 17:07:24 +00:00
lLefevre
03194ce5c6 // fix norms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10228 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 16:57:41 +00:00
vSchoener
1ca36181db // delete debug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10227 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 16:39:43 +00:00
vSchoener
e050010261 // Update Accounting form
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10226 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 16:38:32 +00:00
lLefevre
4621551acf // fix added form.tpl in AdminWebserviceController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10224 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 16:05:06 +00:00
tDidierjean
9900226eba [-] Classes : fixed bug with displayAsDeprecated functions when not called from a class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10223 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 15:49:40 +00:00
fBrignoli
63283c94c2 [+] PDF : TCPDF Library
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10222 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 15:40:34 +00:00
vAugagneur
e855e49dfb //fixed small bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10219 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 15:21:36 +00:00
fSerny
aa7a811258 [*] BO : New module interface tab now accept logo.png
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10211 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 13:26:17 +00:00
lBrieu
f182a82ee9 // Bug fix when deleting a file associated to a virtual product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10210 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 13:25:14 +00:00
lBrieu
284c892d4d // Bug fix when deleting a file associated to a virtual product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10209 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 13:24:49 +00:00
lBrieu
1f1ca31cda // Bug fix when deleting a file associated to a virtual product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10208 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 13:24:19 +00:00
lBrieu
b6ab71ecc2 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10206 b9a71923-0436-4b27-9f14-aed3839534dd 2011-11-17 13:11:45 +00:00
lLefevre
4be94127c8 // fix norm and change asso_shop for shop call in initForm()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10205 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 12:27:07 +00:00
lBrieu
24a617d922 // Bug fix with fillCombination javascript function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10203 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 11:29:02 +00:00
lBrieu
14028f0d36 // Bug fix with fillCombination javascript function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10202 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 11:28:44 +00:00
lBrieu
634934e6cf // bug fix when trying to add files to combinations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10201 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 09:54:49 +00:00
lBrieu
5784a4cd46 // bug fix when trying to add files to combinations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10200 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 09:54:13 +00:00
lBrieu
74a00eab8a // bug fix when trying to add files to combinations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10199 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 09:53:59 +00:00
mMarinetti
38f3940d18 // now custom_form smarty var can be empty in subtab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10197 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 09:08:23 +00:00
mMarinetti
68f2cb80fb // fix adminproduct removing trailing 'loading'
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10196 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 09:06:43 +00:00
mMarinetti
fe5fe7f3db // fix ajax-tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10195 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 09:03:42 +00:00
lBrieu
41b256f637 // bug fix when a product has no default image
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10194 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 08:46:06 +00:00
vKham
d2e80e4fbf //update admin css
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10193 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 08:45:39 +00:00
vAugagneur
89be6d647c [+] BO : adminTab Groups is now a convert to a AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10192 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 08:21:22 +00:00
lLefevre
b01e9b1a8a [*] BO #PSFV-94 : Added AdminShopController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10191 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 08:10:04 +00:00
vAugagneur
6299e72833 //added condition in processDelete to check list_skip_actions array
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10190 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 07:54:14 +00:00
fSerny
710605dd2a [+] BO : New module tab interface - #PSFV-94
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10188 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-17 00:43:30 +00:00
lLefevre
e531c74372 // Fix change tab for controller of AdminQuickAccesses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10187 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 21:27:03 +00:00
bMancone
bb55277763 // StockManager: updated getProductRealQuantities(). StockAvailable: fixed.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10186 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 17:55:39 +00:00
lLefevre
4cc9dc04bf // fix bug method addGroupsIfNoExist() in class Category
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10185 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 17:48:48 +00:00
dSevere
c58d04acc9 // Product : Update stock and quantities of current product for compatibility with new stock management system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10184 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 17:31:45 +00:00
mMarinetti
4e159bf6b6 [*] All : new method Controller::redirect and property $controller->redirect_after
// and added postprocess return value

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10182 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 16:25:00 +00:00
mMarinetti
5fe5558dbe [+] BO : #PSFV-94 - AddonsAccount and AddonsCatalog
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10180 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 15:29:00 +00:00
lLefevre
6507f909b3 // Fix bug position in list_content;tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10179 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 15:20:55 +00:00
mMarinetti
2844627e14 // ajax mode now uses layout-ajax.tpl by default
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10175 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 14:48:24 +00:00
tDidierjean
72644e0118 [*] BO : #PSFV-94 - added AdminCMSContentController, AdminCMSController, AdminCMSCategoriesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10174 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 14:18:36 +00:00
bMancone
41f81bf5ae // Warehouse: it is not possible to delete a warehouse of it has pending supply orders.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10173 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 14:12:58 +00:00
lLefevre
4b858a2bed // fix bug view.tpl in AdminSuppliersController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10172 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 13:35:44 +00:00
lLefevre
4296afbf39 // Fix added new controller accesses in installer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10171 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 13:13:10 +00:00
mMarinetti
7fea58a6bd // javascript for warnings and errors message are now in footer.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10170 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 13:03:02 +00:00
bMancone
50edc71603 // Stock : fixed/improved interfaces
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10169 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 13:01:16 +00:00
dSevere
37b868fde9 // stock movements : interface bug fix on product name in case of the product was deleted from the system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10168 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 11:03:25 +00:00
mMarinetti
55d910eb08 // override Tools empty
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10167 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 10:51:05 +00:00
mMarinetti
257ff5c380 // fixed AdminOrders display view
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10166 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 10:49:30 +00:00
lLefevre
503d819dab [*] BO #PSFV-94 : Added AdminPerformanceController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10165 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 10:28:33 +00:00
bMancone
b407c8f737 Supply Orders: updates rights on receipt update
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10163 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 10:10:46 +00:00
mMarinetti
58fbf5f9e8 [+] BO : #PSFV-94 - new controller AdminTags, thanks again to Julien Breux \!
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10162 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 10:08:14 +00:00
bMancone
effd1924f8 // AdminSupplyOrdersController: fixed currency in 'view'. StockManager: added warehouse filter on getProductRealQuantity()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10161 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 09:51:06 +00:00
vAugagneur
c229af31c5 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10160 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 09:48:44 +00:00
vAugagneur
a48be7ddf3 //fixed css treeview
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10159 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 09:45:07 +00:00
bMancone
7472b6c466 // AdminStock{Cover,InstantState} : fixed and updated.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10157 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 09:30:45 +00:00
mMarinetti
a5ee9ec98c // adding missing admin/themes/template/scenes/form.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10154 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-16 08:52:18 +00:00
lLefevre
916d1fbaef // Fix added token in link of AdminQuickAccesses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10152 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 21:57:11 +00:00
bMancone
0552cfb60a // Warehouse: getWarehousesByProducId()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10151 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 18:25:45 +00:00
bMancone
8931216544 // Stock : fixed bugs on cover/instant state/warehouse/management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10150 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 18:19:27 +00:00
vKham
03823bc17d // added new pics for messages box
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10147 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 17:25:47 +00:00
vSchoener
adae213cec // Update Accounting for the return display html
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10145 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 17:11:53 +00:00
mMarinetti
3689276b37 [+] BO : #PSFV-94 - AdminScenes is now an AdminController
// improvement of form.tpl (shop) 


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10143 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 16:47:18 +00:00
mMarinetti
ca652516d9 // treeview.css fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10142 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 16:40:43 +00:00
mMarinetti
13e4f0d9e5 // Scene constructor bugfix, removed wrong cast
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10141 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 16:31:49 +00:00
tDidierjean
b3b48cf3b0 // You can now display confirmation messages by adding them to array $confirmations in AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10140 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 16:10:34 +00:00
lLefevre
2faf5b2f34 // fix bug position in AdminFeaturesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10139 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 15:43:11 +00:00
lLefevre
764ccc45a3 [*] BO #PSFV-94 : Added AdminFeatureController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10137 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 15:37:04 +00:00
vSchoener
6b502937dd // Update sql for Accounting
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10135 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 15:04:08 +00:00
vSchoener
bc5fb5c6f9 // delete comment Accounting
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10134 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 14:47:10 +00:00
vSchoener
b0c20f9693 // Update Accounting for export #2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10133 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 14:45:51 +00:00
vSchoener
04ee777109 // Update Accounting for export
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10132 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 14:45:24 +00:00
dSevere
ac8177b68c // stock management : Bugs fix after rename and historization modifications
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10131 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 14:05:57 +00:00
lLefevre
b9ee33bdcb // fix retrieving of the fields value 'shop' and 'group_shop' dynamically (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10130 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 12:19:39 +00:00
bMancone
45a3f8d33a // StockManagement : updated the warehouse list displayed when {adding, removing, transfering} stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10127 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 10:48:10 +00:00
tDidierjean
c34205e59d // Fix AdminController folder name for uppercases (CMSCategories)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10126 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 10:31:37 +00:00
bMancone
6f647b1937 // Cleaned comments on SupplyOrder & Warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10124 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 09:50:25 +00:00
bMancone
b5eb325a88 // AdminWarehousesController : added informations on the shops associated to a warehouse on the 'view' action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10123 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 09:28:54 +00:00
bMancone
8fa67843b1 // Tabs: AdminWarehouses is not needed anymore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10122 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-15 08:35:57 +00:00
dSevere
5719c43481 // stock management : Supplier order is now supply order, employee and product is now historized for sttock movements and supply order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10121 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 18:58:02 +00:00
bMancone
35150997c7 // Product: added a method to get the name of a given product, product_attribute, in a given language
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10120 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 18:44:38 +00:00
bMancone
faef9495ea // Added two tables affected when deleting a shop : stock_available and warehouse_shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10119 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 17:45:44 +00:00
rGaillard
a1fb08f026 // Improve Specific prices
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10118 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 17:40:42 +00:00
bMancone
18e709aec4 // When removing a product, its stock available is now properly removed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10111 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 16:21:44 +00:00
aFolletete
082d404597 // revert send to friend module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10110 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 16:18:58 +00:00
bMancone
726a53c490 // Deleted carriers are now properly removed from the table warehouse_carrier
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10107 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 15:44:26 +00:00
mMarinetti
04e40cbb73 // bugfix class Category + simplification AdminCategoriesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10106 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 15:04:06 +00:00
tDidierjean
554bc0e943 // fix missing ecotax field in AdminTaxes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10105 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 14:39:02 +00:00
lLefevre
44275b0939 // fix Update the call of JavaScript and CSS files in the class of HelperForm and controller templates (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10104 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 14:29:25 +00:00
bMancone
fdab7ebc70 // Warehouse: getWarehouseList is now getWarehouses. Employee: it is not possible to delete an employee if he manages warehouses, anymore.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10103 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 14:28:30 +00:00
lLefevre
9885ab5324 // fix Update the call of JavaScript and CSS files in the class of HelperForm and controller templates (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10101 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 14:21:26 +00:00
bMancone
c11c30deca // It is not possible to delete a product if there are currently physical stock/supply order(s) for this product, anymore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10100 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 13:36:33 +00:00
aFolletete
f1d63980e1 // revert blockbestseller.tpl file from revision 10093
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10099 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 13:03:03 +00:00
vAugagneur
834bf6596d git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10097 b9a71923-0436-4b27-9f14-aed3839534dd 2011-11-14 12:48:13 +00:00
tDidierjean
371acd1f43 [*] BO : #PSFV-94 - added AdminModulesPositionsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10095 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 11:04:15 +00:00
aFolletete
5553d55063 // Module changes for new native template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10093 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 10:56:15 +00:00
mMarinetti
612e8d7680 [+] BO : #PSFV-94 AdminCounty is integrated to AdminTaxRules, thanks to Franck
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10091 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 10:34:44 +00:00
lLefevre
b78b1a1a4c [*] BO #PSFV-94 : Added AdminAttachmentsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10090 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 10:33:57 +00:00
mMarinetti
5119bb7355 [+] BO : #PSFV-94 AdminCustomerThreads is now a controller
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10089 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 10:28:46 +00:00
mMarinetti
7306517a29 [+] BO : #PSFV-94 AdminCustomerThreads is now a controller.
// bugfix property shopShareDatas was missing in AdminController ... We may move it in Context later


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10088 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 10:27:49 +00:00
mMarinetti
f891bb9139 // toolbar is now better than ever \!
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10087 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 10:19:06 +00:00
bMancone
1197105373 // Stock : it is not possible to manage stock for a virtual product or a pack anymore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10084 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 10:11:48 +00:00
lLefevre
08afdaa444 // fix update button Stats and referrers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10079 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 09:23:05 +00:00
rGaillard
07ced238d1 // Fix order view
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10078 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 09:16:37 +00:00
vKham
131dc2e4b2 [*] BO : #PSFV-94 - improvement on admin css, new icon for toolbar
// bugfix toolbar

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10077 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 09:13:24 +00:00
lLefevre
c1b8ee96f3 // fix bug controller AdminDeliverySlipController (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10075 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-14 09:10:37 +00:00
mMarinetti
afe8a4cc52 // die2Exception
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10073 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-13 19:44:49 +00:00
mMarinetti
75cbb3abbb // fixed small bug about tpl/php var
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10072 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-13 19:23:29 +00:00
mMarinetti
950dcf92b7 [+] BO : #PSFV-94 - AdminSubdomains is now a Controller
// + AdminSubDomains now uses the default form :) 

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10071 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-13 19:10:41 +00:00
mMarinetti
8b46abe6de [+] BO : #PSFV-94 AdminGenerator is now a controller
// + now form in options.tpl is inside a block
// newly made controller are now controllerCore
// Configuration die2Exception
// added license text in newly made admin templates

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10070 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-13 18:51:01 +00:00
mMarinetti
35429b0699 [+] BO : #PSFV-94 - AdminThemes is now an AdminController
// ajax.php get addons themes has been removed and is now in AdminThemesController + uses of jquery
// removed function AdminTab::uploadIco, moved in AdminThemesController


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10069 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-13 17:46:38 +00:00
mMarinetti
b092fa73d3 [+] BO : #PSFV-94 - AdminWebserviceController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10068 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-13 17:01:43 +00:00
mMarinetti
0f728fa1c0 [+] BO : #PSFV-94 - AdminContact is now an AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10067 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-13 16:22:02 +00:00
mMarinetti
ad2f4716ab [*] BO : helper/options has now a block "after" to append anything you need
[+] BO : #PSFV-94 - AdminLocalization is now an AdminController


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10066 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-13 16:07:43 +00:00
rMalie
742ef4ac2d git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10059 b9a71923-0436-4b27-9f14-aed3839534dd 2011-11-10 17:41:12 +00:00
rMalie
21826ca6b7 // little fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10058 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 17:39:31 +00:00
fSerny
d8b7a0fc85 [-] PROJECT : Hooks alias are now used in Hook::getIdByName
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10057 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 17:34:28 +00:00
rMalie
69585ed7e6 [+] Install: new installer reworked from scratch
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10056 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 17:32:47 +00:00
dSevere
321bca2989 // stock : debug + interfaces optimizations + stockManager update
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10055 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 17:30:16 +00:00
vChabot
ed1a1ab1c6 // add back button to the account creation form
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10054 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 17:11:52 +00:00
lLefevre
a6f91fcb11 // fix bug view.tpl in AdminCartsController PSFV-94
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10052 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 16:33:38 +00:00
vChabot
82319ab68d // call to checkUrl() only if the URL has changed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10051 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 16:32:17 +00:00
lLefevre
54cecbe9a1 // fix bug delete the call method info()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10048 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 16:00:08 +00:00
lLefevre
68fc8b4e12 [*] BO : #PSFV-94 - added AdminReferrersController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10046 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 15:53:47 +00:00
mMarinetti
27d8e7fa6c // assigned missing var in combination
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10045 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 15:49:35 +00:00
mMarinetti
772d0541cc // fix textarea lang and combination
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10044 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 15:34:28 +00:00
mMarinetti
1065c8e54f // fixed toolbar
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10043 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 15:10:40 +00:00
mMarinetti
30159bb893 // fixed duplicate content in AdminProduct controller > combination
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10042 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 15:06:22 +00:00
mMarinetti
3bef0be66c // no debug code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10041 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 15:01:17 +00:00
mMarinetti
9963c84fd9 // norms on AdminProductController
// bugfix addfeaturestodb custom values
// uses of smartyV3 features (createTemplate, createData) in AdminProducts + admin products forms now extends base form.tpl
[+] BO : now tiny_mce can be loaded 'onclick' instead of 'onload'
// improvement in adminproduct pages

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10040 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 14:57:54 +00:00
rMalie
874a67141f [*] MO: Set default config for blockcms, editorial and moneybookers in their install method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10038 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 14:25:15 +00:00
rMalie
933fdab33a // StockAvailable id_shop field is not required anymore (id_shop is set as current shop if no shop chosen)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10034 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 13:55:13 +00:00
rMalie
3e268db6f9 [*] Classes: CMS::getCMSPages() now select only data from cms table if id_lang is null
[*] Classes: Db::autoExecute() can now take INSERT IGNORE as third argument
[*] Classes: Tag::addTags() can now take an array of tags as argument (instead of strings separated by comas)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10033 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 13:45:41 +00:00
rMalie
c1213e34bc // Add default localization file (use it when no localization file is found)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10032 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 13:35:17 +00:00
tDidierjean
5058eb2854 [*] BO : #PSFV-94 - added AdminTranslationsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10030 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 10:56:29 +00:00
vChabot
669aed08c6 [*] FO : Register process enhancement
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10029 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 10:56:14 +00:00
vChabot
568327849c [*] FO : combination link from product page are now the same as the combination link from blocklayered
// Cart is now accepting the combination link

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10028 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 10:45:19 +00:00
rMalie
58a1a5b919 [*] MO: Blockadvertising is now installed only on leftColumn
[*] MO: Editorial module now install default text for each language

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10027 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 10:28:59 +00:00
rMalie
4c6e936967 // Fix Db::executeS() now trigger Db::execute() method if the query begin with select|show|explain keyword
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10025 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-10 09:59:39 +00:00
dSevere
9be2c0c705 // stock : bug fix on supplier orders states change
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10019 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 18:02:26 +00:00
dSevere
cbdafe100f // stock : bug fix on discount rates and tax rates management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10018 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 17:58:43 +00:00
mMarinetti
3de647a81f // toolbar is fixed again
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10017 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 17:56:09 +00:00
dSevere
5caa9752ba // bug fix on toolbar save button management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10015 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 17:14:11 +00:00
bMancone
48df260f67 // SupplierOrderDetail : prices updated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10014 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 17:09:17 +00:00
bMancone
91e5974c52 // Helper list : fixed prefix displayin list_content
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10013 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 16:59:08 +00:00
lLefevre
f864d987fd [*] BO #PSFV-94 : Added AdminStatsConfController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10012 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 16:58:49 +00:00
vChabot
4068f50cd2 // cleaning code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10011 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 16:52:26 +00:00
bMancone
c92e78ad00 // Stock : updated stock{cover, mvt, instant_state}controllers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10007 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 16:03:51 +00:00
dSevere
72077bb489 // stock : update and bugs fix on supplier order add product interface
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10006 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:53:39 +00:00
lLefevre
baba250ba6 [*] BO #PSFV-94 : Added AdminStatsController && AdminStatsTabController && norm of statistic modules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10005 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:50:00 +00:00
lLefevre
dc716baa05 [*] BO #PSFV-94 : Added AdminStatsController && AdminStatsTabController && norm of statistic modules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10004 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:48:15 +00:00
vChabot
42bfc372da // adding ajax script
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10002 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:21:32 +00:00
rMalie
53e0c4fccf // Normalize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10001 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:21:27 +00:00
aFolletete
66fad890fc // fix norm ;)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10000 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:21:24 +00:00
rMalie
48233bfa43 // Normalize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9999 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:21:19 +00:00
rMalie
6d45885d63 // Normalize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9998 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:21:05 +00:00
vAugagneur
9e7c542d8a [+] BO : fixed bug on category tree view
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9996 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:15:55 +00:00
rMalie
cff850ed51 // Normalize blocksearch + remove left / right hook during install
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9993 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:12:04 +00:00
dSevere
047efe3e72 // stock : update and bugs fix on supplier order add product interface and supplier order view interface + toolbar bug fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9991 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:11:36 +00:00
vSchoener
db61901f68 - Update icone Accounting
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9990 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:08:50 +00:00
rMalie
d38bbc2ea5 // Fix during language install (now support table with uppercase prefix on windows)
// Add is_native to hook table in db.sql file

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9989 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 15:01:12 +00:00
vSchoener
fd4d790a32 // update Upgrade for accounting
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9988 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 14:53:04 +00:00
vSchoener
5016b3ca0d - Accounting: Add new tab for product to define the number liable to an existing zone, update upgrader and installer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9986 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 14:16:28 +00:00
rMalie
14c94558a6 // Some fix on objectModel children classes (fields not valid, etc.)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9985 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 12:16:37 +00:00
bMancone
6694cf0a20 // AdminStockInstantState : added hint bo on 'quantity_usable'
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9984 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 11:17:09 +00:00
bMancone
eeefaf3a4f // Added hint box on fieldsDisplay
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9983 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 11:16:36 +00:00
bMancone
5336732032 // AdminStockInstantStateController updated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9982 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-09 10:02:57 +00:00
dSevere
b0d9a04e95 // stock : bug fix on add product interface
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9977 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 18:21:24 +00:00
dSevere
f8ba11c870 // stock : update supplier orders interface + change state bug fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9975 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 17:55:17 +00:00
lLefevre
fc8b5cda7c [*] BO #PSFV-94 : Added AdminImportController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9974 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 17:54:08 +00:00
tDidierjean
c8556afc76 [*] BO : #PSFV-94 - added AdminReturnController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9972 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 16:53:56 +00:00
bMancone
ed01281fca // Stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9971 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 16:02:08 +00:00
bMancone
7f117d226f // StockManager: updated getProductRealQuantities() because of supplier orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9970 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 16:00:37 +00:00
dSevere
57d6ba89f0 // stock : bugs fix and update of supplier order add product interface
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9969 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 15:55:49 +00:00
dSevere
1ec33f92e2 // stock : bugs fix and update of supplier order add product interface
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9967 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 15:45:45 +00:00
vSchoener
621dce0532 // Update accounting
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9966 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 15:14:28 +00:00
vSchoener
569115728f // Add accounting image tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9963 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 14:36:19 +00:00
vAugagneur
4965c1d908 [+] Classes : Helper::renderAdminCategorieTree() now use addJs to include treeView javascript
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9962 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 14:36:10 +00:00
vSchoener
66fa6c64af [+] BO : Add Accounting Management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9961 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 14:20:24 +00:00
bMancone
b173b1b737 // AdminSupplierOrdersController : litle fix on content displayed when using the 'callback' in fieldsdisplay
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9960 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 14:13:17 +00:00
bMancone
d3cf1d4d3a // AdminSupplierOrdersController : litle fix on content displayed when using the 'callback' in fieldsdisplay
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9959 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 14:11:22 +00:00
bMancone
34d2efae1e // Ajax_params is not mandatory
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9958 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 13:47:32 +00:00
bMancone
70ccc98eac // Stock cover : fixed ajax
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9957 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 13:41:42 +00:00
bMancone
4f0bd1ad42 // It is now possible to add customs params when using ajax call with the 'details' action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9956 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 13:41:11 +00:00
tDidierjean
817ed773bb // fix list callback
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9955 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 13:19:49 +00:00
bMancone
17c2ddaa12 // Stock Cover : added information when products has combinations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9953 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 11:38:38 +00:00
bMancone
c8631927f4 // Stock : fixed instant state
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9952 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 11:05:16 +00:00
bMancone
29fdd527c8 // Stock : fixed cover
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9950 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 10:33:18 +00:00
tDidierjean
81e5f72142 [*] BO : #PSFV-94 - added AdminAttributeGeneratorController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9949 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 10:09:57 +00:00
dSevere
ca687d3588 Stock : Add new tpl for leadin intregration
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9948 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 09:49:19 +00:00
rMalie
8115985070 // Fix OrderCartRule class name
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9947 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-08 09:39:04 +00:00
bMancone
1d67787ca6 // AdminSupplierOrdersController : corrected typos & sentences
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9943 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 17:28:16 +00:00
bMancone
701a75adde // AdminSupplierOrdersController : updated toolbar in viewsupplier_order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9940 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 17:07:24 +00:00
bMancone
6535835ca2 // AdminSupplierOrdersController : added the warehouse were products will be sent in the 'view'
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9937 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 16:17:16 +00:00
bMancone
88b6219e66 // SupplierOrder now adds products in warehouses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9936 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 16:13:14 +00:00
dSevere
ad8f419186 // #PSFV-94 : bugs fix for add / remove products to a supplier order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9935 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 16:02:38 +00:00
bMancone
9e234492f7 // AdminSupplierOrdersController : updated quantity received
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9934 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 15:32:57 +00:00
bMancone
fa7c508114 // AdminSupplierOrdersController : when quantity_received_today is checked, the checkbox is now checked; the state of the order is now updated when receiving the first part of it
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9933 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 15:26:52 +00:00
dSevere
be6473f82d // #PSFV-94 : fix toolbar and leadin integration on all stock controllers + bugs fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9932 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 15:18:47 +00:00
bMancone
55166aefa1 // Added overriden tpl for list_action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9930 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 14:38:17 +00:00
bMancone
24df9cbff5 // AdminSupplierOrdersController : added history detail when receiving products
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9929 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 14:18:57 +00:00
bMancone
ebe628fd75 // AdminSupplierOrdersController : updated changes regarding quantity
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9928 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 13:33:08 +00:00
bMancone
0d58f4fd23 // AdminSupplierOrdersController : updated (fixed with modifications of HelperList & AdminController + update_receipt)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9927 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 13:05:07 +00:00
lLefevre
57080f48cd // fix update form.tpl in AdminTaxRulesGroupsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9926 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 13:03:04 +00:00
bMancone
a3d762e854 // db.sql : supplier_order_detail : there is now a quantity expected and a quantity received
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9925 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 12:33:42 +00:00
vKham
1a2bb0e8bc // added icon for edition
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9924 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 11:36:56 +00:00
tDidierjean
e77c445911 // add missing $toolbar_fix declaration
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9923 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 10:46:22 +00:00
vKham
937a4b9a3d // added icon for edition
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9922 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 10:45:27 +00:00
lLefevre
ce8b796598 // fix bug toolbar_fix in AdminStoresController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9921 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 10:45:23 +00:00
vKham
d0e02651c5 // style : notifications, toolbar buttons
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9920 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 10:44:11 +00:00
fBrignoli
015ff89c4b [*] CO : Order amount informations (tax_excl & tax_incl)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9919 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 10:16:12 +00:00
lLefevre
eb1ea1a12b // fix bug toolbar_fix in AdminStatusesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9918 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 09:45:24 +00:00
lLefevre
c44490637f // fix update form.tpl in AdminShopUrlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9917 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 09:39:58 +00:00
lLefevre
94925aa10a // fix update view.tpl in AdminRequestSqlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9916 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 09:25:26 +00:00
lLefevre
edb2da2600 // fix update view.tpl in AdminManufacturersController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9915 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-07 09:12:51 +00:00
lLefevre
c62eb897a5 // fix update form.tpl in AdminLanguagesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9911 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-06 12:54:50 +00:00
lLefevre
b9c0cebc09 // fix update form.tpl in AdminGroupShopController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9910 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-06 12:28:54 +00:00
lLefevre
f0fe2c860a // fix update form.tpl in AdminEmployeesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9909 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-05 22:04:22 +00:00
lLefevre
ebadf3e961 // fix update view.tpl in AdminCustomerController and Added new helper : HelperView
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9908 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-05 22:03:08 +00:00
lLefevre
ced2e2f229 // fix update form.tpl in AdminCountriesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9907 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 21:49:02 +00:00
dSevere
ef03bc051c // #PSFV-94 : Add possibility to add product in a supplier order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9906 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 18:27:04 +00:00
mMarinetti
398823b8ee // list_header in adminproducts
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9905 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 17:50:22 +00:00
mMarinetti
100dc43616 // added fixed toolbar, norms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9904 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 17:32:46 +00:00
mMarinetti
601c4ded53 // bugfix saving tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9903 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 17:28:24 +00:00
rGaillard
e2026d1cc3 // Replacement of getDiscounts method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9900 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 16:52:39 +00:00
tDidierjean
37a918a0bf // fix missing field in table specific_price in installer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9899 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 16:39:52 +00:00
bMancone
94974c5f2c // AdminSupplierOrdersController : added action to update the products that are being received
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9898 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 16:32:32 +00:00
rGaillard
77a66c64fd [*] Core : Specific prices can now be applied to combinations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9897 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 15:53:53 +00:00
lLefevre
eb6620fabe [*] BO #PSFV-94 : Added AdminAccessController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9896 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 15:52:31 +00:00
mMarinetti
851763fc2a // added title for return statuses list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9895 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 15:28:20 +00:00
tDidierjean
4f2edd0d27 // Add new color option for lists
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9894 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 15:22:34 +00:00
vAugagneur
698da37899 //split adminController postProcess
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9893 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 15:16:10 +00:00
mMarinetti
c971c1df66 // no more custom customer form
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9891 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 15:04:40 +00:00
vChabot
818a2f99ea [*] Project : OPC and Guest Checkout are now enabled by default
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9890 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 14:15:15 +00:00
tDidierjean
74bb9d88c8 // Added Helper::createTemplate()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9888 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 13:31:09 +00:00
mMarinetti
c46fd00276 // helper form toolbar, + fix helper no_back
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9887 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 13:29:09 +00:00
mMarinetti
483a4b1f95 // svn:ignore on img/tmp dir improved
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9885 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 13:01:37 +00:00
tDidierjean
80ed8e6db9 // changes to table width
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9884 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 12:52:52 +00:00
mMarinetti
f44bdde391 // improvements on AdminProducts and leadin
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9883 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 11:38:22 +00:00
mMarinetti
56e698165c // #PSFV-94 AdminCategories breadcrumb in lead-in,
// bugfix helperList 

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9882 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 11:10:12 +00:00
mMarinetti
845d741024 // #PSFV-94 - fixed bug related to new breadcrumb system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9881 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 10:59:10 +00:00
aFolletete
a1c8dec437 // fixed misstyping on length attribute
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9880 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 10:43:56 +00:00
bMancone
3424e6f5ee // AdminSupplierOrdersController : updated comments
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9879 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 10:42:11 +00:00
bMancone
96f0d1e895 // SupplierOrder : state update
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9878 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 10:38:55 +00:00
vChabot
f9dec971b6 [*] BO : Carriers can now be sorted ascending or descending
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9877 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 10:23:41 +00:00
dSevere
64e62fa338 // #PSFV-94 : replace back link with cancel button in the toolbar on all admin controllers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9876 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 10:21:23 +00:00
dSevere
04cf1350fc // #PSFV-94 : Update and bug fix with new toolbar implementation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9875 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 09:48:30 +00:00
dSevere
7a412e08ef // #PSFV-94 : Update and bug fix with new toolbar implementation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9873 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-04 09:19:50 +00:00
lLefevre
e5a66e4f95 // fix update form.tpl in AdminCarriersController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9872 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 21:54:05 +00:00
mMarinetti
491f946586 // fix helper show toolbar, added documentation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9870 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 18:42:13 +00:00
mMarinetti
e255465416 // norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9869 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 18:38:52 +00:00
lLefevre
a0e4124e3a // fix add var current and back in helperList
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9868 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 18:24:00 +00:00
mMarinetti
4d9c71b4a6 // bugfix vatnumber
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9867 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 18:03:29 +00:00
dSevere
9c0f70d68b // stock : add product managemetn on supplier order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9866 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:59:29 +00:00
dSevere
31d8d91b1a // #PSFV-94 : Submit button integrated to the toolbar on add/edit form view
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9865 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:58:19 +00:00
dSevere
250546f245 // #PSFV-94 : add product management on suppliers order + Submit button integrated to the toolbar on add/edit form view + adaptations after form and list helper update + bugs fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9864 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:54:55 +00:00
tDidierjean
e00763b927 // change to price parameter in list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9863 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:49:30 +00:00
tDidierjean
c88bcde30e // fix shop association generation with HelperForm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9862 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:27:30 +00:00
fBrignoli
17b7d300b7 // removeTax => removeTaxes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9861 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:20:49 +00:00
vChabot
c60054b040 [*] FO : when an user is created in one step account creation, he is redirected to the cart if the cart is not empty, or in the my-account page if not.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9860 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:16:28 +00:00
vChabot
ef00a2400b [*] BO : when a group is created, every category are linked to this group
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9859 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:14:16 +00:00
vAugagneur
c9f065173b [+] BO : Back-office search use now AdminController.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9858 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:14:13 +00:00
mMarinetti
8c5d2bfaf8 // fix admincontroller helper
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9857 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:06:31 +00:00
mMarinetti
bc16bdf560 // bugfix admin products, adminattributesgroups, admincategories
// helper list and form improved

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9856 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 17:04:33 +00:00
mMarinetti
96868355a6 // bugfix admincustomer filter
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9855 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 16:38:46 +00:00
lLefevre
cb4d8eec16 // fix bug remove info
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9854 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 16:28:59 +00:00
lLefevre
fb59853cb1 [*] BO #PSFV-94 : Added AdminStatusesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9853 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 16:26:12 +00:00
tDidierjean
1240604e7d [*] BO : #PSFV-94 - added AdminZonesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9852 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 16:17:06 +00:00
tDidierjean
92741d95ea // fix list checkbox display for bulk actions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9851 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 16:10:32 +00:00
mMarinetti
5b5612d589 // retrocompatibility
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9850 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 16:08:16 +00:00
mMarinetti
f537049a56 // bugfix employee form
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9849 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 15:35:56 +00:00
tDidierjean
fa4ebdc23c // change to tables width
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9848 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 15:35:19 +00:00
hAitmansour
5a397515ab [-] MO : stock : error declaration interface
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9846 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 15:17:23 +00:00
mMarinetti
43c32d61c0 // bugfix retrocompatibility addProductAttributes and addProductCombination (quantity problem)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9845 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 14:54:50 +00:00
lLefevre
7f28e60ed6 // AdminController refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9843 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 14:37:30 +00:00
dMetzger
873b94a743 // Temporary fix for free_shipping
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9842 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 14:36:45 +00:00
tDidierjean
10212011e9 // List columns can be fixed width or extensible
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9841 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 14:35:15 +00:00
lLefevre
fdbf78d786 // fix updated pictures of penguins on the store controller
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9840 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 14:20:03 +00:00
tDidierjean
47016ca6e4 // commit missing file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9839 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 14:17:58 +00:00
tDidierjean
01bf4d9526 [*] BO : #PSFV-94 - added AdminTaxesController + HelperList improvements
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9836 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 13:53:42 +00:00
vSchoener
ca584c730c // Merge 1.4 -> 1.5
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9835 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 13:51:52 +00:00
mMarinetti
17b828b671 // bugfix added default values in stockavailable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9833 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 13:42:11 +00:00
mMarinetti
f0b9fed843 [*] Project : ObjectModel die2PrestashopException
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9832 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 13:39:41 +00:00
vSchoener
a93440dfa1 // Merge 1.4 => 1.5
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9831 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 13:38:12 +00:00
tDidierjean
a6367738ca // AdminController refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9825 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 11:12:18 +00:00
tDidierjean
292c68ed51 // Add rights checking for object editing/adding
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9824 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 10:52:50 +00:00
mMarinetti
e3d03f7e7d // fixed adminproduct > combinations
[*] BO : now if you click on an AdminProduct sub tab (combinations, prices) already selected, this will reload it.


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9823 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 10:51:18 +00:00
mMarinetti
581cdc12e9 // added prestashopexception when id_category is wrong when update/save
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9822 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 10:39:46 +00:00
lLefevre
575939017b // Fix bug controller AdminCategoriesController (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9821 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 10:24:31 +00:00
hAitmansour
68694bde19 [-] MO - gsitemap : Fixed bug preventing the generation of sitemap
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9820 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 10:11:15 +00:00
vSchoener
1fbf610497 // Merge 1.4 => 1.5
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9819 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 10:07:19 +00:00
lLefevre
2d64b31bfb // Fix delete tab AdminTaxRulesGroup (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9817 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 09:59:10 +00:00
lLefevre
f657317b39 [*] BO #PSFV-94 : Added AdminTaxRulesGroupController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9815 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 09:46:58 +00:00
tDidierjean
ccca9d75b5 // align table headers with the list content
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9814 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 09:31:10 +00:00
vChabot
7c94f13ef7 // attributes positions and groups attributes positions are now working fine with new tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9813 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 09:20:31 +00:00
vSchoener
d5900c22f1 // Merge 1.4 => 1.5
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9812 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-03 09:14:25 +00:00
rGaillard
fe7dfe0460 // Some improvements on BackOffice orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9810 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 19:19:03 +00:00
bMancone
12aa189913 // ajax_supplier_order_products_list: added filter on the supplier
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9809 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 17:29:39 +00:00
bMancone
060b680405 // Added ajax search for products and products attribute
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9808 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 17:25:06 +00:00
rMalie
e7d4ddaec8 // Fix prefix on install query
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9807 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 16:59:25 +00:00
tDidierjean
d638ff4496 [*] BO : #PSFV-94 - added AdminSuppliersController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9806 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 16:02:53 +00:00
dMetzger
d1088bde51 // installer fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9804 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 15:46:04 +00:00
lLefevre
d2afd68ff2 // fix bug position in AdminAttributesGroupsController (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9803 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 15:35:45 +00:00
tDidierjean
daf0b16a4f // Clean notifications when closed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9802 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 14:59:18 +00:00
bMancone
182cde11b9 // AdminSupplierOrdersController: added action to generate the invoice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9801 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 14:52:23 +00:00
tDidierjean
8116a85ea7 // Add class to opened notifications
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9800 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 14:49:34 +00:00
lLefevre
677f758c0d // fix bug hook in AdminAttributesGroupsController (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9799 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 14:26:21 +00:00
dMetzger
17a8dbc05b // Retro compatibility and updater improved for Discount/CartRules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9798 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 14:23:44 +00:00
rGaillard
71b77471de // re-commit admin.css
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9796 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 14:02:55 +00:00
bMancone
07f267626f // AdminSupplierOrdersController : viewsupplier_order improvements
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9795 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 13:40:19 +00:00
vAugagneur
b8875bb65b //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9794 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 13:14:19 +00:00
fSerny
86e51ee01a // Fix on Module API for retrocompatibility
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9793 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 12:42:48 +00:00
rGaillard
33ecd84fb1 // little fix on backoffice order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9792 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 12:32:57 +00:00
dMetzger
b475167130 // Birthdaypresent is deprecated - no longer supported
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9791 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 11:01:58 +00:00
fSerny
0ba4fe9c7e [*] PROJECT : New Module API (part 1)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9790 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:49:01 +00:00
dMetzger
953cb8b872 // Retro compatibility for Discount
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9789 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:47:01 +00:00
vKham
9413c697d6 =// list header filter
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9788 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:41:11 +00:00
tDidierjean
20b1786c1a [*] BO : #PSFV-94 - forms now correctly use admin.js::displayFlags function. attributeLang attribute is deprecated in forms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9787 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:40:57 +00:00
vKham
181e2c68b6 // bo header
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9786 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:40:15 +00:00
rGaillard
48b4d96441 // Missing smarty functions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9785 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:39:59 +00:00
rGaillard
93d769f9bc // Fix backslashes on translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9784 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:35:09 +00:00
vKham
5d598c46dc [+] BO : new backoffice style and icons
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9783 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:27:24 +00:00
rGaillard
ff2b44fc74 // Missing file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9782 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:21:08 +00:00
rGaillard
411f72fba2 // Add smarty front configuration
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9781 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 10:20:40 +00:00
lLefevre
9e08540e84 // fix norm correct in AdminTabsController and AdminAttributesGroupsController (PSFV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9779 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 09:46:41 +00:00
dSevere
fe0775f4a8 // Stock : add enclosed state at state management on supplier orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9778 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 09:37:42 +00:00
tDidierjean
1d4b035272 [-] Installer : fix missing default tax_name in demo products creation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9777 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 09:30:17 +00:00
rGaillard
903d9b783a [+] BO: Add BackOffice orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9776 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 09:18:45 +00:00
bMancone
c4420cb657 // AdminSupplierOrdersController: viewSupplierOrder() - added the currency for each price displayed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9775 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-02 08:33:31 +00:00
lLefevre
ab4795f617 [*] BO : #PSFV-94 - added AdminAttributesGroupController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9774 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-01 20:57:27 +00:00
dMetzger
cb2307abaf // A few table name replaced
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9772 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-01 19:06:26 +00:00
dMetzger
486622522c [+] Project : Vouchers are now replaced by cart rules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9771 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-01 18:50:42 +00:00
lLefevre
1cfd76a66f // fix delete AdminTabs.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9766 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-01 10:35:11 +00:00
lLefevre
3ffa50d1ac [*] BO : #PSFV-94 - added AdminTabsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9765 b9a71923-0436-4b27-9f14-aed3839534dd
2011-11-01 10:32:07 +00:00
bMancone
10c9a90307 // AdminSupplierOrders : cleaned interface and added back button
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9762 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 17:42:58 +00:00
bMancone
290ad585fa // AdminSupplierOrdersController : wrong attribute in fieldsDisplay of viewSupplierOrder()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9761 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 17:30:29 +00:00
bMancone
748ea347a5 // AdminSupplierOrdersController: added 'view' action on one order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9760 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 17:14:49 +00:00
mMarinetti
be4505041f // maj theme gif img are now png if available (back office)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9758 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 16:59:36 +00:00
dSevere
e12751102b // Stock : add state management on orders + bugs fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9755 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 16:52:40 +00:00
dSevere
fe2abf8bc0 // #PSFV-94 : add state management on orders + bugs fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9754 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 16:51:49 +00:00
mMarinetti
30e338cab2 // added title for helperlist, admincontroller factorisation of helper list usage
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9752 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 16:35:45 +00:00
bMancone
9315894615 // Fixed AdminWarehousesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9751 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 14:16:40 +00:00
bMancone
714757dcac // SupplierOrders : added history details per order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9749 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 13:24:36 +00:00
vSchoener
a73ff13321 [-] MO : Fixed bug PSCFI-3940
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9748 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 13:08:51 +00:00
vChabot
c8a0f3b982 // correct drag and drop for position carriers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9746 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 11:01:01 +00:00
mMarinetti
90f2d6c7c3 [*] BO : optimization Upgrader and Admin Home
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9745 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 10:54:37 +00:00
mMarinetti
2ee2272d0e // added default not found controller
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9744 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 10:41:32 +00:00
mMarinetti
401650feaa [+] BO : #PSFV-94 : new class AdminNotFoundControllerCore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9743 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 10:36:17 +00:00
bMancone
4b3c1bca94 // Stock: cleaned
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9741 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-31 08:42:30 +00:00
mMarinetti
5a7fa97b95 // fix product informations autofill url rewrite
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9735 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 17:19:42 +00:00
mMarinetti
7d0bba4e03 // bugfix duplicated information (show_screenshot)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9731 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 16:12:05 +00:00
tDidierjean
b230e4654d [*] BO : #PSFV-94 - added AdminSlipController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9730 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 16:07:40 +00:00
dSevere
4e04df6d98 // Stock: Update Supplier order management and database in consequence
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9729 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 16:04:21 +00:00
dSevere
d9f8dfcce8 // #PSFV-94 : Add new admin controller to manage supplier orders + debug of stock management admin controller + add color and date input type to the form tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9728 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 16:02:19 +00:00
tDidierjean
bb01a8debc [*] BO : #PSFV-94 - added AdminShippingController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9727 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 15:46:01 +00:00
rGaillard
4e0a3102a3 // Update AdminCartsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9726 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 15:31:58 +00:00
mMarinetti
0c64e8edeb // removed field show_screencast from bo
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9725 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 14:54:07 +00:00
lLefevre
4f71dcf861 // fixe call options.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9723 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 14:22:48 +00:00
hAitmansour
cff9554dda [+] MO : multi-shop allow the removal of a shop if it has no order and no customer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9722 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 14:19:13 +00:00
vSchoener
c5dd56aa5f // update paypal version
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9720 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 14:11:13 +00:00
vChabot
9a616a7f3f [*] BO #PSFV-94 : Added AdminPreferencesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9719 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 14:08:07 +00:00
vSchoener
6b32d53742 [+] MO : Update Paypal to use the new system to store payment cc details
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9718 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 14:07:57 +00:00
mMarinetti
5dfcac4053 // yet another display fix for new display header/footer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9716 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 13:51:32 +00:00
mMarinetti
4f4609e980 // bugfix url rewrite javascript, fix redirectAdmin token when toggle status
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9715 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 13:37:24 +00:00
mMarinetti
71ecfb917b // an other bugfix about remi display header and footer new system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9714 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 13:33:18 +00:00
rGaillard
3e3ff64cc5 // Fix merge error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9713 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 13:27:20 +00:00
rGaillard
a296e0192c // revert AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9712 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 13:06:44 +00:00
lLefevre
c044aea666 // Fix added GroupShop Manufacturer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9711 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 13:01:20 +00:00
rGaillard
9fb10416f4 // Change display_header and display_footer behavior on BackOffice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9710 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 12:58:13 +00:00
vSchoener
7371c301ae // Little fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9708 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 12:32:04 +00:00
lLefevre
6679a7db85 [*] BO #PSFV-94 : Added AdminManufacturerController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9706 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 12:20:50 +00:00
mMarinetti
beaaef3c0f [*] All : modified run() to use checkAccess in the Controller class
[+] BO : #PSFV-94 - invalid token is now correctly handled. its uses initCursedPage 
// die2Exception

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9705 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 10:10:27 +00:00
vSchoener
5e6c8f4b2d [+] MO : Update Moneybookers to use the new system to store payment cc details
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9703 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 09:48:07 +00:00
mMarinetti
edbac35e4f // die2Exception
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9698 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-28 08:49:21 +00:00
mMarinetti
4692f2c744 // fix small catalog error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9697 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 18:58:22 +00:00
mMarinetti
bf444e84e8 // fix installer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9696 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 18:53:06 +00:00
mMarinetti
5f79d9f879 // Helper now can uses toolbar
// bugfix in category listing and editing
// display fix in adminHome

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9695 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 18:20:13 +00:00
mMarinetti
d7ac4fb94e // container for header
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9694 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 18:02:55 +00:00
mMarinetti
8d3b768575 // fix in products content.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9693 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 18:01:01 +00:00
fBrignoli
cc470048d1 [-] FO : Order history does not display order details
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9692 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 16:56:15 +00:00
tDidierjean
6eb881bc4c [*] BO : #PSFV-94 - added AdminSearchConfController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9691 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 16:31:56 +00:00
fBrignoli
103eb9a9c1 [*] CO : Empty parameters are not added
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9690 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 16:27:05 +00:00
rGaillard
9c368349f2 // submit form ajax
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9689 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 15:44:58 +00:00
rGaillard
e36250fbcb // Set default Shop in BackOffice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9688 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 15:44:09 +00:00
rGaillard
d97b2f999c // Fix add to cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9687 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 15:37:42 +00:00
vSchoener
99981ffb51 [+] MO : Update Ogone to use the new system to store payment cc details
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9686 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 15:28:58 +00:00
vSchoener
7a453863f9 // update version number of the modules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9685 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 15:26:02 +00:00
rGaillard
430d902bfe // Fix JS location
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9684 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 15:24:19 +00:00
vSchoener
8a67500a4a [+] MO : Uptdate module to store payment cc information
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9683 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 15:15:30 +00:00
tDidierjean
cf384e0af1 [*] BO : #PSFV-94 - added AdminRangePriceController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9682 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 14:57:08 +00:00
mMarinetti
04e0214776 // fix when multishop is not activated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9681 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 14:47:02 +00:00
mMarinetti
7bfbfe0123 // fix when multishop is not activated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9680 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 14:41:51 +00:00
mMarinetti
66647d13ed [*] BO : #PSFV-94 - adminProducts > informations, toolbar and css (starting new design integration (thanks to vuThe)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9679 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 14:38:58 +00:00
tDidierjean
2343573da9 [*] BO : #PSFV-94 - added AdminRangeWeightController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9678 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 14:36:29 +00:00
mMarinetti
f7445817da // added toolbar support in helper classes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9677 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 14:16:23 +00:00
rGaillard
f61f2f0570 // Add CartController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9676 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 14:04:58 +00:00
tDidierjean
7692c1a16f // replace <hr> with <div>
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9675 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 13:53:14 +00:00
tDidierjean
b4341af6a2 [*] BO : #PSFV-94 - // Refactoring AdminAddresses, form.tpl is now extendable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9674 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 13:05:52 +00:00
vChabot
b376fad60d // fix on attribute positions in FO (Attribute constructor was incorrect)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9673 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 12:52:04 +00:00
lLefevre
3ad47429c9 // fix bug move helper list action tpl (PSSV-94)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9672 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 11:15:10 +00:00
lLefevre
1cebf04794 [*] BO #PSFV-94 : Added AdminCategoriesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9671 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 10:22:31 +00:00
tDidierjean
0d65f5b236 // fix email field in list display in AdminCustomers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9670 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 10:04:56 +00:00
hAitmansour
c59864c663 //fix add ;
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9669 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 09:43:32 +00:00
hAitmansour
f7d6e0c64e [*] BO : fix update javascript because radio button shared stocks deleted, fix error in automatic replacement
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9668 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 09:41:20 +00:00
lLefevre
e14c09e404 [*] BO #PSFV-94 : move helper tpl to subfolders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9666 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 09:19:24 +00:00
tDidierjean
000691dc48 // added labels to product page fields
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9664 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 08:09:35 +00:00
vSchoener
2804ac0d2a [+] CORE: Add a way to add easily transaction details (last method changed)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9663 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-27 00:58:24 +00:00
mMarinetti
4c93b5fea5 [+] BO : new method initToolbar() available in AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9662 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 17:45:29 +00:00
mMarinetti
90853d47e7 [*] FO : $currency->prefix and $currency->suffix are now a convenient shortcut for displaying price
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9661 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 17:41:32 +00:00
bMancone
62465a7920 // Stock : added tables for supplier orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9660 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 16:25:01 +00:00
bMancone
f0fe5c12d7 // Stock : added supplier order classes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9659 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 16:24:36 +00:00
mDeflotte
f9c4e50c19 [-] BugFix : If a field is empty don't validate this one
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9658 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 16:04:04 +00:00
mDeflotte
eb08f69f7b // Blocklayered for PS 1.5 - no modifications for the moment
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9654 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 13:12:57 +00:00
mMarinetti
6e237489d9 // fix product edit forms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9653 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 12:38:44 +00:00
bMancone
9aea3d826d // Stock controllers : added permissions check on employees
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9652 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 12:35:28 +00:00
bMancone
e1e634dd6e // Pack : fixed isInStock()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9649 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-26 08:11:02 +00:00
rMalie
e5b32b6666 // Fix bug on install
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9648 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 20:31:23 +00:00
mMarinetti
4fd262bd68 // display_header/footer = false will display <head> tags
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9646 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 17:23:23 +00:00
mMarinetti
2a74e65fd5 // #PSFV-94 - update AdminProductsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9645 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 16:48:15 +00:00
dSevere
e6dfc34e68 // stocks : debug and optimisations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9644 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 16:31:26 +00:00
bMancone
8f00f0f46f // StockManagerInteface: Missing comment..thx doxygen
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9642 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 15:59:57 +00:00
bMancone
42df2fe0f3 // Stock : updated sql files
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9641 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 15:59:21 +00:00
mMarinetti
861a84dbe8 // fix installer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9640 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 15:54:04 +00:00
tDidierjean
dd52ff9253 [*] BO : #PSFV-94 - added AdminProfilesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9639 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 15:21:51 +00:00
rMalie
c7a984c927 [*] Classes: calcul position in class when an attribute, an image or a scene is added
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9638 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 15:17:26 +00:00
rMalie
962c48728b // Fix ConfigurationTest
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9637 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 15:15:35 +00:00
tDidierjean
75cc00c082 [*] BO : #PSFV-94 - added AdminPPreferencesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9636 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 15:00:59 +00:00
tDidierjean
a9fb7e1eb9 [*] BO : #PSFV-94 - added AdminPaymentController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9635 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 14:41:34 +00:00
bMancone
d0fd852078 // StockMvtReason : added getStockMvtReasonsWithFilter(). Controllers : updated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9634 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 14:27:21 +00:00
vSchoener
5ee2e7a6bb - Liable to last commit, update button
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9633 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 14:19:01 +00:00
vSchoener
3557b042e0 - Liable to last commit (style)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9632 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 14:17:49 +00:00
vSchoener
314d0713db - Update theme for payment_cc detail
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9631 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 14:14:38 +00:00
vSchoener
11c86e7e66 [+] CORE: OrderControler display the payment_cc detail for an order, transaction_id can be changed manually
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9629 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 13:46:37 +00:00
vSchoener
e19fdabc20 - Authorieaim : Change format of the stored credit card
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9628 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 13:33:28 +00:00
mDeflotte
d21e3d37ac // BugFix on counting stock instant states lines
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9627 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 13:31:16 +00:00
bMancone
759e67c64a // Layout.tpl : added one new line between each AdminController::displayInformation()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9626 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 13:20:37 +00:00
mMarinetti
ec1437ad8b // thanks to Julien Breux for AdminInformationController
[*] BO : optimized ConfigurationTest class

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9625 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 12:44:47 +00:00
vAugagneur
c971fd21cc //fixed bug autocomplete category tree
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9624 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 12:04:16 +00:00
vAugagneur
cf176f57a0 //fixed bug on category tree
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9622 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 12:00:13 +00:00
lLefevre
5d864982f5 [*] BO #PSFV-94 : Added AdminLanguagesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9621 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 11:55:28 +00:00
lLefevre
b0cab274e9 // Fix bug method update()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9619 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 09:41:45 +00:00
vSchoener
b5d6af8aa5 [-] CORE: Add details payment from payment_cc in the order view
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9618 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 09:09:06 +00:00
mDeflotte
fd763af064 // Removing stock form into product admin tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9615 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 08:16:02 +00:00
vChabot
e856cf4a5d // removing possibility to edit quantity in the command process, step 3
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9614 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 08:15:43 +00:00
lLefevre
03765bac1d //Fixed bug $optionsList in the options.tpl of the class AdminStoreController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9613 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-25 07:51:41 +00:00
bMancone
dbc54e9737 // StockCover : fixed query
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9612 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 16:23:26 +00:00
bMancone
9ab291669f // StockCover : fixed query
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9611 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 16:20:24 +00:00
bMancone
7445c65796 // AdmiNWarehousesController : added details on warehouses (number of refs, quantities, value of the stock in the warehouse currency,..)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9610 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 16:15:12 +00:00
bMancone
0251c800de // Fixed StockCover
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9609 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 16:04:33 +00:00
lLefevre
cdc24e78d3 [*] BO #PSFV-94 : Added AdminCustomerController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9608 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 16:00:28 +00:00
rMalie
fb601c96f8 // Little fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9606 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 15:47:09 +00:00
dSevere
7e8ba0ffff // Update stock movements interface with new controllers + debug and optimisations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9604 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 15:28:58 +00:00
vSchoener
4afc9fbd23 // Delete debug function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9603 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 15:18:43 +00:00
vSchoener
e7f323d549 [-] MO: Add infos to Payment_cc table after validate payment and fix test account test, url generation)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9602 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 15:17:07 +00:00
mDeflotte
7a6364bfa7 // BugFix : Porblem during adding product to cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9601 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 15:04:29 +00:00
aFolletete
1122f9a28e // fixed order of Orders in AdminOrdersController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9599 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 14:47:33 +00:00
aFolletete
7793fac72e // cleanned useless characters
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9598 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 14:40:56 +00:00
mDeflotte
5bccee8478 // Improving admin list action details
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9597 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 14:33:34 +00:00
mDeflotte
378b1386c3 // BugFix with order states change and warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9596 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 14:32:57 +00:00
aFolletete
c8fddc68d1 // fix filter list for date column
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9594 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 14:19:21 +00:00
aFolletete
72d5173e87 // fix filter issue due to bqSQL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9593 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 14:18:10 +00:00
mDeflotte
3e99186cd6 // Improving ajax form in tab product / quantity
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9591 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 14:02:42 +00:00
aFolletete
14632c7fbe // bug fix on new AdminOrders + optimization
[~] FO : usage of $customizedDatas var in order-detail.tpl is now deprecated use $product.customizedDatas

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9589 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 13:19:54 +00:00
mDeflotte
d6502560d0 // Removing console.log
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9588 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 13:14:16 +00:00
bMancone
d5a56e3b27 // Fixed StockCover
// Removed id_stock_mvt_reason from StockManager::transferBetweenWarehouses()
// It is now allowed to transfer stock within one warehouse if and only if it only changes, for a given quantity, its usable state


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9586 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 12:58:24 +00:00
bMancone
db39d6a2d2 // Installer (settings_lite) : added default stock mvt reason for transfer between warehouses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9585 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 12:47:07 +00:00
bMancone
53bc5ac168 // Warehouse : updated comments..
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9583 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 10:20:11 +00:00
bMancone
82c611f092 // StockCover : udpated default warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9582 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 10:13:39 +00:00
bMancone
6ca032c3be // StockCover : added warehouse selection & fixed period selection
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9581 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 10:10:14 +00:00
mDeflotte
ceb04e828b // Removing unused field
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9580 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 09:55:39 +00:00
aNiassy
5097d70dc9 [-] #PSCFI-3773 : Changed the treatment which validate the email and added a condition for receivers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9579 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 09:49:57 +00:00
aFolletete
a645b126d6 // update db.sql
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9578 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 09:46:46 +00:00
mDeflotte
454733bcea [-] BugFix : Bad count in request for admin stock instant states
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9577 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 09:31:09 +00:00
mDeflotte
39fcb10404 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9576 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 09:00:39 +00:00
mDeflotte
7151022505 [-] BugFix : Problem on changing warehouse in admin stock instant state
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9575 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 08:53:35 +00:00
rMalie
feee8cb438 // Fix modules route for dispatcher
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9574 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 08:38:45 +00:00
mMarinetti
fa27a22612 // you can now add new product and stay
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9572 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 08:32:07 +00:00
mMarinetti
626a0e67b8 // fix create new product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9571 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 08:28:15 +00:00
aNiassy
9f60944c60 [-] #PSCFI-3773 : Added conditions in order to test the var $toName (to know if it's a string or an array)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9569 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 08:22:48 +00:00
mMarinetti
f5c09af54e // attributeBack.js some replacement getE() by $()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9568 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-24 07:35:23 +00:00
mMarinetti
9081507794 // added adminProduct - combination - #PSFV-94
bugfix on AdminProductsController


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9566 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 17:31:54 +00:00
dSevere
a498289551 // activate stockCover admin interface + debug and adaptations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9565 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 16:14:44 +00:00
tDidierjean
9494881976 [*] BO : #PSFV-94 - added AdminMetaController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9564 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:47:50 +00:00
mDeflotte
61319af5be [-] BugFix : Bad group by in request for admin stock instant states
[-] BugFix is actions details

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9563 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:27:12 +00:00
mDeflotte
2bc17241ca // Add PS_ADVANCED_STOCK_MANAGEMENT configuration in admin product preference
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9561 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:13:35 +00:00
dSevere
ba09ad8613 // edit form debug (address creation/update) and adaptations for new adminController initList system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9560 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:10:23 +00:00
dSevere
ec4b71b2b7 // adaptations for new adminController initList system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9559 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:09:29 +00:00
mDeflotte
acdb240de4 // BugFix : undefined var in admin page product + bad ajax return
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9558 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:09:15 +00:00
dSevere
59ebf2b7d0 // add forms for add / remove / transfer stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9557 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:06:50 +00:00
dSevere
661cf626ea // debug and optimisations for admin stock interfaces
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9556 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:05:27 +00:00
dSevere
eb60442a04 // debug and optimisations for admin stock interfaces
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9555 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 15:04:49 +00:00
lLefevre
9564bf4ef8 [*] BO #PSFV-94 : Added AdminPDFController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9548 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 14:08:36 +00:00
aFolletete
ed36aa6971 [*] BO : #PSFV-94 - new controller for AdminOrders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9546 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 13:53:54 +00:00
tDidierjean
c9490973b5 //fix content assign
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9545 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 13:49:22 +00:00
tDidierjean
365915cb0e [*] BO : #PSFV-94 - added AdminLogsController and changed initX() functions to return their result
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9544 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 13:40:41 +00:00
tDidierjean
2ee064cd1c [*] BO : #PSFV-94 - added AdminInvoicesController and missing geolocation template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9540 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 12:20:37 +00:00
mMarinetti
9aa1f705f1 // fix update notification
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9539 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 12:13:34 +00:00
lLefevre
f0029f6465 [*] BO #PSFV-94 : Added AdminEmployeesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9536 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 09:50:22 +00:00
mMarinetti
5d12e7f2ec // fixed bug with category trees
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9533 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 09:27:07 +00:00
tDidierjean
02330a5d06 [*] BO : #PSFV-94 - added AdminGeolocationController, added options.tpl override
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9530 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 09:01:19 +00:00
mMarinetti
2f9ecca752 // fix postprocess
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9524 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 07:48:24 +00:00
mMarinetti
1e315d7d5a // removed old adminproduct tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9523 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-21 07:36:16 +00:00
mMarinetti
710329a8a6 // fix creating product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9521 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 16:27:53 +00:00
mMarinetti
927c437679 // fix duplicate 'add new'
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9519 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 16:13:40 +00:00
mMarinetti
2c918da8e9 // fix add new product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9518 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:47:51 +00:00
lLefevre
78dee05c5a [*] BO : #PSFV-94 - changes to helpers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9517 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:37:26 +00:00
mMarinetti
1e9e80b266 // #PSCFV-94 - AdminProducts, AdminCatalog
// new menu style


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9515 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:22:22 +00:00
mMarinetti
0598f561b7 // temporary fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9514 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:21:04 +00:00
mMarinetti
d1719fc0e2 [+] BO : Notification autorefresh can be deactivated
// ajaxPreProcess is now called at the end of init() process in admincontroller
// fixed getTranslationsFlags

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9513 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:18:00 +00:00
mMarinetti
a61afc42d8 // + BO : new modifier htmlentitiesUTF8
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9512 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:10:39 +00:00
mMarinetti
2b9b96482a // now ajaxProcess is handled by postProcess
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9511 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:09:32 +00:00
mMarinetti
6971844278 // fix db_prefix missing
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9510 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:08:07 +00:00
mMarinetti
0c224ad29d // adapted override/_Tools
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9509 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 15:05:15 +00:00
vAugagneur
8b8bb3db00 [+] BO : added ssl option for imap sync in SAV
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9507 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 14:55:27 +00:00
lLefevre
c1df197a5a [*] BO #PSFV-94 : Added AdminDeliverySlipController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9505 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 14:43:43 +00:00
dSevere
65c4c0c134 // optimisation of form and customisation of action parameter
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9503 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 14:22:42 +00:00
fBrignoli
d9e3d1a339 // Raphael modification on Franck's computer related to url creation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9502 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 14:18:44 +00:00
mDeflotte
dd8965c1a3 // Introduct "PS_ADVANCED_STOCK_MANAGEMENT", the new stock management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9501 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 14:09:04 +00:00
tDidierjean
bcb0f0fbf0 [*] BO : #PSFV-94 - changes to helpers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9500 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 13:45:52 +00:00
lLefevre
fcf0a4c5cf //Fixed bug delete duplicate method initList and initOptions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9499 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 13:22:30 +00:00
mDeflotte
71dcca6695 [-] On the phoduct page , some space are missing: "You must add4as a minimum quantity to buy this product."
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9497 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 12:20:55 +00:00
rGaillard
e39c4c2304 // Fix bug on HelperOption
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9496 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 12:13:14 +00:00
rGaillard
7ff90aec1c // Fix helperform displaying on multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9495 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 10:21:25 +00:00
lLefevre
286535500b [*] BO #PSFV-94 : Added AdminCountriesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9492 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:32:13 +00:00
mDeflotte
61898e2ac1 // Removing undefined function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9491 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:14:43 +00:00
vSchoener
b2cab5d3f4 - Same fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9490 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:14:19 +00:00
vSchoener
2d5635187e - Fix private name method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9489 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:13:45 +00:00
mDeflotte
9d1650ca0a // fixing bad code indentation for module block layered
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9488 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:12:20 +00:00
mDeflotte
693e7c05bf // Add mssing translation files
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9487 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:10:28 +00:00
mDeflotte
78ddaa120c // Stock decrementation when order is shipped
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9486 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:08:59 +00:00
tDidierjean
06564db555 // moved displayflags to options template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9485 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:08:55 +00:00
vSchoener
6a6fe4bb5f - Fix norme and php Doc
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9484 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 09:04:32 +00:00
vChabot
7cbd4c20f2 // removing ajaxProcess, now useless because the process doesn't need ajax anymore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9483 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-20 08:04:41 +00:00
bMancone
aae41922b5 // StockCover : fixed l function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9482 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 16:59:17 +00:00
bMancone
1777dee8e9 // Stock: added StockCoverController - stock coverage
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9481 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 16:39:17 +00:00
bMancone
eb2e1826e5 // StockManager: added test for time_left in getProductCoverage()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9480 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 16:33:34 +00:00
vSchoener
cef6e4f65a [-] CORE: Refactoring of the ValidateOrder method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9479 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 16:33:07 +00:00
bMancone
3f15c80a82 // StockManagerInterface : fixed comment..
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9478 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 16:25:38 +00:00
bMancone
5ce693bd87 // StockManager: updated security and added getProductCoverage()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9477 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 16:24:26 +00:00
mMarinetti
32344a5c3f // fixed smarty bug (template_dir) created by commit r9468
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9475 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 16:08:40 +00:00
tDidierjean
ba6de70fc5 [*] BO : #PSFV-94 - added AdminEmailsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9474 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 15:38:57 +00:00
rGaillard
41a4ccbc4c // Fix smarty BackOffice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9473 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 15:34:18 +00:00
vSchoener
eb9654e1ea [-] CORE: Fix regex for isDate and isDateFormat (0000-00-00 00:00:00 is now allowed)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9471 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 15:22:11 +00:00
rGaillard
2a22c9a502 [*] Core: Upgrade smarty to version 3.1.3
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9469 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 15:16:52 +00:00
rGaillard
b22fe70288 // Smarty update
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9468 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 15:13:01 +00:00
lLefevre
c98eefef0d //fixed bug update duplicate call HelperOptions()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9467 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 15:12:22 +00:00
rMalie
dd9257d008 // little fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9466 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 14:58:33 +00:00
lLefevre
74788d0959 // revert commit 9463
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9465 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 14:47:37 +00:00
lLefevre
5f4ee34f0f //FIxed Added Controller AdminCarrierController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9464 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 14:36:25 +00:00
rMalie
8b4f3d0cf6 [+] Classes: Db::autoExecute() can now use SQL functions as values (use array('type' => 'sql', 'value' => 'SQL_FCT()')
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9463 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 14:35:05 +00:00
lLefevre
2f9e2b313f [*] BO #PSFV-94 : Added AdminCarrierController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9462 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 14:34:37 +00:00
mMarinetti
af9dc8707a // added order_by for smarty in helper list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9457 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 13:48:08 +00:00
mMarinetti
5af9dce752 // fix token in ajax calls
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9456 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 13:42:09 +00:00
mMarinetti
3f2a2c99c6 // bugfix arrow switch order_way
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9455 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 13:40:23 +00:00
tDidierjean
433a771bfe //delete AdminRequestSql.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9453 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 13:23:19 +00:00
tDidierjean
6303b68d51 [*] BO : #PSFV-94 - added AdminDbController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9452 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 13:18:51 +00:00
bMancone
4c2e1ca2c8 // Fixed setProductLocation()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9451 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 12:40:01 +00:00
mDeflotte
c43af9ca20 // Improve Stock Instant states tab in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9450 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 11:58:41 +00:00
hAitmansour
2d1a1a473c [*] FO BO MO : rename function isMultiShopActivated by isFeatureActive
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9449 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 11:52:26 +00:00
dSevere
382f4678bf // Add currency to the warehouse - optimisation of form, list and option init in AdminController - list bug fix on StockManager
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9448 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 11:11:30 +00:00
mDeflotte
af8cac9d64 // Improve details action link
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9447 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 09:48:16 +00:00
lLefevre
bfd36393b7 //added option maxlength in input text and added field input checkbox
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9446 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 09:45:08 +00:00
mDeflotte
5fc60a0864 // Improve details action link
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9445 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 09:42:00 +00:00
hAitmansour
d8509b2829 [*] FO BO MO : rename function isMultiShopActivated by isFeatureActive
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9444 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 09:36:12 +00:00
mMarinetti
be31f53773 // fixed path to jquery plugin
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9443 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 09:34:08 +00:00
tDidierjean
de59e7b432 [*] BO : #PSFV-94 - added AdminCurrencuesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9442 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 09:29:49 +00:00
mMarinetti
ab1594fb7e [-] BO : fixed bug with Search:indexation when editing product (id_shop was missing)
// end of line style fix


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9441 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 09:29:00 +00:00
lLefevre
8aa35a9196 //Fixed bug var list_skip_actions in list_content.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9440 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 09:17:56 +00:00
lLefevre
65de510dfa // Fixed bug position in HelperList
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9439 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 08:40:47 +00:00
rMalie
42564ca3d0 // Merge -> revision 9435
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9438 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 08:14:42 +00:00
fBrignoli
43958d54e7 // invalid id for "Stock ... " in PREFIX_tab_lang
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9437 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 07:56:45 +00:00
vAugagneur
c044f5796b //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9436 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-19 07:40:38 +00:00
dSevere
d2e9af38eb // GetList function : Add the possibility to not use LIMIT in the SQL request
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9433 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 17:42:11 +00:00
dSevere
c65af0c1f3 // Stock: Add Stock Management in admin tabs - extend HelperList to render simple lists without filter, sorting, pagination, ...
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9432 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 17:11:13 +00:00
mDeflotte
886fcda18e // Decrement stock available on order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9430 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 15:43:28 +00:00
mDeflotte
243387c4e0 // Add table prefix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9429 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 15:26:49 +00:00
tDidierjean
38ac02496c // fix AdminController::loadObject()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9428 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 15:22:45 +00:00
mDeflotte
8ad7b9a283 // Add title for details action link
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9426 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 14:04:35 +00:00
vChabot
6517b06539 [+] FO : you can access to a product combination with its own url (e.g: http://www.myshop.com/index.php?controller=product&id_product=1#disk-space=16go&color=yellow)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9425 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 14:03:02 +00:00
tDidierjean
730e5e4d96 [*] BO : #PSFV-94 - added AdminContactsController, fix flags display for option lists
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9424 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 14:00:27 +00:00
mDeflotte
463d94914d // Add Stock icons
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9423 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 14:00:13 +00:00
mDeflotte
27c9dbe7b4 // Add Stock Instant states tab in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9422 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 13:28:05 +00:00
dSevere
7b2c4b0f06 // Update the way to skip actions for rows in list mode + code refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9420 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 13:15:46 +00:00
tDidierjean
9f92e7941c [*] BO : #PSFV-94 - added AdminBackupController and some changes to AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9417 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 12:40:35 +00:00
bMancone
dafba9ea02 // Stock: removed id_currency. Warehouse: added id_currency. StockManager: fixed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9416 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 12:31:34 +00:00
bMancone
54e25793fd // Stock & StockMvt : added round()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9415 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 12:11:31 +00:00
bMancone
6e2827418f // StockAvailable : cleaned & fixed save()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9414 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 12:10:26 +00:00
rMalie
39f37e465f // Fix little bug on preactivation (property_exists)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9411 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 09:59:49 +00:00
bMancone
3638cdc3c9 // Attribute: fixed checkAttributeQty()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9410 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 09:46:13 +00:00
rMalie
30835cb4c8 [*] Classes: Tools::property_exists() is deprecated, since PrestaShop now requires 5.1
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9408 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 09:02:57 +00:00
bMancone
e5ae345855 // Stock : fixed Pack & Product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9406 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 08:59:31 +00:00
mDeflotte
8c5430133d // BugFix on action details if the id is not an integer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9404 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-18 07:38:40 +00:00
dSevere
1aaa5b1e02 // Code review
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9403 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 17:21:51 +00:00
dSevere
f895c0c65b // Debug use of HelperList with listKkip arrays
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9402 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 17:17:58 +00:00
lLefevre
96844f2d92 [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminStoresController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9401 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 16:37:21 +00:00
mDeflotte
651e2d72b9 // Improving admin list action "details"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9400 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 15:50:54 +00:00
mDeflotte
a5486b7875 // Adding a new admin list action "details"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9399 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 15:19:25 +00:00
tDidierjean
63599c09dc [*] BO : #PSFV-94 - remove AdminImages.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9398 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 15:12:22 +00:00
mDeflotte
055c381d60 // BugFix : js error when there is no datapicker
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9397 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 15:11:01 +00:00
tDidierjean
ea69499aed [*] BO : #PSFV-94 - more AdminImagesController refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9396 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 15:08:43 +00:00
bMancone
23a24b58e2 // Removed occurences of setStock / getStock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9395 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 15:03:15 +00:00
tDidierjean
643346b806 [-] Classes : fixed image folders rights
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9393 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 14:57:58 +00:00
dSevere
bf309b0d51 //Update usage of row list actions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9390 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 12:52:18 +00:00
dSevere
2e34e7cadd //Stock : Update Warehouse management - use of new adminController - add the possibility to associate shops and carriers to a warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9389 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 12:51:22 +00:00
dSevere
232c21bd0a //Interface optimisations for form display and menu display
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9388 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 12:48:54 +00:00
lLefevre
154c7a9ed9 // Fixed bug tab AdminEmployee
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9387 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 12:10:18 +00:00
rMalie
336fb68ef4 // Merge -> revision 9385
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9386 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 09:55:33 +00:00
rMalie
a7bc16dadd // Replace shop->sqlAsso(), shop->sqlLang() and shop->sqlRestriction() with shop->addSqlAssociation(), shop->addSqlRestrictionOnLang() and shop->addSqlRestriction()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9384 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 09:46:08 +00:00
dSevere
c9c781771a // CSS: padding modification for correct display of stock tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9383 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 09:45:18 +00:00
dSevere
6c9158a305 // Code review and refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9382 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 09:35:51 +00:00
rMalie
5ef98d7b47 // Fix debug in smarty
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9381 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 09:35:38 +00:00
dSevere
d588a80b4a // CSS: padding modification for correct display of stock tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9380 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 09:34:36 +00:00
lLefevre
e1c52879af // fixed bug property currentIndex
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9378 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 08:32:31 +00:00
tDidierjean
cbe497ef8c // fix static call to currentIndex
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9377 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-17 08:20:53 +00:00
tDidierjean
60cea8ce9f // AdminImages now uses HelperForm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9370 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 16:01:13 +00:00
tDidierjean
92565efe43 // Add HelperOptions to generate preferences forms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9369 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 14:30:07 +00:00
dSevere
5bd7821915 // HelperList: add possibility to create custom action for each row
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9368 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 14:19:45 +00:00
mDeflotte
d4dfab892f // Normalization + Fix bug with uncorrect attribute call
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9367 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 14:01:36 +00:00
tDidierjean
c6375f3877 // remove unused function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9365 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 13:45:51 +00:00
lLefevre
50cb82f508 [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminGenderController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9364 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 12:59:26 +00:00
rMalie
de6dc071fb // Fix ID language from context in preactivation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9363 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 12:59:03 +00:00
fBrignoli
da97c9237c [*] CO : Remove last separators
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9360 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 09:23:48 +00:00
vSchoener
6235389101 [*] CORE : AddressFormat, Add the possibility to doesn't specify a patternRules (avoid type) and fix empty content
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9357 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 09:08:15 +00:00
lLefevre
b58fb34c97 [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminQuickAccessesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9355 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 08:57:52 +00:00
rMalie
45645f1f50 // Merge -> revision 9352
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9354 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 08:20:54 +00:00
mDeflotte
cb175ba261 // Add stock defaut quantities and a default warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9353 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-14 07:55:45 +00:00
mDeflotte
2ea57df6cb // Add stock avaibility
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9339 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:37:07 +00:00
dSevere
9fbe849930 // stock: add main tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9338 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:32:18 +00:00
dSevere
3863401d0b // stock: add main tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9336 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:30:40 +00:00
dSevere
ef6805a8a1 // stock: update stockMvt
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9335 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:25:40 +00:00
dSevere
f1c26377a5 // stock: add warehouse tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9334 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:19:10 +00:00
dSevere
bc565999d1 // stock: add warehouse tab and update stock mvt tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9332 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:18:09 +00:00
dSevere
e16af90d6a // stock: add admin tabs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9331 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:14:40 +00:00
bMancone
ae43d7f86b // Stock : updated Stock & StockMvt & StockMvtReason
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9329 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:06:09 +00:00
lLefevre
cf8cb50631 [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminOrderMessageController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9328 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 16:01:44 +00:00
mDeflotte
205e54c31c // Add stock avaibility
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9327 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 15:58:29 +00:00
jmCollin
c4391df038 // fix bug with virtual product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9325 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 15:44:33 +00:00
bMancone
cc24b5abc0 // Stock : removed references to the actual stock management in AdminOrders/Product in order to merge with the new stock management system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9322 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 15:32:06 +00:00
mDeflotte
da6641ca10 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9321 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 15:27:41 +00:00
mDeflotte
7d7d3bfdd4 // Replace tab by a space between keyword "function" and the function name
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9320 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 15:26:39 +00:00
fBrignoli
90a56ae920 // todo are done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9318 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 15:15:21 +00:00
rMalie
552e264c95 [+] Classes: add PDO support if extension is activated
[*] Classes: add engine check (innodb)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9317 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 15:00:08 +00:00
bMancone
9984312409 // Warehouse : added productLocation management methods
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9315 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 14:40:58 +00:00
bMancone
74151b61b2 // Fixed synchronize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9314 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 14:32:02 +00:00
jmCollin
2e67942ba5 // Fix download file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9310 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 11:40:03 +00:00
tDidierjean
740419c6ed // fix states selection in form and address format in AdminAddress
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9309 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 09:41:11 +00:00
lLefevre
502369ee4f [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminGroupShopController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9308 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 09:07:36 +00:00
lLefevre
278dc40a5e [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminShopUrlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9307 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 09:06:32 +00:00
fBrignoli
039271f118 [-] FO : TaxRulesTaxManager cache not refreshed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9302 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 08:40:57 +00:00
fBrignoli
2d0bd337b5 [-] FO : Notice undefined tax_rate
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9301 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 08:24:10 +00:00
rMalie
543c42430c [*] Smarty: move tools/smarty/compile/ and tools/smarty/cache/ folders to cache/smarty/compile/ and cache/smarty/cache/ folders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9300 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 08:14:03 +00:00
bMancone
e0d943f822 // StockAvailable : updated description
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9299 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-13 08:04:23 +00:00
tDidierjean
e372544485 // AdminAddresses now uses HelperForm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9293 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 17:01:17 +00:00
bMancone
aa11f38d17 // StockAvailable : fixed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9291 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 16:22:03 +00:00
vChabot
af92291a9e // fix sql error on install
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9290 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 16:17:13 +00:00
rMalie
798de9aaea // Merge -> revision 9288
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9289 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 16:04:28 +00:00
rMalie
17aa43a4e5 // Norme ConfigurationTest
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9287 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 15:49:03 +00:00
tDidierjean
53f19438d3 // Added states to HelperForm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9285 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 15:27:06 +00:00
lLefevre
5ae93179f2 [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminShopUrlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9283 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 15:16:39 +00:00
lLefevre
6073e159f0 // fix AdminSearchEnginesController add action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9282 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 15:14:44 +00:00
lLefevre
0075d6f1ea // fix AdminRequestSqlController add action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9281 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 15:14:12 +00:00
lLefevre
8cc0c3e7a8 // fix AdminGroupShopController add action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9280 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 15:13:42 +00:00
lLefevre
4a662a90da // fix AdminAliasesController add action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9279 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 15:13:11 +00:00
mDeflotte
e0448016af // Stok : add class StockAvailable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9278 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 14:59:38 +00:00
bMancone
81aae0acf3 // Warehouse : added isEmpty()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9277 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 14:38:07 +00:00
vChabot
c4e28b117d [*] BO : Carriers are now sortable by position or price
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9276 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 14:31:36 +00:00
tDidierjean
d946197b9f // fix AdminStatesController add action
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9274 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 14:24:49 +00:00
bMancone
20595431fd // StockManager->removeProduct() WA : added last wa & current wa when removing
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9270 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 13:55:18 +00:00
bMancone
d376d80d0b // StockManager : changed prototypes in interface & fixed its implementation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9269 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 13:45:55 +00:00
tDidierjean
3bf92f6fa2 // change to BO template override
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9268 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 13:37:04 +00:00
lLefevre
98bf6af495 [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminRequestSqlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9263 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 12:05:11 +00:00
tDidierjean
3a53b68896 // fix AdminAddresses template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9258 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-12 07:36:44 +00:00
lLefevre
c4abd685d3 // revert commit 9252
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9255 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 16:39:19 +00:00
vChabot
8e659eb701 [*] BO : carriers are now sortable by position
// Carriers class is now normalized
// Attribute class is now normalized

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9254 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 16:29:34 +00:00
bMancone
af1db0fc07 // StockManager : Fixed LIFO/FIFO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9253 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 16:29:16 +00:00
lLefevre
fa7ac9460d [*] BO #PSFV-94 : update class HelperForm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9252 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 16:27:50 +00:00
lLefevre
b9692f7515 [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminStatesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9251 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 16:26:27 +00:00
lLefevre
867c38f43b [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminAliasesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9250 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 16:25:37 +00:00
lLefevre
c8ac4f4163 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9249 b9a71923-0436-4b27-9f14-aed3839534dd 2011-10-11 16:24:00 +00:00
lLefevre
f78b83d6c2 [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminSearchEnginesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9248 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 16:22:39 +00:00
lLefevre
5494ed1a3a [*] BO #PSFV-94 : added class HelperForm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9247 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 16:18:14 +00:00
rMalie
7db309c819 [+] Classes: Add Xcache support
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9242 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 14:28:21 +00:00
bMancone
76227dfe9a // StockWarehouse Class is now known as Warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9240 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 14:13:49 +00:00
bMancone
bfd80a8cb9 // StockWarehouse Class is now known as Warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9239 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 14:13:27 +00:00
bMancone
8ca63c6823 // StockManagerFactory : Fixed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9238 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 14:12:58 +00:00
bMancone
859bef9394 // StockManager: Fixed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9237 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 14:12:40 +00:00
aFolletete
2acce20048 // change template system for AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9235 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 13:42:46 +00:00
rMalie
c340b46f7d // Fix main flag for shop_url when a shop_url is updated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9233 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 13:32:18 +00:00
fBrignoli
329a0966ca [-] FO : Notice if blocknewsletter has been removed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9229 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 12:59:30 +00:00
tDidierjean
14bf4ba719 [-] Installer : fix demo product insertion
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9227 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 12:54:06 +00:00
rMalie
de69396a04 // Merge -> revision 9221
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9226 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 12:45:12 +00:00
aNiassy
3a6f44828e [-] FO : Applied the context to the cart in the ParentOrderController::_setDefaultCarrierSelection() method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9223 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 12:34:44 +00:00
bMancone
9353d5a8bc // ObjectModel : removed exception thrown if identifier is not set
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9222 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 12:06:12 +00:00
rMalie
ca010e3a20 [-] MO: fix blocktopmenu install
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9220 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 11:28:31 +00:00
rMalie
48d8dc379f [+] Classes: add support of APC cache
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9217 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 10:04:55 +00:00
rMalie
4d91a31031 // Add exceptions in db classes + normalize some files + split defines.inc file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9216 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 10:04:23 +00:00
fBrignoli
4d93b9a5fe [-] FO : Undefined variable price
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9215 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 09:58:05 +00:00
fBrignoli
81a2788184 // Norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9214 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 09:56:59 +00:00
fBrignoli
0bac60447e [*] BO : AdminTaxRulesGroup country select size
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9213 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 09:55:05 +00:00
aNiassy
01bb408766 [-] BO #PSFV-87 : modified a treatment because in php version 5.3 instructions like "$helper::" are forbidden
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9212 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-11 09:21:21 +00:00
dSevere
e62a73aa6d // update getProductRealQuantities method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9203 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 16:31:47 +00:00
bMancone
d510153022 // Interface: typo. Manager: Physical & Real Quantities + transfer between warehouses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9202 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 16:22:45 +00:00
dSevere
2ff2e87033 // Implements removeProduct method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9201 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 16:13:04 +00:00
lLefevre
2a1de3f012 [*] BO : Rights verification for multi-shop : delete info()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9200 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 16:12:58 +00:00
bMancone
f3a8adaefb // StockWarehouse : norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9199 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 16:12:26 +00:00
lLefevre
a8a11c0ece [*] BO : Rights verification for multi-shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9198 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 16:10:57 +00:00
aFolletete
5fe22693dd // fix issue with prefix and suffix in column
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9197 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 16:04:36 +00:00
aFolletete
fa5b99b53b // clean datepicker
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9196 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 15:37:29 +00:00
lLefevre
c955e5a0a3 [-] BO : removing the call to the property _listSkipDelete
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9195 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 15:35:37 +00:00
aFolletete
bf0c68ca5e // fixed icon column type issue on HelperList
// now callback column call a method of AdminController and not of Entity
// clean datepicker in HelperList

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9194 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 15:35:25 +00:00
lLefevre
fc0af2739c // Delete file requestSql.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9193 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 15:28:22 +00:00
rMalie
ce914bd435 [*] Classes: refactoring of cache classes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9191 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 14:45:27 +00:00
aNiassy
31815febc5 [-] FO-BO: #PSFV-95 : deleted some treatments for avoid code repeated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9187 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 13:19:40 +00:00
aNiassy
3fdb9d9eec [-] FO : #PSCFI-3680 deleted an extraneous slash for the path of blockstore.css
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9185 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 13:03:51 +00:00
bMancone
f8ddc8fcfc // Stock: deleted files while it's not fully implemented.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9184 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 12:52:59 +00:00
vChabot
2c0f3a453f // conflict removed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9181 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 12:39:51 +00:00
bMancone
2a0305f31e // StockWarehouse : updated __PS_USE_SQL_SLAVE__
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9179 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 12:27:16 +00:00
rMalie
577221ff08 // Remove bad _SQL_USE_SLAVE_ uses + normalize Db->executeS(), Db->execute() and Db->numRows() names
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9178 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 12:18:56 +00:00
bMancone
251dd966b7 // Stock : getStockId() copied in this new Class untill its implementation is done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9177 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 10:05:43 +00:00
bMancone
9658d81762 // StockWarehouse Fixed setIdShopList()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9175 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 10:01:15 +00:00
lLefevre
791dd3e6a6 [-][-] FO : not check if Object employee is Load
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9173 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 09:18:11 +00:00
mDeflotte
493dc1d811 // StockWarehouse FixBug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9172 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 08:57:58 +00:00
mDeflotte
f01b058f09 // StockWarehouse FixBug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9171 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 08:47:14 +00:00
bMancone
5fc2d5fe34 // StockWarehouse updated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9170 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 08:43:56 +00:00
dSevere
220a1406d3 // Add Stock Manager
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9169 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 08:35:03 +00:00
lLefevre
19a86d0a8f [-] FO : not check if context employee exist
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9168 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 08:34:25 +00:00
dSevere
8cb02307e5 // Updating Stock interface for using arrays of warehouses id when getting product quantities
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9167 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 08:27:24 +00:00
vChabot
9d2b379b88 // conflict resolved
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9166 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-10 08:16:23 +00:00
lLefevre
c781f25760 [*] BO : added right of multi-shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9157 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 15:39:55 +00:00
bMancone
7f13440775 // Updated stock: Stock & StockMvt & StockWarehouse & StockManagerModule
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9151 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 15:10:03 +00:00
dSevere
fca4a10c0f // Updating Stock interface for using Warehouses objects
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9150 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 15:08:12 +00:00
mDeflotte
2900595bc0 // Add StockWarehouse Class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9148 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 14:50:38 +00:00
mDeflotte
fb5c6d48f2 [*] All : Now autoExecute allow inserting multiple row
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9137 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 12:55:34 +00:00
rMalie
de7107b58c // MCached renamed in CacheMemcache + CacheFS renamed in CacheFs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9136 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 12:49:15 +00:00
mMarinetti
9236b287b1 // revert
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9135 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 12:40:46 +00:00
rMalie
581e212a66 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9134 b9a71923-0436-4b27-9f14-aed3839534dd 2011-10-07 12:40:41 +00:00
rMalie
64dca3508e // Move cache classes in classes/cache/
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9133 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 12:40:00 +00:00
vChabot
02026b1c8c // little fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9132 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 12:31:58 +00:00
vChabot
70c6d95950 // object cache added for getGroupsStatic methode
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9131 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 12:30:58 +00:00
vChabot
6749d55e54 // improve JS (select/unselect all)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9130 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 12:29:51 +00:00
mMarinetti
0e494ed7db // revert
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9129 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 12:27:01 +00:00
jmCollin
bf609d8374 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9128 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 11:27:45 +00:00
bMancone
92b032e8dd // StockManagement : Interface/Factory/Module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9126 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 09:56:55 +00:00
rMalie
14542fea44 // Merge -> revision 9124
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9125 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 09:54:43 +00:00
vChabot
38a23cf978 // refactoring function (delete useless functions)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9123 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 09:24:44 +00:00
vAugagneur
539b92b651 [+] BO : added action button in autocomplete module list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9122 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 08:05:29 +00:00
vChabot
3c12ce1943 // db_settings_extends updated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9121 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 08:02:34 +00:00
vChabot
8e25db88cf // modification upgrade sql 1.5.0.1
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9120 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 07:51:36 +00:00
vChabot
5e4eece1de // little correction
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9119 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 07:47:07 +00:00
vChabot
27fc74ffa5 // adding default restrictions on install
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9118 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-07 07:46:49 +00:00
vAugagneur
1cdc37f80d //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9114 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 15:45:53 +00:00
vAugagneur
bd1657dc01 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9113 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 15:36:28 +00:00
aFolletete
e7fa851a7c // move js_files and css_files assign in initFooter
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9112 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 15:34:05 +00:00
mMarinetti
2f20dea507 // no more media in header.inc
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9111 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 15:32:11 +00:00
vChabot
4134ed3f5d [*] BO : Modules can now be authorized or not by client group
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9108 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 15:22:25 +00:00
vAugagneur
40d0463987 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9106 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 14:52:02 +00:00
vAugagneur
7a75fe3c57 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9105 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 14:51:47 +00:00
vAugagneur
4d7bf6f76a //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9102 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 13:54:33 +00:00
vAugagneur
ef8f39babe //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9101 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 13:41:24 +00:00
mMarinetti
f9bcf3f84f [-] Installer : Fix country_to_timezone in last step
[+] BO : now AdminProducts and AdminCategories are separated from AdminCatalog
[+] FO : new method Category::getAllChildren() (the return value is an array, but can evolve to a collection
// Uses of Media:: in header.inc.php 

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9097 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 13:02:24 +00:00
vAugagneur
646eda2e4e //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9094 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 12:06:18 +00:00
vAugagneur
e228825648 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9093 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 12:05:37 +00:00
rMalie
3d0e96b313 // context->controller now work for adminController too
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9090 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 09:55:28 +00:00
vAugagneur
6c7d1a5ee7 [*] Classes : addJqueryUI automaticaly add css
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9089 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 09:51:37 +00:00
aFolletete
05de006711 // fix bug on AdminController and callback usage
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9087 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 09:48:48 +00:00
aFolletete
6cb41061cf // fix norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9086 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 09:39:45 +00:00
lLefevre
bac1d615cb [-] BO : fixed bug in method displayDate() to the class Tools
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9084 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 09:17:56 +00:00
lLefevre
da0ae2d9cb //added AdminSearchEnginesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9083 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-06 08:26:24 +00:00
lLefevre
6f9f82a2e5 //update property in AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9081 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 16:31:51 +00:00
jmCollin
5e8cd2a3f2 // Fix shipping cost for virtual products
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9078 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 16:02:12 +00:00
vAugagneur
097846fe14 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9077 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 15:57:42 +00:00
vAugagneur
fda5b287c9 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9076 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 15:55:57 +00:00
rMalie
f407514c7e // Remove counties in db_settings_lite.sql
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9075 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 15:51:29 +00:00
aFolletete
9d063a0a67 // fix norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9073 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 15:45:57 +00:00
vChabot
23c5f297ce // little fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9072 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 15:45:01 +00:00
vAugagneur
5423757ab8 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9070 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 15:35:03 +00:00
rMalie
b4d436ca21 // Merge -> revision 9061
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9069 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 15:21:55 +00:00
vChabot
51de6be6cc // fix conflict
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9065 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 14:57:52 +00:00
rMalie
66db4c486d // Small fix on exceptions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9064 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 14:43:25 +00:00
lBrieu
4b8ae2693c [*] FO : Hide the download link and download icon if the virtual product do not have files associated with it
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9063 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 14:28:47 +00:00
lBrieu
fce8c6a4e0 [*] FO : Hide the download link if the virtual product do not have files associated with it
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9062 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 14:27:30 +00:00
lBrieu
9eda5d4cdc [*] FO : get the product attribute id for download link
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9059 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 13:57:02 +00:00
lBrieu
3dc3144727 [*] FO : change the download link for files associated to product attributes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9057 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 13:54:56 +00:00
lBrieu
fc8a13192c [+] FO : don't send email if there's no file associated to the virtual product
[*] FO : change the download link for files associated to product attributes

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9056 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 13:53:51 +00:00
lLefevre
a1f4c147b9 //update adminStates.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9055 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 12:48:31 +00:00
lLefevre
3133e7ab27 //added AdminStatesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9054 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 12:42:52 +00:00
rMalie
0e33114d4d // Improve exception display
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9051 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 12:05:40 +00:00
vAugagneur
a39871ee84 //fixed small bug on search category
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9049 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 09:39:13 +00:00
vAugagneur
2ea5c7d0ba //fixed small bug on search category
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9048 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 09:34:38 +00:00
lLefevre
06713441d5 //Added AdminAliasesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9047 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 09:34:10 +00:00
vAugagneur
053af8843f [+] Classes : Media::getJqueryPluginPath() - added new parameter $folder
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9045 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 09:01:19 +00:00
lLefevre
13607b185b //correct errors in norms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9044 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 08:57:38 +00:00
lLefevre
018cd09251 //added array _listSkipDelete in AdminController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9043 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 08:30:00 +00:00
lLefevre
899c461853 // Added AdminGroupShopController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9042 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 08:18:44 +00:00
lLefevre
1c6dae34d1 //fixed bug update form
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9041 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 08:17:51 +00:00
lBrieu
22d2088e69 [-] Solve problem when trying to view a specific order on the history page (bad order id)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9040 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-05 07:55:21 +00:00
vAugagneur
99593ce1b5 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9033 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 16:25:08 +00:00
rMalie
2a764cfd14 // Fix downloadable files in admin
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9031 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 16:10:05 +00:00
lLefevre
e80543448a //replace password and secure_key by ****
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9030 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 16:03:24 +00:00
vAugagneur
9391324c8d //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9029 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 15:54:49 +00:00
jmCollin
7dba311ab1 // fix bug with combination
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9028 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 15:51:28 +00:00
lLefevre
b3e47d5274 //Added bulk action in AdminShopUrlController and fixed norms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9027 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 15:45:47 +00:00
vAugagneur
1bb02e3abf [+] Classes : Helper::renderAdminCategorieTree() have new params "$use_search" to add a input search
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9026 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 15:42:56 +00:00
lLefevre
65e3e5b8de //fixed bug activeVisu in list_content.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9024 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 15:06:36 +00:00
lLefevre
ab53862f87 //delete info() in HelperList
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9023 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 14:59:03 +00:00
lLefevre
4c720551a8 //assign var listSkipDelete in list_content.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9022 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 14:49:20 +00:00
lLefevre
c1594d0a66 //added message errors and success, Norms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9021 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 14:23:23 +00:00
vAugagneur
35280d155d //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9013 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 12:42:20 +00:00
mDeflotte
2da2b5c374 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9011 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 12:04:19 +00:00
lLefevre
a499af94bb //update property _listSkipDelete
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9010 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 12:01:55 +00:00
lLefevre
e1d3f25007 //added property _listSkipDelete
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9008 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 11:56:02 +00:00
vAugagneur
9b4f965033 //remove folder
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9007 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 10:17:07 +00:00
rMalie
d2a0cf76ee // Normalize adminRequestController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9006 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 08:08:43 +00:00
lLefevre
61d80451da //update of the method _displayEnableLink() call line 171
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9004 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-04 07:09:53 +00:00
lLefevre
723efe49f6 //update .tpl name AdminRequestSqlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8995 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 16:45:27 +00:00
lLefevre
e12b202e85 // Added AdminShopUrlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8994 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 16:44:23 +00:00
vChabot
3e37164520 Initial import.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8989 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 16:00:06 +00:00
rMalie
ae5fc92bf7 // Merge -> revision 8984
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8988 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 15:48:07 +00:00
lBrieu
79115b2572 [*] FO : Update filename if product has combinations (and files associated to them)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8987 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 15:39:06 +00:00
vAugagneur
ad7cef7424 //use Tools::isSubmit() instead of array_key_exist('', $_POST);
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8986 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 15:18:18 +00:00
vAugagneur
fffe36a72b //fixed small bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8985 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 14:40:40 +00:00
vChabot
2adb0ed5b7 // guest checkout works with the 2 registration process
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8983 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 14:35:43 +00:00
vAugagneur
e3f67a1d82 //added missing icons
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8979 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 14:16:30 +00:00
vAugagneur
af180672b1 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8977 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 14:11:55 +00:00
aFolletete
ae7f8eeada // Rename adminAddresses template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8971 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 13:19:57 +00:00
lBrieu
1193a572c1 [*] FO : Update filename if product has combinations (and files associated to them)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8968 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 13:05:08 +00:00
fBrignoli
0874edc9c3 // cache on getTaxCalculator()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8966 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 12:43:05 +00:00
lLefevre
3842184c8a //Added method bulkexport in AdminRequestSqlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8959 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 09:30:03 +00:00
rMalie
ef17d0b7da // Merge -> revision 8952
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8957 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 09:14:01 +00:00
vAugagneur
f1e265fad4 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8956 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 09:02:42 +00:00
vAugagneur
09338a79bf //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8954 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 08:35:50 +00:00
vAugagneur
07ff8bba2a [-] Classes : fixed small bug on CCC
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8953 b9a71923-0436-4b27-9f14-aed3839534dd
2011-10-03 08:22:33 +00:00
rMalie
9ca40220be // Optimisation ObjectModel + hydrateCollection
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8942 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 16:04:33 +00:00
vChabot
8fcc94e777 [*] Registration type is now in 2 steps or all in one
// refactoring AuthController.php (front)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8941 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 15:48:20 +00:00
lLefevre
9af35db5ce //Added AdminRequestSqlController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8938 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 15:28:44 +00:00
tDidierjean
c1d5575723 // added customizable bulk actions for lists in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8936 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 15:08:35 +00:00
lBrieu
2a8a547fe3 [-] Fix problem with js files due to the retro compatibility
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8935 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 15:06:59 +00:00
mDeflotte
3b827893b1 [*] Add reference for carriers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8933 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 14:59:07 +00:00
rMalie
2068aaaf2a // Norm on controllers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8930 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 13:50:55 +00:00
mDeflotte
72672c7a8f [-] BO : BugFix - Not possible to save a carrier
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8927 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 13:19:25 +00:00
vAugagneur
2fbc132933 [+] Classes : added new class Media => It contains all the method related to media like CSS, JS
[+] Classes : added new method Media::addJquery(), Media::addJqueryUI(), Media::addJqueryPlugin()
[~] Deprecated : All method related to CCC has been moved in class Media

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8926 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 13:01:10 +00:00
tDidierjean
1c206de2ba // Update list generation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8922 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 10:00:20 +00:00
rMalie
3e1c4e426f // _frontController now work again
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8921 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 09:51:35 +00:00
mDeflotte
9e5832fb33 [-] All : Class Product, error in SQL request
// some normalization is class product (all is not done)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8919 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 09:29:36 +00:00
mMarinetti
7770d914a0 // removed extra file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8918 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 08:22:52 +00:00
rMalie
3620f0837f // Merge -> 8910
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8917 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 08:17:25 +00:00
mMarinetti
4b56fa5c68 // PdfOrderSlipController with eol
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8916 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 08:17:00 +00:00
mDeflotte
a2483c8114 // ChangeCurrencyController : refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8914 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 07:42:20 +00:00
mDeflotte
97a30b4aab // CompareController : refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8913 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 07:37:20 +00:00
mDeflotte
aab66997da // CaregoryController : FixBug : Product list must be assigned to the template AFTER being calculated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8912 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 07:22:42 +00:00
mDeflotte
ddc6b504c8 // ContactController : refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8911 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-30 07:06:56 +00:00
tDidierjean
aa5684360d // update to AdminController init() and postProcess()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8902 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 17:20:16 +00:00
jmCollin
3e9e437ac1 [+] FO : add files for combination
[*] FO : Create virtual products with no associated file

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8901 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:40:44 +00:00
mMarinetti
1e13bf599b // fix duplicated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8900 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:39:17 +00:00
jmCollin
e90bd74e36 // translate for virtual product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8899 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:32:36 +00:00
rMalie
227e13680b // Refacto of CategoryController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8898 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:31:32 +00:00
tDidierjean
923eb2cd21 // fixed item edition for AdminAddresses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8897 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:25:58 +00:00
mDeflotte
093c743141 [-] FO : BugFix - Ajax error on editing address durring ordering process
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8896 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:19:33 +00:00
rMalie
8b59a8dd04 // Fix authentification gender
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8895 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:13:50 +00:00
mMarinetti
940d412a0c // fix links in main menu,
// + moved tab AdminTracking.php to AdminTrackingController.php


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8894 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:13:34 +00:00
mMarinetti
df9948c445 // fix display subtabs when employee is on hover on adminHome
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8893 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:08:42 +00:00
mMarinetti
e8ff5b025f // fix displaying subtabs link,
// fix adminHome links


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8892 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 16:02:26 +00:00
mDeflotte
117583a0d0 //CmsController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8891 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 15:55:36 +00:00
vChabot
355bad0fba // fix undefined var $customer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8889 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 15:45:09 +00:00
mDeflotte
a73ef6232a //DiscountController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8887 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 15:15:55 +00:00
mDeflotte
317346ce46 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8886 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 15:12:57 +00:00
mDeflotte
af54cbaf32 //GetFileController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8885 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 15:12:34 +00:00
mDeflotte
76fedb28db // Remove "space" in class Tools
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8884 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 14:42:03 +00:00
mDeflotte
38bfdcd843 //GuestTrackingController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8883 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 14:39:13 +00:00
mDeflotte
b5a03180f5 // AdminCustomer : "</from>" have nothing to do in the translation function l();
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8882 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 14:33:59 +00:00
mDeflotte
8554df3197 //historyController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8881 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 13:54:54 +00:00
mDeflotte
b1e011cabd //IdentityController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8879 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 13:48:39 +00:00
rMalie
41138b45c0 // Fix addressesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8878 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 13:43:59 +00:00
rMalie
42c5603cc3 [+] Classes: Add ObjectModel::hydrateCollection() in order to transform arrays from sql queries return in list of objects
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8877 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 13:23:54 +00:00
mDeflotte
5292c8547b //IndexController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8876 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 13:18:48 +00:00
mDeflotte
645c251c8a //IndexController : Refacto done + normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8875 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 13:18:36 +00:00
mDeflotte
98b04bb67b //ManufacturerController : Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8874 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 13:16:03 +00:00
mDeflotte
073c5f16f2 //SupplierController+ManufacturerController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8873 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 13:12:28 +00:00
mDeflotte
38a5ed6c79 //ModuleController+MyAccountController+NewProductsController+OrderConfirmationController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8872 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 12:58:08 +00:00
mDeflotte
a40968d40e // Add error message in order details
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8871 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 12:29:29 +00:00
mDeflotte
642db2b948 //OrderController : Refacto done + modify some comments
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8870 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 12:28:09 +00:00
mDeflotte
f9c565699b //OrderDetailController : Refacto done + modify some comments
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8869 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 11:53:00 +00:00
mDeflotte
590fbe0ef0 //OrderReturnController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8868 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 09:05:03 +00:00
mDeflotte
50bdd80431 //OrderOpcController+OrderSlipController+PageNotFoundController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8867 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 09:03:41 +00:00
mDeflotte
e689f575dd //PreProcess => PostProcess
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8866 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 09:01:59 +00:00
mDeflotte
5f02dc0d0e //StoresController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8865 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 08:59:11 +00:00
mDeflotte
6a96dd1371 //Use protected instead of private function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8863 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-29 07:07:06 +00:00
tDidierjean
94e015fb29 // Delete old AdminAddresses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8860 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 16:50:58 +00:00
tDidierjean
bf3736c820 // Added HelperList, AdminAddressController, and fixed subtab display
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8858 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 16:32:42 +00:00
rMalie
36088f9e6c // Refacto AttachementController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8857 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 16:19:50 +00:00
rMalie
2b96479279 // Refacto AddressesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8856 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 16:16:20 +00:00
mDeflotte
f30c29afa4 //ParentOrderController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8855 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 16:14:50 +00:00
rMalie
be8d2136be // Merge -> revision 8851
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8854 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 16:03:30 +00:00
rMalie
ccd0383e88 // Refacto of cartController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8853 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 15:40:28 +00:00
mDeflotte
c26b75987e //ProductController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8852 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 15:17:03 +00:00
mMarinetti
e620a3d350 [+] BO : now Back-office has meta-title by controller
// fix back office template, add missing override

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8849 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 14:15:07 +00:00
mDeflotte
164006e767 //PasswordController+PdfInvoiceController+PdfOrderReturnController+PdfOrederSlipController+PricesDropController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8848 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 13:56:53 +00:00
mDeflotte
d943eb7b2b //SearchController+SitemapController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8847 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 13:51:35 +00:00
mDeflotte
5a5bc410bf //StatisticsController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8846 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 13:49:32 +00:00
mDeflotte
65fbf9138c //StoresController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8845 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 13:47:11 +00:00
mDeflotte
02d6a07110 //SupplierController : Refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8844 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 13:43:00 +00:00
vChabot
74aa0b573c // fix date error ('0000-00-00' is an invalid date)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8843 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 13:36:41 +00:00
mMarinetti
df7416a453 // now class RequestSql can be overridden
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8841 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 11:47:39 +00:00
mMarinetti
82410874d3 [+] BO : new method $link->getAdminLink($controller), to build admin url with token
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8840 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 10:20:44 +00:00
rMalie
7281de8839 // Add Link->getAdminLink()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8839 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 09:53:30 +00:00
lLefevre
089a31f32c //fix correction norm and language in AdminGroups
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8838 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 09:47:33 +00:00
vChabot
966250e202 // cleaning code (norm / perf)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8837 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 09:37:29 +00:00
bMancone
7dcd300c7d // productcomments
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8835 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 09:02:51 +00:00
vAugagneur
202b54326f //delete unused file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8834 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 08:52:31 +00:00
bMancone
96ed001ff3 // productcomments
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8833 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 08:50:40 +00:00
bMancone
0db92ddae5 // HomeSlider
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8832 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 08:45:41 +00:00
vChabot
c682a16028 // fix parse error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8831 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 08:42:20 +00:00
lLefevre
c304a2c620 //fix correction norm in AdminProducts
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8830 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 08:26:46 +00:00
mMarinetti
c97115fd98 // fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8829 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 08:13:58 +00:00
vChabot
58d205edc5 // add method ajaxProcess in "run" method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8827 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 08:06:10 +00:00
mMarinetti
877074f659 [*] BO : moved 2 javascript functions to display success or error on AdminAccess are now available everywhere (thanks to Loic)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8825 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 07:32:39 +00:00
vChabot
2b3e74baaa // fix error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8824 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 07:31:45 +00:00
vChabot
af89f873d0 // fix parse error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8823 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 07:29:22 +00:00
lLefevre
8a4c8e1d04 //fix correction norm in SQL manager
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8822 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-28 07:10:24 +00:00
rMalie
a1a1c8340e // AddressController : refacto done
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8820 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 16:21:25 +00:00
vAugagneur
474ef2b3d0 //fixed sql bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8819 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 16:06:25 +00:00
rMalie
a1854047e9 // Fix dispatcher with rewriting in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8816 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 15:52:59 +00:00
rMalie
8a4660a378 // Fix bugs on frontControllers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8815 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 15:28:41 +00:00
vChabot
3d36012cb9 // parse error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8814 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 15:20:41 +00:00
tDidierjean
3192ddb27d // change to Controller workflow
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8813 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 15:20:30 +00:00
mMarinetti
86f18ce106 // remove AdminHome tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8811 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 15:10:26 +00:00
vChabot
2045401f9e // cleaning code (norm / perf)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8810 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 15:08:24 +00:00
aFolletete
810f17c38e // rename index.tpl to layout.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8809 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 14:52:52 +00:00
rMalie
1b6d0d1be3 // Merge -> revision 8800
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8808 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 14:30:06 +00:00
mMarinetti
05fde82c53 // no more pouet
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8807 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 14:26:19 +00:00
mDeflotte
d277791787 [-] FO : URL for page "Forgot your password" is not correct
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8806 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 14:23:18 +00:00
mMarinetti
41c4897976 // ajax-tab usage of Dispatcher
// adminHome.tpl
// header.tpl fix


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8805 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 14:18:27 +00:00
vAugagneur
4c255554fe [-] BO : fixed ajax file-upload request
[-] BO : now you can really delete image in BO
//added translations

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8804 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 13:33:39 +00:00
rMalie
98b1103e2e // Remove debug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8803 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 13:27:11 +00:00
rMalie
6a1ea62d13 // Refacto of controllers PART 2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8802 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 13:04:24 +00:00
vChabot
fc88323443 // perf
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8801 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 12:54:47 +00:00
rMalie
80e750c4c9 [+] Classes: Add PHP exceptions support + handler
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8797 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 12:10:47 +00:00
rMalie
7c32b171cd // Fix lcfirst use !
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8796 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 12:08:14 +00:00
dMetzger
b280534764 // SQL file charset set to UTF-8
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8794 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 09:31:54 +00:00
vAugagneur
e1b0cf4ea0 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8792 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 08:59:52 +00:00
rGaillard
a0dc3f8923 //Deletion of a useless file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8791 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 08:55:01 +00:00
vAugagneur
7a217595cd //removing unused plugin
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8790 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 08:28:25 +00:00
lLefevre
916cee53e5 [*] BO : change span.hint
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8789 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 08:13:53 +00:00
lLefevre
2171c5598c [*] BO : refactoring AdminAccess
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8788 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 08:12:33 +00:00
lLefevre
2957b3dbb1 [+] All : new class PrestashopException
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8787 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-27 08:12:15 +00:00
lLefevre
7b1344becf git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8782 b9a71923-0436-4b27-9f14-aed3839534dd 2011-09-26 16:46:48 +00:00
vAugagneur
f7c7b6350f [-] MO : fixed FATAL error on layered navigation module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8781 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 16:31:36 +00:00
lLefevre
eca7864dc4 // fix admin.css (Michael)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8780 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 16:15:17 +00:00
jmCollin
2309720a0b //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8778 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 16:04:15 +00:00
jmCollin
da24f70c91 // Fix for Strict standards: Creating default object from empty value, when try to add a new product without product name or friendly URL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8777 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 15:53:36 +00:00
mMarinetti
52b96fb902 // admin.css directory is now correct in setMedia
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8775 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 15:26:43 +00:00
rMalie
45eb3a52ad // Fix admin dispatcher
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8774 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 14:36:18 +00:00
vChabot
255160292a // import OK for product feature
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8772 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 13:50:53 +00:00
mDeflotte
ddc82146fc [-] BO : #PSFV-66 - Bad warnings "Currency not set"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8771 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 13:49:38 +00:00
aKorczak
7d2e172321 [-] WS : Move classes to /webservice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8767 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 12:27:25 +00:00
lLefevre
12942dd4a8 //Fixed correct norm in class RequestSql
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8765 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 10:22:35 +00:00
rMalie
6a39d24f05 // Improve flexibility of dispatcher + fix controllers access in BO (only admin controllers are loaded by the dispatcher)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8764 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 09:57:00 +00:00
tDidierjean
e98c1cdf5c // fix missing include for multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8763 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 09:18:07 +00:00
rMalie
4d34ca86b7 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8762 b9a71923-0436-4b27-9f14-aed3839534dd 2011-09-26 08:52:32 +00:00
lLefevre
60c004493e [+] BO : add SQL manager
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8760 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 08:30:14 +00:00
mMarinetti
30e94d126c // fix adminHome for Chart, js loading order in setMedia
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8759 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 08:25:38 +00:00
rMalie
ff51f77bba // Fix token on adminHome
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8758 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 08:24:38 +00:00
mMarinetti
a139df824f // maj default theme for admin
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8757 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 08:09:34 +00:00
fBrignoli
2107dd5d5d // problem with zipcode containing letters
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8756 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-26 08:03:52 +00:00
aFolletete
78f6a4e20a [*] Classes : improve performances of "Feature detachable" feature
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8754 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-24 15:03:21 +00:00
fBrignoli
cfca41b012 [-] FO : "It is not safe to rely on the system's timezone ..." due to cookie use before timezone init
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8753 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 17:07:45 +00:00
mMarinetti
95fc50f0fb // fix displaying subtab with old system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8752 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 16:25:15 +00:00
vChabot
83fc0977c9 [*] BO : Features are now sortable.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8751 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:45:40 +00:00
mMarinetti
4f5b1dd933 // fix tab display and subtabbing
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8750 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:45:09 +00:00
rMalie
01d99a4d58 // Improve dispatcher for administration
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8749 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:37:16 +00:00
mMarinetti
e85dcad20b // added class_index.php to svn ignore list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8748 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:24:53 +00:00
mMarinetti
450c8bf81f // optimization default template name
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8747 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:22:50 +00:00
rMalie
af81bc3e23 // Add 2 missing files in override
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8746 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:10:00 +00:00
rMalie
4e717fe190 // Add moduleController file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8745 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:08:43 +00:00
mMarinetti
33179c218b // content.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8744 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:06:55 +00:00
mMarinetti
b00ad8249d //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8743 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:05:48 +00:00
mMarinetti
926063e08f [+] BO : New AdminController system, including smarty backoffice, thanks to Raphael and Thomas
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8742 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 15:01:49 +00:00
rMalie
1437dec72f [*] MO: module cheque use the new moduleController system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8741 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 14:34:18 +00:00
rMalie
7c85e104de // Merge -> revision 8734
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8740 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 14:06:47 +00:00
rMalie
4181a8ea5b // Rename Module->smartyAssign to Module->templateAssign
[+] Front: Add module controller + url dispatch for modules

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8738 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 13:50:33 +00:00
fBrignoli
14a3e123db [-] BO : Missing add one after another type in admintaxrulesgroup
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8737 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 13:25:27 +00:00
mDeflotte
118338a5ea [*] BO : Gender - Allow image resizing
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8736 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 13:04:52 +00:00
mDeflotte
a127911a7f [-] Install : Add gender durring install
[*] FO : Add gender_type "neutral"
// Normalization

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8733 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 09:58:19 +00:00
mDeflotte
a3fb583b98 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8732 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 09:51:10 +00:00
tDidierjean
df5e702f5c // fix blocknewsletter error during e-mail verification
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8731 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 09:10:54 +00:00
fBrignoli
a7b62a9520 [*] MO : blocknewsletter : double opt-in
[*] MO : newsletter : filter on  active only


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8729 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 08:44:49 +00:00
rMalie
d8b6693264 // Fix strict standard on controllers + modules header / footer include
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8727 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 08:05:31 +00:00
fBrignoli
34c4d39649 [-] LO : Incorrect tax for Newfoundland
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8726 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-23 08:05:26 +00:00
vAugagneur
1c01c20149 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8723 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-22 15:46:42 +00:00
rMalie
4f2a090e24 // Merge -> revision 8720
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8722 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-22 15:45:10 +00:00
rMalie
69db63f26c [*] Front: move front controllers in controllers/front/ directory
// Refactoring of front controllers part 1

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8721 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-22 15:19:42 +00:00
rMalie
2dbea99b61 [+] MO: Add Module->smartyAssign method, in order to assign variables with module name as prefix in module's templates
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8718 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-22 12:05:49 +00:00
dMetzger
b24d2fa274 // Removed id_color_defaut from installer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8711 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-22 08:54:11 +00:00
fBrignoli
56294efe91 // Address expected as parameter
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8702 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 16:19:57 +00:00
fBrignoli
f0dde5e983 // missing file in previous commit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8701 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 15:49:43 +00:00
fBrignoli
f8989018a7 // Tax::initializeAddress =>Address::initialize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8700 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 15:43:12 +00:00
tDidierjean
b432c3fd35 // commit index.tpl
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8699 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 15:42:43 +00:00
rMalie
1d6a3e90c8 // Remove Tools::buildQuery
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8698 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 15:36:23 +00:00
tDidierjean
14f55eccb7 // change header and footer smarty inclusion
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8697 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 15:26:44 +00:00
fBrignoli
fc6530d1f5 // norm + perf
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8695 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 14:48:33 +00:00
fBrignoli
bbb13f5568 // missing init selected_states
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8694 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 14:42:55 +00:00
vChabot
46ba33ef92 // import csv ok for group attribute position
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8693 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 14:38:12 +00:00
vAugagneur
8b6ec916e0 [+] BO : now you can choose type of attribute group (select , color, radio)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8691 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 14:29:32 +00:00
fBrignoli
5bc5979e2d // comment
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8690 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 14:29:00 +00:00
fBrignoli
56c570e4b8 // comment
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8689 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 14:23:11 +00:00
rMalie
fd45c7bb4d // Fix validation of emails preferences
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8685 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 12:55:57 +00:00
vChabot
d0102a81b7 [*] BO : groups attributes are now sortable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8683 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 10:04:54 +00:00
rMalie
526a94a0e6 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8682 b9a71923-0436-4b27-9f14-aed3839534dd 2011-09-21 09:52:19 +00:00
bMancone
22707acfae // Fixed setStock(): Quantity is now set correctly
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8681 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 09:47:30 +00:00
fBrignoli
1947e320c9 [*] MO : blockcms - Customizable footer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8680 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 09:41:54 +00:00
vChabot
1b836a3920 // add add_attribute_position.php file to update attribute position
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8678 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 09:03:53 +00:00
rMalie
734a615464 // Improve DbQuery
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8676 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 08:12:47 +00:00
rMalie
a3881668f0 // Fix install with Db
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8675 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-21 07:46:12 +00:00
tDidierjean
9641b3c55b // fix notifications in smarty BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8672 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 17:04:21 +00:00
tDidierjean
27ef804c10 [-] Classes : fix bug PSCFI-3367 - incorrect admin rights for created image folders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8671 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 16:58:58 +00:00
rMalie
7eef9391af // Improve DbQuery
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8670 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 16:49:22 +00:00
rMalie
95233f9df5 [+] Classes: add DbQuery class in order to build queries (usefull when working with chunks of queries)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8668 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 16:14:19 +00:00
tDidierjean
92cc465a3c // Creation of AdminController : Admin tabs will now extend this class (see AdminTools.php for example)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8667 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 16:04:35 +00:00
tDidierjean
b45dd02452 // remove deprecated PS_ADMIN_DIR by _PS_ADMIN_DIR_
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8666 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 15:53:57 +00:00
fBrignoli
b9e7daf0b7 [-] LO : Undefined field description
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8665 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 15:45:48 +00:00
dMetzger
6bc3640449 // Removed leading "*" before PHP opening tag in AdminDB.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8658 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 09:30:36 +00:00
aFolletete
a568d2c669 [-] FO : fixed bug on Feature detachable with product pack feature
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8654 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 08:41:05 +00:00
aFolletete
738590890e // clean conflict lines in SpecificPrice file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8653 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 08:38:43 +00:00
vChabot
58c8c71018 // import csv ok for product attribute position
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8652 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-20 08:25:50 +00:00
aFolletete
c3cc90a191 // Many improvements for Feature Detachable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8648 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 15:55:52 +00:00
jmCollin
7c45913536 // Update DB for download product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8646 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 14:54:30 +00:00
vAugagneur
a07a7f93cc [-] Installer : missing field in customer_message table
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8645 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 14:49:54 +00:00
fBrignoli
6904b58a3e [*] LO : FR now has a Corse Zone defined
[*] LO : CA Taxes


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8644 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 14:03:56 +00:00
tDidierjean
155586da90 // remove unused translations and fix error caused by unused translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8643 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 13:40:44 +00:00
rMalie
031c450293 // Fix class Gender (add static keyword)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8642 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 13:30:11 +00:00
tDidierjean
d8f69d3cc2 // fix ContactController not calling parent constructor
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8640 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 13:20:14 +00:00
vChabot
a88c90fbe1 [*] BO : Product attributes are now sortable.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8639 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 13:11:00 +00:00
rMalie
40e0f3dca5 // Fix class Gender (add static keyword)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8637 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 12:43:25 +00:00
fBrignoli
067342db32 [-] MO : statsnewsletter - SQL error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8635 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 10:02:59 +00:00
dMetzger
d2cb63d1e3 // $_SERVER['request_uri'] replaced by $_SERVER['REQUEST_URI']
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8631 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-19 08:59:46 +00:00
rMalie
42d996ec94 // Merge -> revision 8624
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8626 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-16 15:02:29 +00:00
rMalie
e5e12bdf90 [+] Add abstract controller
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8625 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-16 14:49:47 +00:00
rMalie
52da3c8bb8 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8622 b9a71923-0436-4b27-9f14-aed3839534dd 2011-09-16 10:19:34 +00:00
rMalie
abbcb7892d // Fix controllers file names + add missing files in override/ + ControllerFactory class is now deprecated, use Controller instead + fix NoticationCore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8621 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-16 10:09:26 +00:00
fBrignoli
e055c62066 // DB structure missing tax_computation_method
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8620 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-16 09:30:50 +00:00
rMalie
781d92ccd4 // Move shop classes in classes/shop/ directory
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8616 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-16 08:49:50 +00:00
rMalie
394549b805 // norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8615 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-16 08:40:26 +00:00
rMalie
1977f1d851 // Merge -> revision 8608
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8612 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-15 16:10:59 +00:00
rMalie
8d9309ba23 // Norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8607 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-15 14:32:37 +00:00
vChabot
34c9336b37 [*] FO : display initial price in the cart when a specific price is applied to a product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8604 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-15 12:37:44 +00:00
tDidierjean
70a130854c // fix ajax file manager error with undefined employee
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8602 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-15 08:22:10 +00:00
rMalie
224b55c3c2 // Merge -> revision 8589
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8596 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 16:13:24 +00:00
fBrignoli
8c049f8afd // Norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8595 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 16:06:00 +00:00
fBrignoli
1db441bc42 // Norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8588 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 15:50:15 +00:00
fBrignoli
28c187186f // Norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8587 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 15:46:18 +00:00
lLefevre
605204e8f1 [-] BO : Error JS in TinyMce Plugin
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8586 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 15:44:02 +00:00
fBrignoli
7476f5e534 // Norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8584 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 15:39:44 +00:00
fBrignoli
6700cc023e // Norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8581 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 15:33:14 +00:00
rMalie
23e00a95f8 [+] Project: it's possible to create new genders, "Miss" gender is now added
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8579 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 15:20:53 +00:00
rMalie
03eaee9bf4 [+] Project: it's possible to create new genders, "Miss" gender is now added
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8578 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 15:15:51 +00:00
tDidierjean
62a578b314 // fix image positions when adding or deleting images
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8576 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 15:03:03 +00:00
fBrignoli
9f7a0e4e82 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8572 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 13:38:21 +00:00
fBrignoli
fdd0aa2aa0 // order_detail_tax + tax.deleted
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8571 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 13:37:01 +00:00
lLefevre
01eb0bedc3 [*] BO & FO : Add image in the description of product (CC008)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8570 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 13:29:31 +00:00
aFolletete
b3d60e169b [*] Project : Version 2 of Smarty has been removed for using only version 3
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8569 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 13:27:32 +00:00
fBrignoli
e5703a3d69 // first line was empty
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8567 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 13:11:11 +00:00
fBrignoli
8bcea2496e [-] FO : add to cart broken TaxCalculator::getTaxesRate => getTotalRate
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8566 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 13:09:24 +00:00
vAugagneur
a835a4aa8c //oups sql
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8564 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 12:17:49 +00:00
vAugagneur
453edf991d [+] BO : now you can sync imap mailbox with the Customer Service (SAV)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8562 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 09:42:53 +00:00
rMalie
b7cc6cb72d // Fix &amp; - theme is not w3c valid anymore for now
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8560 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 09:23:32 +00:00
aFolletete
79d16b8d9a // ignore cache and complie content directories
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8559 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 09:21:46 +00:00
aFolletete
59b55487be [-] Classes : Fixed bug on Feature detachables and Customizations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8557 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 09:18:18 +00:00
fBrignoli
facb2318e5 [*] BO : Taxes are now historized
[*] BO : Taxes are no longer stored in the order details row



git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8556 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 09:06:20 +00:00
rMalie
578d6de4b9 // Fix adminMeta (dispatcher notices) + generateHtaccess
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8555 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 08:53:37 +00:00
rMalie
87df41c9d6 // Merge -> revision 8552
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8554 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-14 08:29:10 +00:00
tDidierjean
aa05a52c9b // change image drag&drop to look like other drag&drop lists
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8546 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 17:14:58 +00:00
fBrignoli
d74bcee308 // code norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8545 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 16:55:44 +00:00
tDidierjean
0c49b5b416 // fix image drag&drop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8543 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 15:34:41 +00:00
tDidierjean
feabf30c20 [*] BO : product images can now be dragged and dropped to change position (CC021)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8542 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 15:22:29 +00:00
vChabot
e4a09c5222 // changing name "available_date_combi" to "available_date" and some features
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8541 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 14:52:42 +00:00
tDidierjean
4e85800d20 // fix validation of available_date field in Product class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8540 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 14:21:59 +00:00
fBrignoli
cccdd42735 // debug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8539 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 13:59:44 +00:00
fBrignoli
fa63f24cd3 [-] BO : John Doe cart's address are incorrect!
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8538 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 13:53:56 +00:00
lLefevre
5cae5358fa [*] BO : Add reduction groups in the categories, and bug fix: reduction that is not an integer or a percentage (TD001 - TD002 - TD003)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8536 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 13:17:32 +00:00
mMarinetti
fc7612f010 // norm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8531 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 09:57:19 +00:00
lBrieu
97aa51eb20 [+] BO : Add translations for notifications messages
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8528 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 09:06:46 +00:00
lBrieu
36ffc04d26 [*] BO : Allows to get more details on the notification (customer name, total paid real, etc...)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8527 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 09:06:17 +00:00
lBrieu
bf480eb45e [*] BO : Shows more details for each notification
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8525 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 09:05:30 +00:00
rMontagne
0c2521c568 Fix Classe FileUploader
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8523 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 08:25:52 +00:00
vChabot
8c23f118f1 // assign variables to display cart from payment method choice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8522 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 08:24:40 +00:00
tDidierjean
74f7dda09e // fix ajax fileuploader error with duplicate positions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8521 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 08:21:26 +00:00
vChabot
7564ceb76a [*] BO : add an available date when product is out of stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8520 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 08:07:34 +00:00
vAugagneur
aba41c1078 [+] FO : Messages in order detail are now stored in the Customer Service (SAV)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8518 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 07:18:04 +00:00
vChabot
602bfdfdec // conflict removed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8517 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-13 07:13:25 +00:00
lBrieu
da410fa260 [*] BO : Shows more details for each notification
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8516 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 16:46:07 +00:00
lBrieu
4f3f180fdd [+] BO : Allows to get more details on the notification (customer name, total paid real, etc...)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8515 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 16:45:18 +00:00
rMalie
3df03aa2bb // Merge -> revision 8507
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8514 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 16:20:30 +00:00
rMalie
b50c7e4334 // Merge -> revision 8507
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8513 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 16:17:37 +00:00
rMontagne
3c6a0944fa [*] BO : Update Translation Error for Multiple Upload
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8512 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 16:00:20 +00:00
rMontagne
712a8cd21d [*] BO : Add Style Multiple Upload
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8511 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 15:56:22 +00:00
rMalie
467313e111 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8509 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 15:49:01 +00:00
rMontagne
9fbc821f61 [+] BO : Add Multiple Ajax Upload Image on AdminProduct
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8508 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 15:46:36 +00:00
aFolletete
4bacf38897 // revert
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8505 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 15:25:21 +00:00
fBrignoli
c9de718503 [-] Installer : Removed AdminCounty
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8501 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 14:37:32 +00:00
lLefevre
7869976b39 // fixed commit 8499 : change css to div.hint
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8500 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 14:01:40 +00:00
lLefevre
90724761b0 [*] B0 : change the tooltip (CC014)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8499 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 13:21:48 +00:00
vAugagneur
a318f6e081 //added tools/smarty/cache AND tools/smarty/compile in ignore list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8497 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 12:52:57 +00:00
vAugagneur
480678b81a [-] FO : fixed small js error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8494 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 12:35:29 +00:00
vAugagneur
625920282a [-] FO : ajax request to send message in order detail now use index.php?controller=order-detail
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8492 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 12:21:44 +00:00
lLefevre
80d8b0a1a9 [*] BO : change a number of character by short description(BL007)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8489 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 11:57:30 +00:00
vAugagneur
fbfe491903 [-] Controller : fixed sql bug in contact controller
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8484 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 09:15:50 +00:00
tDidierjean
a3245e4093 [*] BO : Removed size limit for image upload (BL006, CC136)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8482 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-12 09:14:07 +00:00
lBrieu
77a4815ef0 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8446 b9a71923-0436-4b27-9f14-aed3839534dd 2011-09-09 13:14:47 +00:00
lBrieu
0f64fbb542 [+] Add translations for labels (Notifications on BO)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8445 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-09 13:14:30 +00:00
rMalie
a25f1341ea // Fix discounts
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8442 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-09 11:41:02 +00:00
rMalie
a886313c61 // Fix discount creation (bad redirection, missing context value)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8439 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-09 09:42:55 +00:00
vChabot
9ccb38c2af [*] FO : Shop cart visible on payment method choice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8437 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-09 09:22:59 +00:00
vChabot
875358dd31 [*] FO : improved tab in product page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8429 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-08 16:22:20 +00:00
rMalie
eacdc8d624 // Fix UTF-8 on install files
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8422 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-08 14:14:37 +00:00
rMalie
24e213cda8 // Merg// Merge -> revision 8395
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8397 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-07 16:23:13 +00:00
rMalie
5aab81dc66 // Fix carrier creation for multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8396 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-07 15:47:45 +00:00
rMalie
7ef8474e4c // Fix tryToConnect methods for DB
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8386 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-07 12:25:47 +00:00
rMalie
5a41f08c70 // Fix tryConnection and tryEncoding for MySQL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8383 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-07 09:44:20 +00:00
aFolletete
18c930c28e [-] Classes : fixed sql error on Combination class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8382 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-07 08:46:05 +00:00
lBrieu
79346ead0d [+] Update the CSS problem
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8381 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-07 08:34:43 +00:00
rMalie
174947be5b [*] Project: MySQL::trytoconnect() and MySQL::tryUTF8() methods replaced with Db::checkConnection() and Db::checkEncoding()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8380 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-07 08:16:43 +00:00
rMalie
0c7d567451 // Fix carrier bug for virtual products during payment
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8368 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-06 13:34:44 +00:00
rMalie
39f2f53db2 // Merge -> revision 8363
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8365 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-06 12:38:55 +00:00
jmCollin
76f895c4d5 // Correct create product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8361 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-06 11:38:47 +00:00
rMalie
e7b5cd5b95 // Fix HTML validation on URLs (replace & per &amp;)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8355 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-06 09:58:11 +00:00
rMalie
79fd72e461 // Merge -> revision 8342
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8344 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-05 14:56:02 +00:00
rMalie
371f9a5397 [+] Add native MySQLi support
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8341 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-05 13:55:11 +00:00
rMalie
9032e37b38 // Fix stock for customizable features
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8340 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-05 13:53:39 +00:00
rMalie
1e55c19726 // Fix getPush() for notifications
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8336 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-05 12:09:49 +00:00
lBrieu
3842a2f473 // Update "$this->context->employee->id" to "Context::getContext()->employee->id"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8334 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-05 09:57:33 +00:00
aFolletete
3eff951265 [+] Project : adding Features detachables in order to improve performance
// clean code

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8328 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-03 17:21:32 +00:00
aFolletete
adb185cdf9 [-] FO : fixed bug on Manufacturer and Supplier controller, missing variable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8300 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-01 15:03:38 +00:00
bMancone
7d4520b573 [*] MO : sendToAFriend
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8297 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-01 10:10:23 +00:00
tDidierjean
78fee5c3a3 // report fix 8242 to cache system from class MySQL to class DB
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8296 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-01 10:01:49 +00:00
tDidierjean
c2258ae8e9 //// Merge -> revision 8290
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8295 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-01 09:53:43 +00:00
bMancone
d27c0b3b7d [-] MO : Fixed productsComparison
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8293 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-01 08:53:47 +00:00
bMancone
347c584ae9 [*] MO : homeSlider/SendToAFriend - Sandrine CSS
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8291 b9a71923-0436-4b27-9f14-aed3839534dd
2011-09-01 08:17:58 +00:00
bMancone
9aab069851 [*] MO : SendToAFriend - 1.5 Supported / Pop-in instead of form
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8288 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-31 15:33:06 +00:00
bMancone
25ac858966 [*] MO : homeSlider: CSS/Button & productComments: CSS
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8287 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-31 15:27:30 +00:00
bMancone
5195452a3f [-] MO : productComments - Fixed guest comments
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8286 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-31 15:07:51 +00:00
bMancone
44976ee2eb [-] MO : productComments - Fixed deprecated function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8285 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-31 14:08:27 +00:00
bMancone
7dec5e6793 [-] MO - productComments: write review is now the only thing displayed if there are no comments. homeSlider: fixed missing variable in .js
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8283 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-31 13:32:43 +00:00
bMancone
f0b901ca90 [*] MO : homeSlider - Added french translation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8280 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-31 10:03:20 +00:00
bMancone
6c92e8ee82 [*] MO : homeSlider - Added translations/changed size of URL and removed description from the required fields
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8279 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-31 10:02:44 +00:00
lBrieu
ef9bc292b8 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8273 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-31 08:27:58 +00:00
lBrieu
a041afeb57 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8262 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 15:50:33 +00:00
lBrieu
9a975849ee git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8260 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 14:43:53 +00:00
lBrieu
b66043f886 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8259 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 14:42:27 +00:00
lBrieu
9d42140fa9 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8257 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 14:11:26 +00:00
lBrieu
e347e11872 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8254 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 13:44:57 +00:00
lBrieu
7d5f1ae314 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8253 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 13:42:35 +00:00
lBrieu
814a847878 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8252 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 13:40:31 +00:00
lBrieu
6ccb93e606 [-] Remove employee fields
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8251 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-30 13:38:50 +00:00
lBrieu
4817e97cd8 [+] Add employee fields for notifications in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8250 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-30 13:38:36 +00:00
bMancone
375e0a4f6d [-] MO : HomeSlider
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8249 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-30 13:24:06 +00:00
lBrieu
76f7326832 [+] Add some JS and integrates notifications in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8248 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-30 12:06:17 +00:00
lBrieu
9a169ae91f [+] Add handling for notifications in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8247 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-30 12:04:07 +00:00
lBrieu
cb5fc11308 [+] Add some fields in the employee tab to handle notifications in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8246 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-30 12:03:10 +00:00
lBrieu
af96604d69 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8245 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 12:01:29 +00:00
lBrieu
5dcc1a65bf [+] Add CSS modifications for notifications in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8244 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-30 12:00:12 +00:00
lBrieu
1134ed9a02 [+] Add icons for notifications in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8243 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-30 11:59:04 +00:00
lBrieu
3f57d1f64a git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8240 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-30 08:37:37 +00:00
bMancone
6616d46842 [*] MO : productComments - It's now possible to delete comments, beside moderation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8237 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-29 16:21:57 +00:00
lBrieu
f59d648bda git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8236 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-29 15:39:57 +00:00
lBrieu
835093d7e0 [+] Allows to add notifications on the shop (backoffice only)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8235 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-29 15:35:57 +00:00
lBrieu
fa6152abc7 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8233 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-29 14:27:22 +00:00
lBrieu
5521ce88c2 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8232 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-29 14:26:56 +00:00
lBrieu
e0ea67b2d5 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8231 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-29 14:14:13 +00:00
bMancone
53467eb7d3 [-] MO : productComments fixed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8220 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-29 09:19:43 +00:00
tDidierjean
16516953fb // Merge -> revision 8206
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8210 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-26 15:52:42 +00:00
rMalie
d33325c23f // Fix currencies for multishop + meta
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8209 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-26 15:10:52 +00:00
lBrieu
9271f5bebc [+] Label changed for "uninstalled" to "non installed" (CC)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8208 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-26 14:16:04 +00:00
lBrieu
c61be32591 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8207 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-26 14:14:10 +00:00
fBrignoli
64b6633fdd // static call in hookTaxManager
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8203 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-26 08:40:04 +00:00
rMalie
68c7be42c2 // Merge -> revision 8199
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8200 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-26 07:59:29 +00:00
rMalie
2c60ea0863 // Fix multi virtual uri on same domain for htaccess + products on multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8196 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-25 15:27:49 +00:00
rMalie
4c421016ed // Add class_index.php for autoload
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8186 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-25 09:33:50 +00:00
bMancone
f530ade4f6 [*] MO : crossseling - the main title now depends on the number of products in the cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8183 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-25 07:10:51 +00:00
bMancone
39a13dff73 [*] MO : crossseling - Added hookShopingCart (uses all products in the cart)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8182 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-24 17:09:22 +00:00
bMancone
631c3d7fbc [-] MO : FavoriteProducts - now adds/removes correctly products
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8180 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-24 16:00:02 +00:00
rMalie
b12bf222a9 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8179 b9a71923-0436-4b27-9f14-aed3839534dd 2011-08-24 15:57:10 +00:00
rMalie
89fcb38dc7 // Force install of modules in global context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8178 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-24 15:04:50 +00:00
bMancone
829ad87f8a [-] MO : HomeSlider - Added PS_USE_SQL_SLAVE
[-] MO : FavoriteProducts - Fixed link


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8177 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-24 14:23:36 +00:00
fBrignoli
0c68e37e40 [-] FO : Removed deprecated function Tax::getProductTaxRate
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8174 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-24 13:40:41 +00:00
bMancone
acee5463dd [-] MO : HomeSlider
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8173 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-24 13:28:31 +00:00
bMancone
c2922f16e3 [+] MO : Added HomeSlider
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8172 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-24 12:45:50 +00:00
lCherifi
2d228a4fb8 integration new theme standard
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8169 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-23 14:27:30 +00:00
lCherifi
2a1e42606b integration new theme standard
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8168 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-23 14:25:09 +00:00
lCherifi
c0bd68221a integration new theme standard
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8167 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-23 14:23:18 +00:00
rMalie
0ac3122871 // Fix dispatcher (order meta rewrites by length)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8159 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-23 08:58:36 +00:00
fBrignoli
7e1ac5572e // validateControler is now deprecated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8158 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-23 08:58:07 +00:00
rMalie
6d414e45c5 // Fix orders with friendly URL and dispatcher
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8157 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-23 08:54:14 +00:00
rMalie
b2ff23ecac [+] FO : add module-moduleName-pageName ID on body of module pages
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8156 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-23 08:06:57 +00:00
rMalie
22d23f8324 // Merge -> revision 8149
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8151 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 16:22:16 +00:00
rMalie
d7eaa5f5a4 // Fix search on multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8150 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 16:10:17 +00:00
rMalie
a4f6bde797 // Fix change on currencies with context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8148 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 14:46:32 +00:00
rMalie
99c89469fb // Fix order detail controller bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8147 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 14:29:13 +00:00
rMalie
93b9a835d4 // Fix some bugs on multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8145 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 13:44:20 +00:00
rMalie
60e357bd4b // Fix preview link in BO + tax bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8137 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 10:14:15 +00:00
rMalie
4e0b3ed2f7 // Improve multishop ergonomy (you edit this field for) on languages fields
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8136 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 09:33:16 +00:00
rMalie
ae6350fabf // Fix module statscheckup for multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8132 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 08:03:41 +00:00
rMalie
138e98f6e2 [-] MO : Fix potential bug on carts for module Ogone
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8131 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-22 07:53:16 +00:00
rMalie
fd645ddb80 // Merge -> revision 8123
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8125 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-19 14:27:41 +00:00
rMalie
382584ad35 // Fix all category_lang sql restrictions with multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8124 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-19 14:21:45 +00:00
rMalie
31e78477ef // Fix module blockmaccount with context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8122 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-19 14:04:41 +00:00
rMalie
7cadad5d3e // Fix all product_lang sql restrictions with multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8121 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-19 14:01:23 +00:00
rMalie
c7d4290206 // Fix admin referrers for multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8120 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-19 13:07:23 +00:00
fBrignoli
13849fc2c8 // update tax rules PHP => SQL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8116 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-19 12:03:04 +00:00
rMalie
a1843c1900 // Merge -> revision 8114
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8115 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-19 09:46:12 +00:00
fBrignoli
14a8c84bdd [*] Project : Helper multiple select
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8110 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-18 16:36:28 +00:00
fBrignoli
f371f3e3bc [*] Project : US + CA TaxSystem
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8105 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-18 10:10:50 +00:00
fBrignoli
b558f33ae8 // Override with directories & controllers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8104 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-18 10:03:53 +00:00
rMalie
d9a7af17cc // Fix cacheFS (path constant was not always defined)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8102 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-18 08:16:10 +00:00
rMalie
5638172b38 // Add copy data of group shops
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8101 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-18 07:57:04 +00:00
rMalie
0aada6cc1e // Merge -> revision 8097
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8100 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 16:10:20 +00:00
rMalie
89bc665d48 // Fix admin modules positions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8098 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 15:30:44 +00:00
rMalie
acfa8d8600 // Fix share_datas in backoffice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8096 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 14:53:18 +00:00
tDidierjean
39d005f222 // Context part 32
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8095 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 13:40:05 +00:00
rMalie
51f2bf2617 // Fix carrier lang copy when a new shop is created + can duplicate data when editing a shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8094 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 13:37:15 +00:00
rMalie
549d5be0c7 // Fix options with bad multishop visibility
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8091 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 13:12:10 +00:00
rMalie
7481712923 // Fix display of breadcrumb (dont show categories disabled) + it's now impossible to browse categories outside of root category for shops
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8089 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 12:32:04 +00:00
tDidierjean
cb3d802346 // Context part 31
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8087 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 10:07:12 +00:00
rMalie
b8706ddd8a // Fix homefeatured products for multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8086 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 09:41:28 +00:00
rMalie
751ae5d740 // Fix shop selection in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8083 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 08:59:04 +00:00
rMalie
2b05b5308c // Merge -> revision 8076
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8081 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-17 08:15:38 +00:00
rMalie
e86d668a49 // Fix download products
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8080 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-16 16:22:13 +00:00
fBrignoli
28025e0ff6 // Comment
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8079 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-16 16:05:16 +00:00
rMalie
f6162845ab // Add a message when a shop is created to indicate that the user should create an URL for this shop + fix some bugs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8078 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-16 15:53:33 +00:00
fBrignoli
8e64aa20e9 // Exception removed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8077 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-16 15:53:04 +00:00
rMalie
a1303a0cb0 // Add Core prefix for Stock and ProductCompare classes + fix main URL on shop URL + add some translation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8072 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-16 14:13:04 +00:00
rMalie
f0be4af34e // Add skeleton core classes in override/classes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8065 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-16 09:49:28 +00:00
rMalie
21ca4d15d7 // Merge -> revision 8059
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8062 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-16 09:10:40 +00:00
gBrunier
bbb8acc0de //Changing version
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8056 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-12 14:47:18 +00:00
gBrunier
9e0333a664 [+] BO : CB-30 - Customer receive an email when a voucher is created in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8055 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-12 14:24:48 +00:00
gBrunier
f06172fc2e [-] MO : Duplicate condition
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8052 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-12 11:57:11 +00:00
gBrunier
7a01e42704 [-] MO : Replace ps_ by _DB_PREFIX_
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8050 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-12 10:11:11 +00:00
gBrunier
0eb73c212a [+] MO : Adding the favoriteproducts module - Part2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8047 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-12 08:14:09 +00:00
rMalie
4079e1c159 // Fix #PSFV-13
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8041 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 15:22:57 +00:00
rMalie
0e4b7fbd72 // Fix PDF controllers + order-detail template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8039 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 15:14:38 +00:00
tDidierjean
1dc910a60c // fix pdf invoice when called from FO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8037 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 15:10:36 +00:00
rMalie
49468717c2 // Fix #PSFV-48
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8032 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 14:42:31 +00:00
tDidierjean
5ef6b3b0d6 // fix autoExecute with null values
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8030 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 14:32:04 +00:00
rMalie
3ab2ba9a75 // HTML flag can be used in ObjectModel->getTranslationsFieldsChild() to keep html on language fields
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8026 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 13:39:30 +00:00
rMalie
3c9fdb4e2c // Fix install of ps_stock table
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8025 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 12:45:43 +00:00
lBrieu
03596be790 [+] Add the TinyMCE editor on categories description
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8024 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 12:35:47 +00:00
lBrieu
a9b94cee4b [+] Add the TinyMCE editor on categories description
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8023 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 12:34:52 +00:00
gBrunier
e9acb86ac5 [*] MO : Review of the productcomments module - Part3
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8022 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 12:07:25 +00:00
rMalie
52d1d13891 // Merge -> revision 8014
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8021 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 12:00:05 +00:00
rMalie
d1d4d57eca // Revert normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8019 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 10:20:59 +00:00
rMalie
a01a13274a // Fix Product->setStock()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8018 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 09:59:23 +00:00
rMalie
f62cdb1963 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8017 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 09:58:20 +00:00
gBrunier
9cf09cbc7c [*] MO : Review of the productcomments module - Part2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8016 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 09:48:49 +00:00
rMalie
e093ecd554 // Fix on shops + remove id_group_shop from stock + fix stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8015 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 09:38:24 +00:00
lBrieu
eec48ed7b5 [+] Add the TinyMCE editor on categories description
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8013 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 09:10:28 +00:00
tDidierjean
09977516c2 // fix product comparison
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8012 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-11 08:39:52 +00:00
tDidierjean
7c67fd84c2 // Context part 30
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8008 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-10 16:45:48 +00:00
rMalie
183e1289c4 // Fix bug of toto on line 451 of carrier.php (he report modifications after change on signature function)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8007 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-10 16:04:59 +00:00
fBrignoli
aad6d1b6f3 // validateControler => validateController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8004 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-10 15:39:15 +00:00
bMancone
4de7854629 // Fix ObjectModel->associateTo()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8002 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-10 15:16:37 +00:00
tDidierjean
eb2c483f2f // changes to header and footer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7997 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-10 13:11:56 +00:00
rMalie
7411db9a69 // Merge -> revision 7979
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7981 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-10 08:36:17 +00:00
rMalie
f4a3e88283 // Fix virtual uri rewrite in htaccess + keep old specific code in htaccess
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7980 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-10 08:08:32 +00:00
gBrunier
3957de6087 [+] MO : Adding the favoriteproducts module - Part1
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7978 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 16:35:11 +00:00
gBrunier
d36b369b45 // Fix getProductLink (double slash when id_shop)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7977 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 16:31:53 +00:00
rMalie
671162a5f5 [-] Add a new option in admin preference to recompile smarty templates only when they are updated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7976 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 16:25:40 +00:00
tDidierjean
d61637c5e5 // fix front controller initialization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7974 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 16:08:18 +00:00
fBrignoli
5f778cb23a // debug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7971 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 15:24:40 +00:00
fBrignoli
e22bc403e6 [-] Project : index file is now regenerated when a class is removed from the override directory
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7970 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 15:24:03 +00:00
tDidierjean
decbcc7246 // fix loyalty module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7968 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 14:54:17 +00:00
rMalie
f48b1ffc45 // Add cache on products stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7966 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 14:50:48 +00:00
rMalie
6e46649631 // Add cache on products stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7965 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 14:50:30 +00:00
tDidierjean
8d1435dfd0 // fix uninitialized front controller
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7964 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 14:46:03 +00:00
rMalie
269121a9c4 // Add cache on products stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7963 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 14:43:04 +00:00
rMalie
bdc18d1d39 // Fix Shop::SHARE_ORDER and Shop::SHARE_CUSTOMER on statistics
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7959 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 13:42:03 +00:00
rMalie
a86e95fc5a // Fix shop_url when no physical_uri + fix shop association when multistore is disactivated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7958 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-09 13:20:26 +00:00
rMalie
47a4f7f31e // Merge -> revision 7941
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7948 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 16:01:47 +00:00
fBrignoli
58769824ce // replace !is_core by substr($classname, -4) != 'Core'
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7947 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 15:52:23 +00:00
rMalie
f0ee603966 // Fix some bugs on multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7944 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 15:31:32 +00:00
rMalie
f48792054a // Fix some bugs on multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7942 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 15:24:21 +00:00
rMalie
8508481d36 // Add some comments in new autoload class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7939 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 14:24:32 +00:00
fBrignoli
8b6a67327e // debug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7938 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 14:08:08 +00:00
fBrignoli
953c9e0262 [-] Project : Autoload now handle weird syntax (eg. class Product{)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7937 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 14:07:38 +00:00
fBrignoli
5155b92591 [*] Project : Autoload is now able to load classes from /classes or /override subdirectories
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7936 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 13:34:01 +00:00
tDidierjean
653ef8d115 // Context part 29
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7935 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 13:17:12 +00:00
rMalie
89cc9649cf // Fix on discounts with multishop + index?controller=index fixed to be only index.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7929 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-08 08:29:32 +00:00
rMalie
0811404de8 // Refactoring of admin options
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7922 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 15:52:45 +00:00
gBrunier
4d2740eb35 [*] MO : Review of the productcomments module - Part1
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7918 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 15:09:46 +00:00
fBrignoli
13da28a2a8 [~] Hook::get replaced by Hook::getIdByName
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7916 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 14:49:18 +00:00
rMalie
01868b944c // Fix on module product comment for context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7914 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 14:21:16 +00:00
fBrignoli
03ffa388af // missing static keyword
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7911 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 13:53:53 +00:00
rMalie
239f92eaf1 // Merge -> revision 7906
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7909 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 13:26:44 +00:00
rMalie
e4825ac555 // Refactoring of preferences
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7907 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 13:21:40 +00:00
rMalie
bd9366daf5 // Fix physical_uri during install + required paramaters in dispatcher
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7903 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 09:53:42 +00:00
fBrignoli
9066b7e8c4 // oops
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7901 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 08:31:37 +00:00
fBrignoli
3e090ce36d // notice id_shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7898 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 08:13:04 +00:00
rMalie
b1ea0538a3 // Fix install of shop uri
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7896 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-05 07:51:20 +00:00
rMalie
06cc9cff99 // Improve ergonomy of configuration for multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7879 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-03 18:06:51 +00:00
rMalie
f2b5ee338b // Merge -> revision 7875
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7877 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-03 16:16:49 +00:00
rMalie
6f08bcb12e [+] Add a route system to personalize rewrited URL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7876 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-03 16:02:49 +00:00
rMalie
3e298ba94f // Fix categories (duplicate cause of multishop)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7861 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-03 08:07:20 +00:00
rMalie
fa42cc38ae // Routes for dispatcher (part 5)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7860 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-03 07:53:59 +00:00
rMalie
093df64e9f // Remove index.php from smarty cache
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7859 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-03 07:53:28 +00:00
rMalie
e2b883f617 // Remove PS_HTACCESS_SPECIFIC configuration (we don't need it anymore since .htaccess now keep automatically all what he need)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7856 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-02 15:06:31 +00:00
rMalie
6fc10e23f8 // Some fix on canonical URL + remove PS_HOMEPAGE_PHP_SELF configuration
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7853 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-02 14:24:28 +00:00
rMalie
26efd329a3 // Move theme choice from AdminTheme page to Shop page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7848 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-02 13:47:34 +00:00
rMalie
921fbcd564 // Remove AdminAppearance
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7845 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-02 12:23:11 +00:00
rMalie
ffeb22bfb9 // Merge with revision 7841
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7844 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-02 11:43:58 +00:00
rMalie
c945049ef1 // Some fix + improve ergonomy + Tools::isMultiShopActived() moved in Shop class + 1.5.0.1 version in install script
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7842 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-02 09:54:23 +00:00
rMalie
ab5fc723b4 // Routes for dispatcher (part 4) + some fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7830 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-01 13:28:02 +00:00
mMarinetti
6eebc96bd0 [-] BO : Fixed bug in __construct() related to context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7825 b9a71923-0436-4b27-9f14-aed3839534dd
2011-08-01 09:57:39 +00:00
dMetzger
287a5f42dc [+] BO : you can now set detailed permissions for each module in the back end
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7818 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-31 16:39:53 +00:00
dMetzger
a2b32fb056 [-] IN : missing entries in accesses table
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7817 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-31 11:58:31 +00:00
tDidierjean
b3b7dd32bf // Context part 28
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7814 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-29 15:06:20 +00:00
tDidierjean
5d090a25b3 // Context part 27
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7812 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-29 14:29:57 +00:00
rMalie
35748d1b8f // Fix #PSFV-6
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7807 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-29 10:02:55 +00:00
tDidierjean
d80c7b5ba8 // Context part 26
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7804 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 16:37:50 +00:00
rMalie
72de3384a7 // Fix #PSFV-12
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7795 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 14:38:46 +00:00
tDidierjean
d3b2ff2664 // Context part 25
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7794 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 14:17:58 +00:00
rMalie
a1a32714ab // Fix #PSFV-30 + context part 24
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7792 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 14:12:17 +00:00
rMalie
31ed17058c // Revert test
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7791 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 14:05:38 +00:00
rMalie
939d2a0cf5 // test
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7789 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 14:04:21 +00:00
rMalie
ad3e1f1804 // Fix #PSFV-31
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7788 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 13:53:51 +00:00
rMalie
d822f2a373 // Fix #PSFV-32
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7787 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 13:51:29 +00:00
rMalie
e990ded287 // Fix #PSFV-35
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7785 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 13:48:02 +00:00
rMalie
6a99789015 // Fix #PSFV-34
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7784 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 13:43:56 +00:00
rMalie
77603244c0 // Fix #PSFV-37
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7783 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 13:26:46 +00:00
rMalie
8bfd44085d // Some fix after merge
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7781 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 13:03:43 +00:00
rMalie
a875fecb20 // MERGE with 1.4 r7770
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7776 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-28 09:20:57 +00:00
tDidierjean
df255f66c1 // Context part 23
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7765 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 15:08:15 +00:00
rMalie
be4811aa6e // REVERT MERGE
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7761 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 13:35:06 +00:00
rMalie
e159c925d8 // MERGE with trunk revision 7754
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7759 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 12:48:42 +00:00
tDidierjean
4ade3a0ea0 // remove 1.4 deprecated functions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7755 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 09:51:43 +00:00
tDidierjean
86fd2a4648 // Context part 22
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7753 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 09:01:00 +00:00
rMalie
3557765c59 // Fix #PSFV-25
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7752 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 08:36:23 +00:00
rMalie
85fb88a2a4 // Fix #PSFV-24
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7751 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 08:32:52 +00:00
rMalie
8ef7835cd6 // Fix #PSFV-21
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7748 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 08:15:21 +00:00
rMalie
ad270d5ea8 // Fix #PSFV-20
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7747 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 08:12:31 +00:00
rMalie
ad27647a98 // Fix #PSFV-38
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7746 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 08:08:37 +00:00
rMalie
dd5109b3f5 // Fix adminMeta page + bug #PSFV-39
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7745 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-27 08:03:00 +00:00
rMalie
c9ad75fe11 // Routes for dispatcher (part 3)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7743 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-26 16:47:41 +00:00
tDidierjean
d05d16d399 // Context part 21
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7742 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-26 16:40:17 +00:00
tDidierjean
51b4c8591d // Context part 20
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7740 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-26 15:55:04 +00:00
tDidierjean
fddc7a6a75 // fix missing context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7738 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-26 14:55:04 +00:00
rMalie
4f76b91de5 // Routes for dispatcher (part 2)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7728 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-25 20:16:53 +00:00
rMalie
771e36aecb // Routes for dispatcher (part 1)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7727 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-25 17:33:46 +00:00
tDidierjean
0fbd146713 // Context part 19
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7724 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-25 16:42:48 +00:00
tDidierjean
9e349dd274 // Context part 18
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7723 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-25 15:19:39 +00:00
tDidierjean
4caa9d2775 // fix sql
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7722 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-25 14:36:30 +00:00
rMalie
6814ae87c6 // Carrier range price / weight for multishop + fix duplicate of carrier_lang when a new shop is created
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7716 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-25 10:32:56 +00:00
rMalie
e08b70a242 // Carrier association + discount association
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7696 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-22 15:53:07 +00:00
rMalie
90efde2a00 // alias.php is now included from autoload.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7693 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-22 12:36:57 +00:00
rMalie
10e68bda6b // Add scenes for multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7692 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-22 12:27:42 +00:00
rMalie
1a462e0a85 // Fix strict standard on paymentModule + fix stats SQL bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7689 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-22 09:49:29 +00:00
tDidierjean
e72ae93557 // Context part 17
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7688 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-22 09:35:28 +00:00
rMalie
e62be3d793 // id_shop on cart product (for links) + change Shop::sqlAsso() + share_order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7687 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-22 08:57:51 +00:00
tDidierjean
9619b93c73 // fix delete customization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7681 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-21 16:41:12 +00:00
tDidierjean
462c362191 // removing cookie from product customization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7680 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-21 14:38:04 +00:00
rMalie
ff2df3e3b3 // Improve Db class + add _db.php class in overrides for bench
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7678 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-21 12:02:25 +00:00
tDidierjean
884e95f307 // fix mysql insert_id
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7671 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-21 08:05:53 +00:00
rMalie
811018f78c // Fix abstract static methods in Db class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7670 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-20 16:15:05 +00:00
rMalie
d1510f6f36 // Add file config/alias.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7669 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-20 16:13:22 +00:00
rMalie
e921117581 // Add config/alias.php file + refactoring of DB / MySQL classes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7668 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-20 16:10:12 +00:00
rMalie
42da42f827 // Context part 16 (shops)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7664 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-20 12:08:15 +00:00
rMalie
4ae81d8acd // Context part 15
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7658 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-19 16:17:14 +00:00
rMalie
3baf0f02a5 // Fix minor bugs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7656 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-19 14:10:44 +00:00
rMalie
5a1d73862a git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7655 b9a71923-0436-4b27-9f14-aed3839534dd 2011-07-19 13:55:53 +00:00
tDidierjean
e91c92ce98 // Context part 14
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7653 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-19 12:28:30 +00:00
rMalie
fce17efbb8 // Remove some other mysql_ in code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7652 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-19 11:51:12 +00:00
rMalie
fa2fc8b69d // No more mysql_error() hard coded !
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7651 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-19 11:35:33 +00:00
rMalie
35e5efb530 // Context part 13
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7650 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-19 09:44:10 +00:00
tDidierjean
89213e18e5 // Context part 12
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7649 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-19 09:28:11 +00:00
rMalie
8a0a62ae03 // Context in modules + Shop::sql* methods
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7648 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-19 09:23:10 +00:00
tDidierjean
2c493137c3 // Context part 11
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7644 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-18 15:50:58 +00:00
rMalie
0452f08f64 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7643 b9a71923-0436-4b27-9f14-aed3839534dd 2011-07-18 15:37:31 +00:00
rMalie
7b8f139103 // Context part 10
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7642 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-18 15:27:32 +00:00
tDidierjean
0dbcebf01e // Context part 9
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7637 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-18 10:08:07 +00:00
tDidierjean
311e8ab964 // Context part 8
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7633 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-15 16:41:39 +00:00
tDidierjean
20276404a8 // Context part 7
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7629 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-15 13:59:26 +00:00
tDidierjean
3a922aabfe // Context part 6
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7625 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-13 16:35:06 +00:00
tDidierjean
e5c68ba9ae // Context part 5
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7624 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-13 15:24:38 +00:00
rMalie
39e2b09219 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7620 b9a71923-0436-4b27-9f14-aed3839534dd 2011-07-13 13:26:40 +00:00
rMalie
82754451ad git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7618 b9a71923-0436-4b27-9f14-aed3839534dd 2011-07-13 12:52:44 +00:00
rMalie
67c80b2b42 // Refactoring of shop class with new context Part 2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7617 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-13 12:52:09 +00:00
tDidierjean
c5cc771f16 // Context part 4
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7607 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-13 07:51:09 +00:00
rMalie
a6c08c7340 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7605 b9a71923-0436-4b27-9f14-aed3839534dd 2011-07-12 16:28:33 +00:00
rMalie
10dd3db8d4 // Refactoring of shop class with new context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7604 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-12 16:28:20 +00:00
tDidierjean
9f7c369d53 // Context part 3
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7603 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-12 16:25:27 +00:00
rMalie
50f9794383 // Context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7600 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-12 13:50:15 +00:00
tDidierjean
25b1bceffd // Context part 2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7598 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-12 12:50:00 +00:00
rMalie
39d0acc30b // Hook modules exceptions now works with new dispatcher
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7587 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-11 15:16:16 +00:00
tDidierjean
143022e488 // Context - first commit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7586 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-11 14:32:05 +00:00
rMalie
2ee764963b // Fix shop association on new object + some strict standard for Franck
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7584 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-11 13:18:17 +00:00
rMalie
4f3aad65e3 // Multishop for referrers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7583 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-11 13:03:26 +00:00
tDidierjean
8bf1b23239 // revert previous commit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7573 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-08 16:12:27 +00:00
tDidierjean
f085f81d23 // cancel commit
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7572 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-08 15:43:24 +00:00
rMalie
c0d49e1455 // Fix bug on static property call on dynamic class (don't work on php < 5.3)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7569 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-08 15:20:16 +00:00
rMalie
3c50152c94 // Some fix + multistore for import tools
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7546 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-07 12:18:27 +00:00
rMalie
c0e8f46e8e // Fix stats queries
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7537 b9a71923-0436-4b27-9f14-aed3839534dd
2011-07-06 16:17:27 +00:00
4517 changed files with 319423 additions and 127270 deletions

View File

@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -39,4 +39,4 @@ elseif (in_array(substr($_SERVER['REQUEST_URI'], -3), array('.js', 'css')))
die('');
require_once(dirname(__FILE__).'/config/config.inc.php');
ControllerFactory::getController('PageNotFoundController')->run();
Controller::getController('PageNotFoundController')->run();

3394
CHANGELOG

File diff suppressed because it is too large Load Diff

43
admin-dev/ajax-tab.php Executable file
View File

@@ -0,0 +1,43 @@
<?php
/*
* 2007-2011 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-2011 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
*/
define('_PS_ADMIN_DIR_', getcwd());
require(dirname(__FILE__).'/../config/config.inc.php');
require(dirname(__FILE__).'/functions.php');
// For retrocompatibility with "tab" parameter
if (!isset($_GET['controller']) && isset($_GET['tab']))
$_GET['controller'] = strtolower($_GET['tab']);
if (!isset($_POST['controller']) && isset($_POST['tab']))
$_POST['controller'] = strtolower($_POST['tab']);
if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab']))
$_REQUEST['controller'] = strtolower($_REQUEST['tab']);
// Retrocompatibility with 1.4
$_REQUEST['ajaxMode'] = $_POST['ajaxMode'] = $_GET['ajaxMode'] = $_REQUEST['ajax'] = $_POST['ajax'] = $_GET['ajax'] = 1;
Dispatcher::getInstance()->setControllerDirectories(array(_PS_ADMIN_DIR_.'/tabs/', _PS_ADMIN_CONTROLLER_DIR_));
Dispatcher::getInstance()->dispatch();

View File

@@ -25,16 +25,16 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('PS_ADMIN_DIR', getcwd());
include(PS_ADMIN_DIR.'/../config/config.inc.php');
define('_PS_ADMIN_DIR_', getcwd());
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/* Getting cookie or logout */
require_once(dirname(__FILE__).'/init.php');
require_once(PS_ADMIN_DIR.'/tabs/AdminCounty.php');
$context = Context::getContext();
if (isset($_GET['changeParentUrl']))
if (Tools::isSubmit('changeParentUrl'))
echo '<script type="text/javascript">parent.parent.document.location.href = "'.addslashes(urldecode(Tools::getValue('changeParentUrl'))).'";</script>';
if (isset($_GET['installBoughtModule']))
if (Tools::isSubmit('installBoughtModule'))
{
$file = false;
while ($file === false OR file_exists(_PS_MODULE_DIR_.$file))
@@ -66,48 +66,54 @@ if (isset($_GET['installBoughtModule']))
die(displayJavascriptAlert('Module copied to disk'));
}
function displayJavascriptAlert($s){echo '<script type="text/javascript">alert(\''.addslashes($s).'\');</script>';}
if (isset($_GET['ajaxProductManufacturers']))
function displayJavascriptAlert($s)
{
$currentIndex = 'index.php?tab=AdminCatalog';
echo '<script type="text/javascript">alert(\''.addslashes($s).'\');</script>';
}
if (Tools::isSubmit('ajaxProductManufacturers'))
{
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
$manufacturers = Manufacturer::getManufacturers();
if ($manufacturers)
{
$jsonArray = array();
foreach ($manufacturers AS $manufacturer)
$jsonArray[] = '{"optionValue": "'.$manufacturer['id_manufacturer'].'", "optionDisplay": "'.htmlspecialchars($manufacturer['name']).'"}';
$jsonArray[] = '{"optionValue": "'.$manufacturer['id_manufacturer'].'", "optionDisplay": "'.htmlspecialchars(trim($manufacturer['name'])).'"}';
die('['.implode(',', $jsonArray).']');
}
}
if (isset($_GET['ajaxReferrers']))
if (Tools::isSubmit('ajaxReferrers'))
{
require('tabs/AdminReferrers.php');
require(_PS_CONTROLLER_DIR_.'admin/AdminReferrersController.php');
}
if (isset($_GET['ajaxProductSuppliers']))
if (Tools::isSubmit('ajaxProductSuppliers'))
{
$currentIndex = 'index.php?tab=AdminCatalog';
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
$suppliers = Supplier::getSuppliers();
if ($suppliers)
{
$jsonArray = array();
foreach ($suppliers AS $supplier)
$jsonArray[] = '{"optionValue": "'.$supplier['id_supplier'].'", "optionDisplay": "'.htmlspecialchars($supplier['name']).'"}';
$jsonArray[] = '{"optionValue": "'.$supplier['id_supplier'].'", "optionDisplay": "'.htmlspecialchars(trim($supplier['name'])).'"}';
die('['.implode(',', $jsonArray).']');
}
}
if (isset($_GET['ajaxProductAccessories']))
if (Tools::isSubmit('ajaxProductAccessories'))
{
$currentIndex = 'index.php?tab=AdminCatalog';
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
$jsonArray = array();
$products = Db::getInstance()->ExecuteS('
$products = Db::getInstance()->executeS('
SELECT p.`id_product`, pl.`name`
FROM `'._DB_PREFIX_.'product` p
NATURAL LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
WHERE pl.`id_lang` = '.(int)(Tools::getValue('id_lang')).'
'.Context::getContext()->shop->addSqlRestrictionOnLang('pl').'
AND p.`id_product` != '.(int)(Tools::getValue('id_product')).'
AND p.`id_product` NOT IN (
SELECT a.`id_product_2`
@@ -120,18 +126,16 @@ if (isset($_GET['ajaxProductAccessories']))
die('['.implode(',', $jsonArray).']');
}
if (isset($_GET['ajaxDiscountCustomers']))
if (Tools::isSubmit('ajaxDiscountCustomers'))
{
global $cookie;
$currentIndex = 'index.php?tab=AdminDiscounts';
AdminTab::$currentIndex = 'index.php?tab=AdminDiscounts';
$jsonArray = array();
$filter = Tools::getValue('filter');
if (Validate::isBool_Id($filter))
$filterArray = explode('_', $filter);
$customers = Db::getInstance()->ExecuteS('
$customers = Db::getInstance()->executeS('
SELECT `id_customer`, `email`, CONCAT(`lastname`, \' \', `firstname`) as name
FROM `'._DB_PREFIX_.'customer`
WHERE `deleted` = 0 AND is_guest = 0
@@ -143,10 +147,10 @@ if (isset($_GET['ajaxDiscountCustomers']))
ORDER BY CONCAT(`lastname`, \' \', `firstname`) ASC
LIMIT 50');
$groups = Db::getInstance()->ExecuteS('
$groups = Db::getInstance()->executeS('
SELECT g.`id_group`, gl.`name`
FROM `'._DB_PREFIX_.'group` g
LEFT JOIN `'._DB_PREFIX_.'group_lang` AS gl ON (g.`id_group` = gl.`id_group` AND gl.`id_lang` = '.(int)($cookie->id_lang).')
LEFT JOIN `'._DB_PREFIX_.'group_lang` AS gl ON (g.`id_group` = gl.`id_group` AND gl.`id_lang` = '.(int)($context->language->id).')
WHERE '.(Validate::isUnsignedInt($filter) ? 'g.`id_group` = '.(int)($filter) : 'gl.`name` LIKE "%'.pSQL($filter).'%"
'.((Validate::isBool_Id($filter) AND $filterArray[0] == 1) ? 'OR g.`id_group` = '.(int)($filterArray[1]) : '')).'
ORDER BY gl.`name` ASC
@@ -165,9 +169,7 @@ if (isset($_GET['ajaxDiscountCustomers']))
}
if (Tools::getValue('page') == 'prestastore' AND @fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
readfile('http://addons.prestashop.com/adminmodules.php?lang='.Language::getIsoById($cookie->id_lang));
if (Tools::getValue('page') == 'themes' AND @fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
readfile('http://addons.prestashop.com/adminthemes.php?lang='.Language::getIsoById($cookie->id_lang));
readfile('http://addons.prestashop.com/adminmodules.php?lang='.$context->language->iso_code);
if ($step = (int)(Tools::getValue('ajaxProductTab')))
{
@@ -182,17 +184,15 @@ if ($step = (int)(Tools::getValue('ajaxProductTab')))
die (Tools::displayError('Product cannot be loaded'));
$switchArray = array(3 => 'displayFormPrices', 4 => 'displayFormAttributes', 5 => 'displayFormFeatures', 6 => 'displayFormCustomization', 7 => 'displayFormAttachments');
$currentIndex = 'index.php?tab=AdminCatalog';
AdminTab::$currentIndex = 'index.php?tab=AdminCatalog';
if (key_exists($step, $switchArray))
$admin->{$switchArray[$step]}($product, $languages, $defaultLanguage);
}
if (isset($_GET['getAvailableFields']) and isset($_GET['entity']))
if (Tools::isSubmit('getAvailableFields') AND Tools::isSubmit('entity'))
{
$currentIndex = 'index.php?tab=AdminImport';
$jsonArray = array();
require_once(dirname(__FILE__).'/tabs/AdminImport.php');
$import = new AdminImport();
$import = new AdminImportController();
$languages = Language::getLanguages(false);
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
@@ -202,7 +202,7 @@ if (isset($_GET['getAvailableFields']) and isset($_GET['entity']))
die('['.implode(',', $jsonArray).']');
}
if (array_key_exists('ajaxModulesPositions', $_POST))
if (Tools::isSubmit('ajaxModulesPositions'))
{
$id_module = (int)(Tools::getValue('id_module'));
$id_hook = (int)(Tools::getValue('id_hook'));
@@ -219,7 +219,7 @@ if (array_key_exists('ajaxModulesPositions', $_POST))
die('{"hasError" : true, "errors" : "This module can not be loaded"}');
}
if (array_key_exists('ajaxCategoriesPositions', $_POST))
if (Tools::isSubmit('ajaxCategoriesPositions'))
{
$id_category_to_move = (int)(Tools::getValue('id_category_to_move'));
$id_category_parent = (int)(Tools::getValue('id_category_parent'));
@@ -240,7 +240,7 @@ if (array_key_exists('ajaxCategoriesPositions', $_POST))
{
if (isset($position) && $category->updatePosition($way, $position))
{
Module::hookExec('categoryUpdate');
Hook::exec('categoryUpdate');
die(true);
}
else
@@ -251,7 +251,7 @@ if (array_key_exists('ajaxCategoriesPositions', $_POST))
}
if (array_key_exists('ajaxCMSCategoriesPositions', $_POST))
if (Tools::isSubmit('ajaxCMSCategoriesPositions'))
{
$id_cms_category_to_move = (int)(Tools::getValue('id_cms_category_to_move'));
$id_cms_category_parent = (int)(Tools::getValue('id_cms_category_parent'));
@@ -279,7 +279,7 @@ if (array_key_exists('ajaxCMSCategoriesPositions', $_POST))
die('{"hasError" : true, "errors" : "This cms category can not be loaded"}');
}
if (array_key_exists('ajaxCMSPositions', $_POST))
if (Tools::isSubmit('ajaxCMSPositions'))
{
$id_cms = (int)(Tools::getValue('id_cms'));
$id_category = (int)(Tools::getValue('id_cms_category'));
@@ -308,7 +308,7 @@ if (array_key_exists('ajaxCMSPositions', $_POST))
}
/* Modify product position in catalog */
if (array_key_exists('ajaxProductsPositions', $_POST))
if (Tools::isSubmit('ajaxProductsPositions'))
{
$way = (int)(Tools::getValue('way'));
$id_product = (int)(Tools::getValue('id_product'));
@@ -336,14 +336,45 @@ if (array_key_exists('ajaxProductsPositions', $_POST))
}
}
if (isset($_GET['ajaxProductPackItems']))
if (Tools::isSubmit('ajaxProductImagesPositions'))
{
$id_image = (int)(Tools::getValue('id_image'));
$way = (int)(Tools::getValue('way'));
$positions = Tools::getValue('imageTable');
if (is_array($positions))
foreach ($positions AS $key => $value)
{
$pos = explode('_', $value);
if ((isset($pos[1])) AND ($pos[1] == $id_image))
{
// +1 is added because images position range starts from 1 instead of 0 for other objects (products, categories...)
$position = ($key + 1);
break;
}
}
$image = new Image($id_image);
if (Validate::isLoadedObject($image))
{
if (isset($position) && $image->updatePosition($way, $position))
die(true);
else
die('{"hasError" : true, "errors" : "Cannot update image position"}');
}
else
die('{"hasError" : true, "errors" : "This image cannot be loaded"}');
}
if (Tools::isSubmit('ajaxProductPackItems'))
{
$jsonArray = array();
$products = Db::getInstance()->ExecuteS('
$products = Db::getInstance()->executeS('
SELECT p.`id_product`, pl.`name`
FROM `'._DB_PREFIX_.'product` p
NATURAL LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
WHERE pl.`id_lang` = '.(int)(Tools::getValue('id_lang')).'
'.Context::getContext()->shop->addSqlRestrictionOnLang('pl').'
AND p.`id_product` NOT IN (SELECT DISTINCT id_product_pack FROM `'._DB_PREFIX_.'pack`)
AND p.`id_product` != '.(int)(Tools::getValue('id_product')));
@@ -352,20 +383,23 @@ if (isset($_GET['ajaxProductPackItems']))
die('['.implode(',', $jsonArray).']');
}
if (isset($_GET['ajaxStates']) AND isset($_GET['id_country']))
if (Tools::isSubmit('ajaxStates') AND Tools::isSubmit('id_country'))
{
$states = Db::getInstance()->ExecuteS('
$states = Db::getInstance()->executeS('
SELECT s.id_state, s.name
FROM '._DB_PREFIX_.'state s
LEFT JOIN '._DB_PREFIX_.'country c ON (s.`id_country` = c.`id_country`)
WHERE s.id_country = '.(int)(Tools::getValue('id_country')).' AND s.active = 1 AND c.`contains_states` = 1
ORDER BY s.`name` ASC');
if (is_array($states) AND !empty($states))
{
$list = '';
if (Tools::getValue('no_empty') != true)
$list = '<option value="0">-----------</option>'."\n";
{
$empty_value = (Tools::isSubmit('empty_value')) ? Tools::getValue('empty_value') : '----------';
$list = '<option value="0">'.Tools::htmlentitiesUTF8($empty_value).'</option>'."\n";
}
foreach ($states AS $state)
$list .= '<option value="'.(int)($state['id_state']).'"'.((isset($_GET['id_state']) AND $_GET['id_state'] == $state['id_state']) ? ' selected="selected"' : '').'>'.$state['name'].'</option>'."\n";
@@ -381,33 +415,31 @@ if (Tools::isSubmit('submitCustomerNote') AND $id_customer = (int)Tools::getValu
$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'))
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 (!($cookie->employee_form_lang = (int)(Tools::getValue('form_language_id'))))
if (!($context->cookie->employee_form_lang = (int)(Tools::getValue('form_language_id'))))
die ('Error while updating cookie.');
die ('Form language updated.');
}
if (Tools::getValue('submitPublishProduct'))
{
global $cookie;
if (Tools::getIsset('id_product'))
{
$id_product = (int)(Tools::getValue('id_product'));
$id_tab_catalog = (int)(Tab::getIdFromClassName('AdminCatalog'));
$token = Tools::getAdminToken('AdminCatalog'.(int)($id_tab_catalog).(int)($cookie->id_employee));
$bo_product_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminCatalog&id_product='.$id_product.'&updateproduct&token='.$token;
$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((int)$cookie->profile, $id_tab_catalog);
$profileAccess = Profile::getProfileAccess($context->employee->id_profile, $id_tab_catalog);
if($profileAccess['edit'])
{
$product = new Product((int)(Tools::getValue('id_product')));
@@ -431,19 +463,17 @@ if (Tools::getValue('submitPublishProduct'))
if (Tools::getValue('submitPublishCMS'))
{
global $cookie;
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)($cookie->id_employee));
$bo_cms_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminCMSContent&id_cms='.(int)$id_cms.'&updatecms&token='.$token;
$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((int)$cookie->profile, $id_tab_cms);
$profileAccess = Profile::getProfileAccess($context->employee->id_profile, $id_tab_cms);
if($profileAccess['edit'])
{
$cms = new CMS((int)(Tools::getValue('id_cms')));
@@ -477,7 +507,7 @@ if (Tools::isSubmit('submitTrackClickOnHelp'))
if (Tools::isSubmit('saveImportMatchs'))
{
$match = implode('|', Tools::getValue('type_value'));
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'import_match` (
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'import_match` (
`id_import_match` ,
`name` ,
`match`,
@@ -495,41 +525,22 @@ if (Tools::isSubmit('saveImportMatchs'))
if (Tools::isSubmit('deleteImportMatchs'))
{
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'import_match` WHERE id_import_match = '.pSQL(Tools::getValue('idImportMatchs')));
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 = '.pSQL(Tools::getValue('idImportMatchs')));
$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'))
{
global $cookie;
$cookie->show_screencast = (int)(!(bool)$cookie->show_screencast);
}
if (Tools::isSubmit('ajaxAddZipCode') OR Tools::isSubmit('ajaxRemoveZipCode'))
{
$zipcodes = Tools::getValue('zipcodes');
$id_county = (int)Tools::getValue('id_county');
$county = new County($id_county);
if (!Validate::isLoadedObject($county))
die('error');
if (Tools::isSubmit('ajaxAddZipCode'))
if (Validate::isLoadedObject($context->employee))
{
if ($county->isZipCodeRangePresent($zipcodes))
die('error:'.Tools::displayError('This Zip Code is already in use.'));
if ($county->addZipCodes($zipcodes))
die(AdminCounty::renderZipCodeList($county->getZipCodes()));
$context->employee->bo_show_screencast = !$context->employee->bo_show_screencast;
$context->employee->update();
}
else if (Tools::isSubmit('ajaxRemoveZipCode') AND $county->removeZipCodes($zipcodes))
die(AdminCounty::renderZipCodeList($county->getZipCodes()));
die('error');
}
if (Tools::isSubmit('helpAccess'))
@@ -541,14 +552,23 @@ if (Tools::isSubmit('helpAccess'))
if (isset($item) AND isset($isoUser) AND isset($country))
die(HelpAccess::displayHelp($item, $isoUser, $country, $version));
die();
die('{nohelp}');
}
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 (!strlen(Tools::getValue('hooks_list')))
die('{"hasError" : true, "errors" : ["Live Edit : no module on this page"]}');
$modules_list = explode(',', Tools::getValue('modules_list'));
$hooks_list = explode(',', Tools::getValue('hooks_list'));
$hookableList = array();
foreach ($modules_list as $module)
{
$module = trim($module);
@@ -566,18 +586,23 @@ if (Tools::isSubmit('getHookableList'))
if ($moduleInstance->isHookableOn($hook_name))
array_push($hookableList[$hook_name], $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` ');
$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'))
@@ -585,14 +610,19 @@ if (Tools::isSubmit('getHookableModuleList'))
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' => Module::hookExec($hook_name, array(), (int)$mod->id));
}
$hookableModulesList[] = array('id' => (int)$mod->id, 'name' => $mod->displayName, 'display' => Hook::exec($hook_name, array(), (int)$mod->id));
}
}
die(Tools::jsonEncode($hookableModulesList));
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"]}');
/* PrestaShop demo mode*/
$hooks_list = explode(',', Tools::getValue('hooks_list'));
$id_shop = (int)Tools::getValue('id_shop');
if ($id_shop)
@@ -603,23 +633,28 @@ if (Tools::isSubmit('saveHook'))
$hook = trim($hook);
if (!$hook)
continue;
$sql = 'DELETE FROM '._DB_PREFIX_.'hook_module
WHERE id_hook = (SELECT id_hook FROM '._DB_PREFIX_.'hook WHERE `name` = \''.pSQL($hook).'\' LIMIT 1)
AND id_shop = '.$id_shop;
Db::getInstance()->Execute($sql);
Db::getInstance()->execute($sql);
$hookedModules = explode(',', Tools::getValue($hook));
$i = 1;
$value = '';
$ids = array();
foreach ($hookedModules as $module)
{
$ids = explode('_', $module);
$value .= '('.$ids[1].', '.$id_shop.', (SELECT id_hook FROM '._DB_PREFIX_.'hook WHERE `name` = \''.pSQL($hook).'\' LIMIT 1), '.$i.'),';
$id = explode('_', $module);
if (!in_array($id[1], $ids))
{
$ids[] = $id[1];
$value .= '('.(int)$id[1].', (SELECT id_hook FROM `'._DB_PREFIX_.'hook` WHERE `name` = \''.pSQL($hook).'\' LIMIT 0, 1), '.(int)$i.'),';
}
$i++;
}
$value = rtrim($value, ',');
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'hook_module (id_module, id_shop, id_hook, position) VALUES '.$value);
Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'hook_module (id_module, id_shop, id_hook, position) VALUES '.$value);
}
}
die('{"hasError" : false, "errors" : ""}');
@@ -628,26 +663,26 @@ if (Tools::isSubmit('saveHook'))
if (Tools::isSubmit('getAdminHomeElement'))
{
$result = array();
$protocol = (!empty($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS']) != 'off') ? 'https' : 'http';
$isoUser = Language::getIsoById(intval($cookie->id_lang));
$isoCountry = Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'));
$context = stream_context_create(array('http' => array('method'=>"GET", 'timeout' => 5)));
$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('www.prestashop.com', 80, $errno, $errst, 3))
$result['screencast'] = 'OK';
else
$result['screencast'] = 'NOK';
// PREACTIVATION
$content = @file_get_contents($protocol.'://www.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)$cookie->id_lang.'&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, $context);
$content = @file_get_contents($protocol.'://www.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')
if ($content[0] == 'OK' && Validate::isCleanHtml($content[2]) && Validate::isCleanHtml($content[1]))
{
$result['partner_preactivation'] = $content[2];
$content[1] = explode('#%#', $content[1]);
@@ -665,44 +700,299 @@ if (Tools::isSubmit('getAdminHomeElement'))
else
$result['partner_preactivation'] = 'NOK';
}
// PREACTIVATION PAYPAL WARNING
$content = @file_get_contents('https://www.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.'://www.prestashop.com/partner/prestashop/prestashop-link.php?iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)$cookie->id_lang, false, $context);
$content = @file_get_contents($protocol.'://www.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')
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
$result['discover_prestashop'] = $content[1];
else
$result['discover_prestashop'] = 'NOK';
if (@fsockopen('www.prestashop.com', 80, $errno, $errst, 3))
$result['discover_prestashop'] .= '<iframe frameborder="no" style="margin: 0px; padding: 0px; width: 315px; height: 290px;" src="'.$protocol.'://www.prestashop.com/rss/news2.php?v='._PS_VERSION_.'&lang='.$isoUser.'"></iframe>';
$content = @file_get_contents($protocol.'://www.prestashop.com/partner/paypal/paypal-tips.php?protocol='.$protocol.'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)$cookie->id_lang, false, $context);
$content = @file_get_contents($protocol.'://www.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')
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
$result['discover_prestashop'] .= $content[1];
}
}
die(Tools::jsonEncode($result));
}
if (Tools::isSubmit('getChildrenCategories') && Tools::getValue('id_category_parent'))
if (Tools::isSubmit('getChildrenCategories') && Tools::getValue('id_category_parent'))
{
$children_categories = Category::getChildrenWithNbSelectedSubCatForProduct(Tools::getValue('id_category_parent'), Tools::getValue('id_product', 0), Tools::getValue('post_selected_cat', null), $cookie->id_lang);
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id);
die(Tools::jsonEncode($children_categories));
}
if (Tools::isSubmit('updateProductImageShopAsso'))
if (Tools::isSubmit('getNotifications'))
{
if ($id_image = (int)Tools::getValue('id_image') AND $id_shop = (int)Tools::getValue('id_shop'))
$notification = new Notification;
die(Tools::jsonEncode($notification->getLastElements()));
}
if (Tools::isSubmit('updateElementEmployee') && Tools::getValue('updateElementEmployeeType'))
{
$notification = new Notification;
die($notification->updateEmployeeLastElement(Tools::getValue('updateElementEmployeeType')));
}
if (Tools::isSubmit('syncImapMail'))
{
if (!$url = Configuration::get('PS_SAV_IMAP_URL')
|| !$port = Configuration::get('PS_SAV_IMAP_PORT')
|| !$user = Configuration::get('PS_SAV_IMAP_USER')
|| !$password = Configuration::get('PS_SAV_IMAP_PWD'))
die('{"hasError" : true, "errors" : ["Configuration is not correct"]}');
if (!function_exists('imap_open'))
die('{"hasError" : true, "errors" : ["imap is not installed on this server"]}');
$mbox = @imap_open('{'.$url.':'.$port.(Configuration::get('PS_SAV_IMAP_SSL') ? '/ssl' : '').'}', $user, $password);
//checks if there is no error when connecting imap server
$errors = imap_errors();
$str_errors = '';
$str_error_delete = '';
if (sizeof($errors))
{
if ((int)Tools::getValue('active'))
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'image_shop (`id_image`, `id_shop`) VALUES('.(int)$id_image.', '.(int)$id_shop.')');
else
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'image_shop WHERE `id_image`='.(int)$id_image.' AND `id_shop`='.(int)$id_shop);
$str_errors = '["';
foreach($errors as $error)
$str_errors .= '"'.$error.'",';
$str_errors = rtrim($str_errors, ',').'';
}
//checks if imap connexion is active
if (!$mbox)
die('{"hasError" : true, "errors" : ["Cannot connect to the mailbox"]}');
//Returns information about the current mailbox. Returns FALSE on failure.
$check = imap_check($mbox);
if ($check)
die('{"hasError" : true, "errors" : ["Fail to get information about the current mailbox"]}');
if ($check->Nmsgs == 0)
die('{"hasError" : true, "errors" : ["NO message to sync"]}');
$result = imap_fetch_overview($mbox,"1:{$check->Nmsgs}",0);
foreach ($result as $overview)
{
//check if message exist in database
if (isset($overview->subject))
$subject = $overview->subject;
else
$subject = '';
//Creating an md5 to check if message has been allready processed
$md5 = md5($overview->date.$overview->from.$subject.$overview->msgno);
$exist = Db::getInstance()->getValue(
'SELECT `md5_header`
FROM `'._DB_PREFIX_.'customer_message_sync_imap`
WHERE `md5_header` = \''.pSQL($md5).'\'');
if ($exist)
{
if (Configuration::get('PS_SAV_IMAP_DELETE_MSG'))
if (!imap_delete($mbox, $overview->msgno))
$str_error_delete = ', "Fail to delete message"';
}
else
{
//check if subject has id_order
preg_match('/\#ct([0-9]*)/', $subject, $matches1);
preg_match('/\#tc([0-9-a-z-A-Z]*)/', $subject, $matches2);
if (isset($matches1[1]) && isset($matches2[1]))
{
//check if order exist in database
$ct = new CustomerThread((int)$matches1[1]);
if (Validate::isLoadedObject($ct) && $ct->token == $matches2[1])
{
$cm = new CustomerMessage();
$cm->id_customer_thread = $ct->id;
$cm->message = imap_fetchbody($mbox, $overview->msgno, 1);
$cm->add();
}
}
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'customer_message_sync_imap` (`md5_header`) VALUES (\''.pSQL($md5).'\')');
}
}
imap_expunge($mbox);
imap_close($mbox);
die('{"hasError" : false, "errors" : '.$str_errors.$str_errors_delete.'"]}');
}
/* Modify attribute position */
if (Tools::isSubmit('ajaxAttributesPositions'))
{
$way = (int)Tools::getValue('way');
$id_attribute = (int)Tools::getValue('id_attribute');
$id_attribute_group = (int)Tools::getValue('id_attribute_group');
$positions = Tools::getValue('attribute');
if (is_array($positions))
foreach ($positions as $position => $value)
{
// pos[1] = id_attribute_group, pos[2] = id_attribute, pos[3]=old position
$pos = explode('_', $value);
if ((isset($pos[1]) && isset($pos[2])) && ($pos[1] == $id_attribute_group && (int)$pos[2] === $id_attribute))
{
if ($attribute = new Attribute((int)$pos[2]))
if (isset($position) && $attribute->updatePosition($way, $position))
echo "ok position $position for attribute $pos[2]\r\n";
else
echo '{"hasError" : true, "errors" : "Can not update attribute '. $id_attribute . ' to position '.$position.' "}';
else
echo '{"hasError" : true, "errors" : "This attribute ('.$id_attribute.') can t be loaded"}';
break;
}
}
}
/* Modify group attribute position */
if (Tools::isSubmit('ajaxGroupsAttributesPositions'))
{
$way = (int)Tools::getValue('way');
$id_attribute_group = (int)Tools::getValue('id_attribute_group');
$positions = Tools::getValue('attribute_group');
$new_positions = array();
foreach($positions as $k => $v)
if (count(explode('_', $v)) == 3)
$new_positions[] = $v;
foreach ($new_positions as $position => $value)
{
// pos[1] = id_attribute_group, pos[2] = old position
$pos = explode('_', $value);
if (isset($pos[1]) && (int)$pos[1] === $id_attribute_group)
{
if ($group_attribute = new AttributeGroup((int)$pos[1]))
if (isset($position) && $group_attribute->updatePosition($way, $position))
echo "ok position $position for group attribute $pos[1]\r\n";
else
echo '{"hasError" : true, "errors" : "Can not update group attribute '. $id_attribute_group . ' to position '.$position.' "}';
else
echo '{"hasError" : true, "errors" : "This group attribute ('.$id_attribute_group.') can t be loaded"}';
break;
}
}
}
/* Modify feature position */
if (Tools::isSubmit('ajaxFeaturesPositions'))
{
$way = (int)Tools::getValue('way');
$id_feature = (int)Tools::getValue('id_feature');
$positions = Tools::getValue('feature');
$new_positions = array();
foreach($positions as $k => $v)
if (!empty($v))
$new_positions[] = $v;
foreach ($new_positions as $position => $value)
{
// pos[2] = id_feature, pos[3] = old position
$pos = explode('_', $value);
if (isset($pos[2]) && (int)$pos[2] === $id_feature)
{
if ($feature = new Feature((int)$pos[2]))
if (isset($position) && $feature->updatePosition($way, $position))
echo "ok position $position for feature $pos[1]\r\n";
else
echo '{"hasError" : true, "errors" : "Can not update feature '. $id_feature . ' to position '.$position.' "}';
else
echo '{"hasError" : true, "errors" : "This feature ('.$id_feature.') can t be loaded"}';
break;
}
}
}
/* Modify carrier position */
if (Tools::isSubmit('ajaxCarriersPositions'))
{
$way = (int)(Tools::getValue('way'));
$id_carrier = (int)(Tools::getValue('id_carrier'));
$positions = Tools::getValue('carrier');
foreach ($positions as $position => $value)
{
$pos = explode('_', $value);
if (isset($pos[2]) && (int)$pos[2] === $id_carrier)
{
if ($carrier = new Carrier((int)$pos[2]))
if (isset($position) && $carrier->updatePosition($way, $position))
echo "ok position $position for carrier $pos[1]\r\n";
else
echo '{"hasError" : true, "errors" : "Can not update carrier '. $id_carrier . ' to position '.$position.' "}';
else
echo '{"hasError" : true, "errors" : "This carrier ('.$id_carrier.') can t be loaded"}';
break;
}
}
}
if (Tools::isSubmit('searchCategory'))
{
$q = Tools::getValue('q');
$limit = Tools::getValue('limit');
$results = Db::getInstance()->executeS(
'SELECT c.`id_category`, cl.`name`
FROM `'._DB_PREFIX_.'category` c
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.$context->shop->addSqlRestrictionOnLang('cl').')
WHERE cl.`id_lang` = '.(int)$context->language->id.' AND c.`level_depth` <> 0
AND cl.`name` LIKE \'%'.pSQL($q).'%\'
GROUP BY c.id_category
ORDER BY c.`position`
LIMIT '.(int)$limit);
if ($results)
foreach ($results as $result)
echo trim($result['name']).'|'.(int)$result['id_category']."\n";
}
if (Tools::isSubmit('getParentCategoriesId') && $id_category = Tools::getValue('id_category'))
{
$category = new Category((int)$id_category);
$results = Db::getInstance()->executeS('SELECT `id_category` FROM `'._DB_PREFIX_.'category` c WHERE c.`nleft` < '.(int)$category->nleft.' AND c.`nright` > '.(int)$category->nright.'');
$output = array();
foreach ($results as $result)
$output[] = $result;
die(Tools::jsonEncode($output));
}
/* Update attribute */
if (Tools::isSubmit('ajaxUpdateTaxRule'))
{
$id_tax_rule = Tools::getValue('id_tax_rule');
$tax_rules = new TaxRule((int)$id_tax_rule);
$output = array();
foreach ($tax_rules as $key => $result)
$output[$key] = $result;
die(Tools::jsonEncode($output));
}

View File

@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -25,61 +25,59 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('PS_ADMIN_DIR', getcwd());
include_once('../config/config.inc.php');
include_once('tabs/AdminCatalog.php');
include_once('tabs/AdminProducts.php');
include_once('init.php');
define('_PS_ADMIN_DIR_', getcwd());
include_once('../config/config.inc.php');
include_once('tabs/AdminCatalog.php');
include_once('tabs/AdminProducts.php');
include_once('init.php');
if (Tools::getValue('token') != Tools::getAdminTokenLite('AdminCatalog'))
die(1);
if (Tools::getValue('token') != Tools::getAdminTokenLite('AdminCatalog'))
die(1);
$catalog = new AdminCatalog();
$adminProducts = new AdminProducts();
$catalog = new AdminCatalog();
$adminProducts = new AdminProducts();
global $cookie;
echo ' <tr>
<td class="col-left"><label for="id_category_default" class="t">'.$adminProducts->getL('Default category:').'</label></td>
<td>
<select id="id_category_default" name="id_category_default" onchange="checkDefaultCategory(this.value);">';
$categories = Category::getCategories((int)($cookie->id_lang), false);
Category::recurseCategory($categories, $categories[0][1], 1, (int)(Tools::getValue('id_category_default')));
echo ' </select>
</td>
</tr>
<tr>
<td class="col-left">'.$adminProducts->getL('Catalog:').'</td>
<td>
<div style="overflow: auto; min-height: 300px; padding-top: 0.6em;" id="categoryList">
<script type="text/javascript">
$(document).ready(function() {
$(\'div#categoryList input.categoryBox\').click(function (){
if ($(this).is(\':not(:checked)\') && $(\'div#categoryList input.id_category_default\').val() == $(this).val())
alert(\''.utf8_encode(html_entity_decode($adminProducts->getL('Consider changing the default category.'))).'\');
});
echo ' <tr>
<td class="col-left"><label for="id_category_default" class="t">'.$adminProducts->getL('Default category:').'</label></td>
<td>
<select id="id_category_default" name="id_category_default" onchange="checkDefaultCategory(this.value);">';
$categories = Category::getCategories(Context::getContext()->language->id, false);
Category::recurseCategory($categories, $categories[0][1], 1, (int)(Tools::getValue('id_category_default')));
echo ' </select>
</td>
</tr>
<tr>
<td class="col-left">'.$adminProducts->getL('Catalog:').'</td>
<td>
<div style="overflow: auto; min-height: 300px; padding-top: 0.6em;" id="categoryList">
<script type="text/javascript">
$(document).ready(function() {
$(\'div#categoryList input.categoryBox\').click(function (){
if ($(this).is(\':not(:checked)\') && $(\'div#categoryList input.id_category_default\').val() == $(this).val())
alert(\''.utf8_encode(html_entity_decode($adminProducts->getL('Consider changing the default category.'))).'\');
});
</script>
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'categoryBox[]\', this.checked)" /></th>
<th>'.$adminProducts->getL('ID').'</th>
<th style="width: 600px">'.$adminProducts->getL('Name').'</th>
</tr>';
$done = array();
$index = array();
$categoryBox = Tools::getValue('categoryBox');
if ($categoryBox != '')
{
$categoryBox = @unserialize($categoryBox);
foreach ($categoryBox AS $k => $row)
$index[] = $row;
}
elseif ((int)Tools::getValue('id_product'))
$index = Product::getProductCategories((int)Tools::getValue('id_product'));
$adminProducts->recurseCategoryForInclude((int)(Tools::getValue('id_product')), $index, $categories, $categories[0][1], 1, (int)(Tools::getValue('id_category_default')));
echo ' </table>
<p style="padding:0px; margin:0px 0px 10px 0px;">'.$adminProducts->getL('Mark all checkbox(es) of categories in which product is to appear').'<sup> *</sup></p>
</div>
</tr>';
});
</script>
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'categoryBox[]\', this.checked)" /></th>
<th>'.$adminProducts->getL('ID').'</th>
<th style="width: 600px">'.$adminProducts->getL('Name').'</th>
</tr>';
$done = array();
$index = array();
$categoryBox = Tools::getValue('categoryBox');
if ($categoryBox != '')
{
$categoryBox = @unserialize($categoryBox);
foreach ($categoryBox AS $k => $row)
$index[] = $row;
}
elseif ((int)Tools::getValue('id_product'))
$index = Product::getProductCategories((int)Tools::getValue('id_product'));
$adminProducts->recurseCategoryForInclude((int)(Tools::getValue('id_product')), $index, $categories, $categories[0][1], 1, (int)(Tools::getValue('id_category_default')));
echo ' </table>
<p style="padding:0px; margin:0px 0px 10px 0px;">'.$adminProducts->getL('Mark all checkbox(es) of categories in which product is to appear').'<sup> *</sup></p>
</div>
</tr>';

View File

@@ -25,8 +25,8 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('PS_ADMIN_DIR', getcwd());
include(PS_ADMIN_DIR.'/../config/config.inc.php');
define('_PS_ADMIN_DIR_', getcwd());
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/* Getting cookie or logout */
require_once(dirname(__FILE__).'/init.php');

View File

@@ -25,8 +25,8 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('PS_ADMIN_DIR', getcwd());
include(PS_ADMIN_DIR.'/../config/config.inc.php');
define('_PS_ADMIN_DIR_', getcwd());
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/* Getting cookie or logout */
require_once(dirname(__FILE__).'/init.php');
@@ -53,13 +53,13 @@ else
// Excluding downloadable products from packs because download from pack is not supported
$excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', false);
$items = Db::getInstance()->ExecuteS('
SELECT p.`id_product`, `reference`, pl.name
FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.id_product = p.id_product)
WHERE (pl.name LIKE \'%'.pSQL($query).'%\' OR p.reference LIKE \'%'.pSQL($query).'%\') AND pl.id_lang = '.(int)($cookie->id_lang).
(!empty($excludeIds) ? ' AND p.id_product NOT IN ('.$excludeIds.') ' : ' ').
($excludeVirtuals ? 'AND p.id_product NOT IN (SELECT pd.id_product FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : ''));
$sql = 'SELECT p.`id_product`, `reference`, pl.name
FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.id_product = p.id_product AND pl.id_lang = '.(int)Context::getContext()->language->id.Context::getContext()->shop->addSqlRestrictionOnLang('pl').')
WHERE (pl.name LIKE \'%'.pSQL($query).'%\' OR p.reference LIKE \'%'.pSQL($query).'%\')'.
(!empty($excludeIds) ? ' AND p.id_product NOT IN ('.$excludeIds.') ' : ' ').
($excludeVirtuals ? 'AND p.id_product NOT IN (SELECT pd.id_product FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : '');
$items = Db::getInstance()->executeS($sql);
if ($items)
foreach ($items AS $item)

View File

@@ -24,7 +24,7 @@
* @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 */
@@ -43,5 +43,5 @@ $smtpPort = $_GET['smtpPort'];
$smtpEncryption = $_GET['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 ? 'ok' : 'fail');
die($result === true ? 'ok' : $result);

View File

@@ -1,5 +1,6 @@
<?php
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
?>

View File

@@ -8,13 +8,16 @@
*/
require_once('../../config/config.inc.php');
require_once('../init.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
@ob_start();
displayArray($_POST);
writeInfo(@ob_get_clean());
$safe_post = array();
foreach ($_POST AS $key => $value)
$safe_post[Tools::safeOutput($key)] = Tools::safeOutput($value);
displayArray($safe_post);
writeInfo(@ob_get_clean());
echo "{";
$error = "";
$info = "";
$info = "";
/* $_POST['new_folder'] = substr(md5(time()), 1, 5);
$_POST['currentFolderPath'] = "../../uploaded/";*/
if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_NEWFOLDER)
@@ -44,12 +47,12 @@
$manager = new manager(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], false);
$pathInfo = $manager->getFolderInfo(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder']);
foreach($pathInfo as $k=>$v)
{
{
switch ($k)
{
case "ctime";
case "ctime";
case "mtime":
case "atime":
$v = date(DATE_TIME_FORMAT, $v);
@@ -60,10 +63,10 @@
case 'cssClass':
$v = 'folderEmpty';
break;
}
}
$info .= sprintf(", %s:'%s'", $k, $v);
}
}else
}else
{
$error = ERR_FOLDER_CREATION_FAILED;
}
@@ -72,4 +75,4 @@
echo "error:'" . $error . "'";
echo $info;
echo "}";
?>
?>

View File

@@ -6,6 +6,7 @@
* @since 22/April/2007
*
*/
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");

View File

@@ -6,6 +6,7 @@
* @since 22/April/2007
*
*/
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");

View File

@@ -6,6 +6,7 @@
* @since 22/May/2007
*
*/
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");

View File

@@ -6,6 +6,7 @@
* @since 22/May/2007
*
*/
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");

View File

@@ -6,6 +6,7 @@
* @since 22/May/2007
*
*/
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");

View File

@@ -1,10 +1,11 @@
<?
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
require_once('../../config/config.inc.php');
require_once('../init.php');
$error = '';
$fileMoved = array();
$unmovedDocDueToSamePath = array();
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
$error = '';
$fileMoved = array();
$unmovedDocDueToSamePath = array();
if(CONFIG_SYS_VIEW_ONLY || (!CONFIG_OPTIONS_CUT && !CONFIG_OPTIONS_COPY))
{
$error = SYS_DISABLED;

View File

@@ -6,7 +6,7 @@
* @since 22/May/2007
*
*/
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**
@@ -104,7 +105,7 @@
<fieldset id="modes">
<legend>Modes</legend>
<form name="formAction" id="formAction" method="post" action="<?php echo appendQueryString(CONFIG_URL_IMAGE_UNDO, makeQueryString(array('path'))); ?>">
<input type="hidden" name="file_path" id="file_path" value="<?php echo $_GET['path']; ?>" />
<input type="hidden" name="file_path" id="file_path" value="<?php echo Tools::safeOutput($_GET['path']); ?>" />
<p><label><?php echo IMG_MODE_RESIZE; ?></label> <input type="radio" name="mode" value="resize" class="input" checked="checked" onclick="return changeMode();"/>
<label><?php echo IMG_MODE_CROP; ?></label> <input type="radio" name="mode" value="crop" class="input" onclick="return changeMode();" />
@@ -130,7 +131,7 @@
<p><input type="hidden" name="mode" id="image_mode" value="" />
<input type="hidden" name="new_name" id="hidden_new_name" value="" />
<input type="hidden" name="save_to" id="hidden_save_to" value="" />
<input type="hidden" name="path" id="path" value="<?php echo $_GET['path']; ?>" />
<input type="hidden" name="path" id="path" value="<?php echo Tools::safeOutput($_GET['path']); ?>" />
<input type="hidden" name="flip_angle" id="flip_angle" value="" />
<label><?php echo IMG_LBL_WIDTH; ?></label> <input type="text" name="width" id="width" value="" class="input imageInput" />
<label><?php echo IMG_LBL_HEIGHT; ?></label> <input type="text" name="height" id="height" value="" class="input imageInput" />

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**
@@ -83,8 +84,8 @@
$error = TXT_UNKNOWN_REQUEST;
}
echo "{";
echo "error:'" . $error . "',\n";
echo "path:'" . $path . "'";
echo "error:'" . Tools::safeOutput($error) . "',\n";
echo "path:'" . Tools::safeOutput($path) . "'";
echo "}";
?>
?>

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**

View File

@@ -1,4 +1,5 @@
<?php
define('_PS_ADMIN_DIR_', getcwd());
require_once('../../config/config.inc.php');
require_once('../init.php');
/**
@@ -73,7 +74,7 @@
<script type="text/javascript" src="jscripts/ajaxfilemanager.js"></script>-->
<script type="text/javascript">
var globalSettings = {'upload_init':false};
var queryString = '<?php echo makeQueryString(array('path')); ?>';
var queryString = '<?php echo Tools::safeOutput(makeQueryString(array('path'))); ?>';
var paths = {'root':'<?php echo addTrailingSlash(backslashToSlash(CONFIG_SYS_ROOT_PATH)); ?>', 'root_title':'<?php echo LBL_FOLDER_ROOT; ?>'};
var parentFolder = {};
var urls = {
@@ -89,7 +90,7 @@
'text_editor':'<?php echo CONFIG_URL_TEXT_EDITOR; ?>',
'image_editor':'<?php echo CONFIG_URL_IMAGE_EDITOR; ?>',
'download':'<?php echo CONFIG_URL_DOWNLOAD; ?>',
'present':'<?php echo getCurrentUrl(); ?>',
'present':'<?php echo Tools::safeOutput(getCurrentUrl()); ?>',
'home':'<?php echo CONFIG_URL_HOME; ?>',
'view':'<?php echo CONFIG_URL_LIST_LISTING; ?>'
};
@@ -130,7 +131,7 @@
var searchRequired = false;
var supporedPreviewExts = '<?php echo CONFIG_VIEWABLE_VALID_EXTS; ?>';
var supportedUploadExts = '<?php echo CONFIG_UPLOAD_VALID_EXTS; ?>'
var elementId = <?php echo (!empty($_GET['elementId'])?"'" . $_GET['elementId'] . "'":'null'); ?>;
var elementId = <?php echo (!empty($_GET['elementId'])?"'" . Tools::safeOutput($_GET['elementId']) . "'":'null'); ?>;
var files = {};
$(document).ready(
function()
@@ -463,9 +464,9 @@ $(document).ready(
<tr>
<td>
<b><?php echo LBL_SEARCH_MTIME; ?></b><br />
<input type="text" class="input inputMtime" name="search_mtime_from" id="search_mtime_from" value="<?php echo (!empty($_GET['search_mtime_from'])?$_GET['search_mtime_from']:''); ?>" />
<input type="text" class="input inputMtime" name="search_mtime_from" id="search_mtime_from" value="<?php echo (!empty($_GET['search_mtime_from'])?Tools::safeOutput($_GET['search_mtime_from']):''); ?>" />
<span class="leftToRightArrow">&nbsp;</span>
<input type="text" class="input inputMtime" name="search_mtime_to" id="search_mtime_to" value="<?php echo (!empty($_GET['search_mtime_to'])?$_GET['search_mtime_to']:''); ?>" />
<input type="text" class="input inputMtime" name="search_mtime_to" id="search_mtime_to" value="<?php echo (!empty($_GET['search_mtime_to'])?Tools::safeOutput($_GET['search_mtime_to']):''); ?>" />
</td></tr>
<tr>

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -31,7 +31,11 @@ eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^
//media.js end
//ajaxfileupload start
jQuery.extend({ createUploadIframe: function(id, uri)
{ var frameId = 'jUploadFrame' + id; if(window.ActiveXObject) { var io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />'); if(typeof uri== 'boolean'){ io.src = 'javascript:false';}
{ var frameId = 'jUploadFrame' + id; if(window.ActiveXObject) {
var io = document.createElement('iframe');
io.setAttribute('id', frameId);
io.setAttribute('name', frameId);
if(typeof uri== 'boolean'){ io.src = 'javascript:false';}
else if(typeof uri== 'string'){ io.src = uri;}
}
else { var io = document.createElement('iframe'); io.id = frameId; io.name = frameId;}

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -25,21 +25,19 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('PS_ADMIN_DIR', getcwd());
define('_PS_ADMIN_DIR_', getcwd());
include(PS_ADMIN_DIR.'/../config/config.inc.php');
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
/* Header can't be included, so cookie must be created here */
$cookie = new Cookie('psAdmin');
if (!$cookie->id_employee)
Tools::redirectAdmin('login.php');
if (!Context::getContext()->employee->isLoggedBack())
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminLogin'));
$tabAccess = Profile::getProfileAccess($cookie->profile, Tab::getIdFromClassName('AdminBackup'));
$tabAccess = Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminBackup'));
if ($tabAccess['view'] !== '1')
die (Tools::displayError('You do not have permission to view here'));
$backupdir = realpath( PS_ADMIN_DIR . '/backups/');
$backupdir = realpath(_PS_ADMIN_DIR_ . '/backups/');
if ($backupdir === false)
die (Tools::displayError('Backups directory does not exist.'));

View File

@@ -1,59 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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(PS_ADMIN_DIR.'/../config/config.inc.php');
$cookie = new Cookie('psAdmin');
Tools::setCookieLanguage();
$translations = array(
'FR' => array(
'Referer is missing' => 'Vous devez indiquer un "referer"',
'Confirmation' => 'Confirmation',
'Yes' => 'Oui',
'No' => 'Non',
'close' => 'fermer')
);
if (!Tools::getValue('referer')):
echo '<p>'.Tools::historyc_l('Referer is missing', $translations).'</p>';
echo '<p><a href="#" onclick="tb_remove()">'.Tools::historyc_l('close', $translations).'</a></p>';
else:
$referer = Tools::htmlentitiesUTF8(rawurldecode(Tools::getValue('referer')));?>
<h2><?php echo Tools::historyc_l('Confirmation', $translations) ?></h2>
<p>
<a href="#" class="thickbox confirm_yes" title="" onclick="tb_remove(); window.open('<?php echo $referer ?>', '_self')">
<?php echo Tools::historyc_l('Yes', $translations) ?>
</a>
<a href="#" class="confirm_no" onclick="tb_remove()"><?php echo Tools::historyc_l('No', $translations) ?></a>
</p>
<?php endif; //check if referer exists

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2011 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-2011 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
*/
include(dirname(__FILE__).'/../config/config.inc.php');
if (isset($_GET['secure_key']))
{
$secureKey = md5(_COOKIE_KEY_.Configuration::get('PS_SHOP_NAME'));
if (!empty($secureKey) AND $secureKey === $_GET['secure_key'])
Currency::refreshCurrencies();
}

View File

@@ -25,8 +25,8 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_ADMIN_DIR_', getcwd());
include_once(dirname(__FILE__).'/../config/config.inc.php');
$cookie = new Cookie('psAdmin');
$module = Tools::getValue('module');
$render = Tools::getValue('render');
@@ -38,7 +38,7 @@ $height = Tools::getValue('height');
$id_employee = Tools::getValue('id_employee');
$id_lang = Tools::getValue('id_lang');
if ($cookie->id_employee != $id_employee)
if (Context::getContext()->employee->id != $id_employee)
die;
if (!Tools::file_exists_cache($module_path = dirname(__FILE__).'/../modules/'.$module.'/'.$module.'.php'))

View File

@@ -0,0 +1,2 @@
Order deny,allow
Deny from all

View File

@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 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-2011 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
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -27,14 +27,14 @@
echo ' </div>
</div>
'.Module::hookExec('backOfficeFooter').'
'.Hook::exec('backOfficeFooter').'
<div id="footer">
<div style="float:left;margin-left:10px;padding-top:6px">
<a href="http://www.prestashop.com/" target="_blank" style="font-weight:700;color:#666666">PrestaShop&trade; '._PS_VERSION_.'</a><br />
<span style="font-size:10px">'.translate('Load time:').' '.number_format(microtime(true) - $timerStart, 3, '.', '').'s</span>
</div>
<div style="float:right;height:40px;margin-right:10px;line-height:38px;vertical-align:middle">';
if (strtoupper(Language::getIsoById($cookie->id_lang)) == 'FR') echo '<span style="color: #812143; font-weight: bold;">Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h &agrave; 18h ';
if (strtoupper(Context::getContext()->language->iso_code) == 'FR') echo '<span style="color: #812143; font-weight: bold;">Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h &agrave; 18h ';
echo ' | <a href="http://www.prestashop.com/en/contact_us/" target="_blank" class="footer_link">'.translate('Contact').'</a>
| <a href="http://forge.prestashop.com" target="_blank" class="footer_link">'.translate('Bug Tracker').'</a>

View File

@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -25,7 +25,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/
require_once(dirname(__FILE__).'/../images.inc.php');
require_once(dirname(__FILE__).'/../images.inc.php');
function bindDatepicker($id, $time)
{
@@ -49,14 +49,20 @@ function bindDatepicker($id, $time)
});';
}
// id can be a identifier or an array of identifiers
/**
* Deprecated since 1.5
* Use Controller::addJqueryUi('ui.datepicker') instead
*
* @param int|array $id id can be a identifier or an array of identifiers
* @param unknown_type $time
*/
function includeDatepicker($id, $time = false)
{
global $cookie;
Tools::displayAsDeprecated();
echo '<script type="text/javascript" src="'.__PS_BASE_URI__.'js/jquery/jquery-ui-1.8.10.custom.min.js"></script>';
$iso = Db::getInstance()->getValue('SELECT iso_code FROM '._DB_PREFIX_.'lang WHERE `id_lang` = '.(int)($cookie->id_lang));
$iso = Db::getInstance()->getValue('SELECT iso_code FROM '._DB_PREFIX_.'lang WHERE `id_lang` = '.(int)Context::getContext()->language->id);
if ($iso != 'en')
echo '<script type="text/javascript" src="'.__PS_BASE_URI__.'js/jquery/datepicker/ui/i18n/ui.datepicker-'.$iso.'.js"></script>';
echo '<script type="text/javascript" src="'.__PS_BASE_URI__.'js/jquery/ui/i18n/jquery.ui.datepicker-'.$iso.'.js"></script>';
echo '<script type="text/javascript">';
if (is_array($id))
foreach ($id as $id2)
@@ -76,14 +82,13 @@ function includeDatepicker($id, $time = false)
function rewriteSettingsFile($baseUrls = NULL, $theme = NULL, $arrayDB = NULL)
{
$defines = array();
$defines['_PS_DIRECTORY_'] = ($baseUrls AND $baseUrls['_PS_DIRECTORY_']) ? $baseUrls['_PS_DIRECTORY_'] : _PS_DIRECTORY_;
$defines['_MEDIA_SERVER_1_'] = ($baseUrls AND isset($baseUrls['_MEDIA_SERVER_1_'])) ? $baseUrls['_MEDIA_SERVER_1_'] : _MEDIA_SERVER_1_;
$defines['_MEDIA_SERVER_2_'] = ($baseUrls AND isset($baseUrls['_MEDIA_SERVER_2_'])) ? $baseUrls['_MEDIA_SERVER_2_'] : _MEDIA_SERVER_2_;
$defines['_MEDIA_SERVER_3_'] = ($baseUrls AND isset($baseUrls['_MEDIA_SERVER_3_'])) ? $baseUrls['_MEDIA_SERVER_3_'] : _MEDIA_SERVER_3_;
$defines['_PS_CACHING_SYSTEM_'] = _PS_CACHING_SYSTEM_;
$defines['_PS_CACHE_ENABLED_'] = _PS_CACHE_ENABLED_;
$defines['_DB_NAME_'] = (($arrayDB AND isset($arrayDB['_DB_NAME_'])) ? $arrayDB['_DB_NAME_'] : _DB_NAME_);
$defines['_MYSQL_ENGINE_'] = _MYSQL_ENGINE_;
$defines['_MYSQL_ENGINE_'] = (($arrayDB AND isset($arrayDB['_MYSQL_ENGINE_'])) ? $arrayDB['_MYSQL_ENGINE_'] : _MYSQL_ENGINE_);
$defines['_DB_SERVER_'] = (($arrayDB AND isset($arrayDB['_DB_SERVER_'])) ? $arrayDB['_DB_SERVER_'] : _DB_SERVER_);
$defines['_DB_USER_'] = (($arrayDB AND isset($arrayDB['_DB_USER_'])) ? $arrayDB['_DB_USER_'] : _DB_USER_);
$defines['_DB_PREFIX_'] = (($arrayDB AND isset($arrayDB['_DB_PREFIX_'])) ? $arrayDB['_DB_PREFIX_'] : _DB_PREFIX_);
@@ -100,7 +105,7 @@ function rewriteSettingsFile($baseUrls = NULL, $theme = NULL, $arrayDB = NULL)
foreach ($defines as $k => $value)
$content .= 'define(\''.$k.'\', \''.addslashes($value).'\');'."\n";
$content .= "\n?>";
if ($fd = @fopen(PS_ADMIN_DIR.'/../config/settings.inc.php', 'w'))
if ($fd = @fopen(_PS_ADMIN_DIR_.'/../config/settings.inc.php', 'w'))
{
fwrite($fd, $content);
fclose($fd);
@@ -132,53 +137,55 @@ function displayDate($sqlDate, $withTime = false)
*/
function getPath($urlBase, $id_category, $path = '', $highlight = '', $categoryType = 'catalog', $home = false)
{
global $cookie;
$context = Context::getContext();
if ($categoryType == 'catalog')
{
{
$category = Db::getInstance()->getRow('
SELECT id_category, level_depth, nleft, nright
FROM '._DB_PREFIX_.'category
WHERE id_category = '.(int)$id_category);
if (isset($category['id_category']))
{
$categories = Db::getInstance()->ExecuteS('
SELECT c.id_category, cl.name, cl.link_rewrite
FROM '._DB_PREFIX_.'category c
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category)
WHERE c.nleft <= '.(int)$category['nleft'].' AND c.nright >= '.(int)$category['nright'].' AND cl.id_lang = '.(int)$cookie->id_lang.($home ? ' AND c.id_category='.$id_category : '').'
GROUP BY c.id_category
ORDER BY c.level_depth ASC
LIMIT '.(!$home ? (int)($category['level_depth'] + 1) : 1));
$sql = 'SELECT c.id_category, cl.name, cl.link_rewrite
FROM '._DB_PREFIX_.'category c
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category'.$context->shop->addSqlRestrictionOnLang('cl').')
WHERE c.nleft <= '.(int)$category['nleft'].'
AND c.nright >= '.(int)$category['nright'].'
AND cl.id_lang = '.(int)$context->language->id.
($home ? ' AND c.id_category='.$id_category : '').'
GROUP BY c.id_category
ORDER BY c.level_depth ASC
LIMIT '.(!$home ? (int)($category['level_depth'] + 1) : 1);
$categories = Db::getInstance()->executeS($sql);
$fullPath = '';
$n = 1;
$nCategories = (int)sizeof($categories);
foreach ($categories AS $category)
{
$edit = '<a href="'.$urlBase.'&id_category='.(int)$category['id_category'].'&'.(($category['id_category'] == 1 || $home) ? 'viewcategory' : 'addcategory').'&token='.Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)($cookie->id_employee)).'" title="'.($category['id_category'] == 1 ? 'Home' : 'Modify').'"><img src="../img/admin/'.(($category['id_category'] == 1 || $home) ? 'home' : 'edit').'.gif" alt="" /></a> ';
$edit = '<a href="'.$urlBase.'&id_category='.(int)$category['id_category'].'&'.(($category['id_category'] == 1 || $home) ? 'viewcategory' : 'addcategory').'&token='.Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)$context->employee->id).'" title="'.($category['id_category'] == 1 ? 'Home' : 'Modify').'"><img src="../img/admin/'.(($category['id_category'] == 1 || $home) ? 'home' : 'edit').'.gif" alt="" /></a> ';
$fullPath .= $edit.
($n < $nCategories ? '<a href="'.$urlBase.'&id_category='.(int)$category['id_category'].'&viewcategory&token='.Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)($cookie->id_employee)).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'">' : '').
($n < $nCategories ? '<a href="'.$urlBase.'&id_category='.(int)$category['id_category'].'&viewcategory&token='.Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)$context->employee->id).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'">' : '').
(!empty($highlight) ? str_ireplace($highlight, '<span class="highlight">'.htmlentities($highlight, ENT_NOQUOTES, 'UTF-8').'</span>', $category['name']) : $category['name']).
($n < $nCategories ? '</a>' : '').
(($n++ != $nCategories OR !empty($path)) ? ' > ' : '');
}
return $fullPath.$path;
}
}
elseif ($categoryType == 'cms')
{
$category = new CMSCategory($id_category, (int)($cookie->id_lang));
$category = new CMSCategory($id_category, $context->language->id);
if (!$category->id)
return $path;
$name = ($highlight != NULL) ? str_ireplace($highlight, '<span class="highlight">'.$highlight.'</span>', CMSCategory::hideCMSCategoryPosition($category->name)) : CMSCategory::hideCMSCategoryPosition($category->name);
$edit = '<a href="'.$urlBase.'&id_cms_category='.$category->id.'&addcategory&token=' . Tools::getAdminToken('AdminCMSContent'.(int)(Tab::getIdFromClassName('AdminCMSContent')).(int)($cookie->id_employee)).'">
$edit = '<a href="'.$urlBase.'&id_cms_category='.$category->id.'&addcategory&token=' . Tools::getAdminToken('AdminCmsContent'.(int)(Tab::getIdFromClassName('AdminCmsContent')).(int)$context->employee->id).'">
<img src="../img/admin/edit.gif" alt="Modify" /></a> ';
if ($category->id == 1)
$edit = '<a href="'.$urlBase.'&id_cms_category='.$category->id.'&viewcategory&token=' . Tools::getAdminToken('AdminCMSContent'.(int)(Tab::getIdFromClassName('AdminCMSContent')).(int)($cookie->id_employee)).'">
$edit = '<a href="'.$urlBase.'&id_cms_category='.$category->id.'&viewcategory&token=' . Tools::getAdminToken('AdminCmsContent'.(int)(Tab::getIdFromClassName('AdminCmsContent')).(int)$context->employee->id).'">
<img src="../img/admin/home.gif" alt="Home" /></a> ';
$path = $edit.'<a href="'.$urlBase.'&id_cms_category='.$category->id.'&viewcategory&token=' . Tools::getAdminToken('AdminCMSContent'.(int)(Tab::getIdFromClassName('AdminCMSContent')).(int)($cookie->id_employee)).'">
$path = $edit.'<a href="'.$urlBase.'&id_cms_category='.$category->id.'&viewcategory&token=' . Tools::getAdminToken('AdminCmsContent'.(int)(Tab::getIdFromClassName('AdminCmsContent')).(int)$context->employee->id).'">
'.$name.'</a> > '.$path;
if ($category->id == 1)
return substr($path, 0, strlen($path) - 3);
@@ -209,10 +216,9 @@ function createDir($path, $rights)
function checkPSVersion()
{
libxml_set_streams_context(stream_context_create(array('http' => array('timeout' => 3))));
if ($feed = @simplexml_load_file('http://www.prestashop.com/xml/version.xml') AND _PS_VERSION_ < $feed->version->num)
return array('name' => $feed->version->name, 'link' => $feed->download->link);
return false;
$upgrader = new Upgrader();
return $upgrader->checkPSVersion();
}
function translate($string)
@@ -225,59 +231,54 @@ function translate($string)
return str_replace('"', '&quot;', stripslashes($str));
}
function recursiveTab($id_tab)
{
global $cookie, $tabs;
$adminTab = Tab::getTab((int)$cookie->id_lang, $id_tab);
$tabs[]= $adminTab;
if ($adminTab['id_parent'] > 0)
recursiveTab($adminTab['id_parent']);
}
/**
* Returns a new Tab object
*
* @param string $tab class name
* @return mixed(AdminTab, bool) tab object or false if failed
*/
function checkingTab($tab)
{
global $adminObj, $cookie;
$tab = trim($tab);
$tab_lowercase = strtolower($tab);
if (!Validate::isTabName($tab))
return false;
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT id_tab, module FROM `'._DB_PREFIX_.'tab` WHERE class_name = \''.pSQL($tab).'\'');
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT id_tab, module, class_name FROM `'._DB_PREFIX_.'tab` WHERE class_name = \''.pSQL($tab).'\'');
if (!$row['id_tab'])
{
if (isset(AdminTab::$tabParenting[$tab]))
Tools::redirectAdmin('?tab='.AdminTab::$tabParenting[$tab].'&token='.Tools::getAdminTokenLite(AdminTab::$tabParenting[$tab]));
echo Tools::displayError('Tab cannot be found.');
echo sprintf(Tools::displayError('Tab %s cannot be found.'),$tab);
return false;
}
if ($row['module'] AND file_exists(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php'))
include_once(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php');
elseif (file_exists(PS_ADMIN_DIR.'/tabs/'.$tab.'.php'))
include_once(PS_ADMIN_DIR.'/tabs/'.$tab.'.php');
// Class file is included in Dispatcher::dispatch() function
if (!class_exists($tab, false) OR !$row['id_tab'])
{
echo Tools::displayError('Tab file cannot be found.');
echo sprintf(Tools::displayError('Tab file %s cannot be found.'),$tab);
return false;
}
$adminObj = new $tab;
if (!$adminObj->viewAccess() AND ($adminObj->table != 'employee' OR $cookie->id_employee != Tools::getValue('id_employee') OR !Tools::isSubmit('updateemployee')))
if (!$adminObj->viewAccess() AND ($adminObj->table != 'employee' OR Context::getContext()->employee->id != Tools::getValue('id_employee') OR !Tools::isSubmit('updateemployee')))
{
$adminObj->_errors = array(Tools::displayError('Access denied'));
echo $adminObj->displayErrors();
return false;
}
return $row['id_tab'];
return $adminObj;
}
/**
* @TODO deprecate for Tab::checkTabRights()
*/
function checkTabRights($id_tab)
{
global $cookie;
static $tabAccesses = NULL;
if ($tabAccesses === NULL)
$tabAccesses = Profile::getProfileAccesses($cookie->profile);
$tabAccesses = Profile::getProfileAccesses(Context::getContext()->employee->id_profile);
if (isset($tabAccesses[(int)($id_tab)]['view']))
return ($tabAccesses[(int)($id_tab)]['view'] === '1');
@@ -387,3 +388,230 @@ function simpleXMLToArray ($xml, $flattenValues = true, $flattenAttributes = tru
return $return;
}
/**
* Generate a sweet HTML list for shop selection
*
* @todo move in adminTab
* @return string
*/
function generateShopList()
{
$tree = Shop::getTree();
$context = Context::getContext();
// Get default value
list($shopID, $shopGroupID) = Shop::getContext();
if ($shopID)
$value = 's-'.$shopID;
else if ($shopGroupID)
$value = 'g-'.$shopGroupID;
else
$value = '';
// Generate HTML
$url = $_SERVER['REQUEST_URI'].(($_SERVER['QUERY_STRING']) ? '&' : '?').'setShopContext=';
$html = '<select class="shopList" onchange="location.href = \''.$url.'\'+$(this).val();">';
if ($context->employee->id_profile == _PS_ADMIN_PROFILE_ ||
$context->shop->getTotalShopsWhoExists() == Employee::getTotalEmployeeShopById($context->employee->id))
$html .= '<option value="" class="first">'.translate('All shops').'</option>';
/*$html .= (Context::getContext()->employee->id_profile == _PS_ADMIN_PROFILE_) ? '<option value="" class="first">'.translate('All shops').'</option>' : '';*/
foreach ($tree as $gID => $group_data)
{
$disabled = ($group_data['totalShops'] != count($group_data['shops'])) ? 'disabled="disabled"' : '';
$html .= '<option class="group" value="g-'.$gID.'" '.(($value == 'g-'.$gID) ? 'selected="selected"' : '').' '.$disabled.'>'.htmlspecialchars($group_data['name']).'</option>';
foreach ($group_data['shops'] as $sID => $shopData)
if ($shopData['active'])
$html .= '<option value="s-'.$sID.'" class="shop" '.(($value == 's-'.$sID || $context->shop->id == $sID) ? 'selected="selected"' : '').'>&raquo; '.$shopData['name'].'</option>';
}
$html .= '</select>';
return $html;
}
/**
* for retrocompatibility with old AdminTab, old index.php
*
* @return void
*/
function runAdminTab($tab, $ajaxMode = false)
{
$ajaxMode = (bool)$ajaxMode;
require_once(_PS_ADMIN_DIR_.'/init.php');
$cookie = Context::getContext()->cookie;
if (empty($tab) and !sizeof($_POST))
{
$tab = 'AdminHome';
$_POST['tab'] = 'AdminHome';
$_POST['token'] = Tools::getAdminTokenLite($tab);
}
// $tab = $_REQUEST['tab'];
if ($adminObj = checkingTab($tab))
{
$noTabLink = $adminObj->noTabLink;
// init is different for new tabs (AdminController) and old tabs (AdminTab)
if ($adminObj instanceof AdminController)
{
if($ajaxMode)
$adminObj->ajax = true;
$adminObj->path = dirname($_SERVER["PHP_SELF"]);
$adminObj->run();
}
else
{
if (!$ajaxMode)
require_once(_PS_ADMIN_DIR_.'/header.inc.php');
$isoUser = Context::getContext()->language->id;
$tabs = array();
$tabs = Tab::recursiveTab($adminObj->id, $tabs);
$tabs = array_reverse($tabs);
$bread = '';
foreach ($tabs AS $key => $item)
{
$bread .= ' <img src="../img/admin/separator_breadcrum.png" style="margin-right:5px" alt="&gt;" />';
if (count($tabs) - 1 > $key)
$bread .= '<a href="?tab='.$item['class_name'].'&token='.Tools::getAdminToken($item['class_name'].intval($item['id_tab']).(int)Context::getContext()->employee->id).'">';
$bread .= $item['name'];
if (count($tabs) - 1 > $key)
$bread .= '</a>';
}
// @TODO : a way to desactivate this feature
if (!$ajaxMode)
echo'<script type="text/javascript">
$(function() {
$.ajax({
type: \'POST\',
url: \'ajax.php\',
data: \'helpAccess=1&item='.$item['class_name'].'&isoUser='.$isoUser.'&country='.Context::getContext()->country->iso_code.'&version='._PS_VERSION_.'\',
async : true,
success: function(msg) {
$("#help-button").html(msg);
$("#help-button").fadeIn("slow");
}
});
});</script>';
if (!$ajaxMode)
echo '<div class="path_bar">
<div id="help-button" class="floatr" style="display: none; font-family: Verdana; font-size: 10px; margin-right: 4px; margin-top: 4px;">
</div>
<a href="?token='.Tools::getAdminToken($tab.intval(Tab::getIdFromClassName($tab)).(int)Context::getContext()->employee->id).'">'.translate('Back Office').'</a>
'.$bread.'</div>';
if (!$ajaxMode && Shop::isFeatureActive() && Context::shop() != Shop::CONTEXT_ALL)
{
echo '<div class="multishop_info">';
if (Context::shop() == Shop::CONTEXT_GROUP)
printf(translate('You are configuring your store for group shop %s'), '<b>'.Context::getContext()->shop->getGroup()->name.'</b>');
elseif (Context::shop() == Shop::CONTEXT_SHOP)
printf(translate('You are configuring your store for shop %s'), '<b>'.Context::getContext()->shop->name.'</b>');
echo '</div>';
}
if (Validate::isLoadedObject($adminObj))
{
if ($adminObj->checkToken())
{
if($ajaxMode)
{
// the differences with index.php is here
$adminObj->ajaxPreProcess();
$action = Tools::getValue('action');
// no need to use displayConf() here
if (!empty($action) AND method_exists($adminObj, 'ajaxProcess'.Tools::toCamelCase($action)) )
$adminObj->{'ajaxProcess'.Tools::toCamelCase($action)}();
else
$adminObj->ajaxProcess();
// @TODO We should use a displayAjaxError
$adminObj->displayErrors();
if (!empty($action) AND method_exists($adminObj, 'displayAjax'.Tools::toCamelCase($action)) )
$adminObj->{'displayAjax'.$action}();
else
$adminObj->displayAjax();
}
else
{
/* Filter memorization */
if (isset($_POST) AND !empty($_POST) AND isset($adminObj->table))
foreach ($_POST AS $key => $value)
if (is_array($adminObj->table))
{
foreach ($adminObj->table AS $table)
if (strncmp($key, $table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0)
$cookie->$key = !is_array($value) ? $value : serialize($value);
}
elseif (strncmp($key, $adminObj->table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0)
$cookie->$key = !is_array($value) ? $value : serialize($value);
if (isset($_GET) AND !empty($_GET) AND isset($adminObj->table))
foreach ($_GET AS $key => $value)
if (is_array($adminObj->table))
{
foreach ($adminObj->table AS $table)
if (strncmp($key, $table.'OrderBy', 7) === 0 OR strncmp($key, $table.'Orderway', 8) === 0)
$cookie->$key = $value;
}
elseif (strncmp($key, $adminObj->table.'OrderBy', 7) === 0 OR strncmp($key, $adminObj->table.'Orderway', 12) === 0)
$cookie->$key = $value;
$adminObj->displayConf();
$adminObj->postProcess();
$adminObj->displayErrors();
$adminObj->display();
include(_PS_ADMIN_DIR_.'/footer.inc.php');
}
}
else
{
if($ajaxMode)
{
// If this is an XSS attempt, then we should only display a simple, secure page
ob_clean();
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
if (false === strpos($url, '?token=') AND false === strpos($url, '&token='))
$url .= '&token='.$adminObj->token;
// we can display the correct url
// die(Tools::jsonEncode(array(translate('Invalid security token'),$url)));
die(Tools::jsonEncode(translate('Invalid security token')));
}
else
{
// If this is an XSS attempt, then we should only display a simple, secure page
ob_clean();
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
if (false === strpos($url, '?token=') AND false === strpos($url, '&token='))
$url .= '&token='.$adminObj->token;
$message = translate('Invalid security token');
echo '<html><head><title>'.$message.'</title></head><body style="font-family:Arial,Verdana,Helvetica,sans-serif;background-color:#EC8686">
<div style="background-color:#FAE2E3;border:1px solid #000000;color:#383838;font-weight:700;line-height:20px;margin:0 0 10px;padding:10px 15px;width:500px">
<img src="../img/admin/error2.png" style="margin:-4px 5px 0 0;vertical-align:middle">
'.$message.'
</div>';
echo '<a href="'.htmlentities($url).'" method="get" style="float:left;margin:10px">
<input type="button" value="'.Tools::htmlentitiesUTF8(translate('I understand the risks and I really want to display this page')).'" style="height:30px;margin-top:5px" />
</a>
<a href="index.php" method="get" style="float:left;margin:10px">
<input type="button" value="'.Tools::htmlentitiesUTF8(translate('Take me out of here!')).'" style="height:40px" />
</a>
</body></html>';
die;
}
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -25,7 +25,6 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('PS_ADMIN_DIR', getcwd());
include(PS_ADMIN_DIR.'/../get-file.php');
define('_PS_ADMIN_DIR_', getcwd());
require(dirname(dirname(__FILE__)).'/config/config.inc.php');
Controller::getController('GetFileController')->run();

View File

@@ -25,8 +25,8 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_ADMIN_DIR_', getcwd());
include_once(dirname(__FILE__).'/../config/config.inc.php');
$cookie = new Cookie('psAdmin');
$module = Tools::getValue('module');
$render = Tools::getValue('render');
@@ -41,7 +41,7 @@ $dir = Tools::getValue('dir', 0); // Should be a String : Either ASC or DESC
$id_employee = (int)(Tools::getValue('id_employee'));
$id_lang = (int)(Tools::getValue('id_lang'));
if ($cookie->id_employee != $id_employee)
if (Context::getContext()->employee->id != $id_employee)
die;
if (!Validate::isModuleName($module))

View File

@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -31,52 +31,205 @@ header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-ch
header('Pragma: no-cache');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
require_once(dirname(__FILE__).'/init.php');
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$iso.'" lang="'.$iso.'">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="NOFOLLOW, NOINDEX" />
<link type="text/css" rel="stylesheet" href="'._PS_JS_DIR_.'jquery/datepicker/datepicker.css" />
<link type="text/css" rel="stylesheet" href="'._PS_CSS_DIR_.'admin.css" />
<link type="text/css" rel="stylesheet" href="'._PS_CSS_DIR_.'jquery.cluetip.css" />
<link type="text/css" rel="stylesheet" href="themes/'.$employee->bo_theme.'/admin.css" />
<link type="text/css" rel="stylesheet" href="themes/'.Context::getContext()->employee->bo_theme.'/admin.css" />
<title>PrestaShop&trade; - '.translate('Administration panel').'</title>
<script type="text/javascript">
var helpboxes = '.Configuration::get('PS_HELPBOX').';
var roundMode = '.Configuration::get('PS_PRICE_ROUND_MODE').';
</script>
<script type="text/javascript" src="'._PS_JS_DIR_.'jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="'._PS_JS_DIR_.'jquery/jquery.hoverIntent.minified.js"></script>
<script type="text/javascript" src="'._PS_JS_DIR_.'jquery/jquery.cluetip.js"></script>
<script type="text/javascript" src="'._PS_JS_DIR_.'jquery/plugins/jquery.hoverIntent.js"></script>
<script type="text/javascript" src="'._PS_JS_DIR_.'jquery/plugins/cluetip/jquery.cluetip.js"></script>
<script type="text/javascript" src="'._PS_JS_DIR_.'admin.js"></script>
<script type="text/javascript" src="'._PS_JS_DIR_.'toggle.js"></script>
<script type="text/javascript" src="'._PS_JS_DIR_.'tools.js"></script>
<script type="text/javascript" src="'._PS_JS_DIR_.'ajax.js"></script>
<link rel="shortcut icon" href="'._PS_IMG_.'favicon.ico" />
'.Module::hookExec('backOfficeHeader').'
'.Hook::exec('backOfficeHeader').'
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="'._PS_CSS_DIR_.'admin-ie.css" />
<![endif]-->
<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 {
color:'.(Tools::getBrightness(empty($employee->bo_color) ? '#FFFFFF' : $employee->bo_color) < 128 ? 'white' : '#383838').'
color:'.(Tools::getBrightness(empty(Context::getContext()->employee->bo_color) ? '#FFFFFF' : Context::getContext()->employee->bo_color) < 128 ? 'white' : '#383838').'
}
</style>
<script type="text/javascript">
function getPush()
{
$.post("ajax.php",{"getNotifications" : "1"}, function(data) {
if (data)
{
json = jQuery.parseJSON(data);
// Add orders notifications to the list
html = "";
nb_notifs = 0;
$.each(json.order, function(property, value) {
html += "<li>'.translate('A new order has been made on your shop.').'<br />'.translate('Order number : ').'<strong>#" + parseInt(value.id_order) + "</strong><br />'.translate('Total : ').'<strong>" + value.total_paid_real + "</strong><br />'.translate('From : ').'<strong>" + value.customer_name + "</strong><br /><a href=\"index.php?controller=AdminOrders&token='.Tools::getAdminTokenLite('AdminOrders').'&vieworder&id_order=" + parseInt(value.id_order) + "\">'.translate('Click here to see that order').'</a></li>";
});
if (html != "")
{
$("#list_orders_notif").prev("p").hide();
$("#list_orders_notif").empty().append(html);
nb_notifs = $("#list_orders_notif li").length;
$("#orders_notif_value").text(nb_notifs);
$("#orders_notif_number_wrapper").show();
}
else
{
$("#orders_notif_number_wrapper").hide();
}
// Add customers notifications to the list
html = "";
nb_notifs = 0;
$.each(json.customer, function(property, value) {
html += "<li>'.translate('A new customer registered on your shop.').'<br />'.translate('Customer name : ').'<strong>" + value.customer_name + "</strong><br /><a href=\"index.php?controller=AdminCustomers&token='.Tools::getAdminTokenLite('AdminCustomers').'&viewcustomer&id_customer=" + parseInt(value.id_customer) + "\">'.translate('Click here to see that customer').'</a></li>";
});
if (html != "")
{
$("#list_customers_notif").prev("p").hide();
$("#list_customers_notif").empty().append(html);
nb_notifs = $("#list_customers_notif li").length;
$("#customers_notif_value").text(nb_notifs);
$("#customers_notif_number_wrapper").show();
}
else
{
$("#customers_notif_number_wrapper").hide();
}
// Add messages notifications to the list
html = "";
nb_notifs = 0;
$.each(json.message, function(property, value) {
html += "<li>'.translate('A new message posted on your shop.').'<br />'.translate('From : ').'<strong>" + value.customer_name + "</strong><br />'.translate('Excerpt : ').'<strong>" + value.message_customer + "</strong><br /><a href=\"index.php?controller=AdminOrders&token='.Tools::getAdminTokenLite('AdminOrders').'&vieworder&id_order=" + parseInt(value.id_order) + "\">'.translate('Click here to see that message').'</a></li>";
});
if (html != "")
{
$("#list_messages_notif").prev("p").hide();
$("#list_messages_notif").empty().append(html);
nb_notifs = $("#list_messages_notif li").length;
$("#messages_notif_value").text(nb_notifs);
$("#messages_notif_number_wrapper").show();
}
else
{
$("#messages_notif_number_wrapper").hide();
}
}
setTimeout("getPush()",60000);
});
}
$().ready(function()
{
var hints = $(\'.translatable span.hint\');
';
if (Shop::isFeatureActive())
{
if (Context::shop() == Shop::CONTEXT_ALL)
$youEditFieldFor = translate('A modification of this field will be applied for all shops');
else if (Context::shop() == Shop::CONTEXT_GROUP)
$youEditFieldFor = sprintf(translate('A modification of this field will be applied for all shops of group %s'), '<b>'.Context::getContext()->shop->getGroup()->name.'</b>');
else
$youEditFieldFor = sprintf(translate('A modification of this field will be applied for the shop %s'), '<b>'.Context::getContext()->shop->name.'</b>');
echo 'hints.html(hints.html()+\'<br /><span class="red">'.addslashes($youEditFieldFor).'</span>\');';
}
echo ' var html = "";
var nb_notifs = 0;
var wrapper_id = "";
var type = new Array();
$(".notifs").live("click", function(){
wrapper_id = $(this).attr("id");
type = wrapper_id.split("s_notif")
$.post("ajax.php",{"updateElementEmployee" : "1", "updateElementEmployeeType" : type[0]}, function(data) {
if(data)
{
if(!$("#" + wrapper_id + "_wrapper").is(":visible"))
{
$(".notifs_wrapper").hide();
$("#" + wrapper_id + "_number_wrapper").hide();
$("#" + wrapper_id + "_wrapper").show();
}else
{
$("#" + wrapper_id + "_wrapper").hide();
}
}
});
});
$("#main").click(function(){
$(".notifs_wrapper").hide();
});
getPush();
});
</script>
</head>
<body '.((!empty($employee->bo_color)) ? 'style="background:'.Tools::htmlentitiesUTF8($employee->bo_color).'"' : '').'>
<body '.((!empty(Context::getContext()->employee->bo_color)) ? 'style="background:'.Tools::htmlentitiesUTF8(Context::getContext()->employee->bo_color).'"' : '').'>
<div id="top_container">
<div id="container">
<div id="header_infos"><span>
<a id="header_shopname" href="index.php"><span>'.Configuration::get('PS_SHOP_NAME').'</span></a><br />
'.Tools::substr($employee->firstname, 0, 1).'.&nbsp;'.htmlentities($employee->lastname, ENT_COMPAT, 'UTF-8').'
[ <a href="index.php?logout" id="header_logout"><span>'.translate('logout').'</span></a> ]
- <a href="'.__PS_BASE_URI__.'" id="header_foaccess" target="_blank" title="'.translate('View my shop').'"><span>'.translate('View my shop').'</span></a>
- <a href="index.php?tab=AdminEmployees&id_employee='.(int)$cookie->id_employee.'&updateemployee&token='.Tools::getAdminTokenLite('AdminEmployees').'" style="font-size: 10px;"><img src="../img/admin/employee.gif" alt="" /> '.translate('My preferences').'</a>
</span></div>
<div id="header">
<div id="header_infos">
<a id="header_shopname" href="index.php"><span>'.Configuration::get('PS_SHOP_NAME').'</span></a><div id="notifs_icon_wrapper">';
if (Configuration::get('PS_SHOW_NEW_ORDERS') == 1)
{
echo '<div id="orders_notif" class="notifs"><span id="orders_notif_number_wrapper" class="number_wrapper"><span id="orders_notif_value">0</span></span>
<div id="orders_notif_wrapper" class="notifs_wrapper">
<h3>'.translate('Last orders').'</h3>
<p class="no_notifs">'.translate('No new orders has been made on your shop').'</p>
<ul id="list_orders_notif"></ul>
<p><a href="index.php?controller=AdminOrders&token='.Tools::getAdminTokenLite('AdminOrders').'">'.translate('Show all orders').'</a></p>
</div>
</div>';
}
if (Configuration::get('PS_SHOW_NEW_CUSTOMERS') == 1)
{
echo '<div id="customers_notif" class="notifs notifs_alternate"><span id="customers_notif_number_wrapper" class="number_wrapper"><span id="customers_notif_value">0</span></span>
<div id="customers_notif_wrapper" class="notifs_wrapper">
<h3>'.translate('Last customers').'</h3>
<p class="no_notifs">'.translate('No new customers registered on your shop').'</p>
<ul id="list_customers_notif"></ul>
<p><a href="index.php?controller=AdminCustomers&token='.Tools::getAdminTokenLite('AdminCustomers').'">'.translate('Show all customers').'</a></p>
</div>
</div>';
}
if (Configuration::get('PS_SHOW_NEW_MESSAGES') == 1)
{
echo '<div id="messages_notif" class="notifs"><span id="messages_notif_number_wrapper" class="number_wrapper"><span id="messages_notif_value">0</span></span>
<div id="messages_notif_wrapper" class="notifs_wrapper">
<h3>'.translate('Last messages').'</h3>
<p class="no_notifs">'.translate('No new messages posted on your shop').'</p>
<ul id="list_messages_notif"></ul>
<p><a href="index.php?controller=AdminMessages&token='.Tools::getAdminTokenLite('AdminMessages').'">'.translate('Show all messages').'</a></p>
</div>
</div>';
}
echo '</div><span id="employee_links">
<a href="index.php?controller=AdminEmployees&id_employee='.(int)Context::getContext()->employee->id.'&updateemployee&token='.Tools::getAdminTokenLite('AdminEmployees').'" class="employee" alt="">'.translate('My preferences').'</a>
<span class="separator"></span>
<span class="employee_name">
'.Tools::substr(Context::getContext()->employee->firstname, 0, 1).'.&nbsp;'.htmlentities(Context::getContext()->employee->lastname, ENT_COMPAT, 'UTF-8').'
</span><span class="separator"></span><a href="index.php?logout" id="header_logout"><span>'.translate('logout').'</span></a><span class="separator"></span>';
if (Context::getContext()->shop->getBaseURL())
echo '<a href="'.Context::getContext()->shop->getBaseURL().'" id="header_foaccess" target="_blank" title="'.translate('View my shop').'"><span>'.translate('View my shop').'</span></a>';
echo '</span>
<div id="header_search">
<form method="post" action="index.php?tab=AdminSearch&token='.Tools::getAdminTokenLite('AdminSearch').'">
<form method="post" action="index.php?controller=AdminSearch&token='.Tools::getAdminTokenLite('AdminSearch').'">
<input type="text" name="bo_query" id="bo_query"
value="'.Tools::safeOutput(Tools::stripslashes(Tools::getValue('bo_query'))).'"
/>
@@ -84,6 +237,7 @@ echo '
<option value="0">'.translate('everywhere').'</option>
<option value="1" '.(Tools::getValue('bo_search_type') == 1 ? 'selected="selected"' : '').'>'.translate('catalog').'</option>
<option value="2" '.(Tools::getValue('bo_search_type') == 2 ? 'selected="selected"' : '').'>'.translate('customers').'</option>
<option value="6" '.(Tools::getValue('bo_search_type') == 6 ? 'selected="selected"' : '').'>'.translate('ip address').'</option>
<option value="3" '.(Tools::getValue('bo_search_type') == 3 ? 'selected="selected"' : '').'>'.translate('orders').'</option>
<option value="4" '.(Tools::getValue('bo_search_type') == 4 ? 'selected="selected"' : '').'>'.translate('invoices').'</option>
<option value="5" '.(Tools::getValue('bo_search_type') == 5 ? 'selected="selected"' : '').'>'.translate('carts').'</option>
@@ -103,75 +257,80 @@ echo '
</script>
<select onchange="quickSelect(this);" id="quick_select">
<option value="0">'.translate('Quick Access').'</option>';
foreach (QuickAccess::getQuickAccesses((int)($cookie->id_lang)) AS $quick)
foreach (QuickAccess::getQuickAccesses(Context::getContext()->language->id) AS $quick)
{
preg_match('/tab=(.+)(&.+)?$/', $quick['link'], $adminTab);
preg_match('/controller=(.+)(&.+)?$/', $quick['link'], $adminTab);
if (isset($adminTab[1]))
{
if (strpos($adminTab[1], '&'))
$adminTab[1] = substr($adminTab[1], 0, strpos($adminTab[1], '&'));
$quick['link'] .= '&token='.Tools::getAdminToken($adminTab[1].(int)(Tab::getIdFromClassName($adminTab[1])).(int)($cookie->id_employee));
$quick['link'] .= '&token='.Tools::getAdminToken($adminTab[1].(int)(Tab::getIdFromClassName($adminTab[1])).(int)(Context::getContext()->employee->id));
}
echo '<option value="'.$quick['link'].($quick['new_window'] ? '_blank' : '').'">&gt; '.$quick['name'].'</option>';
}
echo ' </select>
</div>';
if (Tools::isMultiShopActivated())
echo '<div id="header_shoplist">'.Shop::generateHtmlList().'</div>';
if (Shop::isFeatureActive())
echo '<div id="header_shoplist">'.translate('Select your shop:').' '.generateShopList().'</div>';
echo '</div>';
echo Hook::exec('backOfficeTop');
echo '<ul id="menu">';
echo ' <div class="flatclear">&nbsp;</div>
'.Module::hookExec('backOfficeTop').'
<ul id="menu">';
if (empty($tab))
echo '<div class="mainsubtablist" style="display:none"></div>';
// This is made to display the subtab list
$id_current_tab = (int)Tab::getIdFromClassName($tab);
$id_parent_tab_current = (int)(Tab::getCurrentParentId());
$tabs = Tab::getTabs((int)$cookie->id_lang, 0);
$myCurrentTab = new Tab($id_current_tab);
$tabs = Tab::getTabs(Context::getContext()->language->id, 0);
$echoLis = '';
$mainsubtablist = '';
foreach ($tabs AS $t)
if (checkTabRights($t['id_tab']) === true)
{
$img = (Tools::file_exists_cache(_PS_ADMIN_DIR_.'/themes/'.$employee->bo_theme.'/img/t/'.$t['class_name'].'.gif') ? 'themes/'.$employee->bo_theme.'/img/' : _PS_IMG_).'t/'.$t['class_name'].'.gif';
$img = (Tools::file_exists_cache(_PS_ADMIN_DIR_.'/themes/'.Context::getContext()->employee->bo_theme.'/img/t/'.$t['class_name'].'.gif') ? 'themes/'.Context::getContext()->employee->bo_theme.'/img/' : _PS_IMG_).'t/'.$t['class_name'].'.gif';
if (trim($t['module']) != '')
$img = _MODULE_DIR_.$t['module'].'/'.$t['class_name'].'.gif';
$current = (($t['class_name'] == $tab) OR ($id_parent_tab_current == $t['id_tab']));
echo '<li class="submenu_size '.($current ? 'active' : '').'" id="maintab'.$t['id_tab'].'">
<a href="index.php?tab='.$t['class_name'].'&token='.Tools::getAdminToken($t['class_name'].(int)($t['id_tab']).(int)($cookie->id_employee)).'">
$current = ((strtolower($t['class_name']) == $tab) OR ($myCurrentTab->id_parent == $t['id_tab']));
echo '<li class="submenu_size '.($current ? 'active' : '').' maintab" id="maintab'.$t['id_tab'].'">
<span class="title">
<img src="'.$img.'" alt="" /> '.$t['name'].'
</a>
</li>';
$echoLi = '';
$subTabs = Tab::getTabs((int)$cookie->id_lang, (int)$t['id_tab']);
</span>
<ul class="submenu">';
$subTabs = Tab::getTabs(Context::getContext()->language->id, (int)$t['id_tab']);
// @todo need a better way than using noTabLink property, keeping the fact to avoid db modification
if (!in_array($t['class_name'], $noTabLink))
array_unshift($subTabs, $t);
foreach ($subTabs AS $t2)
if (checkTabRights($t2['id_tab']) === true)
$echoLi .= '<li><a href="index.php?tab='.$t2['class_name'].'&token='.Tools::getAdminTokenLite($t2['class_name']).'">'.$t2['name'].'</a></li>';
echo '<li><a href="index.php?controller='.$t2['class_name'].'&token='.Tools::getAdminTokenLite($t2['class_name']).'">'.$t2['name'].'</a></li>';
echo '</ul></li>';
$echoLi = '';
foreach ($subTabs AS $t2)
if (checkTabRights($t2['id_tab']) === true)
$echoLi .= '<li class="subitem"><a href="index.php?controller='.$t2['class_name'].'&token='.Tools::getAdminTokenLite($t2['class_name']).'">'.$t2['name'].'</a></li>';
if ($current)
$mainsubtablist = $echoLi;
$echoLis .= '<div id="tab'.(int)($t['id_tab']).'_subtabs" style="display:none">'.$echoLi.'</div>';
}
echo ' </ul>'.$echoLis;
if ($employee->bo_uimode == 'hover')
echo ' <script type="text/javascript">
$("#menu li").hoverIntent({over:hoverTabs,timeout:100,out:outTabs});
function outTabs(){}
function hoverTabs() {
var content = $("#tab"+parseInt(this.id.substr(7, 3))+"_subtabs").html();
$("#submenu").html(content);
if (content.length == 0)
$("#submenu").removeClass("withLeftBorder");
else
$("#submenu").addClass("withLeftBorder");
$("#menu li").removeClass("active");
$(this).addClass("active");
}
</script>';
echo ' <ul id="submenu" '.(strlen($mainsubtablist) ? 'class="withLeftBorder"' : '').'>'.$mainsubtablist.'</ul>
<div id="main">
echo '
</div>
<div id="main">
<div id="content">'
.(file_exists(PS_ADMIN_DIR.'/../install') ? '<div style="background-color: #FFEBCC;border: 1px solid #F90;line-height: 20px;margin: 0px 0px 10px;padding: 10px 20px;">'
.(file_exists(_PS_ADMIN_DIR_.'/../install') ? '<div style="background-color: #FFEBCC;border: 1px solid #F90;line-height: 20px;margin: 0px 0px 10px;padding: 10px 20px;">'
.translate('For security reasons, you must also:').' '.
translate('deleted the /install folder').
translate('delete the /install folder').
'</div>' : '').'
';
if(defined('_PS_MODE_DEV_') && _PS_MODE_DEV_)
echo '<div class="warn">This tab is an AdminTab</div>';

View File

@@ -26,135 +26,19 @@
*/
define('_PS_ADMIN_DIR_', getcwd());
define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility
require(dirname(__FILE__).'/../config/config.inc.php');
require(dirname(__FILE__).'/functions.php');
include(PS_ADMIN_DIR.'/../config/config.inc.php');
include(PS_ADMIN_DIR.'/functions.php');
include(PS_ADMIN_DIR.'/header.inc.php');
if (empty($tab) and !sizeof($_POST))
{
$tab = 'AdminHome';
$_POST['tab'] = 'AdminHome';
$_POST['token'] = Tools::getAdminTokenLite($tab);
}
if ($id_tab = checkingTab($tab))
{
$isoUser = Language::getIsoById(intval($cookie->id_lang));
$tabs = array();
recursiveTab($id_tab);
$tabs = array_reverse($tabs);
$bread = '';
foreach ($tabs AS $key => $item)
$bread .= ' <img src="../img/admin/separator_breadcrum.png" style="margin-right:5px" />
'.((sizeof($tabs) - 1 > $key)
? '<a href="?tab='.$item['class_name'].'&token='.Tools::getAdminToken($item['class_name'].intval($item['id_tab']).intval($cookie->id_employee)).'">'
: '').'
'.$item['name'].((sizeof($tabs) - 1 > $key) ? '</a>' : '');
echo'<script type="text/javascript">
$(function() {
$.ajax({
type: \'POST\',
url: \'ajax.php\',
data: \'helpAccess=1&item='.$item['class_name'].'&isoUser='.$isoUser.'&country='.Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT')).'&version='._PS_VERSION_.'\',
async : true,
success: function(msg) {
$("#help-button").html(msg);
$("#help-button").fadeIn("slow");
}
});
});</script>';
echo '<div class="path_bar">
<div id="help-button" class="floatr" style="display: none; font-family: Verdana; font-size: 10px; margin-right: 4px; margin-top: 4px;">
</div>
<a href="?token='.Tools::getAdminToken($tab.intval(Tab::getIdFromClassName($tab)).intval($cookie->id_employee)).'">'.translate('Back Office').'</a>
'.$bread;
if (Tools::isMultiShopActivated())
{
echo '
<span style="float:right">'.translate('You are currently view/configure your store for').' <b>';
if (Shop::getContextType() == Shop::CONTEXT_ALL)
echo 'all shops';
elseif (Shop::getContextType() == Shop::CONTEXT_GROUP)
{
$group_shop = new GroupShop((int)Shop::getCurrentGroupShop());
echo 'all shops of group shop <b>'.$group_shop->name.'</b>';
}
elseif (Shop::getContextType() == Shop::CONTEXT_SHOP)
{
$shop = new Shop((int)Shop::getCurrentShop());
echo 'shop <b>'.$shop->name.'</b>';
}
echo '</b>
</span>&nbsp;';
}
echo '
</div>';
if (Validate::isLoadedObject($adminObj))
{
if ($adminObj->checkToken())
{
/* Filter memorization */
if (isset($_POST) AND !empty($_POST) AND isset($adminObj->table))
foreach ($_POST AS $key => $value)
if (is_array($adminObj->table))
{
foreach ($adminObj->table AS $table)
if (strncmp($key, $table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0)
$cookie->$key = !is_array($value) ? $value : serialize($value);
}
elseif (strncmp($key, $adminObj->table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0)
$cookie->$key = !is_array($value) ? $value : serialize($value);
if (isset($_GET) AND !empty($_GET) AND isset($adminObj->table))
foreach ($_GET AS $key => $value)
if (is_array($adminObj->table))
{
foreach ($adminObj->table AS $table)
if (strncmp($key, $table.'OrderBy', 7) === 0 OR strncmp($key, $table.'Orderway', 8) === 0)
$cookie->$key = $value;
}
elseif (strncmp($key, $adminObj->table.'OrderBy', 7) === 0 OR strncmp($key, $adminObj->table.'Orderway', 12) === 0)
$cookie->$key = $value;
$adminObj->displayConf();
$adminObj->postProcess();
$adminObj->displayErrors();
$adminObj->display();
}
else
{
// If this is an XSS attempt, then we should only display a simple, secure page
ob_clean();
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
if (false === strpos($url, '?token=') AND false === strpos($url, '&token='))
$url .= '&token='.$adminObj->token;
$message = translate('Invalid security token');
echo '<html><head><title>'.$message.'</title></head><body style="font-family:Arial,Verdana,Helvetica,sans-serif;background-color:#EC8686">
<div style="background-color:#FAE2E3;border:1px solid #000000;color:#383838;font-weight:700;line-height:20px;margin:0 0 10px;padding:10px 15px;width:500px">
<img src="../img/admin/error2.png" style="margin:-4px 5px 0 0;vertical-align:middle">
'.$message.'
</div>';
echo '<a href="'.htmlentities($url).'" method="get" style="float:left;margin:10px">
<input type="button" value="'.Tools::htmlentitiesUTF8(translate('I understand the risks and I really want to display this page')).'" style="height:30px;margin-top:5px" />
</a>
<a href="index.php" method="get" style="float:left;margin:10px">
<input type="button" value="'.Tools::htmlentitiesUTF8(translate('Take me out of here!')).'" style="height:40px" />
</a>
</body></html>';
die;
}
}
}
include(PS_ADMIN_DIR.'/footer.inc.php');
// For retrocompatibility with "tab" parameter
if (!isset($_GET['controller']) && isset($_GET['tab']))
$_GET['controller'] = strtolower($_GET['tab']);
if (!isset($_POST['controller']) && isset($_POST['tab']))
$_POST['controller'] = strtolower($_POST['tab']);
if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab']))
$_REQUEST['controller'] = strtolower($_REQUEST['tab']);
// Prepare and trigger admin dispatcher
Dispatcher::getInstance()->setDefaultController('AdminHome');
Dispatcher::getInstance()->setControllerNotFound('AdminNotFound');
Dispatcher::getInstance()->setControllerDirectories(array(_PS_ADMIN_DIR_.'/tabs/', _PS_ADMIN_CONTROLLER_DIR_));
Dispatcher::getInstance()->dispatch();

View File

@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -28,66 +28,72 @@
ob_start();
$timerStart = microtime(true);
$currentFileName = array_reverse(explode("/", $_SERVER['SCRIPT_NAME']));
$cookie = new Cookie('psAdmin', substr($_SERVER['SCRIPT_NAME'], strlen(__PS_BASE_URI__), -strlen($currentFileName['0'])));
// $_GET['tab'] = $_GET['controller'];
// $_POST['tab'] = $_POST['controller'];
// $_REQUEST['tab'] = $_REQUEST['controller'];
$context = Context::getContext();
if (isset($_GET['logout']))
$cookie->logout();
$context->employee->logout();
if (!$cookie->isLoggedBack())
if (!isset($context->employee) || !$context->employee->isLoggedBack())
Tools::redirectAdmin('index.php?controller=AdminLogin&redirect='.$_SERVER['REQUEST_URI']);
// Set current index
$currentIndex = $_SERVER['SCRIPT_NAME'].(($controller = Tools::getValue('controller')) ? '?controller='.$controller: '');
if ($back = Tools::getValue('back'))
$currentIndex .= '&back='.urlencode($back);
AdminTab::$currentIndex = $currentIndex;
$iso = $context->language->iso_code;
include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php');
include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php');
include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
/* Server Params */
$protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
$protocol_content = (isset($useSSL) AND $useSSL AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
$link = new Link($protocol_link, $protocol_content);
$context->link = $link;
define('_PS_BASE_URL_', Tools::getShopDomain(true));
define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true));
$path = dirname(__FILE__).'/themes/';
if (empty($context->employee->bo_theme) OR !file_exists($path.$context->employee->bo_theme.'/admin.css'))
{
$destination = substr($_SERVER['REQUEST_URI'], strlen(dirname($_SERVER['SCRIPT_NAME'])) + 1);
Tools::redirectAdmin('login.php'.(empty($destination) || ($destination == 'index.php?logout') ? '' : '?redirect='.$destination));
if (file_exists($path.'oldschool/admin.css'))
$context->employee->bo_theme = 'oldschool';
elseif (file_exists($path.'origins/admin.css'))
$context->employee->bo_theme = 'origins';
else
foreach (scandir($path) as $theme)
if ($theme[0] != '.' AND file_exists($path.$theme.'/admin.css'))
{
$employee->bo_theme = $theme;
break;
}
$context->employee->update();
}
else
// Change shop context ?
if (Shop::isFeatureActive() && Tools::getValue('setShopContext') !== false)
{
$link = new Link();
$currentIndex = $_SERVER['SCRIPT_NAME'].(($tab = Tools::getValue('tab')) ? '?tab='.$tab : '');
if ($back = Tools::getValue('back'))
$currentIndex .= '&back='.urlencode($back);
/* Server Params */
$protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
$protocol_content = (isset($useSSL) AND $useSSL AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
define('_PS_BASE_URL_', Tools::getShopDomain(true));
define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true));
$employee = new Employee((int)$cookie->id_employee);
$cookie->id_lang = (int)$employee->id_lang;
$iso = strtolower(Language::getIsoById($cookie->id_lang ? $cookie->id_lang : Configuration::get('PS_LANG_DEFAULT')));
include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php');
include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php');
include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
/* attribute id_lang is often needed, so we create a constant for performance reasons */
define('_USER_ID_LANG_', (int)$cookie->id_lang);
$path = dirname(__FILE__).'/themes/';
if (empty($employee->bo_theme) OR !file_exists($path.$employee->bo_theme.'/admin.css'))
{
if (file_exists($path.'oldschool/admin.css'))
$employee->bo_theme = 'oldschool';
elseif (file_exists($path.'origins/admin.css'))
$employee->bo_theme = 'origins';
else
foreach (scandir($path) as $theme)
if ($theme[0] != '.' AND file_exists($path.$theme.'/admin.css'))
{
$employee->bo_theme = $theme;
break;
}
$employee->update();
}
// Change shop context ?
if (Tools::isMultiShopActivated() && Tools::getValue('setShopContext') !== false)
{
$cookie->shopContext = Tools::getValue('setShopContext');
$url = parse_url($_SERVER['REQUEST_URI']);
$query = (isset($url['query'])) ? $url['query'] : '';
parse_str($query, $parseQuery);
unset($parseQuery['setShopContext']);
Tools::redirectAdmin($url['path'] . '?' . http_build_query($parseQuery));
}
$context->cookie->shopContext = Tools::getValue('setShopContext');
$url = parse_url($_SERVER['REQUEST_URI']);
$query = (isset($url['query'])) ? $url['query'] : '';
parse_str($query, $parseQuery);
unset($parseQuery['setShopContext']);
Tools::redirectAdmin($url['path'] . '?' . http_build_query($parseQuery));
}
$context->currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
$shopID = '';
if ($context->cookie->shopContext)
{
$split = explode('-', $context->cookie->shopContext);
if (count($split) == 2 && $split[0] == 's')
$shopID = (int)$split[1];
}
$context->shop = new Shop($shopID);

View File

@@ -24,164 +24,5 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
ob_start();
define('PS_ADMIN_DIR', getcwd());
include(PS_ADMIN_DIR.'/../config/config.inc.php');
include(PS_ADMIN_DIR.'/functions.php');
$clientIsMaintenanceOrLocal = in_array(Tools::getRemoteAddr(), array_merge(array('127.0.0.1'),explode(',', Configuration::get('PS_MAINTENANCE_IP'))));
$errors = array();
if ((empty($_SERVER['HTTPS']) OR strtolower($_SERVER['HTTPS']) == 'off')
AND Configuration::get('PS_SSL_ENABLED'))
{
// You can uncomment theses lines if you want to force https even from localhost and automatically redirect
// header('HTTP/1.1 301 Moved Permanently');
// header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']);
// exit();
// If ssl is enabled, https protocol is required. Exception for maintenance and local (127.0.0.1) IP
if ($clientIsMaintenanceOrLocal)
$errors[] = translate('SSL is activated. However, your IP is allowed to use unsecure mode (Maintenance or local IP).').'<br/>';
else
$warningSslMessage = translate('SSL is activated. Please connect using the following url to log in in secure mode (https).')
.'<br/><br/><a href="https://'.Tools::getServerName().$_SERVER['REQUEST_URI'].'">https://'.Tools::getServerName().$_SERVER['REQUEST_URI'].'</a>';
}
$cookie = new Cookie('psAdmin', substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__), -10));
if (!isset($cookie->id_lang))
$cookie->id_lang = Configuration::get('PS_LANG_DEFAULT');
$iso = strtolower(Language::getIsoById((int)($cookie->id_lang)));
include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php');
/* Cookie creation and redirection */
if (Tools::isSubmit('Submit'))
{
/* Check fields validity */
$passwd = trim(Tools::getValue('passwd'));
$email = trim(Tools::getValue('email'));
if (empty($email))
$errors[] = Tools::displayError('E-mail is empty');
elseif (!Validate::isEmail($email))
$errors[] = Tools::displayError('Invalid e-mail address');
elseif (empty($passwd))
$errors[] = Tools::displayError('Password is blank');
elseif (!Validate::isPasswd($passwd))
$errors[] = Tools::displayError('Invalid password');
else
{
/* Seeking for employee */
$employee = new Employee();
$employee = $employee->getByemail($email, $passwd);
if (!$employee)
{
$errors[] = Tools::displayError('Employee does not exist or password is incorrect.');
$cookie->logout();
}
else
{
/* Creating cookie */
$cookie->id_employee = $employee->id;
$cookie->email = $employee->email;
$cookie->profile = $employee->id_profile;
$cookie->passwd = $employee->passwd;
$cookie->remote_addr = ip2long(Tools::getRemoteAddr());
$cookie->write();
/* Redirect to admin panel */
if (isset($_GET['redirect']))
$url = strval($_GET['redirect'].(isset($_GET['token']) ? ('&token='.$_GET['token']) : ''));
else
$url = 'index.php';
if (!Validate::isCleanHtml($url))
die(Tools::displayError());
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$iso.'" lang="'.$iso.'">
<meta http-equiv="Refresh" content="0;URL='.Tools::safeOutput($url, true).'">
<head>
<script language="javascript" type="text/javascript">
window.location.replace("'.Tools::safeOutput($url, true).'");
</script>
<div style="text-align:center; margin-top:250px;"><a href="'.Tools::safeOutput($url, true).'">'.translate('Click here to launch Administration panel').'</a></div>
</head>
</html>';
exit ;
}
}
}
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$iso.'" lang="'.$iso.'">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="../css/login.css" />
<title>PrestaShop&trade; - '.translate('Administration panel').'</title>';
echo '
</head>
<body>
<div id="container">';
if ($nbErrors = sizeof($errors))
{
echo '
<div id="error">
<h3>'.($nbErrors > 1 ? translate('There are') : translate('There is')).' '.$nbErrors.' '.($nbErrors > 1 ? translate('errors') : translate('error')).'</h3>
<ol style="margin: 0 0 0 20px;">';
foreach ($errors AS $error)
echo '<li>'.$error.'</li>';
echo '
</ol>
</div>
<br />';
}
echo '
<div id="login">
<h1>'.Tools::htmlentitiesUTF8(Configuration::get('PS_SHOP_NAME')).'</h1>
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">';
$randomNb = rand(100, 999);
if(file_exists(PS_ADMIN_DIR.'/../install') OR file_exists(PS_ADMIN_DIR.'/../admin'))
{
echo ' <span>'.translate('For security reasons, you cannot connect to the Back Office until after you have:').'<br /><br />
- '.translate('deleted the /install folder').'<br />
- '.translate('renamed the /admin folder (eg. ').'/admin'.$randomNb.')<br />
<br />'.translate('Please then access this page by the new url (eg. http://www.domain.tld/admin').$randomNb.')</span>';
}
else
{
// If https enabled, we force it except if you try to log in from maintenance or local ip
if ( (empty($_SERVER['HTTPS']) OR strtolower($_SERVER['HTTPS']) == 'off')
AND ( Configuration::get('PS_SSL_ENABLED') AND !$clientIsMaintenanceOrLocal)
)
echo '<div class="error">'.$warningSslMessage.'</div>';
else
echo '<label for="email">'.translate('E-mail address:').'</label><br />
<input type="text" id="email" name="email" value="'.Tools::safeOutput(Tools::getValue('email')).'" class="input"/>
<div style="margin: 1.8em 0 0 0;">
<label for="passwd">'.translate('Password:').'</label><br />
<input id="passwd" type="password" name="passwd" class="input" value=""/>
</div>
<div>
<div id="submit"><input type="submit" name="Submit" value="'.translate('Log in').'" class="button" /></div>
<div id="lost"><a href="password.php">'.translate('Lost password?').'</a></div>
</div>
';
}
?>
<script type="text/javascript">
//<![CDATA[
if (document.getElementById('email')) document.getElementById('email').focus();
//]]>
</script>
<?php
echo '
</form>
</div>
<h2><a href="http://www.prestashop.com">&copy; Copyright by PrestaShop. all rights reserved.</a></h2>
</div>
</body>
</html>';
header('Location: index.php?controller=AdminLogin');

View File

@@ -24,93 +24,4 @@
* @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(PS_ADMIN_DIR.'/../config/config.inc.php');
include(PS_ADMIN_DIR.'/functions.php');
$cookie = new Cookie('psAdmin', substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__), -10));
$errors = array();
$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');
$iso = strtolower(Language::getIsoById((int)$id_lang));
include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
if (isset($_POST['Submit']))
{
$errors = array();
if (empty($_POST['email']))
$errors[] = Tools::displayError('E-mail is empty');
elseif (!Validate::isEmail($_POST['email']))
$errors[] = Tools::displayError('Invalid e-mail address');
else
{
$employee = new Employee();
if (!$employee->getByemail($_POST['email']) OR !$employee)
$errors[] = Tools::displayError('This account does not exist');
else
{
if ((strtotime($employee->last_passwd_gen.'+'.Configuration::get('PS_PASSWD_TIME_BACK').' minutes') - time()) > 0 )
$errors[] = Tools::displayError('You can regenerate your password only every').' '.Configuration::get('PS_PASSWD_TIME_BACK').' '.Tools::displayError('minute(s)');
else
{
$pwd = Tools::passwdGen();
$employee->passwd = md5(pSQL(_COOKIE_KEY_.$pwd));
$employee->last_passwd_gen = date('Y-m-d H:i:s', time());
$result = $employee->update();
if (!$result)
$errors[] = Tools::displayError('An error occurred during your password change.');
else
{
Mail::Send((int)$id_lang, 'password', Mail::l('Your new admin password'), array('{email}' => $employee->email, '{lastname}' => $employee->lastname, '{firstname}' => $employee->firstname, '{passwd}' => $pwd), $employee->email, $employee->firstname.' '.$employee->lastname);
$confirmation = 'ok';
}
}
}
}
}
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$iso.'" lang="'.$iso.'">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="../css/login.css" />
<title>PrestaShop&trade; - '.translate('Administration panel').'</title>
</head>
<body><div id="container">';
if (sizeof($errors))
{
echo '<div id="error">
<h3>'.translate('There is 1 error').'</h3>
<ol>';
foreach ($errors AS $error)
echo '<li>'.$error.'</li>';
echo '</ol>
</div>';
}
echo '
<div id="login">
<h1>'.Configuration::get('PS_SHOP_NAME').'</h1>
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">
<div class="page-title center">'.translate('Forgot your password?').'</div><br />';
if (isset($confirmation))
echo ' <br />
<div style="font-weight: bold;">'.translate('Your password has been e-mailed to you').'.</div>
<div style="margin: 2em 0 0 0; text-align: right;"><a href="login.php?email='.Tools::safeOutput(Tools::getValue('email')).'">> '.translate('back to login home').'</a></div>';
else
echo ' <span style="font-weight: bold;">'.translate('Please, enter your e-mail address').' </span>
'.translate('(the one you wrote during your registration) in order to receive your access codes by e-mail').'.<br />
<input type="text" name="email" class="input" />
<div>
<div id="submit"><input type="submit" name="Submit" value="'.translate('Send').'" class="button" /></div>
<div id="lost">&nbsp;</div>
</div>
</form>
</div>
<h2><a href="http://www.prestashop.com">&copy; Copyright by PrestaShop. all rights reserved.</a></h2>
</div></body></html>';
header('Location: index.php?controller=AdminLogin');

View File

@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -25,15 +25,13 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('PS_ADMIN_DIR', getcwd());
define('_PS_ADMIN_DIR_', getcwd());
include(PS_ADMIN_DIR.'/../config/config.inc.php');
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
if (!Context::getContext()->employee->id)
Tools::redirectAdmin('index.php?controller=AdminLogin');
/* Header can't be included, so cookie must be created here */
$cookie = new Cookie('psAdmin');
if (!$cookie->id_employee)
Tools::redirectAdmin('login.php');
$functionArray = array(
'pdf' => 'generateInvoicePDF',
'id_order_slip' => 'generateOrderSlipPDF',
@@ -41,7 +39,8 @@ $functionArray = array(
'invoices' => 'generateInvoicesPDF',
'invoices2' => 'generateInvoicesPDF2',
'slips' => 'generateOrderSlipsPDF',
'deliveryslips' => 'generateDeliverySlipsPDF'
'deliveryslips' => 'generateDeliverySlipsPDF',
'id_supply_order' => 'generateSupplyOrderFormPDF'
);
foreach ($functionArray as $var => $function)
@@ -51,14 +50,47 @@ foreach ($functionArray as $var => $function)
die;
}
function generateSupplyOrderFormPDF()
{
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'));
generatePDF($supply_order, PDF::TEMPLATE_SUPPLY_ORDER_FORM);
}
function generateInvoicePDF()
{
if (!isset($_GET['id_order']))
die (Tools::displayError('Missing order ID'));
$order = new Order((int)($_GET['id_order']));
if (Tools::isSubmit('id_order'))
generateInvoicePDFByIdOrder(Tools::getValue('id_order'));
elseif (Tools::isSubmit('id_order_invoice'))
generateInvoicePDFByIdOrderInvoice(Tools::getValue('id_order_invoice'));
else
die (Tools::displayError('Missing order ID or invoice order ID'));
exit;
}
function generateInvoicePDFByIdOrder($id_order)
{
$order = new Order($id_order);
if (!Validate::isLoadedObject($order))
die(Tools::displayError('Cannot find order in database'));
PDF::invoice($order);
generatePDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE);
}
function generateInvoicePDFByIdOrderInvoice($id_order_invoice)
{
$order_invoice = new OrderInvoice($id_order_invoice);
if (!Validate::isLoadedObject($order_invoice))
die(Tools::displayError('Cannot find order invoice in database'));
generatePDF($order_invoice, PDF::TEMPLATE_INVOICE);
}
function generateOrderSlipPDF()
@@ -69,7 +101,8 @@ function generateOrderSlipPDF()
die(Tools::displayError('Cannot find order in database'));
$order->products = OrderSlip::getOrdersSlipProducts($orderSlip->id, $order);
$tmp = NULL;
PDF::invoice($order, 'D', false, $tmp, $orderSlip);
generatePDF($orderSlip, PDF::TEMPLATE_ORDER_SLIP);
}
function generateDeliverySlipPDF()
@@ -77,38 +110,62 @@ function generateDeliverySlipPDF()
$order = Order::getByDelivery((int)($_GET['id_delivery']));
if (!Validate::isLoadedObject($order))
die(Tools::displayError('Cannot find order in database'));
$tmp = NULL;
PDF::invoice($order, 'D', false, $tmp, false, $order->delivery_number);
generatePDF($order, PDF::TEMPLATE_DELIVERY_SLIP);
}
function generateInvoicesPDF()
{
$orders = Order::getOrdersIdInvoiceByDate($_GET['date_from'], $_GET['date_to'], NULL, 'invoice');
if (!is_array($orders))
$id_orders_list = Order::getOrdersIdInvoiceByDate($_GET['date_from'], $_GET['date_to'], NULL, 'invoice');
if (!is_array($id_orders_list))
die (Tools::displayError('No invoices found'));
PDF::multipleInvoices($orders);
$orders = array();
foreach ($id_orders_list as $id_order)
$orders[] = new Order((int)$id_order);
generatePDF($orders, PDF::TEMPLATE_INVOICE);
}
function generateInvoicesPDF2()
{
$allOrders = array();
$id_orders_list = array();
foreach (explode('-', Tools::getValue('id_order_state')) as $id_order_state)
if (is_array($orders = Order::getOrderIdsByStatus((int)$id_order_state)))
$allOrders = array_merge($allOrders, $orders);
PDF::multipleInvoices($allOrders);
if (is_array($id_orders = Order::getOrderIdsByStatus((int)$id_order_state)))
$id_orders_list = array_merge($id_orders_list, $id_orders);
$orders = array();
foreach ($id_orders_list as $id_order)
$orders[] = new Order((int)$id_order);
generatePDF($orders, PDF::TEMPLATE_INVOICE);
}
function generateOrderSlipsPDF()
{
$orderSlips = OrderSlip::getSlipsIdByDate($_GET['date_from'], $_GET['date_to']);
if (!count($orderSlips))
$id_order_slips_list = OrderSlip::getSlipsIdByDate($_GET['date_from'], $_GET['date_to']);
if (!count($id_order_slips_list))
die (Tools::displayError('No order slips found'));
PDF::multipleOrderSlips($orderSlips);
$order_slips = array();
foreach ($id_order_slips_list as $id_order_slips)
$order_slips[] = new OrderSlip((int)$id_order_slips);
generatePDF($order_slips, PDF::TEMPLATE_ORDER_SLIP);
}
function generateDeliverySlipsPDF()
{
$slips = unserialize(urldecode($_GET['deliveryslips']));
if (is_array($slips))
PDF::multipleDelivery($slips);
generatePDF($slips, PDF::TEMPLATE_DELIVERY_SLIP);
}
function generatePDF($object, $template)
{
global $smarty;
$pdf = new PDF($object, $template, $smarty);
$pdf->render();
}

View File

@@ -32,5 +32,6 @@ if (substr(_COOKIE_KEY_, 34, 8) != Tools::getValue('token'))
ini_set('max_execution_time', 7200);
Search::indexation(Tools::getValue('full'));
if (Tools::getValue('redirect'))
Tools::redirectAdmin($_SERVER['HTTP_REFERER'].'&conf=4');

View File

@@ -1,138 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminAccess extends AdminTab
{
public function postProcess()
{
if (Tools::isSubmit('submitAddaccess') AND $action = Tools::getValue('action') AND $id_tab = (int)(Tools::getValue('id_tab')) AND $id_profile = (int)(Tools::getValue('id_profile')) AND $this->tabAccess['edit'] == 1)
{
if ($id_tab == -1 AND $action == 'all' AND (int)(Tools::getValue('perm')) == 0)
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'access` SET `view` = '.(int)(Tools::getValue('perm')).', `add` = '.(int)(Tools::getValue('perm')).', `edit` = '.(int)(Tools::getValue('perm')).', `delete` = '.(int)(Tools::getValue('perm')).' WHERE `id_profile` = '.(int)($id_profile).' AND `id_tab` != 31');
elseif ($id_tab == -1 AND $action == 'all')
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'access` SET `view` = '.(int)(Tools::getValue('perm')).', `add` = '.(int)(Tools::getValue('perm')).', `edit` = '.(int)(Tools::getValue('perm')).', `delete` = '.(int)(Tools::getValue('perm')).' WHERE `id_profile` = '.(int)($id_profile));
elseif ($id_tab == -1)
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'access` SET `'.pSQL($action).'` = '.(int)(Tools::getValue('perm')).' WHERE `id_profile` = '.(int)($id_profile));
elseif ($action == 'all')
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'access` SET `view` = '.(int)(Tools::getValue('perm')).', `add` = '.(int)(Tools::getValue('perm')).', `edit` = '.(int)(Tools::getValue('perm')).', `delete` = '.(int)(Tools::getValue('perm')).' WHERE `id_tab` = '.(int)($id_tab).' AND `id_profile` = '.(int)($id_profile));
else
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'access` SET `'.pSQL($action).'` = '.(int)(Tools::getValue('perm')).' WHERE `id_tab` = '.(int)($id_tab).' AND `id_profile` = '.(int)($id_profile));
}
}
public function display()
{
$this->displayForm();
}
/**
* Get the current profile id
*
* @return the $_GET['profile'] if valid, else 1 (the first profile id)
*/
function getCurrentProfileId()
{
return (isset($_GET['profile']) AND !empty($_GET['profile']) AND is_numeric($_GET['profile'])) ? (int)($_GET['profile']) : 1;
}
public function displayForm($isMainTab = true)
{
global $cookie, $currentIndex;
parent::displayForm();
$currentProfile = (int)($this->getCurrentProfileId());
$tabs = Tab::getTabs($cookie->id_lang);
$profiles = Profile::getProfiles((int)($cookie->id_lang));
$accesses = Profile::getProfileAccesses((int)($currentProfile));
echo '
<script type="text/javascript">
setLang(Array(\''.$this->l('Profile updated').'\', \''.$this->l('Request failed!').'\', \''.$this->l('Update in progress. Please wait.').'\', \''.$this->l('Server connection failed!').'\'));
</script>
<div id="ajax_confirmation"></div>
<table class="table" cellspacing="0">
<tr>
<th '.($currentProfile == (int)_PS_ADMIN_PROFILE_ ? 'colspan="6"' : '').'>
<select name="profile" onchange="redirect(\''.Tools::getHttpHost(true, true).$currentIndex.'&token='.$this->token.'&profile=\'+this.options[this.selectedIndex].value)">';
if ($profiles)
foreach ($profiles AS $profile)
echo '<option value="'.(int)$profile['id_profile'].'" '.((int)$profile['id_profile'] == $currentProfile ? 'selected="selected"' : '').'>'.$profile['name'].'</option>';
$tabsize = sizeof($tabs);
foreach ($tabs AS $tab)
if ($tab['id_tab'] > $tabsize)
$tabsize = $tab['id_tab'];
echo '
</select>
</th>';
if ($currentProfile != (int)(_PS_ADMIN_PROFILE_))
echo '
<th class="center">'.$this->l('View').'<br /><input type="checkbox" name="1" id="viewall" onclick="ajax_power(this, \'view\', -1, '.$currentProfile.', \''.$this->token.'\', \''.$tabsize.'\', \''.sizeof($tabs).'\')" /></th>
<th class="center">'.$this->l('Add').'<br /><input type="checkbox" name="1" id="addall" onclick="ajax_power(this, \'add\', -1, '.$currentProfile.', \''.$this->token.'\', \''.$tabsize.'\', \''.sizeof($tabs).'\')" /></th>
<th class="center">'.$this->l('Edit').'<br /><input type="checkbox" name="1" id="editall" onclick="ajax_power(this, \'edit\', -1, '.$currentProfile.', \''.$this->token.'\', \''.$tabsize.'\', \''.sizeof($tabs).'\')" /></th>
<th class="center">'.$this->l('Delete').'<br /><input type="checkbox" name="1" id="deleteall" onclick="ajax_power(this, \'delete\', -1, '.$currentProfile.', \''.$this->token.'\', \''.$tabsize.'\', \''.sizeof($tabs).'\')" /></th>
<th class="center">'.$this->l('All').'<br /><input type="checkbox" name="1" id="allall" onclick="ajax_power(this, \'all\', -1, '.$currentProfile.', \''.$this->token.'\', \''.$tabsize.'\', \''.sizeof($tabs).'\')" /></th>
</tr>';
if (!sizeof($tabs))
echo '<tr><td colspan="5">'.$this->l('No tab').'</td></tr>';
elseif ($currentProfile == (int)(_PS_ADMIN_PROFILE_))
echo '<tr><td colspan="5">'.$this->l('Administrator permissions can\'t be modified.').'</td></tr>';
else
foreach ($tabs AS $tab)
if (!$tab['id_parent'] OR (int)($tab['id_parent']) == -1)
{
$this->printTabAccess((int)($currentProfile), $tab, $accesses[$tab['id_tab']], false, $tabsize, sizeof($tabs));
foreach ($tabs AS $child)
if ($child['id_parent'] === $tab['id_tab'])
$this->printTabAccess($currentProfile, $child, $accesses[$child['id_tab']], true, $tabsize, sizeof($tabs));
}
echo '</table>';
}
private function printTabAccess($currentProfile, $tab, $access, $is_child, $tabsize, $tabnumber)
{
$result_accesses = 0;
$perms = array('view', 'add', 'edit', 'delete');
echo '<tr><td'.($is_child ? '' : ' class="bold"').'>'.($is_child ? ' &raquo; ' : '').$tab['name'].'</td>';
foreach ($perms as $perm)
{
if($this->tabAccess['edit'] == 1)
echo '<td class="center"><input type="checkbox" name="1" id=\''.$perm.(int)($access['id_tab']).'\' class=\''.$perm.' '.(int)($access['id_tab']).'\' onclick="ajax_power(this, \''.$perm.'\', '.(int)($access['id_tab']).', '.(int)($access['id_profile']).', \''.$this->token.'\', \''.$tabsize.'\', \''.$tabnumber.'\')" '.((int)($access[$perm]) == 1 ? 'checked="checked"' : '').'/></td>';
else
echo '<td class="center"><input type="checkbox" name="1" disabled="disabled" '.((int)($access[$perm]) == 1 ? 'checked="checked"' : '').' /></td>';
$result_accesses += $access[$perm];
}
echo '<td class="center"><input type="checkbox" name="1" id=\'all'.(int)($access['id_tab']).'\' class=\'all '.(int)($access['id_tab']).'\' onclick="ajax_power(this, \'all\', '.(int)($access['id_tab']).', '.(int)($access['id_profile']).', \''.$this->token.'\', \''.$tabsize.'\', \''.$tabnumber.'\')" '.($result_accesses == 4 ? 'checked="checked"' : '').'/></td></tr>';
}
}

View File

@@ -1,38 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
class AdminAddonsCatalog extends AdminTab
{
public function display()
{
$parentDomain = Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI'])));
echo '<iframe frameborder="no" style="margin:0px;padding:0px;width:100%;height:920px" src="http://addons.prestashop.com/iframe/search.php?parentUrl='.$parentDomain.'"></iframe>
<div class="clear">&nbsp;</div>';
}
}

View File

@@ -1,38 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
class AdminAddonsMyAccount extends AdminTab
{
public function display()
{
$parentDomain = Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI'])));
echo '<iframe frameborder="no" style="margin:0px;padding:0px;width:100%;height:920px" src="http://addons.prestashop.com/iframe/myaccount.php?parentUrl='.$parentDomain.'"></iframe>
<div class="clear">&nbsp;</div>';
}
}

View File

@@ -1,510 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7320 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
if(Configuration::get('VATNUMBER_MANAGEMENT') AND file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php'))
include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php');
class AdminAddresses extends AdminTab
{
/** @var array countries list */
private $countriesArray = array();
public function __construct()
{
global $cookie;
$this->table = 'address';
$this->className = 'Address';
$this->lang = false;
$this->edit = true;
$this->delete = true;
$this->requiredDatabase = true;
$this->addressType = 'customer';
if (!Tools::getValue('realedit'))
$this->deleted = true;
$this->_select = 'cl.`name` as country';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON
(cl.`id_country` = a.`id_country` AND cl.`id_lang` = '.(int)($cookie->id_lang).')';
$countries = Country::getCountries((int)($cookie->id_lang));
foreach ($countries AS $country)
$this->countriesArray[$country['id_country']] = $country['name'];
$this->fieldsDisplay = array(
'id_address' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'firstname' => array('title' => $this->l('First name'), 'width' => 80, 'filter_key' => 'a!firstname'),
'lastname' => array('title' => $this->l('Last name'), 'width' => 100, 'filter_key' => 'a!lastname'),
'address1' => array('title' => $this->l('Address'), 'width' => 200),
'postcode' => array('title' => $this->l('Postcode/ Zip Code'), 'align' => 'right', 'width' => 50),
'city' => array('title' => $this->l('City'), 'width' => 150),
'country' => array('title' => $this->l('Country'), 'width' => 100, 'type' => 'select', 'select' => $this->countriesArray, 'filter_key' => 'cl!id_country'));
parent::__construct();
}
public function postProcess()
{
if (isset($_POST['submitAdd'.$this->table]))
{
// Transform e-mail in id_customer for parent processing
if ($this->addressType == 'customer')
{
if (Validate::isEmail(Tools::getValue('email')))
{
$customer = new Customer;
$customer = $customer->getByemail(Tools::getValue('email'));
if (Validate::isLoadedObject($customer))
$_POST['id_customer'] = $customer->id;
else
$this->_errors[] = Tools::displayError('This e-mail address is not registered.');
}
elseif ($id_customer = Tools::getValue('id_customer'))
{
$customer = new Customer((int)($id_customer));
if (Validate::isLoadedObject($customer))
$_POST['id_customer'] = $customer->id;
else
$this->_errors[] = Tools::displayError('Unknown customer');
}
else
$this->_errors[] = Tools::displayError('Unknown customer');
if (Country::isNeedDniByCountryId(Tools::getValue('id_country')) AND !Tools::getValue('dni'))
$this->_errors[] = Tools::displayError('Identification number is incorrect or has already been used.');
}
// Check manufacturer selected
if ($this->addressType == 'manufacturer')
{
$manufacturer = new Manufacturer((int)(Tools::getValue('id_manufacturer')));
if (!Validate::isLoadedObject($manufacturer))
$this->_errors[] = Tools::displayError('Manufacturer selected is not valid.');
}
/* If the selected country does not contain states */
$id_state = (int)(Tools::getValue('id_state'));
if ($id_country = Tools::getValue('id_country') AND $country = new Country((int)($id_country)) AND !(int)($country->contains_states) AND $id_state)
$this->_errors[] = Tools::displayError('You have selected a state for a country that does not contain states.');
/* If the selected country contains states, then a state have to be selected */
if ((int)($country->contains_states) AND !$id_state)
$this->_errors[] = Tools::displayError('An address located in a country containing states must have a state selected.');
/* Check zip code */
if ($country->need_zip_code)
{
$zip_code_format = $country->zip_code_format;
if (($postcode = Tools::getValue('postcode')) AND $zip_code_format)
{
$zip_regexp = '/^'.$zip_code_format.'$/ui';
$zip_regexp = str_replace(' ', '( |)', $zip_regexp);
$zip_regexp = str_replace('-', '(-|)', $zip_regexp);
$zip_regexp = str_replace('N', '[0-9]', $zip_regexp);
$zip_regexp = str_replace('L', '[a-zA-Z]', $zip_regexp);
$zip_regexp = str_replace('C', $country->iso_code, $zip_regexp);
if (!preg_match($zip_regexp, $postcode))
$this->_errors[] = Tools::displayError('Your zip/postal code is incorrect.').'<br />'.Tools::displayError('Must be typed as follows:').' '.str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $zip_code_format)));
}
elseif ($zip_code_format)
$this->_errors[] = Tools::displayError('Postcode required.');
elseif ($postcode AND !preg_match('/^[0-9a-zA-Z -]{4,9}$/ui', $postcode))
$this->_errors[] = Tools::displayError('Your zip/postal code is incorrect.');
}
/* If this address come from order's edition and is the same as the other one (invoice or delivery one)
** we delete its id_address to force the creation of a new one */
if ((int)(Tools::getValue('id_order')))
{
$this->_redirect = false;
if (isset($_POST['address_type']))
$_POST['id_address'] = '';
}
}
if (!sizeof($this->_errors))
parent::postProcess();
/* Reassignation of the order's new (invoice or delivery) address */
$address_type = ((int)(Tools::getValue('address_type')) == 2 ? 'invoice' : ((int)(Tools::getValue('address_type')) == 1 ? 'delivery' : ''));
if (isset($_POST['submitAdd'.$this->table]) AND ($id_order = (int)(Tools::getValue('id_order'))) AND !sizeof($this->_errors) AND !empty($address_type))
{
if(!Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'orders SET `id_address_'.$address_type.'` = '.Db::getInstance()->Insert_ID().' WHERE `id_order` = '.$id_order))
$this->_errors[] = Tools::displayError('An error occurred while linking this address to its order.');
else
Tools::redirectAdmin(Tools::getValue('back').'&conf=4');
}
}
public function getList($id_lang, $orderBy = NULL, $orderWay = NULL, $start = 0, $limit = NULL, $id_lang_shop = NULL)
{
parent::getList($id_lang, $orderBy, $orderWay, $start, $limit);
global $cookie;
/* Manage default params values */
if (empty($limit))
$limit = ((!isset($cookie->{$this->table.'_pagination'})) ? $this->_pagination[0] : $limit = $cookie->{$this->table.'_pagination'});
if (!Validate::isTableOrIdentifier($this->table))
die('filter is corrupted');
if (empty($orderBy))
$orderBy = Tools::getValue($this->table.'Orderby', 'id_'.$this->table);
if (empty($orderWay))
$orderWay = Tools::getValue($this->table.'Orderway', 'ASC');
$limit = (int)(Tools::getValue('pagination', $limit));
$cookie->{$this->table.'_pagination'} = $limit;
/* Check params validity */
if (!Validate::isOrderBy($orderBy) OR !Validate::isOrderWay($orderWay)
OR !is_numeric($start) OR !is_numeric($limit)
OR !Validate::isUnsignedId($id_lang))
die(Tools::displayError('get list params is not valid'));
/* Determine offset from current page */
if ((isset($_POST['submitFilter'.$this->table]) OR
isset($_POST['submitFilter'.$this->table.'_x']) OR
isset($_POST['submitFilter'.$this->table.'_y'])) AND
!empty($_POST['submitFilter'.$this->table]) AND
is_numeric($_POST['submitFilter'.$this->table]))
$start = (int)($_POST['submitFilter'.$this->table] - 1) * $limit;
/* Cache */
$this->_lang = (int)($id_lang);
$this->_orderBy = $orderBy;
$this->_orderWay = Tools::strtoupper($orderWay);
/* SQL table : orders, but class name is Order */
$sqlTable = $this->table == 'order' ? 'orders' : $this->table;
/* Query in order to get results number */
$queryTotal = Db::getInstance()->getRow('
SELECT COUNT(a.`id_'.$this->table.'`) AS total
FROM `'._DB_PREFIX_.$sqlTable.'` a
'.($this->lang ? 'LEFT JOIN `'._DB_PREFIX_.$this->table.'_lang` b ON (b.`id_'.$this->table.'` = a.`id_'.$this->table.'` AND b.`id_lang` = '.(int)($id_lang).')' : '').'
'.(isset($this->_join) ? $this->_join.' ' : '').'
WHERE 1 '.(isset($this->_where) ? $this->_where.' ' : '').(($this->deleted OR $this->table == 'currency') ? 'AND a.`deleted` = 0 ' : '').$this->_filter.'
'.(isset($this->_group) ? $this->_group.' ' : '').'
'.(isset($this->addressType) ? 'AND a.id_'.strval($this->addressType).' != 0' : ''));
$this->_listTotal = (int)($queryTotal['total']);
/* Query in order to get results with all fields */
$this->_list = Db::getInstance()->ExecuteS('
SELECT a.*'.($this->lang ? ', b.*' : '').(isset($this->_select) ? ', '.$this->_select.' ' : '').'
FROM `'._DB_PREFIX_.$sqlTable.'` a
'.($this->lang ? 'LEFT JOIN `'._DB_PREFIX_.$this->table.'_lang` b ON (b.`id_'.$this->table.'` = a.`id_'.$this->table.'` AND b.`id_lang` = '.(int)($id_lang).')' : '').'
'.(isset($this->_join) ? $this->_join.' ' : '').'
WHERE 1 '.(isset($this->_where) ? $this->_where.' ' : '').(($this->deleted OR $this->table == 'currency') ? 'AND a.`deleted` = 0 ' : '').$this->_filter.'
'.(isset($this->_group) ? $this->_group.' ' : '').'
'.(isset($this->addressType) ? 'AND a.id_'.strval($this->addressType).' != 0' : '').'
ORDER BY '.(($orderBy == 'id_'.$this->table) ? 'a.' : '').'`'.pSQL($orderBy).'` '.pSQL($orderWay).'
LIMIT '.(int)($start).','.(int)($limit));
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
'.((int)($obj->id) ? '<input type="hidden" name="id_'.$this->table.'" value="'.(int)($obj->id).'" />' : '').'
'.(($id_order = (int)(Tools::getValue('id_order'))) ? '<input type="hidden" name="id_order" value="'.(int)($id_order).'" />' : '').'
'.(($address_type = (int)(Tools::getValue('address_type'))) ? '<input type="hidden" name="address_type" value="'.(int)($address_type).'" />' : '').'
'.(Tools::getValue('realedit') ? '<input type="hidden" name="realedit" value="1" />' : '').'
<fieldset>
<legend><img src="../img/admin/contact.gif" alt="" />'.$this->l('Addresses').'</legend>';
switch ($this->addressType)
{
case 'manufacturer':
echo '<label>'.$this->l('Choose manufacturer').'</label>
<div class="margin-form">';
$manufacturers = Manufacturer::getManufacturers();
echo '<select name="id_manufacturer">';
if (!sizeof($manufacturers))
echo '<option value="0">'.$this->l('No manufacturer available').'&nbsp</option>';
foreach ($manufacturers as $manufacturer)
echo '<option value="'.(int)($manufacturer['id_manufacturer']).'"'.($this->getFieldValue($obj, 'id_manufacturer') == $manufacturer['id_manufacturer'] ? ' selected="selected"' : '').'>'.$manufacturer['name'].'&nbsp</option>';
echo '</select>';
echo '</div>';
echo '<input type="hidden" name="alias" value="manufacturer">';
break;
case 'customer':
default:
if ($obj->id)
{
$customer = new Customer($obj->id_customer);
$tokenCustomer = Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee));
echo '
<label>'.$this->l('Customer').'</label>
<div class="margin-form"><a style="display: block; padding-top: 4px;" href="?tab=AdminCustomers&id_customer='.$customer->id.'&viewcustomer&token='.$tokenCustomer.'">'.$customer->lastname.' '.$customer->firstname.' ('.$customer->email.')</a></div>
<input type="hidden" name="id_customer" value="'.$customer->id.'" />
<input type="hidden" name="email" value="'.$customer->email.'" />';
}
else
{
echo
'<label>'.$this->l('Customer e-mail').'</label>
<div class="margin-form">
<input type="text" size="33" name="email" value="'.htmlentities(Tools::getValue('email'), ENT_COMPAT, 'UTF-8').'" style="text-transform: lowercase;" /> <sup>*</sup>
</div>';
}
echo '
<label for="dni">'.$this->l('Identification Number').'</label>
<div class="margin-form">
<input type="text" name="dni" id="dni" value="'.htmlentities($this->getFieldValue($obj, 'dni'), ENT_COMPAT, 'UTF-8').'" />
<p>'.$this->l('DNI / NIF / NIE').'</p>
</div>';
echo '<label>'.$this->l('Alias').'</label>
<div class="margin-form">
<input type="text" size="33" name="alias" value="'.htmlentities($this->getFieldValue($obj, 'alias'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
break;
}
$addresses_fields = $this->processAddressFormat();
$addresses_fields = $addresses_fields["dlv_all_fields"]; // we use delivery address
foreach($addresses_fields as $addr_field_item)
{
if ($addr_field_item == 'company')
{
if ($this->addressType != 'manufacturer')
{
echo '<label>'.$this->l('Company').'</label>
<div class="margin-form">
<input type="text" size="33" name="company" value="'.htmlentities($this->getFieldValue($obj, 'company'), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
if ((Configuration::get('VATNUMBER_MANAGEMENT') AND file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php')) && VatNumber::isApplicable(Configuration::get('PS_COUNTRY_DEFAULT')))
echo '<div id="vat_area" style="display: visible">';
else if(Configuration::get('VATNUMBER_MANAGEMENT'))
echo '<div id="vat_area" style="display: hidden">';
else
echo'<div style="display: none;">';
echo '<label>'.$this->l('VAT number').'</label>
<div class="margin-form">
<input type="text" size="33" name="vat_number" value="'.htmlentities($this->getFieldValue($obj, 'vat_number'), ENT_COMPAT, 'UTF-8').'" />
</div>
</div>';
}
}
elseif ($addr_field_item == 'lastname')
{
echo '
<label>'.$this->l('Last name').'</label>
<div class="margin-form">
<input type="text" size="33" name="lastname" value="'.htmlentities($this->getFieldValue($obj, 'lastname'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' 0-9!<>,;?=+()@#"<22>{}_$%:<span class="hint-pointer">&nbsp;</span></span>
</div>';
}
elseif ($addr_field_item == 'firstname')
{
echo '
<label>'.$this->l('First name').'</label>
<div class="margin-form">
<input type="text" size="33" name="firstname" value="'.htmlentities($this->getFieldValue($obj, 'firstname'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' 0-9!<>,;?=+()@#"<22>{}_$%:<span class="hint-pointer">&nbsp;</span></span>
</div>';
}
elseif ($addr_field_item == 'address1')
{
echo '
<label>'.$this->l('Address').'</label>
<div class="margin-form">
<input type="text" size="33" name="address1" value="'.htmlentities($this->getFieldValue($obj, 'address1'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div>';
}
elseif ($addr_field_item == 'address2')
{
echo '
<label>'.$this->l('Address').' (2):</label>
<div class="margin-form">
<input type="text" size="33" name="address2" value="'.htmlentities($this->getFieldValue($obj, 'address2'), ENT_COMPAT, 'UTF-8').'" />
</div>';
}
elseif ($addr_field_item == 'postcode')
{
echo '
<label>'.$this->l('Postcode/ Zip Code').'</label>
<div class="margin-form">
<input type="text" size="33" name="postcode" value="'.htmlentities($this->getFieldValue($obj, 'postcode'), ENT_COMPAT, 'UTF-8').'" />
</div>';
}
elseif ($addr_field_item == 'city')
{
echo '
<label>'.$this->l('City').'</label>
<div class="margin-form">
<input type="text" size="33" name="city" value="'.htmlentities($this->getFieldValue($obj, 'city'), ENT_COMPAT, 'UTF-8').'" style="text-transform: uppercase;" /> <sup>*</sup>
</div>';
}
elseif ($addr_field_item == 'country' || $addr_field_item == 'Country:name')
{
echo '
<label>'.$this->l('Country').'</label>
<div class="margin-form">
<select name="id_country" id="id_country" />';
$selectedCountry = $this->getFieldValue($obj, 'id_country');
foreach ($this->countriesArray AS $id_country => $name)
echo ' <option value="'.$id_country.'"'.((!$selectedCountry AND Configuration::get('PS_COUNTRY_DEFAULT') == $id_country) ? ' selected="selected"' : ($selectedCountry == $id_country ? ' selected="selected"' : '')).'>'.$name.'</option>';
echo ' </select> <sup>*</sup>
</div>';
echo '
<div id="contains_states" '.(!Country::containsStates((int)$selectedCountry) ? 'style="display:none;"' : '').'>
<label>'.$this->l('State').'</label>
<div class="margin-form">
<select name="id_state" id="id_state">
</select>
<sup>*</sup>
</div>
</div>';
$id_country_ajax = (int)$this->getFieldValue($obj, 'id_country');
echo '
<script type="text/javascript">
$(document).ready(function(){
ajaxStates ();
$(\'#id_country\').change(function() {
ajaxStates ();
});
function ajaxStates ()
{
$.ajax({
url: "ajax.php",
cache: false,
data: "ajaxStates=1&id_country="+$(\'#id_country\').val()+"&id_state="+$(\'#id_state\').val(),
success: function(html)
{
if (html == \'false\')
{
$("#contains_states").fadeOut();
$(\'#id_state option[value=0]\').attr("selected", "selected");
}
else
{
$("#id_state").html(html);
$("#contains_states").fadeIn();
$(\'#id_state option[value='.(int)$obj->id_state.']\').attr("selected", "selected");
}
}
}); ';
if (file_exists(_PS_MODULE_DIR_.'vatnumber/ajax.php'))
echo ' $.ajax({
type: "GET",
url: "'._MODULE_DIR_.'vatnumber/ajax.php?id_country="+$(\'#id_country\').val(),
success: function(isApplicable)
{
if(isApplicable == 1)
$(\'#vat_area\').show();
else
$(\'#vat_area\').hide();
}
});';
echo ' }; }); </script>';
}
} // End foreach
echo '
<label>'.$this->l('Home phone').'</label>
<div class="margin-form">
<input type="text" size="33" name="phone" value="'.htmlentities($this->getFieldValue($obj, 'phone'), ENT_COMPAT, 'UTF-8').'" />
</div>';
echo '
<label>'.$this->l('Mobile phone').'</label>
<div class="margin-form">
<input type="text" size="33" name="phone_mobile" value="'.htmlentities($this->getFieldValue($obj, 'phone_mobile'), ENT_COMPAT, 'UTF-8').'" />
</div>';
echo '
<label>'.$this->l('Other').'</label>
<div class="margin-form">
<textarea name="other" cols="36" rows="4">'.htmlentities($this->getFieldValue($obj, 'other'), ENT_COMPAT, 'UTF-8').'</textarea>
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>';
echo '
</form>';
}
protected function processAddressFormat()
{
$tmp_addr = new Address((int)Tools::getValue("id_address"));
$selectedCountry = ($tmp_addr && $tmp_addr->id_country) ? $tmp_addr->id_country :
(int)(Configuration::get('PS_COUNTRY_DEFAULT'));
$inv_adr_fields = AddressFormat::getOrderedAddressFields($selectedCountry);
$dlv_adr_fields = AddressFormat::getOrderedAddressFields($selectedCountry);
$inv_all_fields = array();
$dlv_all_fields = array();
$out = array();
foreach (array('inv','dlv') as $adr_type)
{
foreach (${$adr_type.'_adr_fields'} as $fields_line)
foreach(explode(' ',$fields_line) as $field_item)
${$adr_type.'_all_fields'}[] = trim($field_item);
$out[$adr_type.'_adr_fields'] = ${$adr_type.'_adr_fields'};
$out[$adr_type.'_all_fields'] = ${$adr_type.'_all_fields'};
}
return $out;
}
}

View File

@@ -1,106 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
class AdminAliases extends AdminTab
{
function __construct()
{
$this->table = 'alias';
$this->className = 'Alias';
$this->edit = true;
$this->delete = true;
$this->fieldsDisplay = array(
'alias' => array('title' => $this->l('Aliases'), 'width' => 160),
'search' => array('title' => $this->l('Search'), 'width' => 40),
'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false)
);
parent::__construct();
}
public function postProcess()
{
if (isset($_POST['submitAdd'.$this->table]))
{
$search = strval(Tools::getValue('search'));
$string = strval(Tools::getValue('alias'));
$aliases = explode(',', $string);
if (empty($search) OR empty($string))
$this->_errors[] = $this->l('aliases and result are both required');
if (!Validate::isValidSearch($search))
$this->_errors[] = $search.' '.$this->l('is not a valid result');
foreach ($aliases AS $alias)
if (!Validate::isValidSearch($alias))
$this->_errors[] = $alias.' '.$this->l('is not a valid alias');
if (!sizeof($this->_errors))
{
Alias::deleteAliases($search);
foreach ($aliases AS $alias)
{
$obj = new Alias(NULL, trim($alias), trim($search));
$obj->save();
}
}
}
else
parent::postProcess();
}
public function displayForm($isMainTab = true)
{
global $currentIndex;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/search.gif" />'.$this->l('Aliases').'</legend>
<label>'.$this->l('Alias:').' </label>
<div class="margin-form">
<input type="text" size="40" name="alias" value="'.Tools::getValue('alias', htmlentities($obj->getAliases(), ENT_COMPAT, 'UTF-8')).'" /> <sup>*</sup>
<p class="clear">'.$this->l('Enter each alias separated by a comma (\',\')').' '.$this->l('(e.g., \'prestshop,preztashop,prestasohp\')').'<br />
'.$this->l('Forbidden characters:').' <>;=#{}</p>
</div>
<label>'.$this->l('Result:').' </label>
<div class="margin-form">
<input type="text" size="15" name="search" value="'.htmlentities($this->getFieldValue($obj, 'search'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<p class="clear">'.$this->l('Search this word instead.').'</p>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
}

View File

@@ -1,36 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
include_once(dirname(__FILE__).'/AdminThemes.php');
class AdminAppearance extends AdminThemes // extends AdminThemes only for retro-compatibility
{
public function display()
{
Tools::redirectAdmin('index.php?tab=AdminThemes&token='.Tools::getAdminTokenLite('AdminThemes'));
}
}

View File

@@ -1,134 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminAttachments extends AdminTab
{
public function __construct()
{
global $cookie;
$this->table = 'attachment';
$this->className = 'Attachment';
$this->lang = true;
$this->edit = true;
$this->delete = true;
$this->fieldsDisplay = array(
'id_attachment' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Name')),
'file' => array('title' => $this->l('File')));
parent::__construct();
}
public function postProcess()
{
if (Tools::isSubmit('submitAdd'.$this->table))
{
if ($id = (int)(Tools::getValue('id_attachment')) AND $a = new Attachment($id))
{
$_POST['file'] = $a->file;
$_POST['mime'] = $a->mime;
}
if (!sizeof($this->_errors))
{
if (isset($_FILES['file']) AND is_uploaded_file($_FILES['file']['tmp_name']))
{
if ($_FILES['file']['size'] > (Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024 * 1024))
$this->_errors[] = $this->l('File too large, maximum size allowed:').' '.(Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024).' '.$this->l('kb').'. '.$this->l('File size you\'re trying to upload is:').number_format(($_FILES['file']['size']/1024), 2, '.', '').$this->l('kb');
else
{
do $uniqid = sha1(microtime()); while (file_exists(_PS_DOWNLOAD_DIR_.$uniqid));
if (!copy($_FILES['file']['tmp_name'], _PS_DOWNLOAD_DIR_.$uniqid))
$this->_errors[] = $this->l('File copy failed');
$_POST['file_name'] = $_FILES['file']['name'];
@unlink($_FILES['file']['tmp_name']);
$_POST['file'] = $uniqid;
$_POST['mime'] = $_FILES['file']['type'];
}
}
else if (array_key_exists('file', $_FILES) && (int)$_FILES['file']['error'] === 1)
{
$max_upload = (int)(ini_get('upload_max_filesize'));
$max_post = (int)(ini_get('post_max_size'));
$upload_mb = min($max_upload, $max_post);
$this->_errors[] = $this->l('the File').' <b>'.$_FILES['file']['name'].'</b> '.$this->l('exceeds the size allowed by the server. This limit is set to').' <b>'.$upload_mb.$this->l('Mb').'</b>';
}
else if (!empty($_FILES['file']['tmp_name']))
$this->_errors[] = $this->l('No file or your file isn\'t uploadable, check your server configuration about the upload maximum size.');
}
$this->validateRules();
}
return parent::postProcess();
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post" enctype="multipart/form-data">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/t/AdminAttachments.gif" />'.$this->l('Attachment').'</legend>
<label>'.$this->l('Filename:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo ' <div id="cname_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="name_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'name', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'cname¤cdescription', 'cname');
echo ' </div>
<div class="clear">&nbsp;</div>
<label>'.$this->l('Description:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo ' <div id="cdescription_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<textarea name="description_'.$language['id_lang'].'">'.htmlentities($this->getFieldValue($obj, 'description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'cname¤cdescription', 'cdescription');
echo ' </div>
<div class="clear">&nbsp;</div>
<label>'.$this->l('File').'</label>
<div class="margin-form">
<p><input type="file" name="file" /></p>
<p>'.$this->l('Upload file from your computer').'</p>
</div>
<div class="clear">&nbsp;</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
}

View File

@@ -1,321 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
@ini_set('max_execution_time', 3600);
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminAttributeGenerator extends AdminTab
{
private $combinations = array();
private $product;
private function addAttribute($arr, $price = 0, $weight = 0)
{
foreach ($arr AS $attr)
{
$price += (float)($_POST['price_impact_'.(int)($attr)]);
$weight += (float)($_POST['weight_impact'][(int)($attr)]);
}
if ($this->product->id)
{
return (array(
'id_product' => (int)($this->product->id),
'price' => (float)($price),
'weight' => (float)($weight),
'ecotax' => 0,
'quantity' => (int)($_POST['quantity']),
'reference' => pSQL($_POST['reference']),
'default_on' => 0));
}
return array();
}
static private function createCombinations($list)
{
if (sizeof($list) <= 1)
return sizeof($list) ? array_map(create_function('$v', 'return (array($v));'), $list[0]) : $list;
$res = array();
$first = array_pop($list);
foreach ($first AS $attribute)
{
$tab = self::createCombinations($list);
foreach ($tab AS $toAdd)
$res[] = is_array($toAdd) ? array_merge($toAdd, array($attribute)) : array($toAdd, $attribute);
}
return $res;
}
public function postProcess()
{
global $currentIndex;
$this->product = new Product((int)(Tools::getValue('id_product')));
if (isset($_POST['generate']))
{
if (!is_array(Tools::getValue('options')))
$this->_errors[] = Tools::displayError('Please choose at least 1 attribute.');
else
{
$tab = array_values($_POST['options']);
if (sizeof($tab) AND Validate::isLoadedObject($this->product))
{
self::setAttributesImpacts($this->product->id, $tab);
$this->combinations = array_values(self::createCombinations($tab));
$values = array_values(array_map(array($this, 'addAttribute'), $this->combinations));
$this->product->deleteProductAttributes();
$res = $this->product->addProductAttributeMultiple($values);
$this->product->addAttributeCombinationMultiple($res, $this->combinations);
$this->product->updateQuantityProductWithAttributeQuantity();
}
else
$this->_errors[] = Tools::displayError('Unable to initialize parameters, combination is missing or object cannot be loaded.');
}
}
elseif (isset($_POST['back']))
Tools::redirectAdmin($currentIndex.'&id_product='.(int)(Tools::getValue('id_product')).'&id_category='.(int)(Tools::getValue('id_category')).'&addproduct'.'&tabs=3&token='.Tools::getValue('token'));
parent::postProcess();
}
static private function displayAndReturnAttributeJs()
{
global $cookie;
$attributes = Attribute::getAttributes((int)($cookie->id_lang), true);
$attributeJs = array();
foreach ($attributes AS $k => $attribute)
$attributeJs[$attribute['id_attribute_group']][$attribute['id_attribute']] = $attribute['name'];
echo '
<script type="text/javascript">
var attrs = new Array();
attrs[0] = new Array(0, \'---\');';
foreach ($attributeJs AS $idgrp => $group)
{
echo '
attrs['.$idgrp.'] = new Array(0, \'---\' ';
foreach ($group AS $idattr => $attrname)
echo ', '.$idattr.', \''.addslashes(($attrname)).'\'';
echo ');';
}
echo '
</script>';
return $attributeJs;
}
private function displayGroupSelect($attributeJs, $attributesGroups)
{
echo ' <div>
<select multiple name="attributes[]" id="attribute_group" style="width: 200px; height: 350px; margin-bottom: 10px;">';
foreach ($attributesGroups AS $k => $attributeGroup)
{
$idGroup = (int)$attributeGroup['id_attribute_group'];
if (isset($attributeJs[$idGroup]))
{
echo ' <optgroup name="'.$idGroup.'" id="'.$idGroup.'" label="'.htmlspecialchars(stripslashes($attributeGroup['name'])).'">';
foreach ($attributeJs[$idGroup] AS $k => $v)
echo ' <option name="'.$k.'" id="attr_'.$k.'" value="'.htmlspecialchars($v, ENT_QUOTES).'" title="'.htmlspecialchars($v, ENT_QUOTES).'"">'.$v.'</option>';
echo ' </optgroup>';
}
}
echo ' </select>
</div>';
}
static private function setAttributesImpacts($id_product, $tab)
{
$attributes = array();
foreach ($tab AS $group)
foreach ($group AS $attribute)
$attributes[] = '('.(int)($id_product).', '.(int)($attribute).', '.(float)($_POST['price_impact_'.(int)($attribute)]).', '.(float)($_POST['weight_impact'][(int)($attribute)]).')';
return Db::getInstance()->Execute(
'INSERT INTO `'._DB_PREFIX_.'attribute_impact` (`id_product`, `id_attribute`, `price`, `weight`)
VALUES '.implode(',', $attributes).'
ON DUPLICATE KEY UPDATE `price`=VALUES(price), `weight`=VALUES(weight)'
);
}
static private function getAttributesImpacts($id_product)
{
$tab = array();
$result = Db::getInstance()->ExecuteS(
'SELECT ai.`id_attribute`, ai.`price`, ai.`weight`
FROM `'._DB_PREFIX_.'attribute_impact` ai
WHERE ai.`id_product` = '.(int)($id_product));
if (!$result)
return array();
foreach ($result AS $impact)
{
$tab[$impact['id_attribute']]['price'] = (float)($impact['price']);
$tab[$impact['id_attribute']]['weight'] = (float)($impact['weight']);
}
return $tab;
}
private function displayGroupeTable($attributeJs, $attributesGroups)
{
global $cookie;
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
$combinationsGroups = $this->product->getAttributesGroups((int)($cookie->id_lang));
$attributes = array();
$impacts = self::getAttributesImpacts($this->product->id);
foreach ($combinationsGroups AS &$combination)
{
$target = &$attributes[$combination['id_attribute_group']][$combination['id_attribute']];
$target = $combination;
if (isset($impacts[$combination['id_attribute']]))
{
$target['price'] = $impacts[$combination['id_attribute']]['price'];
$target['weight'] = $impacts[$combination['id_attribute']]['weight'];
}
}
foreach ($attributesGroups AS $k => $attributeGroup)
{
$idGroup = $attributeGroup['id_attribute_group'];
if (isset($attributeJs[$idGroup]))
{
echo '
<br class="clear"/>
<table class="table" cellpadding="0" cellspacing="0" align="left" style="margin-bottom: 10px; display: none;">
<thead>
<tr>
<th id="tab_h1" style="width: 150px">'.htmlspecialchars(stripslashes($attributeGroup['name'])).'</th>
<th id="tab_h2" style="width: 350px" colspan="2">'.$this->l('Price impact').' ('.$currency->sign.')'.'</th>
<th style="width: 150px">'.$this->l('Weight impact').' ('.Configuration::get('PS_WEIGHT_UNIT').')'.'</th>
</tr>
</thead>
<tbody id="table_'.$idGroup.'" name="result_table">
</tbody>
</table>';
if (isset($attributes[$idGroup]))
foreach ($attributes[$idGroup] AS $k => $attribute)
echo '<script type="text/javascript">$(\'#table_'.$idGroup.'\').append(create_attribute_row('.$k.', '.$idGroup.', \''.addslashes($attribute['attribute_name']).'\', '.$attribute['price'].', '.$attribute['weight'].'));toggle(getE(\'table_\' + '.$idGroup.').parentNode, true);</script>';
}
}
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
$jsAttributes = self::displayAndReturnAttributeJs();
$attributesGroups = AttributeGroup::getAttributesGroups((int)($cookie->id_lang));
$this->product = new Product((int)(Tools::getValue('id_product')));
// JS Init
echo
'<script type="text/javascript">
i18n_tax_exc = "'.$this->l('Tax Excl.:').'";
i18n_tax_inc = "'.$this->l('Tax Incl.:').'";
var product_tax = "'.Tax::getProductTaxRate($this->product->id, NULL).'";
function calcPrice(element, element_has_tax)
{
name = element.attr("name");
var element_price = element.val().replace(/,/g, ".");
var other_element_price = "0";
if (!isNaN(element_price) && element_price > 0)
{
if (element_has_tax)
other_element_price = parseFloat(element_price / ((product_tax / 100) + 1));
else
other_element_price = ps_round(parseFloat(element_price * ((product_tax / 100) + 1)), 2);
}
$("#related_to_"+name).val(other_element_price);
}
$(document).ready(function()
{
$(".price_impact").each(function()
{
calcPrice($(this), false);
});
});
</script>';
if (isset($_POST['generate']) AND !sizeof($this->_errors))
echo '
<div class="module_confirmation conf confirm">
<img src="../img/admin/ok.gif" alt="" title="" style="margin-right:5px; float:left;" />
'.sizeof($this->combinations).' '.$this->l('product(s) successfully created.').'
</div>';
echo '
<script type="text/javascript" src="../js/attributesBack.js"></script>
<form enctype="multipart/form-data" method="post" id="generator" action="'.$currentIndex.'&&id_product='.(int)(Tools::getValue('id_product')).'&id_category='.(int)(Tools::getValue('id_category')).'&attributegenerator&token='.Tools::getValue('token').'">
<fieldset style="margin-bottom: 35px;"><legend><img src="../img/admin/asterisk.gif" />'.$this->l('Attributes generator').'</legend>'.
$this->l('Add or modify attributes for product:').' <b>'.$this->product->name[$cookie->id_lang].'</b>
<br /><br />
';
echo '
<div style="padding-top:10px; float: left; width: 570px;">
<div style="float:left;">
<label>'.$this->l('Quantity').'</label>
<div class="margin-form">
<input type="text" size="20" name="quantity" value="0"/>
</div>
<label>'.$this->l('Reference').'</label>
<div class="margin-form">
<input type="text" size="20" name="reference" value="'.$this->product->reference.'"/>
</div>
</div>
<div style="float:left; text-align:center; margin-left:20px;">
<input type="submit" class="button" style="margin-bottom:5px;" name="generate" value="'.$this->l('Generate').'" /><br />
<input type="submit" class="button" name="back" value="'.$this->l('Back to product').'" />
</div>
<br style="clear:both;" />
<div style="margin-top: 15px;">';
self::displayGroupeTable($jsAttributes, $attributesGroups);
echo '
</div>
</div>
<div style="float: left; margin-left: 60px;">
';
self::displayGroupSelect($jsAttributes, $attributesGroups);
echo '
<div>
<p style="text-align: center;">
<input class="button" type="button" style="margin: 0 0 10px 20px;" value="'.$this->l('Add').'" class="button" onclick="add_attr_multiple();" />
<input class="button" type="button" style="margin: 0 0 10px 20px;" value="'.$this->l('Delete').'" class="button" onclick="del_attr_multiple();" /><br />
<input type="submit" class="button" name="back" value="'.$this->l('Back to product').'" />
</p>
</div>
</div>
<br />
</fieldset>
</form>';
}
}

View File

@@ -1,160 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7465 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminAttributes extends AdminTab
{
public function __construct()
{
$this->table = 'attribute';
$this->className = 'Attribute';
$this->lang = true;
$this->edit = true;
$this->delete = true;
$this->fieldImageSettings = array('name' => 'texture', 'dir' => 'co');
parent::__construct();
}
/**
* Display form
*
* @global string $currentIndex Current URL in order to keep current Tab
*/
public function displayForm($token = NULL)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
$color = ($obj->color ? $obj->color : 0);
$attributes_groups = AttributeGroup::getAttributesGroups($this->_defaultFormLanguage);
$strAttributesGroups = '';
echo '
<script type="text/javascript">
var attributesGroups = {';
foreach ($attributes_groups AS $attribute_group)
$strAttributesGroups .= '"'.$attribute_group['id_attribute_group'].'" : '.$attribute_group['is_color_group'].',';
echo $strAttributesGroups.'};
</script>
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.($token ? $token : $this->token).'" method="post" enctype="multipart/form-data">
'.($obj->id ? '<input type="hidden" name="id_attribute" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/asterisk.gif" />'.$this->l('Attribute').'</legend>
<label>'.$this->l('Name:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="name_'.$language['id_lang'].'" value="'.htmlspecialchars($this->getFieldValue($obj, 'name', (int)($language['id_lang']))).'" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name', 'name');
echo '
<div class="clear"></div>
</div>
<label>'.$this->l('Group:').' </label>
<div class="margin-form">
<select name="id_attribute_group" id="id_attribute_group" onchange="showAttributeColorGroup(\'id_attribute_group\', \'colorAttributeProperties\')">';
foreach ($attributes_groups AS $attribute_group)
echo '<option value="'.$attribute_group['id_attribute_group'].'"'.($this->getFieldValue($obj, 'id_attribute_group') == $attribute_group['id_attribute_group'] ? ' selected="selected"' : '').'>'.$attribute_group['name'].'</option>';
echo '
</select><sup> *</sup>
</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('GroupShop association:').'</label><div class="margin-form">';
$this->displayAssoGroupShop();
echo '</div>';
}
echo '
<script type="text/javascript" src="../js/jquery/jquery-colorpicker.js"></script>
<div id="colorAttributeProperties" style="'.((Validate::isLoadedObject($obj) AND $obj->isColorAttribute()) ? 'display: block;' : 'display: none;').'">
<label>'.$this->l('Color').'</label>
<div class="margin-form">
<input width="20px" type="color" data-hex="true" class="color mColorPickerInput" name="color" value="'.(Tools::getValue('color', $color) ? htmlentities(Tools::getValue('color', $color)) : '#000000').'" /> <sup>*</sup>
<p class="clear">'.$this->l('HTML colors only (e.g.,').' "lightblue", "#CC6600")</p>
</div>
<label>'.$this->l('Texture:').' </label>
<div class="margin-form">
<input type="file" name="texture" />
<p>'.$this->l('Upload color texture from your computer').'<br />'.$this->l('This will override the HTML color!').'</p>
</div>
<label>'.$this->l('Current texture:').' </label>
<div class="margin-form">
<p>'.(file_exists(_PS_IMG_DIR_.$this->fieldImageSettings['dir'].'/'.$obj->id.'.jpg')
? '<img src="../img/'.$this->fieldImageSettings['dir'].'/'.$obj->id.'.jpg" alt="" title="" /> <a href="'.$_SERVER['REQUEST_URI'].'&deleteImage=1"><img src="../img/admin/delete.gif" alt="'.$this->l('delete').'" title="" /></a>'
: $this->l('None')
).'</p>
</div>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAddattribute" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>
<script>
showAttributeColorGroup(\'id_attribute_group\', \'colorAttributeProperties\');
</script>';
}
/**
* Manage page processing
*
* @global string $currentIndex Current URL in order to keep current Tab
*/
public function postProcess($token = NULL)
{
global $currentIndex;
if (Tools::getValue('submitDel'.$this->table))
{
if ($this->tabAccess['delete'] === '1')
{
if (isset($_POST[$this->table.$_POST['groupid'].'Box']))
{
$object = new $this->className();
if ($object->deleteSelection($_POST[$this->table.$_POST['groupid'].'Box']))
Tools::redirectAdmin($currentIndex.'&conf=2'.'&token='.($token ? $token : $this->token));
$this->_errors[] = Tools::displayError('An error occurred while deleting selection.');
}
else
$this->_errors[] = Tools::displayError('You must select at least one element to delete.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
else
parent::postProcess();
}
}

View File

@@ -1,235 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7465 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
include_once(PS_ADMIN_DIR.'/tabs/AdminAttributes.php');
class AdminAttributesGroups extends AdminTab
{
/** @var object AdminAttributes() instance */
private $adminAttributes;
public function __construct()
{
$this->adminAttributes = new AdminAttributes();
$this->table = 'attribute_group';
$this->className = 'AttributeGroup';
$this->lang = true;
$this->edit = true;
$this->delete = true;
$this->fieldsDisplay = array(
'name' => array('title' => $this->l('Name'), 'width' => 140, 'filter_key' => 'b!name'),
'attribute' => array('title' => $this->l('Attributes'), 'width' => 240, 'orderby' => false, 'search' => false));
parent::__construct();
}
public function display()
{
global $currentIndex;
if ((isset($_POST['submitAddattribute']) AND sizeof($this->adminAttributes->_errors))
OR isset($_GET['updateattribute']) OR isset($_GET['addattribute']))
{
$this->adminAttributes->displayForm($this->token);
echo '<br /><br /><a href="'.$currentIndex.'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to list').'</a><br />';
}
else
{
parent::display();
$this->displayAssoGroupShop();
}
}
public function postProcess()
{
global $cookie, $currentIndex;
$this->adminAttributes->tabAccess = Profile::getProfileAccess($cookie->profile, $this->id);
$this->adminAttributes->postProcess($this->token);
if(Tools::getValue('submitDel'.$this->table))
{
if ($this->tabAccess['delete'] === '1')
{
if (isset($_POST[$this->table.'Box']))
{
$object = new $this->className();
if ($object->deleteSelection($_POST[$this->table.'Box']))
Tools::redirectAdmin($currentIndex.'&conf=2'.'&token='.$this->token);
$this->_errors[] = Tools::displayError('An error occurred while deleting selection.');
}
else
$this->_errors[] = Tools::displayError('You must select at least one element to delete.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
else
parent::postProcess();
}
public function displayErrors()
{
$this->adminAttributes->displayErrors();
parent::displayErrors();
}
/* Report to AdminTab::displayList() for more details */
public function displayList()
{
global $currentIndex, $cookie;
echo '<br /><a href="'.$currentIndex.'&add'.$this->table.'&token='.$this->token.'"><img src="../img/admin/add.gif" border="0" /> <b>'.$this->l('Add attributes group').'</b></a><br />
<a href="'.$currentIndex.'&addattribute&token='.$this->token.'"><img src="../img/admin/add.gif" border="0" /> '.$this->l('Add attribute').'</a><br /><br />
'.$this->l('Click on the group name to view its attributes. Click again to hide them.').'<br /><br />';
if ($this->_list === false)
Tools::displayError('No elements found');
$this->displayListHeader();
echo '<input type="hidden" name="groupid" value="0">';
if (!sizeof($this->_list))
echo '<tr><td class="center" colspan="'.sizeof($this->_list).'">'.$this->l('No elements found').'</td></tr>';
$irow = 0;
foreach ($this->_list AS $tr)
{
$id = (int)($tr['id_'.$this->table]);
echo '
<tr'.($irow++ % 2 ? ' class="alt_row"' : '').'>
<td style="vertical-align: top; padding: 4px 0 4px 0" class="center"><input type="checkbox" name="'.$this->table.'Box[]" value="'.$id.'" class="noborder" /></td>
<td style="width: 140px; vertical-align: top; padding: 4px 0 4px 0; cursor: pointer" onclick="$(\'#attributes_'.$id.'\').slideToggle();">'.$tr['name'].'</td>
<td style="vertical-align: top; padding: 4px 0 4px 0; width: 340px">
<div id="attributes_'.$id.'" style="display: none">
<table class="table" cellpadding="0" cellspacing="0">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'attribute'.$id.'Box[]\', this.checked)" /></th>
<th width="100%">'.$this->l('Attribute').'</th>
<th>'.$this->l('Actions').'</th>
</tr>';
$attributes = AttributeGroup::getAttributes((int)($cookie->id_lang), $id);
foreach ($attributes AS $attribute)
{
echo '
<tr>
<td class="center"><input type="checkbox" name="attribute'.$id.'Box[]" value="'.$attribute['id_attribute'].'" class="noborder" /></td>
<td>
'.($tr['is_color_group'] ? '<div style="float: left; width: 18px; height: 12px; border: 1px solid #996633; background-color: '.$attribute['color'].'; margin-right: 4px;"></div>' : '')
.$attribute['name'].'
</td>
<td class="center">
<a href="'.$currentIndex.'&id_attribute='.$attribute['id_attribute'].'&updateattribute&token='.$this->token.'">
<img src="../img/admin/edit.gif" border="0" alt="'.$this->l('Edit').'" title="'.$this->l('Edit').'" /></a>&nbsp;
<a href="'.$currentIndex.'&id_attribute='.$attribute['id_attribute'].'&deleteattribute&token='.$this->token.'"
onclick="return confirm(\''.$this->l('Delete attribute', __CLASS__, true, false).' : '.$attribute['name'].'?\');">
<img src="../img/admin/delete.gif" border="0" alt="'.$this->l('Delete').'" title="'.$this->l('Delete').'" /></a>
</td>
</tr>';
}
echo '
</table>
<p><input type="Submit" class="button" name="submitDelattribute" value="'.$this->l('Delete selection').'"
onclick="changeFormParam(this.form, \''.$currentIndex.'\', '.$id.'); return confirm(\''.$this->l('Delete selected items?', __CLASS__, true, false).'\');" /></p>
</div>
</td>';
echo '
<td style="vertical-align: top; padding: 4px 0 4px 0" class="center">
<a href="'.$currentIndex.'&id_'.$this->table.'='.$id.'&update'.$this->table.'&token='.$this->token.'">
<img src="../img/admin/edit.gif" border="0" alt="'.$this->l('Edit').'" title="'.$this->l('Edit').'" /></a>&nbsp;
<a href="'.$currentIndex.'&id_'.$this->table.'='.$id.'&delete'.$this->table.'&token='.$this->token.'" onclick="return confirm(\''.$this->l('Delete item', __CLASS__, true, false).' : '.$tr['name'].'?\');">
<img src="../img/admin/delete.gif" border="0" alt="'.$this->l('Delete').'" title="'.$this->l('Delete').'" /></a>
</td>
</tr>';
}
$this->displayListFooter();
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<form action="'.$currentIndex.'&token='.$this->token.'" method="post">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/asterisk.gif" />'.$this->l('Attributes group').'</legend>
<label>'.$this->l('Name:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="name_'.$language['id_lang'].'" value="'.htmlspecialchars($this->getFieldValue($obj, 'name', (int)($language['id_lang']))).'" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name¤public_name', 'name');
echo '
<div class="clear"></div>
</div>
<label>'.$this->l('Public name:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="public_name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="public_name_'.$language['id_lang'].'" value="'.htmlspecialchars($this->getFieldValue($obj, 'public_name', (int)($language['id_lang']))).'" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
<p style="clear: both">'.$this->l('Term or phrase displayed to the customer').'</p>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name¤public_name', 'public_name');
echo '
<div class="clear"></div>
</div>
<label>'.$this->l('Color group:').' </label>
<div class="margin-form">
<input type="radio" name="is_color_group" id="is_color_group_on" value="1" '.($this->getFieldValue($obj, 'is_color_group') ? 'checked="checked" ' : '').'/>
<label class="t" for="is_color_group_on"><img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Yes').'" /></label>
<input type="radio" name="is_color_group" id="is_color_group_off" value="0" '.(!$this->getFieldValue($obj, 'is_color_group') ? 'checked="checked" ' : '').'/>
<label class="t" for="is_color_group_off"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('No').'" /></label>
<p>'.$this->l('This is a color group').'</p>
</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('GroupShop association:').'</label><div class="margin-form">';
$this->displayAssoGroupShop();
echo '</div>';
}
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
}

View File

@@ -1,307 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7320 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminBackup extends AdminTab
{
/** @var string The field we are sorting on */
protected $_sortBy = 'date';
public function __construct()
{
$this->table = 'backup';
$this->className = 'Backup';
parent::__construct();
$this->edit = false;
$this->delete = true;
$this->view = true;
$this->deleted = false;
$this->requiredDatabase = false;
$this->fieldsDisplay = array (
'date' => array('title' => $this->l('Date'), 'type' => 'datetime', 'width' => 120, 'align' => 'right'),
'age' => array('title' => $this->l('Age')),
'filename' => array('title' => $this->l('File name'), 'width' => 200),
'filesize' => array('title' => $this->l('File size')));
$this->optionTitle = $this->l('Backup options');
$this->_fieldsOptions = array(
'PS_BACKUP_ALL' => array('title' => $this->l('Ignore statistics tables:'),
'desc' => $this->l('The following tables will NOT be backed up if you enable this option:').'<br />'._DB_PREFIX_.'connections, '._DB_PREFIX_.'connections_page, '._DB_PREFIX_.'connections_source, '._DB_PREFIX_.'guest, '._DB_PREFIX_.'statssearch', 'cast' => 'intval', 'type' => 'bool'),
'PS_BACKUP_DROP_TABLE' => array('title' => $this->l('Drop existing tables during import:'),
'desc' => $this->l('Select this option to instruct the backup file to drop your tables prior to restoring the backed up data').'<br />(ie. "DROP TABLE IF EXISTS")', 'cast' => 'intval', 'type' => 'bool'));
$this->identifier = 'filename';
}
/**
* Load class object using identifier in $_GET (if possible)
* otherwise return an empty object
* This method overrides the one in AdminTab because AdminTab assumes the id is a UnsignedInt
* "Backups" Directory in admin directory must be writeable (CHMOD 777)
* @param boolean $opt Return an empty object if load fail
* @return object
*/
protected function loadObject($opt = false)
{
if ($id = Tools::getValue($this->identifier))
return new $this->className($id);
return new $this->className();
}
/**
* Creates a new backup, and then displays the normal menu
*/
public function displayForm($isMainTab = true)
{
if(is_writable(PS_ADMIN_DIR.'/backups/'))
{
if (!($object = $this->loadObject()))
return;
if ($object->add())
{
echo '<div class="conf confirm"><img src="../img/admin/ok.gif" />&nbsp;'.$this->l('It appears that the Backup was successful, however, you must download and carefully verify the Backup file.').'</div>';
if ($this->tabAccess['view'] === '1')
echo '
<fieldset style="margin: 40px 0;" class="width3">
<legend><img src="../img/admin/AdminBackup.gif" alt="" class="icon" /> '.$this->l('Download').'</legend>
<p style="font-size: 13px;"><a href="'.$object->getBackupURL().'"><img src="../img/admin/AdminBackup.gif" alt="" class="icon" /></a><b><a href="'.$object->getBackupURL().'">'.$this->l('Download the Backup file').' ('.number_format((filesize($object->id)*0.000001), 2, '.', '').$this->l('Mb').')</a></b><br /><br />
'.$this->l('Tip: You can also download this file by FTP, Backup files are located in "admin/backups" directory.').'</p>
</fieldset>';
$this->displayHowTo(false);
}
elseif ($object->error)
$this->_errors[] = $object->error;
}
else
$this->_errors[] = $this->l('"Backups" Directory in admin directory must be writeable (CHMOD 755 / 777)');
$this->displayErrors();
}
/**
* Displays the page which allows the backup to be downloaded
*/
public function viewbackup()
{
global $currentIndex;
if (!($object = $this->loadObject()))
return;
if ($object->id)
{
$url = $object->getBackupURL();
echo '<div class="conf confirm"><img src="../img/admin/ok.gif" />&nbsp;'.$this->l('Beginning download ...').'</div>';
echo '<br />'.$this->l('Back-up file should automatically download.');
echo '<br /><br />'.$this->l('If not,').' <b><a href="'.$url.'">'.$this->l('please click here!').'</a></b>';
echo '<iframe width="0" height="0" scrolling="no" frameborder="0" src="'.$url.'"></iframe>';
echo '<br /><br /><br /><a href="'.$currentIndex.'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to list').'</a><br />';
}
elseif ($object->error)
$this->_errors[] = $object->error;
$this->displayErrors();
}
public function displayHowTo($showForm = true)
{
global $currentIndex;
echo '
<div class="error width1" style="float: left; margin-right: 10px;">
<p>'.$this->l('Disclaimer before creating a new Backup').'</p>
<ol style="font-size: 11px; font-weight: normal; line-height: 20px; padding-left: 10px;">
<li>'.$this->l('PrestaShop is not responsible for your database, Backups, restore and data.').'</li>
<li>'.$this->l('PrestaShop is an Open-source software, you are using it at your own risk under the licence agreement.').'</li>
<li>'.$this->l('You should Backup your data on a regular basis (both files and database).').'</li>
<li>'.$this->l('This function only backs up your database, not your files.').'</li>
<li>'.$this->l('By default, your existing database tables will be deleted during Backup restore (see options).').'</li>
<li>'.$this->l('Always verify the quality and integrity of your Backups files.').'</li>
<li>'.$this->l('Always verify that your Backups files are complete, up-to-date and valid. Even if you had a success message during the Backup process.').'</li>
<li>'.$this->l('Always check your data.').'</li>
<li>'.$this->l('Never restore a Backup on a live site.').'</li>
</ol>';
if ($showForm)
echo '
<form action="'.$currentIndex.'&add'.$this->table.'&token='.$this->token.'" method="post" style="text-align: center;">
<input type="submit" class="button" value="'.$this->l('I read the disclaimer - Create a new Backup').'" style="padding: 10px; font-weight: bold; border: 1px solid;" />
</form>';
echo '
</div>
<div class="warn width2" style="float: left;">
<p>'.$this->l('How-to restore a database Backup in 10 easy steps').'</p>
<ol style="font-size: 11px; font-weight: normal; line-height: 20px;">
<li>'.$this->l('Turn off the "Enable Shop" option in the "Preferences" tab.').'</li>
<li>'.$this->l('Download the Backup from the list below or from your FTP server (in the folder "admin/backups").').'</li>
<li>'.$this->l('Check the Backup integrity: look for errors, incomplete file. Verify all your data.').'</li>
<li>'.$this->l('Ask your hosting provider for a "phpMyAdmin" access to your database').'</li>
<li>'.$this->l('Connect to "phpMyAdmin" and select your current database').'</li>
<li>'.$this->l('Unless you enabled the "Drop existing tables" option, you must delete all tables from your current database.').'</li>
<li>'.$this->l('At the top of the screen select the tab "Import"').'</li>
<li>'.$this->l('Click on the "Browse..." button and select the Backup file from your hard drive').'</li>
<li>'.$this->l('Check the max. allowed filesize (ie. Max: 16Mb)').'<br />'.$this->l('If your Backup file exceeds this limit, contact your hosting provider').'</li>
<li>'.$this->l('Click on the "Go" button and wait during the import, the process can take several minutes').'</li>
</ol>
</div>
<div class="clear"></div>';
}
public function displayList()
{
global $currentIndex;
// Test if the backup dir is writable
if(!is_writable(PS_ADMIN_DIR.'/backups/'))
$this->displayWarning($this->l('"Backups" Directory in admin directory must be writeable (CHMOD 755 / 777)'));
$this->displayErrors();
$this->displayHowTo();
parent::displayList();
}
public function getList($id_lang, $orderBy = NULL, $orderWay = NULL, $start = 0, $limit = NULL, $id_lang_shop = NULL)
{
global $cookie;
if (!Validate::isTableOrIdentifier($this->table))
die('filter is corrupted');
if (empty($orderBy))
$orderBy = Tools::getValue($this->table.'Orderby', $this->_defaultOrderBy);
if (empty($orderWay))
$orderWay = Tools::getValue($this->table.'Orderway', 'ASC');
// Try and obtain getList arguments from $_GET
$orderBy = Tools::getValue($this->table.'Orderby');
$orderWay = Tools::getValue($this->table.'Orderway');
// Validate the orderBy and orderWay fields
switch ($orderBy)
{
case 'filename':
case 'filesize':
case 'date':
case 'age':
break;
default:
$orderBy = 'date';
}
switch ($orderWay)
{
case 'asc':
case 'desc':
break;
default:
$orderWay = 'desc';
}
if (empty($limit))
$limit = ((!isset($cookie->{$this->table.'_pagination'})) ? $this->_pagination[0] : $limit = $cookie->{$this->table.'_pagination'});
$limit = (int)(Tools::getValue('pagination', $limit));
$cookie->{$this->table.'_pagination'} = $limit;
/* Determine offset from current page */
if (!empty($_POST['submitFilter'.$this->table]) AND is_numeric($_POST['submitFilter'.$this->table]))
$start = (int)($_POST['submitFilter'.$this->table] - 1) * $limit;
$this->_lang = (int)($id_lang);
$this->_orderBy = $orderBy;
$this->_orderWay = strtoupper($orderWay);
$this->_list = array();
// Find all the backups
$dh = @opendir(PS_ADMIN_DIR.'/backups/');
if ($dh === false)
{
$this->_errors[] = Tools::displayError('Unable to open backup directory .').addslashes(PS_ADMIN_DIR.'/backups/').'"';
return;
}
while (($file = readdir($dh)) !== false)
{
if (preg_match('/^([\d]+-[a-z\d]+)\.sql(\.gz|\.bz2)?$/', $file, $matches) == 0)
continue;
$timestamp = (int)($matches[1]);
$date = date('Y-m-d h:i:s', $timestamp);
$age = time() - $timestamp;
if ($age < 3600)
$age = '< 1 '.$this->l('hour');
else if ($age < 86400)
{
$age = floor($age / 3600);
$age = $age.' '.(($age == 1) ? $this->l('hour') : $this->l('hours'));
}
else
{
$age = floor($age / 86400);
$age = $age.' '.(($age == 1) ? $this->l('day') : $this->l('days'));
}
$size = filesize(PS_ADMIN_DIR.'/backups/'.$file);
$this->_list[] = array(
'filename' => $file,
'age' => $age,
'date' => $date,
'filesize' => number_format($size / 1000, 2).' Kb',
'timestamp' => $timestamp,
'filesize_sort' => $size,
);
}
closedir($dh);
$this->_listTotal = count($this->_list);
// Sort the _list based on the order requirements
switch ($this->_orderBy)
{
case 'filename':
$this->_sortBy = 'filename';
$sorter = 'str_sort';
break;
case 'filesize':
$this->_sortBy = 'filesize_sort';
$sorter = 'int_sort';
break;
case 'age':
case 'date':
$this->_sortBy = 'timestamp';
$sorter = 'int_sort';
break;
}
usort($this->_list, array($this, $sorter));
$this->_list = array_slice($this->_list, $start, $limit);
}
public function int_sort($a, $b)
{
return $this->_orderWay == 'ASC' ? $a[$this->_sortBy] - $b[$this->_sortBy] : $b[$this->_sortBy] - $a[$this->_sortBy];
}
public function str_sort($a, $b)
{
return $this->_orderWay == 'ASC' ? strcmp($a[ $this->_sortBy], $b[$this->_sortBy]) : strcmp($b[ $this->_sortBy], $a[$this->_sortBy]);
}
}

View File

@@ -1,357 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7300 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminCMS extends AdminTab
{
private $_category;
public function __construct()
{
$this->table = 'cms';
$this->className = 'CMS';
$this->lang = true;
$this->edit = true;
$this->view = true;
$this->delete = true;
$this->fieldsDisplay = array(
'id_cms' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'link_rewrite' => array('title' => $this->l('URL'), 'width' => 200),
'meta_title' => array('title' => $this->l('Title'), 'width' => 300),
'position' => array('title' => $this->l('Position'), 'width' => 40,'filter_key' => 'position', 'align' => 'center', 'position' => 'position'),
'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false)
);
$this->_category = AdminCMSContent::getCurrentCMSCategory();
$this->_join = '
LEFT JOIN `'._DB_PREFIX_.'cms_category` c ON (c.`id_cms_category` = a.`id_cms_category`)';
$this->_select = 'a.position ';
$this->_filter = 'AND c.id_cms_category = '.(int)($this->_category->id);
parent::__construct();
}
private function _displayDraftWarning($active)
{
return
'<div class="warn draft" style="'.($active ? 'display:none' : '').'">
<p>
<span style="float: left">
<img src="../img/admin/warn2.png" />
'.$this->l('Your CMS page will be saved as a draft').'
</span>
<input type="button" class="button" style="float: right;" value="'.$this->l('Save and preview').'" onclick="submitAddcmsAndPreview();">
<input type="hidden" name="previewSubmitAddcmsAndPreview" id="previewSubmitAddcmsAndPreview" />
<br class="clear" />
</p>
</div>';
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
$obj = $this->loadObject(true);
$iso = Language::getIsoById((int)($cookie->id_lang));
$divLangName = 'meta_title¤meta_description¤meta_keywords¤ccontent¤link_rewrite';
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.Tools::getAdminTokenLite('AdminCMSContent').'" method="post" name="cms" id="cms">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
'.$this->_displayDraftWarning($obj->active).'
<fieldset><legend><img src="../img/admin/cms.gif" />'.$this->l('CMS page').'</legend>';
// META TITLE
echo '<label>'.$this->l('CMS Category:').' </label>
<div class="margin-form">
<select name="id_cms_category">';
$categories = CMSCategory::getCategories((int)($cookie->id_lang), false);
CMSCategory::recurseCMSCategory($categories, $categories[0][1], 1, $this->getFieldValue($obj, 'id_cms_category'));
echo '
</select>
</div>
<label>'.$this->l('Meta title').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo ' <div id="meta_title_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="40" type="text" onkeyup="copyMeta2friendlyURL();" id="name_'.$language['id_lang'].'" name="meta_title_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_title', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, $divLangName, 'meta_title');
echo ' </div><div class="clear space">&nbsp;</div>';
// META DESCRIPTION
echo ' <label>'.$this->l('Meta description').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo ' <div id="meta_description_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="50" type="text" name="meta_description_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" />
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, $divLangName, 'meta_description');
echo ' </div><div class="clear space">&nbsp;</div>';
// META KEYWORDS
echo ' <label>'.$this->l('Meta keywords').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo ' <div id="meta_keywords_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="50" type="text" name="meta_keywords_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_keywords', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" />
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, $divLangName, 'meta_keywords');
echo ' </div><div class="clear space">&nbsp;</div>';
// LINK REWRITE
echo ' <label>'.$this->l('Friendly URL').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo ' <div id="link_rewrite_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="30" type="text" id="input_link_rewrite_'.$language['id_lang'].'" name="link_rewrite_'.$language['id_lang'].'" onkeyup="this.value = str2url(this.value); updateFriendlyURL();" value="'.htmlentities($this->getFieldValue($obj, 'link_rewrite', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, $divLangName, 'link_rewrite');
echo ' </div><div class="clear space">&nbsp;</div>';
// CONTENT
echo ' <label>'.$this->l('Page content').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo ' <div id="ccontent_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').';float: left;">
<textarea class="rte" cols="80" rows="30" id="content_'.$language['id_lang'].'" name="content_'.$language['id_lang'].'">'.htmlentities(stripslashes($this->getFieldValue($obj, 'content', $language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, $divLangName, 'ccontent');
echo ' </div><div class="clear space">&nbsp;</div>
<label>'.$this->l('Enable:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" onclick="toggleDraftWarning(false);" value="1" '.($this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" onclick="toggleDraftWarning(true);" value="0" '.(!$this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('Shop association:').'</label><div class="margin-form">';
$this->displayAssoShop();
echo '</div>';
}
// SUBMIT
echo ' <div class="margin-form space">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset><br />
'.$this->_displayDraftWarning($obj->active).'
</form>';
// TinyMCE
global $cookie;
$iso = Language::getIsoById((int)($cookie->id_lang));
$isoTinyMCE = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en');
$ad = dirname($_SERVER["PHP_SELF"]);
echo '
<script type="text/javascript">
var iso = \''.$isoTinyMCE.'\' ;
var pathCSS = \''._THEME_CSS_DIR_.'\' ;
var ad = \''.$ad.'\' ;
</script>
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>';
}
public function display($token = NULL)
{
global $currentIndex, $cookie;
if (($id_cms_category = (int)Tools::getValue('id_cms_category')))
$currentIndex .= '&id_cms_category='.$id_cms_category;
$this->getList((int)($cookie->id_lang), !$cookie->__get($this->table.'Orderby') ? 'position' : NULL, !$cookie->__get($this->table.'Orderway') ? 'ASC' : NULL);
//$this->getList((int)($cookie->id_lang));
if (!$id_cms_category)
$id_cms_category = 1;
echo '<h3>'.(!$this->_listTotal ? ($this->l('No pages found')) : ($this->_listTotal.' '.($this->_listTotal > 1 ? $this->l('pages') : $this->l('page')))).' '.
$this->l('in category').' "'.stripslashes(CMSCategory::hideCMSCategoryPosition($this->_category->getName())).'"</h3>';
echo '<a href="'.$currentIndex.'&id_cms_category='.$id_cms_category.'&add'.$this->table.'&token='.Tools::getAdminTokenLite('AdminCMSContent').'"><img src="../img/admin/add.gif" border="0" /> '.$this->l('Add a new page').'</a>
<div style="margin:10px;">';
$this->displayList($token);
echo '</div>';
}
public function displayList($token = NULL)
{
global $currentIndex;
/* Display list header (filtering, pagination and column names) */
$this->displayListHeader($token);
if (!sizeof($this->_list))
echo '<tr><td class="center" colspan="'.(sizeof($this->fieldsDisplay) + 2).'">'.$this->l('No items found').'</td></tr>';
/* Show the content of the table */
$this->displayListContent($token);
/* Close list table and submit button */
$this->displayListFooter($token);
}
function postProcess()
{
global $cookie, $link, $currentIndex;
if (Tools::isSubmit('viewcms') AND ($id_cms = (int)(Tools::getValue('id_cms'))) AND $cms = new CMS($id_cms, (int)($cookie->id_lang)) AND Validate::isLoadedObject($cms))
{
$redir = $link->getCMSLink($cms);
if (!$cms->active)
{
$admin_dir = dirname($_SERVER['PHP_SELF']);
$admin_dir = substr($admin_dir, strrpos($admin_dir,'/') + 1);
$redir .= '?adtoken='.Tools::encrypt('PreviewCMS'.$cms->id).'&ad='.$admin_dir;
}
Tools::redirectAdmin($redir);
}
elseif (Tools::isSubmit('deletecms'))
{
if (Tools::getValue('id_cms') == Configuration::get('PS_CONDITIONS_CMS_ID'))
{
Configuration::updateValue('PS_CONDITIONS', 0);
Configuration::updateValue('PS_CONDITIONS_CMS_ID', 0);
}
$cms = new CMS((int)(Tools::getValue('id_cms')));
$cms->cleanPositions($cms->id_cms_category);
if (!$cms->delete())
$this->_errors[] = Tools::displayError('An error occurred while deleting object.').' <b>'.$this->table.' ('.mysql_error().')</b>';
else
Tools::redirectAdmin($currentIndex.'&id_cms_category='.$cms->id_cms_category.'&conf=1&token='.Tools::getAdminTokenLite('AdminCMSContent'));
}/* Delete multiple objects */
elseif (Tools::getValue('submitDel'.$this->table))
{
if ($this->tabAccess['delete'] === '1')
{
if (isset($_POST[$this->table.'Box']))
{
$cms = new CMS();
$result = true;
$result = $cms->deleteSelection(Tools::getValue($this->table.'Box'));
if ($result)
{
$cms->cleanPositions((int)(Tools::getValue('id_cms_category')));
Tools::redirectAdmin($currentIndex.'&conf=2&token='.Tools::getAdminTokenLite('AdminCMSContent').'&id_category='.(int)(Tools::getValue('id_cms_category')));
}
$this->_errors[] = Tools::displayError('An error occurred while deleting selection.');
}
else
$this->_errors[] = Tools::displayError('You must select at least one element to delete.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
elseif (Tools::isSubmit('submitAddcms') OR Tools::isSubmit('submitAddcmsAndPreview'))
{
parent::validateRules();
if (!sizeof($this->_errors))
{
if (!$id_cms = (int)(Tools::getValue('id_cms')))
{
$cms = new CMS();
$this->copyFromPost($cms, 'cms');
if (!$cms->add())
$this->_errors[] = Tools::displayError('An error occurred while creating object.').' <b>'.$this->table.' ('.mysql_error().')</b>';
elseif (Tools::isSubmit('submitAddcmsAndPreview'))
{
$preview_url = $link->getCMSLink($cms, $this->getFieldValue($object, 'link_rewrite', $this->_defaultFormLanguage), (int)($cookie->id_lang));
if (!$cms->active)
{
$admin_dir = dirname($_SERVER['PHP_SELF']);
$admin_dir = substr($admin_dir, strrpos($admin_dir,'/') + 1);
$token = Tools::encrypt('PreviewCMS'.$cms->id);
$preview_url .= $object->active ? '' : '&adtoken='.$token.'&ad='.$admin_dir;
}
Tools::redirectAdmin($preview_url);
}
else
Tools::redirectAdmin($currentIndex.'&id_cms_category='.$cms->id_cms_category.'&conf=3&token='.Tools::getAdminTokenLite('AdminCMSContent'));
}
else
{
$cms = new CMS($id_cms);
$this->copyFromPost($cms, 'cms');
if (!$cms->update())
$this->_errors[] = Tools::displayError('An error occurred while updating object.').' <b>'.$this->table.' ('.mysql_error().')</b>';
elseif (Tools::isSubmit('submitAddcmsAndPreview'))
{
$preview_url = $link->getCMSLink($cms, $this->getFieldValue($object, 'link_rewrite', $this->_defaultFormLanguage), (int)($cookie->id_lang));
if (!$cms->active)
{
$admin_dir = dirname($_SERVER['PHP_SELF']);
$admin_dir = substr($admin_dir, strrpos($admin_dir,'/') + 1);
$token = Tools::encrypt('PreviewCMS'.$cms->id);
$preview_url .= $object->active ? '' : '&adtoken='.$token.'&ad='.$admin_dir;
}
Tools::redirectAdmin($preview_url);
}
else
Tools::redirectAdmin($currentIndex.'&id_cms_category='.$cms->id_cms_category.'&conf=4&token='.Tools::getAdminTokenLite('AdminCMSContent'));
}
}
}
elseif (Tools::getValue('position'))
{
if ($this->tabAccess['edit'] !== '1')
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
elseif (!Validate::isLoadedObject($object = $this->loadObject()))
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
elseif (!$object->updatePosition((int)(Tools::getValue('way')), (int)(Tools::getValue('position'))))
$this->_errors[] = Tools::displayError('Failed to update the position.');
else
Tools::redirectAdmin($currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&conf=4'.(($id_category = (int)(Tools::getValue('id_cms_category'))) ? ('&id_cms_category='.$id_category) : '').'&token='.Tools::getAdminTokenLite('AdminCMSContent'));
}
/* Change object statuts (active, inactive) */
elseif (Tools::isSubmit('status') AND Tools::isSubmit($this->identifier))
{
if ($this->tabAccess['edit'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()))
{
if ($object->toggleStatus())
Tools::redirectAdmin($currentIndex.'&conf=5'.((int)Tools::getValue('id_cms_category') ? '&id_cms_category='.(int)Tools::getValue('id_cms_category') : '').'&token='.Tools::getValue('token'));
else
$this->_errors[] = Tools::displayError('An error occurred while updating status.');
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
else
parent::postProcess(true);
}
}

View File

@@ -1,293 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminCMSCategories extends AdminTab
{
protected $maxImageSize = 300000;
/** @var object CMSCategory() instance for navigation*/
private $_CMSCategory;
public function __construct()
{
global $cookie;
$this->table = 'cms_category';
$this->className = 'CMSCategory';
$this->lang = true;
$this->edit = true;
$this->view = true;
$this->delete = true;
$this->fieldsDisplay = array(
'id_cms_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30),
'name' => array('title' => $this->l('Name'), 'width' => 100, 'callback' => 'hideCMSCategoryPosition'),
'description' => array('title' => $this->l('Description'), 'width' => 500, 'maxlength' => 90, 'orderby' => false),
'position' => array('title' => $this->l('Position'), 'width' => 40,'filter_key' => 'position', 'align' => 'center', 'position' => 'position'),
'active' => array('title' => $this->l('Displayed'), 'active' => 'status', 'align' => 'center', 'type' => 'bool', 'orderby' => false));
$this->_CMSCategory = AdminCMSContent::getCurrentCMSCategory();
$this->_filter = 'AND `id_parent` = '.(int)($this->_CMSCategory->id);
$this->_select = 'position ';
parent::__construct();
}
public function displayList($token = NULL)
{
global $currentIndex;
/* Display list header (filtering, pagination and column names) */
$this->displayListHeader($token);
if (!sizeof($this->_list))
echo '<tr><td class="center" colspan="'.(sizeof($this->fieldsDisplay) + 2).'">'.$this->l('No items found').'</td></tr>';
/* Show the content of the table */
$this->displayListContent($token);
/* Close list table and submit button */
$this->displayListFooter($token);
}
public function display($token = NULL)
{
global $currentIndex, $cookie;
$id_cms_category = (int)(Tools::getValue('id_cms_category', 1));
$this->getList((int)($cookie->id_lang), !$cookie->__get($this->table.'Orderby') ? 'position' : NULL, !$cookie->__get($this->table.'Orderway') ? 'ASC' : NULL);
echo '<h3>'.(!$this->_listTotal ? ($this->l('There are no subcategories')) : ($this->_listTotal.' '.($this->_listTotal > 1 ? $this->l('subcategories') : $this->l('subCMS Category')))).' '.$this->l('in CMS Category').' "'.stripslashes(CMSCategory::hideCMSCategoryPosition($this->_CMSCategory->getName())).'"</h3>';
echo '<a href="'.__PS_BASE_URI__.substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__)).'?tab=AdminCMSContent&add'.$this->table.'&id_parent='.Tools::getValue('id_cms_category').'&token='.($token!=NULL ? $token : $this->token).'"><img src="../img/admin/add.gif" border="0" /> '.$this->l('Add a new sub CMS Category').'</a>
<div style="margin:10px;">';
$this->displayList($token);
echo '</div>';
}
public function postProcess($token = NULL)
{
global $cookie, $currentIndex;
$this->tabAccess = Profile::getProfileAccess($cookie->profile, $this->id);
if (Tools::isSubmit('submitAdd'.$this->table))
{
if ($id_cms_category = (int)(Tools::getValue('id_cms_category')))
{
if (!CMSCategory::checkBeforeMove($id_cms_category, (int)(Tools::getValue('id_parent'))))
{
$this->_errors[] = Tools::displayError('CMS Category cannot be moved here');
return false;
}
}
}
/* Change object statuts (active, inactive) */
elseif (isset($_GET['statuscms_category']) AND Tools::getValue($this->identifier))
{
if ($this->tabAccess['edit'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()))
{
if ($object->toggleStatus())
Tools::redirectAdmin($currentIndex.'&conf=5'.((int)$object->id_parent ? '&id_cms_category='.(int)$object->id_parent : '').'&token='.Tools::getValue('token'));
else
$this->_errors[] = Tools::displayError('An error occurred while updating status.');
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
/* Delete object */
elseif (isset($_GET['delete'.$this->table]))
{
if ($this->tabAccess['delete'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()) AND isset($this->fieldImageSettings))
{
// check if request at least one object with noZeroObject
if (isset($object->noZeroObject) AND sizeof($taxes = call_user_func(array($this->className, $object->noZeroObject))) <= 1)
$this->_errors[] = Tools::displayError('You need at least one object.').' <b>'.$this->table.'</b><br />'.Tools::displayError('You cannot delete all of the items.');
else
{
$this->deleteImage($object->id);
if ($this->deleted)
{
$object->deleted = 1;
if ($object->update())
Tools::redirectAdmin($currentIndex.'&conf=1&token='.Tools::getValue('token'));
}
elseif ($object->delete())
Tools::redirectAdmin($currentIndex.'&conf=1&token='.Tools::getValue('token'));
$this->_errors[] = Tools::displayError('An error occurred during deletion.');
}
}
else
$this->_errors[] = Tools::displayError('An error occurred while deleting object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
elseif (isset($_GET['position']))
{
if ($this->tabAccess['edit'] !== '1')
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
elseif (!Validate::isLoadedObject($object = new CMSCategory((int)(Tools::getValue($this->identifier, Tools::getValue('id_cms_category_to_move', 1))))))
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
elseif (!$object->updatePosition((int)(Tools::getValue('way')), (int)(Tools::getValue('position'))))
$this->_errors[] = Tools::displayError('Failed to update the position.');
else
Tools::redirectAdmin($currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&conf=5'.(($id_category = (int)(Tools::getValue($this->identifier, Tools::getValue('id_cms_category_parent', 1)))) ? ('&'.$this->identifier.'='.$id_category) : '').'&token='.Tools::getAdminTokenLite('AdminCMSContent'));
}
/* Delete multiple objects */
elseif (Tools::getValue('submitDel'.$this->table))
{
if ($this->tabAccess['delete'] === '1')
{
if (isset($_POST[$this->table.'Box']))
{
$cms_category = new CMSCategory();
$result = true;
$result = $cms_category->deleteSelection(Tools::getValue($this->table.'Box'));
if ($result)
{
$cms_category->cleanPositions((int)(Tools::getValue('id_cms_category')));
Tools::redirectAdmin($currentIndex.'&conf=2&token='.Tools::getAdminTokenLite('AdminCMSContent').'&id_category='.(int)(Tools::getValue('id_cms_category')));
}
$this->_errors[] = Tools::displayError('An error occurred while deleting selection.');
}
else
$this->_errors[] = Tools::displayError('You must select at least one element to delete.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
parent::postProcess(true);
}
public function displayForm($token=NULL)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
$active = $this->getFieldValue($obj, 'active');
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.($token!=NULL ? $token : $this->token).'" method="post" enctype="multipart/form-data">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset style="width:520px"><legend><img src="../img/admin/tab-categories.gif" />'.$this->l('CMS Category').'</legend>
<label>'.$this->l('Name:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages as $language)
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" style="width: 260px" name="name_'.$language['id_lang'].'" id="name_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'name', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" '.((!$obj->id) ? ' onkeyup="copy2friendlyURL();"' : '').' /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Displayed:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.($active ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"><img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.(!$active ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
</div>
<label>'.$this->l('Parent CMS Category:').' </label>
<div class="margin-form">
<select name="id_parent">';
$categories = CMSCategory::getCategories((int)($cookie->id_lang), false);
CMSCategory::recurseCMSCategory($categories, $categories[0][1], 1, $this->getFieldValue($obj, 'id_parent'));
echo '
</select>
</div>
<label>'.$this->l('Description:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages as $language)
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<textarea name="description_'.$language['id_lang'].'" rows="5" cols="40">'.htmlentities($this->getFieldValue($obj, 'description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea>
</div>';
echo ' <p class="clear"></p>
</div>
<div class="clear"><br /></div>
<label>'.$this->l('Meta title:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages as $language)
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" name="meta_title_'.$language['id_lang'].'" id="meta_title_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_title', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Meta description:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages as $language)
echo '<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" name="meta_description_'.$language['id_lang'].'" id="meta_description_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Meta keywords:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages as $language)
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" name="meta_keywords_'.$language['id_lang'].'" id="meta_keywords_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_keywords', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Friendly URL:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages as $language)
echo '<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" name="link_rewrite_'.$language['id_lang'].'" id="link_rewrite_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'link_rewrite', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" onkeyup="this.value = str2url(this.value);" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Only letters and the minus (-) character are allowed').'<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l('Save and back to parent CMS Category').'" name="submitAdd'.$this->table.'AndBackToParent" class="button" />
&nbsp;<input type="submit" class="button" name="submitAdd'.$this->table.'" value="'.$this->l('Save').'"/>
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>
<p class="clear"></p>';
}
}

View File

@@ -1,129 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
include(PS_ADMIN_DIR.'/tabs/AdminCMSCategories.php');
include(PS_ADMIN_DIR.'/tabs/AdminCMS.php');
class AdminCMSContent extends AdminTab
{
/** @var object adminCMSCategories() instance */
private $adminCMSCategories;
/** @var object adminCMS() instance */
private $adminCMS;
/** @var object Category() instance for navigation*/
private static $_category = NULL;
public function __construct()
{
/* Get current category */
$id_cms_category = (int)(Tools::getValue('id_cms_category', Tools::getValue('id_cms_category_parent', 1)));
self::$_category = new CMSCategory($id_cms_category);
if (!Validate::isLoadedObject(self::$_category))
die('Category cannot be loaded');
$this->table = array('cms_category', 'cms');
$this->adminCMSCategories = new adminCMSCategories();
$this->adminCMS = new adminCMS();
parent::__construct();
}
/**
* Return current category
*
* @return object
*/
public static function getCurrentCMSCategory()
{
return self::$_category;
}
public function viewAccess($disable = false)
{
$result = parent::viewAccess($disable);
$this->adminCMSCategories->tabAccess = $this->tabAccess;
$this->adminCMS->tabAccess = $this->tabAccess;
return $result;
}
public function postProcess()
{
if (Tools::isSubmit('submitDelcms') OR Tools::isSubmit('previewSubmitAddcmsAndPreview') OR Tools::isSubmit('submitAddcms') OR isset($_GET['deletecms']) OR Tools::isSubmit('viewcms') OR (Tools::isSubmit('statuscms') AND Tools::isSubmit('id_cms')) OR (Tools::isSubmit('position') AND !Tools::isSubmit('id_cms_category_to_move')))
$this->adminCMS->postProcess();
if(Tools::isSubmit('submitDelcms_category') OR Tools::isSubmit('submitAddcms_categoryAndBackToParent') OR Tools::isSubmit('submitAddcms_category') OR isset($_GET['deletecms_category']) OR (Tools::isSubmit('statuscms_category') AND Tools::isSubmit('id_cms_category')) OR (Tools::isSubmit('position') AND Tools::isSubmit('id_cms_category_to_move')))
$this->adminCMSCategories->postProcess();
}
public function displayErrors()
{
parent::displayErrors();
$this->adminCMS->displayErrors();
$this->adminCMSCategories->displayErrors();
}
public function display()
{
global $currentIndex;
if (((Tools::isSubmit('submitAddcms_category') OR Tools::isSubmit('submitAddcms_categoryAndStay')) AND sizeof($this->adminCMSCategories->_errors)) OR isset($_GET['updatecms_category']) OR isset($_GET['addcms_category']))
{
$this->adminCMSCategories->displayForm($this->token);
echo '<br /><br /><a href="'.$currentIndex.'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to list').'</a><br />';
}
elseif (((Tools::isSubmit('submitAddcms') OR Tools::isSubmit('submitAddcmsAndStay')) AND sizeof($this->adminCMS->_errors)) OR isset($_GET['updatecms']) OR isset($_GET['addcms']))
{
$this->adminCMS->displayForm($this->token);
echo '<br /><br /><a href="'.$currentIndex.'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to list').'</a><br />';
}
else
{
$id_cms_category = (int)(Tools::getValue('id_cms_category'));
if (!$id_cms_category)
$id_cms_category = 1;
$cms_tabs = array('cms_category', 'cms');
// Cleaning links
$catBarIndex = $currentIndex;
foreach ($cms_tabs AS $tab)
if (Tools::getValue($tab.'Orderby') && Tools::getValue($tab.'Orderway'))
$catBarIndex = preg_replace('/&'.$tab.'Orderby=([a-z _]*)&'.$tab.'Orderway=([a-z]*)/i', '', $currentIndex);
echo '<div class="cat_bar"><span style="color: #3C8534;">'.$this->l('Current category').' :</span>&nbsp;&nbsp;&nbsp;'.getPath($catBarIndex, $id_cms_category,'','','cms').'</div>';
echo '<h2>'.$this->l('Categories').'</h2>';
$this->adminCMSCategories->display($this->token);
echo '<div style="margin:10px">&nbsp;</div>';
echo '<h2>'.$this->l('Pages in this category').'</h2>';
$this->adminCMS->display($this->token);
}
}
}

View File

@@ -1,379 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7321 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminCarriers extends AdminTab
{
protected $maxImageSize = 30000;
public function __construct()
{
global $cookie;
$this->table = 'carrier';
$this->className = 'Carrier';
$this->lang = true;
$this->edit = true;
$this->delete = true;
$this->deleted = true;
$this->fieldImageSettings = array('name' => 'logo', 'dir' => 's');
$this->fieldsDisplay = array(
'id_carrier' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Name'), 'width' => 100),
'logo' => array('title' => $this->l('Logo'), 'align' => 'center', 'image' => 's', 'orderby' => false, 'search' => false),
'delay' => array('title' => $this->l('Delay'), 'width' => 300, 'orderby' => false),
'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false),
'is_free' => array('title' => $this->l('Is Free'), 'align' => 'center', 'icon' => array(0 => 'disabled.gif', 1 => 'enabled.gif', 'default' => 'disabled.gif'), 'type' => 'bool', 'orderby' => false));
$this->optionTitle = $this->l('Carrier options');
$this->_fieldsOptions = array(
'PS_CARRIER_DEFAULT' => array('title' => $this->l('Default carrier:'), 'desc' => $this->l('The default carrier used in shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_carrier', 'list' => Carrier::getCarriers((int)(Configuration::get('PS_LANG_DEFAULT')), true , false,false, NULL, ALL_CARRIERS)),
);
parent::__construct();
}
public function displayTop()
{
echo
'<div class="hint clear" style="display:block;">'.
'&nbsp;<b>'.$this->l('How to create a new carrier?').'</b>'.
'<br />'.
'<ul>'.'
<li>'.$this->l('Click "Add new".').'<br />'.'</li>
<li>'.$this->l('Fill in the fields and click "Save".').'</li>
<li>'.$this->l('You need to decide a price range or a weight range for which the new carrier will be available. Under the "Shipping" tab, click either "Price Ranges" or "Weight Ranges".').'</li>
<li>'.$this->l('Click "Add new".').'</li>
<li>'.$this->l('Select the name of the carrier and define the price range or the weight range. For example the carrier can be made available for a weight range between 0 and 5kgs. Another carrier will have a range between 5 and 10kgs.').'</li>
<li>'.$this->l('When you are done, click "Save".').'</li>
<li>'.$this->l('Click on the "Shipping" tab.').'</li>
<li>'.$this->l('You need to choose the fees that will be applied for this carrier. At the bottom on the page, in the "Fees" section, select the name of the carrier.').'</li>
<li>'.$this->l('For each zone, enter a price. Click "Save".').'</li>
<li>'.$this->l('You\'re set! The new carrier will be displayed to your customers.').'</li>
</ul>
</div><br />';
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
$currentLanguage = (int)($cookie->id_lang);
echo '<script type="text/javascript">
$(document).ready(function(){
// At the loading
($("input[name=\'is_free\']:checked").val() == 0) ? $("#shipping_costs_div").show(): $("#shipping_costs_div").hide();
$("input[name=\'is_free\']").live("change", function(){
($("input[name=\'is_free\']:checked").val() == 0) ? $("#shipping_costs_div").show(): $("#shipping_costs_div").hide();
});
});
</script>
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post" enctype="multipart/form-data">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/delivery.gif" />'.$this->l('Carriers').'</legend>
<label>'.$this->l('Company:').' </label>
<div class="margin-form">
<input type="text" size="25" name="name" value="'.htmlentities($this->getFieldValue($obj, 'name'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Allowed characters: letters, spaces and').' ().-<span class="hint-pointer">&nbsp;</span></span>
<p class="clear">'.$this->l('Carrier name displayed during checkout').'<br />'.$this->l('With a value of 0, the carrier name will be replaced by the shop name').'</p>
</div>
<label>'.$this->l('Logo:').' </label>
<div class="margin-form">
<input type="file" name="logo" />
<p>'.$this->l('Upload logo from your computer').' (.gif, .jpg, .jpeg '.$this->l('or').' .png)</p>
</div>
<label>'.$this->l('Transit time:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="delay_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" size="41" maxlength="128" name="delay_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'delay', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'delay', 'delay');
echo '
<p style="clear: both">'.$this->l('Time taken for product delivery; displayed during checkout').'</p>
</div>
<label>'.$this->l('URL:').' </label>
<div class="margin-form">
<input type="text" size="40" name="url" value="'.htmlentities($this->getFieldValue($obj, 'url'), ENT_COMPAT, 'UTF-8').'" />
<p class="clear">'.$this->l('URL for the tracking number; type \'@\' where the tracking number will appear').'</p>
</div>
<label>'.$this->l('Zone').'</label>
<div class="margin-form">';
$carrier_zones = $obj->getZones();
$zones = Zone::getZones(false);
foreach ($zones AS $zone)
echo '<input type="checkbox" id="zone_'.$zone['id_zone'].'" name="zone_'.$zone['id_zone'].'" value="true" '.(Tools::getValue('zone_'.$zone['id_zone'], (is_array($carrier_zones) AND in_array(array('id_carrier' => $obj->id, 'id_zone' => $zone['id_zone'], 'name' => $zone['name'], 'active' => $zone['active']), $carrier_zones))) ? ' checked="checked"' : '').'><label class="t" for="zone_'.$zone['id_zone'].'">&nbsp;<b>'.$zone['name'].'</b></label><br />';
echo '<p>'.$this->l('The zone in which this carrier is to be used').'</p>
</div>
<label>'.$this->l('Group access').'</label>
<div class="margin-form">';
$groups = Group::getGroups((int)($cookie->id_lang));
if (sizeof($groups))
{
echo '
<table cellspacing="0" cellpadding="0" class="table" style="width: 28em;">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'groupBox[]\', this.checked)"'.(!isset($obj->id) ? 'checked="checked" ' : '').' /></th>
<th>'.$this->l('ID').'</th>
<th>'.$this->l('Group name').'</th>
</tr>';
$irow = 0;
foreach ($groups as $group)
echo '
<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td><input type="checkbox" name="groupBox[]" class="groupBox" id="groupBox_'.$group['id_group'].'" value="'.$group['id_group'].'" '.((Db::getInstance()->getValue('SELECT id_group FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier='.(int)($obj->id).' AND id_group='.(int)($group['id_group'])) OR (!isset($obj->id))) ? 'checked="checked" ' : '').'/></td>
<td>'.$group['id_group'].'</td>
<td><label for="groupBox_'.$group['id_group'].'" class="t">'.$group['name'].'</label></td>
</tr>';
echo '
</table>
<p style="padding:0px; margin:10px 0px 10px 0px;">'.$this->l('Mark all groups you want to give access to this carrier').'</p>
';
}
else
echo '<p>'.$this->l('No group created').'</p>';
echo ' </div>
<label>'.$this->l('Status:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.($this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.(!$this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Include or exclude carrier from list of carriers on Front Office').'</p>
</div>
<label>'.$this->l('Apply shipping cost:').' </label>
<div class="margin-form">
<input type="radio" name="is_free" id="is_free_on" value="0" '.(!$this->getFieldValue($obj, 'is_free') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" /></label>
<input type="radio" name="is_free" id="is_free_off" value="1" '.($this->getFieldValue($obj, 'is_free') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" /></label>
<p>'.$this->l('Apply shipping costs and additional shipping costs by products in carrier price').'</p>
</div>
<div id="shipping_costs_div">
<label>'.$this->l('Tax').'</label>
<div class="margin-form">
<select name="id_tax_rules_group" id="id_tax_rules_group" '.(Tax::excludeTaxeOption() ? 'disabled="disabled"' : '' ).'>
<option value="0">'.$this->l('No Tax').'</option>';
foreach (TaxRulesGroup::getTaxRulesGroups(true) AS $tax_rules_group)
echo '<option value="'.$tax_rules_group['id_tax_rules_group'].'" '.(($this->getFieldValue($obj, 'id_tax_rules_group') == $tax_rules_group['id_tax_rules_group']) ? ' selected="selected"' : '').'>'.$tax_rules_group['name'].'</option>';
echo '</select>
</div>
<label>'.$this->l('Shipping & handling:').' </label>
<div class="margin-form">
<input type="radio" name="shipping_handling" id="shipping_handling_on" value="1" '.($this->getFieldValue($obj, 'shipping_handling') ? 'checked="checked" ' : '').'/>
<label class="t" for="shipping_handling_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="shipping_handling" id="shipping_handling_off" value="0" '.(!$this->getFieldValue($obj, 'shipping_handling') ? 'checked="checked" ' : '').'/>
<label class="t" for="shipping_handling_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Include the shipping & handling costs in carrier price').'</p>
</div>
<label>'.$this->l('Billing:').' </label>
<div class="margin-form">
<input type="radio" name="shipping_method" id="billing_default" value="'.Carrier::SHIPPING_METHOD_DEFAULT.'" '.($this->getFieldValue($obj, 'shipping_method') == Carrier::SHIPPING_METHOD_DEFAULT ? 'checked="checked" ' : '').'/>
<label class="t" for="billing_default">'.$this->l('Default behavior').'</label><br />
<input type="radio" name="shipping_method" id="billing_price" value="'.Carrier::SHIPPING_METHOD_PRICE.'" '.($this->getFieldValue($obj, 'shipping_method') == Carrier::SHIPPING_METHOD_PRICE ? 'checked="checked" ' : '').'/>
<label class="t" for="billing_price">'.$this->l('According to total price').'</label><br />
<input type="radio" name="shipping_method" id="billing_weight" value="'.Carrier::SHIPPING_METHOD_WEIGHT.'" '.($this->getFieldValue($obj, 'shipping_method') == Carrier::SHIPPING_METHOD_WEIGHT ? 'checked="checked" ' : '').'/>
<label class="t" for="billing_weight">'.$this->l('According to total weight').'</label><br />
</div>
<label>'.$this->l('Out-of-range behavior:').' </label>
<div class="margin-form">
<select name="range_behavior">
<option value="0"'.(!$this->getFieldValue($obj, 'range_behavior') ? ' selected="selected"' : '').'>'.$this->l('Apply the cost of the highest defined range').'</option>
<option value="1"'.($this->getFieldValue($obj, 'range_behavior') ? ' selected="selected"' : '').'>'.$this->l('Disable carrier').'</option>
</select>
<p>'.$this->l('Out-of-range behavior when none is defined (e.g., when a customer\'s cart weight is greater than the highest range limit)').'</p>
</div>';
if($this->getFieldValue($obj, 'is_module'))
{
echo '<label>'.$this->l('Module:').' </label>
<div class="margin-form"><p> - '.
$this->l('This carrier is bound to this module ').' => '.$this->getFieldValue($obj, 'external_module_name').'</p>
<input type="hidden" name="is_module" value="1">
<input type="hidden" name="external_module_name" value="'.$this->getFieldValue($obj, 'external_module_name').'">';
if($this->getFieldValue($obj, 'shipping_external'))
{
echo '<p> - '.$this->l('The shipping costs are calculated outside of your shop').'</p>
<input type="hidden" name="shipping_external" value="1">';
}
if($this->getFieldValue($obj, 'need_range'))
{
echo '<p> - '.$this->l('This carrier uses PrestaShop range to calculate shipping costs').'</p>
<input type="hidden" name="need_range" value="1">';
}
echo '</div>';
}
echo '</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('Shop association:').'</label><div class="margin-form">';
$this->displayAssoShop();
echo '</div>';
}
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
public function beforeDelete($object)
{
return $object->isUsed();
}
public function afterDelete($object, $oldId)
{
$object->copyCarrierData((int)($oldId));
}
private function changeGroups($id_carrier, $delete = true)
{
if ($delete)
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier='.(int)($id_carrier));
$groups = Db::getInstance()->ExecuteS('SELECT id_group FROM `'._DB_PREFIX_.'group`');
foreach ($groups as $group)
if (in_array($group['id_group'], $_POST['groupBox']))
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'carrier_group (id_group, id_carrier) VALUES('.(int)($group['id_group']).','.(int)($id_carrier).')');
}
public function postProcess()
{
global $currentIndex;
if (Tools::getValue('submitAdd'.$this->table))
{
/* Checking fields validity */
$this->validateRules();
if (!sizeof($this->_errors))
{
$id = (int)(Tools::getValue('id_'.$this->table));
/* Object update */
if (isset($id) AND !empty($id))
{
if ($this->tabAccess['edit'] === '1')
{
$object = new $this->className($id);
if (Validate::isLoadedObject($object))
{
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier='.(int)($id));
$object->deleted = 1;
$object->update();
$objectNew = new $this->className();
$this->copyFromPost($objectNew, $this->table);
$result = $objectNew->add();
if (Validate::isLoadedObject($objectNew))
{
$this->afterDelete($objectNew, $object->id);
Hook::updateCarrier((int)($object->id), $objectNew);
}
$this->changeGroups($objectNew->id);
if (!$result)
$this->_errors[] = Tools::displayError('An error occurred while updating object.').' <b>'.$this->table.'</b>';
elseif ($this->postImage($objectNew->id))
{
$this->changeZones($objectNew->id);
Tools::redirectAdmin($currentIndex.'&id_'.$this->table.'='.$object->id.'&conf=4'.'&token='.$this->token);
}
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
/* Object creation */
else
{
if ($this->tabAccess['add'] === '1')
{
$object = new $this->className();
$this->copyFromPost($object, $this->table);
if (!$object->add())
$this->_errors[] = Tools::displayError('An error occurred while creating object.').' <b>'.$this->table.'</b>';
elseif (($_POST['id_'.$this->table] = $object->id /* voluntary */) AND $this->postImage($object->id) AND $this->_redirect)
{
$this->changeZones($object->id);
$this->changeGroups($object->id);
Tools::redirectAdmin($currentIndex.'&id_'.$this->table.'='.$object->id.'&conf=3'.'&token='.$this->token);
}
}
else
$this->_errors[] = Tools::displayError('You do not have permission to add here.');
}
}
}
else
{
if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox')))
OR (isset($_GET['delete'.$this->table]) AND Tools::getValue('id_carrier') == Configuration::get('PS_CARRIER_DEFAULT')))
$this->_errors[] = $this->l('Please set another carrier as default before deleting');
else
parent::postProcess();
}
}
function changeZones($id)
{
$carrier = new $this->className($id);
if (!Validate::isLoadedObject($carrier))
die (Tools::displayError('Object cannot be loaded'));
$zones = Zone::getZones(true);
foreach ($zones as $zone)
if (sizeof($carrier->getZone($zone['id_zone'])))
{
if (!isset($_POST['zone_'.$zone['id_zone']]) OR !$_POST['zone_'.$zone['id_zone']])
$carrier->deleteZone($zone['id_zone']);
}
else
if (isset($_POST['zone_'.$zone['id_zone']]) AND $_POST['zone_'.$zone['id_zone']])
$carrier->addZone($zone['id_zone']);
}
public function displayListContent($token = NULL)
{
foreach ($this->_list as $key => $list)
if ($list['name'] == '0')
$this->_list[$key]['name'] = Configuration::get('PS_SHOP_NAME');
parent::displayListContent($token);
}
}

View File

@@ -1,344 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7310 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminCarts extends AdminTab
{
public function __construct()
{
$this->table = 'cart';
$this->className = 'Cart';
$this->lang = false;
$this->edit = false;
$this->view = true;
$this->delete = true;
$this->_select = 'CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) `customer`, a.id_cart total, ca.name carrier, o.id_order ';
$this->_join = 'LEFT JOIN '._DB_PREFIX_.'customer c ON (c.id_customer = a.id_customer)
LEFT JOIN '._DB_PREFIX_.'currency cu ON (cu.id_currency = a.id_currency)
LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.id_carrier = a.id_carrier)
LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_cart = a.id_cart) ';
$this->fieldsDisplay = array(
'id_cart' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'id_order' => array('title' => $this->l('ID Order'), 'align' => 'center', 'width' => 25),
'customer' => array('title' => $this->l('Customer'), 'width' => 80, 'filter_key' => 'c!lastname'),
'total' => array('title' => $this->l('Total'), 'callback' => 'getOrderTotalUsingTaxCalculationMethod', 'orderby' => false, 'search' => false, 'width' => 50, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'currency' => true),
'carrier' => array('title' => $this->l('Carrier'), 'width' => 25, 'align' => 'center', 'callback' => 'replaceZeroByShopName', 'filter_key' => 'ca!name'),
'date_add' => array('title' => $this->l('Date'), 'width' => 90, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'));
$this->shopLinkType = 'shop';
parent::__construct();
}
public function viewDetails()
{
global $currentIndex, $cookie;
if (!($cart = $this->loadObject(true)))
return;
$customer = new Customer($cart->id_customer);
$customerStats = $customer->getStats();
$products = $cart->getProducts();
$customizedDatas = Product::getAllCustomizedDatas((int)($cart->id));
Product::addCustomizationPrice($products, $customizedDatas);
$summary = $cart->getSummaryDetails();
$discounts = $cart->getDiscounts();
$currency = new Currency($cart->id_currency);
$currentLanguage = new Language((int)($cookie->id_lang));
// display cart header
echo '<h2>'.(($customer->id) ? $customer->firstname.' '.$customer->lastname : $this->l('Guest')).' - '.$this->l('Cart #').sprintf('%06d', $cart->id).' '.$this->l('from').' '.$cart->date_upd.'</h2>';
/* Display customer information */
echo '
<br />
<div style="float: left;">
<fieldset style="width: 400px">
<legend><img src="../img/admin/tab-customers.gif" /> '.$this->l('Customer information').'</legend>
<span style="font-weight: bold; font-size: 14px;">';
if ($customer->id)
echo '
<a href="?tab=AdminCustomers&id_customer='.$customer->id.'&viewcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee)).'"> '.$customer->firstname.' '.$customer->lastname.'</a></span> ('.$this->l('#').$customer->id.')<br />
(<a href="mailto:'.$customer->email.'">'.$customer->email.'</a>)<br /><br />
'.$this->l('Account registered:').' '.Tools::displayDate($customer->date_add, (int)($cookie->id_lang), true).'<br />
'.$this->l('Valid orders placed:').' <b>'.$customerStats['nb_orders'].'</b><br />
'.$this->l('Total paid since registration:').' <b>'.Tools::displayPrice($customerStats['total_orders'], $currency, false).'</b><br />';
else
echo $this->l('Guest not registered').'</span>';
echo '</fieldset>';
echo '
</div>
<div style="float: left; margin-left: 40px">';
/* Display order information */
$id_order = (int)(Order::getOrderByCartId($cart->id));
$order = new Order($id_order);
if ($order->getTaxCalculationMethod() == PS_TAX_EXC)
{
$total_products = $summary['total_products'];
$total_discount = $summary['total_discounts_tax_exc'];
$total_wrapping = $summary['total_wrapping_tax_exc'];
$total_price = $summary['total_price_without_tax'];
$total_shipping = $summary['total_shipping_tax_exc'];
} else {
$total_products = $summary['total_products_wt'];
$total_discount = $summary['total_discounts'];
$total_wrapping = $summary['total_wrapping'];
$total_price = $summary['total_price'];
$total_shipping = $summary['total_shipping'];
}
echo '
<fieldset style="width: 400px">
<legend><img src="../img/admin/cart.gif" /> '.$this->l('Order information').'</legend>
<span style="font-weight: bold; font-size: 14px;">';
if ($order->id)
echo '
<a href="?tab=AdminOrders&id_order='.(int)($order->id).'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'"> '.$this->l('Order #').sprintf('%06d', $order->id).'</a></span>
<br /><br />
'.$this->l('Made on:').' '.Tools::displayDate($order->date_add, (int)$cookie->id_lang, true).'<br /><br /><br /><br />';
else
echo $this->l('No order created from this cart').'</span>';
echo '</fieldset>';
echo '
</div>';
// List of products
echo '
<br style="clear:both;" />
<fieldset style="margin-top:25px; width: 715px; ">
<legend><img src="../img/admin/cart.gif" alt="'.$this->l('Products').'" />'.$this->l('Cart summary').'</legend>
<div style="float:left;">
<table style="width: 700px;" cellspacing="0" cellpadding="0" class="table" id="orderProducts">
<tr>
<th align="center" style="width: 60px">&nbsp;</th>
<th>'.$this->l('Product').'</th>
<th style="width: 80px; text-align: center">'.$this->l('UP').'</th>
<th style="width: 20px; text-align: center">'.$this->l('Qty').'</th>
<th style="width: 30px; text-align: center">'.$this->l('Stock').'</th>
<th style="width: 90px; text-align: right; font-weight:bold;">'.$this->l('Total').'</th>
</tr>';
$tokenCatalog = Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)($cookie->id_employee));
foreach ($products as $k => $product)
{
if ($order->getTaxCalculationMethod() == PS_TAX_EXC)
{
$product_price = $product['price'];
$product_total = $product['total'];
} else {
$product_price = $product['price_wt'];
$product_total = $product['total_wt'];
}
$image = array();
if (isset($product['id_product_attribute']) AND (int)($product['id_product_attribute']))
$image = Db::getInstance()->getRow('
SELECT id_image
FROM '._DB_PREFIX_.'product_attribute_image
WHERE id_product_attribute = '.(int)($product['id_product_attribute']));
if (!isset($image['id_image']))
$image = Db::getInstance()->getRow('
SELECT id_image
FROM '._DB_PREFIX_.'image
WHERE id_product = '.(int)($product['id_product']).' AND cover = 1');
$productObj = new Product($product['id_product']);
/* Customization display */
$this->displayCustomizedDatas($customizedDatas, $product, $currency, $image, $tokenCatalog, $stock);
if ($product['cart_quantity'] > $product['customizationQuantityTotal'])
{
$imageProduct = new Image($image['id_image']);
echo '
<tr>
<td align="center">'.(isset($image['id_image']) ? cacheImage(_PS_IMG_DIR_.'p/'.$imageProduct->getExistingImgPath().'.jpg',
'product_mini_'.(int)($product['id_product']).(isset($product['id_product_attribute']) ? '_'.(int)($product['id_product_attribute']) : '').'.jpg', 45, 'jpg') : '--').'</td>
<td><a href="index.php?tab=AdminCatalog&id_product='.$product['id_product'].'&updateproduct&token='.$tokenCatalog.'">
<span class="productName">'.$product['name'].'</span><br />
'.($product['reference'] ? $this->l('Ref:').' '.$product['reference'] : '')
.(($product['reference'] AND $product['supplier_reference']) ? ' / '.$product['supplier_reference'] : '')
.'</a></td>
<td align="center">'.Tools::displayPrice($product_price, $currency, false).'</td>
<td align="center" class="productQuantity">'.((int)($product['cart_quantity']) - $product['customizationQuantityTotal']).'</td>
<td align="center" class="productQuantity">'.$productObj->getStock(isset($product['id_product_attribute']) ? $product['id_product_attribute'] : 0).'</td>
<td align="right">'.Tools::displayPrice($product_total, $currency, false).'</td>
</tr>';
}
}
echo '
<tr class="cart_total_product">
<td colspan="5">'.$this->l('Total products:').'</td>
<td class="price bold right">'.Tools::displayPrice($total_products, $currency, false).'</td>
</tr>';
if ($summary['total_discounts'] != 0)
echo '
<tr class="cart_total_voucher">
<td colspan="5">'.$this->l('Total vouchers:').'</td>
<td class="price-discount bold right">'.Tools::displayPrice($total_discount, $currency, false).'</td>
</tr>';
if ($summary['total_wrapping'] > 0)
echo '
<tr class="cart_total_voucher">
<td colspan="5">'.$this->l('Total gift-wrapping:').'</td>
<td class="price-discount bold right">'.Tools::displayPrice($total_wrapping, $currency, false).'</td>
</tr>';
if ($cart->getOrderTotal(true, Cart::ONLY_SHIPPING) > 0)
echo '
<tr class="cart_total_delivery">
<td colspan="5">'.$this->l('Total shipping:').'</td>
<td class="price bold right">'.Tools::displayPrice($total_shipping, $currency, false).'</td>
</tr>';
echo '
<tr class="cart_total_price">
<td colspan="5" class="bold">'.$this->l('Total:').'</td>
<td class="price bold right">'.Tools::displayPrice($total_price, $currency, false).'</td>
</tr>
</table>';
if (sizeof($discounts))
{
echo '
<table cellspacing="0" cellpadding="0" class="table" style="width:280px; margin:15px 0px 0px 420px;">
<tr>
<th><img src="../img/admin/coupon.gif" alt="'.$this->l('Discounts').'" />'.$this->l('Discount name').'</th>
<th align="center" style="width: 100px">'.$this->l('Value').'</th>
</tr>';
foreach ($discounts as $discount)
echo '
<tr>
<td><a href="?tab=AdminDiscounts&id_discount='.$discount['id_discount'].'&updatediscount&token='.Tools::getAdminToken('AdminDiscounts'.(int)(Tab::getIdFromClassName('AdminDiscounts')).(int)($cookie->id_employee)).'">'.$discount['name'].'</a></td>
<td align="center">- '.Tools::displayPrice($discount['value_real'], $currency, false).'</td>
</tr>';
echo '
</table>';
}
echo '<div style="float:left; margin-top:15px;">'.
$this->l('According to the group of this customer, prices are printed:').' '.($order->getTaxCalculationMethod() == PS_TAX_EXC ? $this->l('tax excluded.') : $this->l('tax included.')).'
</div></div>';
// Cancel product
echo '
</fieldset>
<div class="clear" style="height:20px;">&nbsp;</div>';
}
private function displayCustomizedDatas(&$customizedDatas, &$product, &$currency, &$image, $tokenCatalog, &$stock)
{
if (!($order = $this->loadObject(true)))
return;
if (is_array($customizedDatas) AND isset($customizedDatas[(int)($product['id_product'])][(int)($product['id_product_attribute'])]))
{
$image = new Image($image['id_image']);
echo '
<tr>
<td align="center">'.(isset($image['id_image']) ? cacheImage(_PS_IMG_DIR_.'p/'.$image->getExistingImgPath().'.jpg',
'product_mini_'.(int)($product['id_product']).(isset($product['id_product_attribute']) ? '_'.(int)($product['id_product_attribute']) : '').'.jpg', 45, 'jpg') : '--').'</td>
<td><a href="index.php?tab=AdminCatalog&id_product='.$product['id_product'].'&updateproduct&token='.$tokenCatalog.'">
<span class="productName">'.$product['name'].'</span><br />
'.($product['reference'] ? $this->l('Ref:').' '.$product['reference'] : '')
.(($product['reference'] AND $product['supplier_reference']) ? ' / '.$product['supplier_reference'] : '')
.'</a></td>
<td align="center">'.Tools::displayPrice($product['price_wt'], $currency, false).'</td>
<td align="center" class="productQuantity">'.$product['customizationQuantityTotal'].'</td>
<td align="center" class="productQuantity">'.(int)($stock['quantity']).'</td>
<td align="right">'.Tools::displayPrice($product['total_customization_wt'], $currency, false).'</td>
</tr>';
foreach ($customizedDatas[(int)($product['id_product'])][(int)($product['id_product_attribute'])] AS $customization)
{
echo '
<tr>
<td colspan="2">';
foreach ($customization['datas'] AS $type => $datas)
if ($type == _CUSTOMIZE_FILE_)
{
$i = 0;
echo '<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">';
foreach ($datas AS $data)
echo '<li style="display: inline; margin: 2px;">
<a href="displayImage.php?img='.$data['value'].'&name='.(int)($order->id).'-file'.++$i.'" target="_blank"><img src="'._THEME_PROD_PIC_DIR_.$data['value'].'_small" alt="" /></a>
</li>';
echo '</ul>';
}
elseif ($type == _CUSTOMIZE_TEXTFIELD_)
{
$i = 0;
echo '<ul style="margin: 0px 0px 4px 0px; padding: 0px 0px 0px 6px; list-style-type: none;">';
foreach ($datas AS $data)
echo '<li>'.($data['name'] ? $data['name'] : $this->l('Text #').++$i).$this->l(':').' '.$data['value'].'</li>';
echo '</ul>';
}
echo '</td>
<td align="center"></td>
<td align="center" class="productQuantity">'.$customization['quantity'].'</td>
<td align="center" class="productQuantity"></td>
<td align="center"></td>
</tr>';
}
}
}
public function display()
{
global $cookie;
if (isset($_GET['view'.$this->table]))
$this->viewDetails();
else
{
$this->getList((int)($cookie->id_lang), !Tools::getValue($this->table.'Orderby') ? 'date_add' : NULL, !Tools::getValue($this->table.'Orderway') ? 'DESC' : NULL);
$this->displayList();
}
}
protected function _displayDeleteLink($token = NULL, $id)
{
global $currentIndex;
foreach ($this->_list as $cart)
if ($id == $cart['id_cart'])
if ($cart['id_order'])
return;
$_cacheLang['Delete'] = $this->l('Delete', __CLASS__, true, false);
$_cacheLang['DeleteItem'] = $this->l('Delete item #', __CLASS__, true, false).$id.' ?)';
echo '
<a href="'.$currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token).'" onclick="return confirm(\''.$_cacheLang['DeleteItem'].'\');">
<img src="../img/admin/delete.gif" alt="'.$_cacheLang['Delete'].'" title="'.$_cacheLang['Delete'].'" /></a>
';
}
}

View File

@@ -1,204 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7499 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
include(PS_ADMIN_DIR.'/tabs/AdminCategories.php');
include(PS_ADMIN_DIR.'/tabs/AdminProducts.php');
class AdminCatalog extends AdminTab
{
/** @var object AdminCategories() instance */
private $adminCategories;
/** @var object AdminProducts() instance */
private $adminProducts;
/** @var object AttributeGenerator() instance */
private $attributeGenerator;
/** @var object imageResize() instance */
private $imageResize;
/** @var object Category() instance for navigation*/
private static $_category = NULL;
public function __construct()
{
/* Get current category */
$id_category = abs(Tools::getValue('id_category'));
$shop = new Shop(Shop::getCurrentShop(true));
if (!$id_category)
$id_category = $shop->id_category;
else if ($id_category != $shop->id_category)
{
// Check if current category is "inside" shop default category
$sql = 'SELECT nleft, nright FROM '._DB_PREFIX_.'category
WHERE id_category = '.$shop->id_category;
if ($result = Db::getInstance()->getRow($sql))
{
$sql = 'SELECT id_category FROM '._DB_PREFIX_.'category
WHERE id_category = '.(int)$id_category.'
AND nleft >= '.$result['nleft'].'
AND nright <= '.$result['nright'];
if (!Db::getInstance()->getValue($sql))
$id_category = $shop->id_category;
}
}
self::$_category = new Category($id_category, NULL, Shop::getCurrentShop(true));
if (!Validate::isLoadedObject(self::$_category))
die('Category cannot be loaded');
$this->table = array('category', 'product');
$this->adminCategories = new AdminCategories();
$this->adminProducts = new AdminProducts();
parent::__construct();
}
/**
* Return current category
*
* @return object
*/
public static function getCurrentCategory()
{
return self::$_category;
}
public function viewAccess($disable = false)
{
$result = parent::viewAccess($disable);
$this->adminCategories->tabAccess = $this->tabAccess;
$this->adminProducts->tabAccess = $this->tabAccess;
return $result;
}
public function postProcess()
{
if (!Tools::getValue('id_product'))
$this->adminCategories->postProcess();
elseif (isset($_GET['attributegenerator']))
{
if (!isset($this->attributeGenerator))
{
include_once(PS_ADMIN_DIR.'/tabs/AdminAttributeGenerator.php');
$this->attributeGenerator = new AdminAttributeGenerator();
}
$this->attributeGenerator->postProcess();
}
elseif (isset($_GET['imageresize']))
{
if (!isset($this->imageResize))
{
include_once(PS_ADMIN_DIR.'/tabs/AdminImageResize.php');
$this->imageResize = new AdminImageResize();
}
$this->imageResize->postProcess();
}
$this->adminProducts->postProcess($this->token);
}
public function displayErrors()
{
parent::displayErrors();
$this->adminProducts->displayErrors();
$this->adminCategories->displayErrors();
if (Validate::isLoadedObject($this->attributeGenerator))
$this->attributeGenerator->displayErrors();
if (Validate::isLoadedObject($this->imageResize))
$this->imageResize->displayErrors();
}
public function display()
{
global $currentIndex;
if (((Tools::isSubmit('submitAddcategory') OR Tools::isSubmit('submitAddcategoryAndStay')) AND sizeof($this->adminCategories->_errors)) OR isset($_GET['updatecategory']) OR isset($_GET['addcategory']))
{
$this->adminCategories->displayForm($this->token);
echo '<br /><br /><a href="'.$currentIndex.'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to list').'</a><br />';
}
elseif (((Tools::isSubmit('submitAddproduct') OR Tools::isSubmit('submitAddproductAndPreview') OR Tools::isSubmit('submitAddproductAndStay') OR Tools::isSubmit('submitSpecificPricePriorities') OR Tools::isSubmit('submitPriceAddition') OR Tools::isSubmit('submitPricesModification')) AND sizeof($this->adminProducts->_errors)) OR Tools::isSubmit('updateproduct') OR Tools::isSubmit('addproduct'))
{
$this->adminProducts->displayForm($this->token);
if (Tools::getValue('id_category') > 1)
echo '<br /><br /><a href="index.php?tab='.Tools::getValue('tab').'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to home').'</a><br />';
else
echo '<br /><br /><a href="index.php?tab='.Tools::getValue('tab').'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to catalog').'</a><br />';
}
elseif (isset($_GET['attributegenerator']))
{
if (!isset($this->attributeGenerator))
{
include_once(PS_ADMIN_DIR.'/tabs/AdminAttributeGenerator.php');
$this->attributeGenerator = new AdminAttributeGenerator();
}
$this->attributeGenerator->displayForm();
}
elseif (isset($_GET['imageresize']))
{
if (!isset($this->imageResize))
{
include_once(PS_ADMIN_DIR.'/tabs/AdminImageResize.php');
$this->imageResize = new AdminImageResize();
}
$this->imageResize->displayForm();
}
elseif (!isset($_GET['editImage']))
{
$home = false;
$id_category = (int)(Tools::getValue('id_category'));
if (!$id_category)
{
$home = true;
if (Shop::getContextType() == Shop::CONTEXT_SHOP)
{
$shop = new Shop((int)Shop::getCurrentShop());
$id_category = $shop->id_category;
}
else
$id_category = 1;
}
$catalog_tabs = array('category', 'product');
// Cleaning links
$catBarIndex = $currentIndex;
foreach ($catalog_tabs AS $tab)
if (Tools::getValue($tab.'Orderby') && Tools::getValue($tab.'Orderway'))
$catBarIndex = preg_replace('/&'.$tab.'Orderby=([a-z _]*)&'.$tab.'Orderway=([a-z]*)/i', '', $currentIndex);
echo '<div class="cat_bar"><span style="color: #3C8534;">'.$this->l('Current category').' :</span>&nbsp;&nbsp;&nbsp;'.getPath($catBarIndex, $id_category, '', '', 'catalog', $home).'</div>';
echo '<h2>'.$this->l('Categories').'</h2>';
$this->adminCategories->display($this->token);
echo '<div style="margin:10px">&nbsp;</div>';
echo '<h2>'.$this->l('Products in this category').'</h2>';
$this->adminProducts->display($this->token);
}
}
}

View File

@@ -1,355 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7499 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminCategories extends AdminTab
{
protected $maxImageSize = 300000;
/** @var object Category() instance for navigation*/
private $_category;
public function __construct()
{
global $cookie;
$this->table = 'category';
$this->className = 'Category';
$this->lang = true;
$this->edit = true;
$this->view = true;
$this->delete = true;
$this->fieldImageSettings = array('name' => 'image', 'dir' => 'c');
$this->fieldsDisplay = array(
'id_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30),
'name' => array('title' => $this->l('Name'), 'width' => 100),
'description' => array('title' => $this->l('Description'), 'width' => 500, 'maxlength' => 90, 'orderby' => false),
'position' => array('title' => $this->l('Position'), 'width' => 40,'filter_key' => 'position', 'align' => 'center', 'position' => 'position'),
'active' => array('title' => $this->l('Displayed'), 'active' => 'status', 'align' => 'center', 'type' => 'bool', 'orderby' => false));
$this->_category = AdminCatalog::getCurrentCategory();
$this->_filter = 'AND `id_parent` = '.(int)($this->_category->id);
$this->_select = 'position ';
parent::__construct();
}
public function displayList($token = NULL)
{
global $currentIndex;
/* Display list header (filtering, pagination and column names) */
$this->displayListHeader($token);
if (!sizeof($this->_list))
echo '<tr><td class="center" colspan="'.(sizeof($this->fieldsDisplay) + 2).'">'.$this->l('No items found').'</td></tr>';
/* Show the content of the table */
$this->displayListContent($token);
/* Close list table and submit button */
$this->displayListFooter($token);
}
public function display($token = NULL)
{
global $currentIndex, $cookie;
$this->getList((int)($cookie->id_lang), !$cookie->__get($this->table.'Orderby') ? 'position' : NULL, !$cookie->__get($this->table.'Orderway') ? 'ASC' : NULL, 0, NULL, (int)Shop::getCurrentShop(true));
echo '<h3>'.(!$this->_listTotal ? ($this->l('There are no subcategories')) : ($this->_listTotal.' '.($this->_listTotal > 1 ? $this->l('subcategories') : $this->l('subcategory')))).' '.$this->l('in category').' "'.stripslashes($this->_category->getName()).'"</h3>';
if ($this->tabAccess['add'] === '1')
echo '<a href="'.__PS_BASE_URI__.substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__)).'?tab=AdminCatalog&add'.$this->table.'&id_parent='.$this->_category->id.'&token='.($token!=NULL ? $token : $this->token).'"><img src="../img/admin/add.gif" border="0" /> '.$this->l('Add a new subcategory').'</a>';
echo '<div style="margin:10px;">';
$this->displayList($token);
echo '</div>';
}
public function postProcess($token = NULL)
{
global $cookie, $currentIndex;
$this->tabAccess = Profile::getProfileAccess($cookie->profile, $this->id);
if (Tools::isSubmit('submitAdd'.$this->table))
{
if ($id_category = (int)(Tools::getValue('id_category')))
{
if (!Category::checkBeforeMove($id_category, $this->_category->id))
{
$this->_errors[] = Tools::displayError('Category cannot be moved here');
return false;
}
}
}
/* Change object statuts (active, inactive) */
elseif (isset($_GET['status']) AND Tools::getValue($this->identifier))
{
if ($this->tabAccess['edit'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()))
{
if ($object->toggleStatus())
{
$target = '';
if (($id_category = (int)(Tools::getValue('id_category'))) AND Tools::getValue('id_product'))
$target = '&id_category='.(int)($id_category);
else
{
$referrer = Tools::secureReferrer($_SERVER['HTTP_REFERER']);
if (preg_match('/id_category=(\d+)/', $referrer, $matches))
$target = '&id_category='.(int)($matches[1]);
}
Module::hookExec('categoryUpdate');
Tools::redirectAdmin($currentIndex.'&conf=5'.$target.'&token='.Tools::getValue('token'));
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating status.');
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
/* Delete object */
elseif (isset($_GET['delete'.$this->table]))
{
if ($this->tabAccess['delete'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()) AND isset($this->fieldImageSettings))
{
// check if request at least one object with noZeroObject
if (isset($object->noZeroObject) AND sizeof($taxes = call_user_func(array($this->className, $object->noZeroObject))) <= 1)
$this->_errors[] = Tools::displayError('You need at least one object.').' <b>'.$this->table.'</b><br />'.Tools::displayError('You cannot delete all of the items.');
else
{
if ($this->deleted)
{
$object->deleteImage();
$object->deleted = 1;
if ($object->update())
Tools::redirectAdmin($currentIndex.'&conf=1&token='.Tools::getValue('token').'&id_category='.(int)($object->id_parent));
}
elseif ($object->delete())
Tools::redirectAdmin($currentIndex.'&conf=1&token='.Tools::getValue('token').'&id_category='.(int)($object->id_parent));
$this->_errors[] = Tools::displayError('An error occurred during deletion.');
}
}
else
$this->_errors[] = Tools::displayError('An error occurred while deleting object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
elseif (isset($_GET['position']))
{
if ($this->tabAccess['edit'] !== '1')
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
elseif (!Validate::isLoadedObject($object = new Category((int)(Tools::getValue($this->identifier, Tools::getValue('id_category_to_move', 1))))))
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
if (!$object->updatePosition((int)(Tools::getValue('way')), (int)(Tools::getValue('position'))))
$this->_errors[] = Tools::displayError('Failed to update the position.');
else
Tools::redirectAdmin($currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&conf=5'.(($id_category = (int)(Tools::getValue($this->identifier, Tools::getValue('id_category_parent', 1)))) ? ('&'.$this->identifier.'='.$id_category) : '').'&token='.Tools::getAdminTokenLite('AdminCatalog'));
}
/* Delete multiple objects */
elseif (Tools::getValue('submitDel'.$this->table))
{
if ($this->tabAccess['delete'] === '1')
{
if (isset($_POST[$this->table.'Box']))
{
$category = new Category();
$result = true;
$result = $category->deleteSelection(Tools::getValue($this->table.'Box'));
if ($result)
{
$category->cleanPositions((int)(Tools::getValue('id_category')));
Tools::redirectAdmin($currentIndex.'&conf=2&token='.Tools::getAdminTokenLite('AdminCatalog').'&id_category='.(int)(Tools::getValue('id_category')));
}
$this->_errors[] = Tools::displayError('An error occurred while deleting selection.');
}
else
$this->_errors[] = Tools::displayError('You must select at least one element to delete.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
return;
}
parent::postProcess();
}
protected function postImage($id)
{
$ret = parent::postImage($id);
if (($id_category = (int)(Tools::getValue('id_category'))) AND isset($_FILES) AND sizeof($_FILES) AND $_FILES['image']['name'] != NULL AND file_exists(_PS_CAT_IMG_DIR_.$id_category.'.jpg'))
{
$imagesTypes = ImageType::getImagesTypes('categories');
foreach ($imagesTypes AS $k => $imageType)
imageResize(_PS_CAT_IMG_DIR_.$id_category.'.jpg', _PS_CAT_IMG_DIR_.$id_category.'-'.stripslashes($imageType['name']).'.jpg', (int)($imageType['width']), (int)($imageType['height']));
}
return $ret;
}
public function displayForm($token = NULL)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
$active = $this->getFieldValue($obj, 'active');
$customer_groups = $obj->getGroups();
if (Shop::getContextType() == Shop::CONTEXT_SHOP)
{
$shop = new Shop(Shop::getCurrentShop());
$id_category = $shop->id_category;
}
else
$id_category = (int)Tools::getValue('id_parent');
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.($token!=NULL ? $token : $this->token).'" method="post" enctype="multipart/form-data">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/tab-categories.gif" />'.$this->l('Category').'</legend>
<label>'.$this->l('Name:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages AS $language)
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" style="width: 260px" name="name_'.$language['id_lang'].'" id="name_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'name', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" '.((!$obj->id) ? ' onkeyup="copy2friendlyURL();"' : '').' /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}'.($obj->id ? '<br />'.$this->youEditFieldFor() : '').'<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Displayed:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.($active ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"><img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.(!$active ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
</div>
<label>'.$this->l('Parent category:').' </label>
<div class="margin-form">
<select name="id_parent">';
$categories = Category::getCategories((int)$cookie->id_lang, false);
Category::recurseCategory($categories, $categories[0][1], 1, ($obj->id ? $this->getFieldValue($obj, 'id_parent') : $id_category));
echo '
</select>
</div>
<label>'.$this->l('Description:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages AS $language)
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<textarea name="description_'.$language['id_lang'].'" rows="5" cols="40">'.htmlentities($this->getFieldValue($obj, 'description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Image:').' </label>
<div class="margin-form">';
echo $this->displayImage($obj->id, _PS_IMG_DIR_.'c/'.$obj->id.'.jpg', 350, NULL, Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)($cookie->id_employee)), true);
echo ' <br /><input type="file" name="image" />
<p>'.$this->l('Upload category logo from your computer').'</p>
</div>
<div class="clear"><br /></div>
<label>'.$this->l('Meta title:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages AS $language)
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" name="meta_title_'.$language['id_lang'].'" id="meta_title_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_title', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}'.($obj->id ? '<br />'.$this->youEditFieldFor() : '').'<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Meta description:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages AS $language)
echo '<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" name="meta_description_'.$language['id_lang'].'" id="meta_description_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}'.($obj->id ? '<br />'.$this->youEditFieldFor() : '').'<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Meta keywords:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages AS $language)
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" name="meta_keywords_'.$language['id_lang'].'" id="meta_keywords_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'meta_keywords', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}'.($obj->id ? '<br />'.$this->youEditFieldFor() : '').'<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Friendly URL:').' </label>
<div class="margin-form translatable">';
foreach ($this->_languages AS $language)
echo '<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="text" name="link_rewrite_'.$language['id_lang'].'" id="link_rewrite_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'link_rewrite', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" onchange="this.value = str2url(this.value);" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Only letters and the minus (-) character are allowed').($obj->id ? '<br />'.$this->youEditFieldFor() : '').'<span class="hint-pointer">&nbsp;</span></span>
</div>';
echo ' <p class="clear"></p>
</div>
<label>'.$this->l('Groups access:').' </label>
<div class="margin-form">';
$groups = Group::getGroups((int)($cookie->id_lang));
if (sizeof($groups))
{
echo '
<table cellspacing="0" cellpadding="0" class="table" style="width: 28em;">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'groupBox[]\', this.checked)"'.(!isset($obj->id) ? 'checked="checked" ' : '').' /></th>
<th>'.$this->l('ID').'</th>
<th>'.$this->l('Group name').'</th>
</tr>';
$irow = 0;
foreach ($groups AS $group)
echo '
<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td><input type="checkbox" name="groupBox[]" class="groupBox" id="groupBox_'.$group['id_group'].'" value="'.$group['id_group'].'" '.((in_array($group['id_group'], $customer_groups) OR (!isset($obj->id))) ? 'checked="checked" ' : '').'/></td>
<td>'.$group['id_group'].'</td>
<td><label for="groupBox_'.$group['id_group'].'" class="t">'.$group['name'].'</label></td>
</tr>';
echo '
</table>
<p style="padding:0px; margin:10px 0px 10px 0px;">'.$this->l('Mark all groups you want to give access to this category').'</p>
';
} else
echo '<p>'.$this->l('No group created').'</p>';
echo '
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l('Save and back to parent category').'" name="submitAdd'.$this->table.'AndBackToParent" class="button" />
&nbsp;<input type="submit" class="button" name="submitAdd'.$this->table.'" value="'.$this->l('Save').'"/>
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>
<p class="clear"></p>';
}
}

View File

@@ -1,132 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7060 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
class AdminContact extends AdminPreferences
{
public function __construct()
{
$this->className = 'Configuration';
$this->table = 'configuration';
$temporyArrayFields = $this->_getDefaultFieldsContent();
$this->_buildOrderedFieldsShop($temporyArrayFields);
parent::__construct();
}
private function _getDefaultFieldsContent()
{
global $cookie;
$countryList = array();
$countryList[] = array('id' => '0', 'name' => $this->l('Choose your country'));
foreach (Country::getCountries(intval($cookie->id_lang)) AS $country)
$countryList[] = array('id' => $country['id_country'], 'name' => $country['name']);
$stateList = array();
$stateList[] = array('id' => '0', 'name' => $this->l('Choose your state (if applicable)'));
foreach (State::getStates(intval($cookie->id_lang)) AS $state)
$stateList[] = array('id' => $state['id_state'], 'name' => $state['name']);
$formFields = array(
'PS_SHOP_NAME' => array('title' => $this->l('Shop name:'), 'desc' => $this->l('Displayed in e-mails and page titles'), 'validation' => 'isGenericName', 'required' => true, 'size' => 30, 'type' => 'text'),
'PS_SHOP_EMAIL' => array('title' => $this->l('Shop e-mail:'), 'desc' => $this->l('Displayed in e-mails sent to customers'), 'validation' => 'isEmail', 'required' => true, 'size' => 30, 'type' => 'text'),
'PS_SHOP_DETAILS' => array('title' => $this->l('Registration:'), 'desc' => $this->l('Shop registration information (e.g., SIRET or RCS)'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'textarea', 'cols' => 30, 'rows' => 5),
'PS_SHOP_ADDR1' => array('title' => $this->l('Shop address line 1:'), 'validation' => 'isAddress', 'size' => 30, 'type' => 'text'),
'PS_SHOP_ADDR2' => array('title' => 'Address line 2', 'validation' => 'isAddress', 'size' => 30, 'type' => 'text'),
'PS_SHOP_CODE' => array('title' => $this->l('Post/Zip code:'), 'validation' => 'isGenericName', 'size' => 6, 'type' => 'text'),
'PS_SHOP_CITY' => array('title' => $this->l('City:'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text'),
'PS_SHOP_COUNTRY_ID' => array('title' => $this->l('Country:'), 'validation' => 'isInt', 'size' => 30, 'type' => 'select', 'list' => $countryList, 'identifier' => 'id', 'cast' => 'intval'),
'PS_SHOP_STATE_ID' => array('title' => $this->l('State:'), 'validation' => 'isInt', 'size' => 30, 'type' => 'select', 'list' => $stateList, 'identifier' => 'id', 'cast' => 'intval'),
'PS_SHOP_PHONE' => array('title' => $this->l('Phone:'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text'),
'PS_SHOP_FAX' => array('title' => $this->l('Fax:'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text'),
);
return $formFields;
}
private function _buildOrderedFieldsShop($formFields)
{
$associatedOrderKey = array(
'PS_SHOP_NAME' => 'company',
'PS_SHOP_ADDR1' => 'address1',
'PS_SHOP_ADDR2' => 'address2',
'PS_SHOP_CITY' => 'city',
'PS_SHOP_STATE_ID' => 'State:name',
'PS_SHOP_CODE' => 'postcode',
'PS_SHOP_COUNTRY_ID' => 'Country:name',
'PS_SHOP_PHONE' => 'phone');
$this->_fieldsShop = array();
$orderedFields = AddressFormat::getOrderedAddressFields(Configuration::get('PS_SHOP_COUNTRY_ID'));
foreach($orderedFields as $lineFields)
if (($patterns = explode(' ', $lineFields)))
foreach($patterns as $pattern)
if (($key = array_search($pattern, $associatedOrderKey)))
$this->_fieldsShop[$key] = $formFields[$key];
foreach($formFields as $key => $value)
if (!isset($this->_fieldsShop[$key]))
$this->_fieldsShop[$key] = $formFields[$key];
}
public function postProcess()
{
if (isset($_POST['PS_SHOP_STATE_ID']) && $_POST['PS_SHOP_STATE_ID'] != '0')
{
$isStateOk = Db::getInstance()->getValue('SELECT `active` FROM `'._DB_PREFIX_.'state` WHERE `id_country` = '.(int)(Tools::getValue('PS_SHOP_COUNTRY_ID')).' AND `id_state` = '.(int)(Tools::getValue('PS_SHOP_STATE_ID')));
if ($isStateOk != 1)
$this->_errors[] = Tools::displayError('This state is not in this country.');
}
parent::postProcess();
}
protected function _postConfig($fields)
{
global $cookie;
if (!$this->_errors && isset($_POST['PS_SHOP_COUNTRY_ID']))
{
$country = new Country((int)($_POST['PS_SHOP_COUNTRY_ID']), intval($cookie->id_lang));
Configuration::updateValue('PS_SHOP_COUNTRY', pSQL($country->name));
}
if (!$this->_errors && isset($_POST['PS_SHOP_STATE_ID']))
{
$state = new State((int)($_POST['PS_SHOP_STATE_ID']));
Configuration::updateValue('PS_SHOP_STATE', pSQL($state->name));
}
parent::_postConfig($fields);
}
public function display()
{
$this->_displayForm('shop', $this->_fieldsShop, $this->l('Contact details'), 'width3', 'tab-contact');
}
}

View File

@@ -1,121 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7300 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminContacts extends AdminTab
{
public function __construct()
{
$this->table = 'contact';
$this->className = 'Contact';
$this->lang = true;
$this->edit = true;
$this->delete = true;
$this->fieldsDisplay = array(
'id_contact' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Title'), 'width' => 130),
'email' => array('title' => $this->l('E-mail address'), 'width' => 130),
'description' => array('title' => $this->l('Description'), 'width' => 150));
$this->optionTitle = $this->l('Contact options');
$this->_fieldsOptions = array(
'PS_CUSTOMER_SERVICE_FILE_UPLOAD' => array('title' => $this->l('Allow file upload'), 'desc' => $this->l('Allow customers to upload file using contact page'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'value', 'list' => array(
'0' => array('value' => 0, 'name' => $this->l('No')),
'1' => array('value' => 1, 'name' => $this->l('Yes'))
)),
'PS_CUSTOMER_SERVICE_SIGNATURE' => array('title' => $this->l('Pre-defined message'), 'desc' => $this->l('Please fill the message that appears by default when you answer a thread on the customer service page'), 'cast' => 'pSQL', 'type' => 'textareaLang', 'identifier' => 'value',
'cols' => 40, 'rows' => 8
));
parent::__construct();
}
public function displayForm($isMainTab = true)
{
global $currentIndex;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/contact.gif" />'.$this->l('Contacts').'</legend>
<label>'.$this->l('Title:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="name_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'name', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name¤description', 'name');
echo ' <p style="clear: both">'.$this->l('Contact name, e.g., Technical Support').'</p>
</div>
<label>'.$this->l('E-mail address').'</label>
<div class="margin-form">
<input type="text" size="33" name="email" value="'.htmlentities($this->getFieldValue($obj, 'email'), ENT_COMPAT, 'UTF-8').'" />
<p style="clear: both">'.$this->l('E-mails will be sent to this address').'</p>
</div>
<label>'.$this->l('Save in Customer Service?').'</label>
<div class="margin-form">
<input type="radio" name="customer_service" id="customer_service_on" value="1" '.($this->getFieldValue($obj, 'customer_service') ? 'checked="checked" ' : '').'/>
<label class="t" for="customer_service_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="customer_service" id="customer_service_off" value="0" '.(!$this->getFieldValue($obj, 'customer_service') ? 'checked="checked" ' : '').'/>
<label class="t" for="customer_service_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('The messages will be saved in the Customer Service tab').'</p>
</div><div class="clear">&nbsp;</div>
<label>'.$this->l('Description').'</label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="description_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<textarea name="description_'.$language['id_lang'].'" cols="36" rows="5">'.htmlentities($this->getFieldValue($obj, 'description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name¤description', 'description');
echo '
<p style="clear: both">'.$this->l('Additional information about this contact').'</p>
</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('Shop association:').'</label><div class="margin-form">';
$this->displayAssoShop();
echo '</div>';
}
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
}

View File

@@ -1,347 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7310 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminCountries extends AdminTab
{
public function __construct()
{
global $cookie;
$this->table = 'country';
$this->className = 'Country';
$this->lang = true;
$this->edit = true;
$this->deleted = false;
$this->_select = 'z.`name` AS zone';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = a.`id_zone`)';
$this->fieldsDisplay = array(
'id_country' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Country'), 'width' => 130, 'filter_key' => 'b!name'),
'iso_code' => array('title' => $this->l('ISO code'), 'width' => 70, 'align' => 'center'),
'call_prefix' => array('title' => $this->l('Call prefix'), 'width' => 40, 'align' => 'center', 'callback' => 'displayCallPrefix'),
'zone' => array('title' => $this->l('Zone'), 'width' => 100, 'filter_key' => 'z!name'),
'a!active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'filter_key' => 'a!active'));
$this->optionTitle = $this->l('Countries options');
$this->_fieldsOptions = array('PS_COUNTRY_DEFAULT' => array('title' => $this->l('Default country:'), 'desc' => $this->l('The default country used in shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_country', 'list' => Country::getCountries((int)($cookie->id_lang))));
parent::__construct();
}
public function postProcess()
{
if (isset($_GET['delete'.$this->table]) OR Tools::getValue('submitDel'.$this->table))
$this->_errors[] = Tools::displayError('You cannot delete a country. If you do not want it available for customers, please disable it.');
else
{
if (Tools::getValue('submitAdd'.$this->table))
{
$id_country = Tools::getValue('id_country');
$tmp_addr_format = new AddressFormat($id_country);
$save_status = false;
$is_new = is_null($tmp_addr_format->id_country);
if ($is_new)
{
$tmp_addr_format = new AddressFormat();
$tmp_addr_format->id_country = $id_country;
}
$tmp_addr_format->format = Tools::getValue('address_layout');
if (strlen($tmp_addr_format->format) > 0)
{
if ($tmp_addr_format->checkFormatFields())
$save_status = ($is_new) ? $tmp_addr_format->save(): $tmp_addr_format->update();
else
{
$errorList = $tmp_addr_format->getErrorList();
foreach($errorList as $numError => $error)
$this->_errors[] = $error;
}
if (!$save_status)
$this->_errors[] = Tools::displayError('Invalid address layout'.Db::getInstance()->getMsgError());
}
unset($tmp_addr_format);
}
return parent::postProcess();
}
}
private function _displayValidFields()
{
$html = '<ul>';
$appendContainer = '';
$objectList = AddressFormat::getLiableClass('Address');
$objectList['Address'] = NULL;
// Get the available properties for each class
foreach($objectList as $className => &$object)
{
$fields = array();
$html .= '<li>
<a href="javascript:void(0);" onClick="displayAvailableFields(\''.$className.'\')">'.$className.'</a>';
foreach(AddressFormat::getValidateFields($className) as $name)
$fields[] = '<a style="color:#4B8;" href="javascript:void(0);" class="addPattern" id="'.$className.':'.$name.'">
'.$name.'</a>';
$html .= '
<div class="availableFieldsList" id="availableListFieldsFor_'.$className.'" style="width:300px;">
'.implode(', ', $fields).'</div></li>';
unset($object);
}
return $html .= '</ul>';
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
$defaultLayout = '';
$defaultLayoutTab = array(
array('firstname', 'lastname'),
array('company'),
array('vat_number'),
array('address1'),
array('address2'),
array('postcode', 'city'),
array('Country:name'),
array('phone'));
if (!($obj = $this->loadObject(true)))
return;
foreach ($defaultLayoutTab as $line)
$defaultLayout .= implode(' ', $line)."\r\n";
echo '
<script type="text/javascript" language="javascript" src="'._PS_JS_DIR_.'jquery/jquery-fieldselection.js"></script>
<script type="text/javascript" language="javascript">
lastLayoutModified = "";
$(document).ready(function()
{
$(".availableFieldsList").css("display", "none");
$(".addPattern").click(function()
{
addFieldsToCursorPosition($(this).attr("id"))
lastLayoutModified = $("#ordered_fields").val();
});
$("#ordered_fields").keyup(function()
{
lastLayoutModified = $(this).val();
});
$("#useLastDefaultLayout").mouseover(function()
{
switchExplanationText("'.$this->l('Will display back your last registered layout').'");
});
$("#useDefaultLayoutSystem").mouseover(function()
{
switchExplanationText("'.$this->l('Will display a default layout for this country').'");
});
$("#useCurrentLastModifiedLayout").mouseover(function()
{
switchExplanationText("'.$this->l('Will display back you\'re current editing layout').'");
});
$("#eraseCurrentLayout").mouseover(function()
{
switchExplanationText("'.$this->l('Will delete the current layout').'");
});
});
function switchExplanationText(text)
{
$("#explanationText").fadeOut("fast", function()
{
$(this).html(text);
$(this).fadeIn("fast");
});
}
function addFieldsToCursorPosition(pattern)
{
$("#ordered_fields").replaceSelection(pattern + " ");
}
function displayAvailableFields(containerName)
{
$(".availableFieldsList").each( function (){
if ($(this).attr(\'id\') != \'availableListFieldsFor_\'+containerName)
$(this).slideUp();
});
$("#availableListFieldsFor_" + containerName).slideToggle();
}
function resetLayout(defaultLayout, type)
{
if (confirm("'.$this->l('Are you sure to apply this selection ?').'"))
{
$("#ordered_fields").val(unescape(defaultLayout.replace(/\+/g, " ")));
}
}
</script>
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/world.gif" />'.$this->l('Countries').'</legend>
<label>'.$this->l('Country:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="30" type="text" name="name_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'name', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name', 'name');
echo ' <p style="clear: both">'.$this->l('Name of country').'</p>
</div>
<label>'.$this->l('ISO code:').' </label>
<div class="margin-form">
<input type="text" size="4" maxlength="3" name="iso_code" value="'.htmlentities($this->getFieldValue($obj, 'iso_code'), ENT_COMPAT, 'UTF-8').'" style="text-transform: uppercase;" /> <sup>*</sup>
<p>'.$this->l('2- or 3-letter ISO code, e.g., FR for France').'. <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html" target="_blank">'.$this->l('Official list here').'</a>.</p>
</div>
<label>'.$this->l('Call prefix:').' </label>
<div class="margin-form">
<input type="text" size="4" maxlength="3" name="call_prefix" value="'.(int)($this->getFieldValue($obj, 'call_prefix')).'" style="text-transform: uppercase;" /> <sup>*</sup>
<p>'.$this->l('International call prefix, e.g., 33 for France.').'.</p>
</div>
<label>'.$this->l('Default currency:').' </label>
<div class="margin-form">
<select name="id_currency">
<option value="0" '.(Tools::getValue('id_currency', $obj->id_currency) == 0 ? 'selected' : '').'>'.$this->l('Default store currency').'</option>
';
$currencies = Currency::getCurrencies();
foreach ($currencies AS $currency)
echo '<option value="'.intval($currency['id_currency']).'" '.(Tools::getValue('id_currency', $obj->id_currency) == $currency['id_currency'] ? 'selected' : '').'>'.Tools::htmlentitiesUTF8($currency['name']).'</option>';
echo '
</select>
</div>
<label>'.$this->l('Zone:').' </label>
<div class="margin-form">
<select name="id_zone">';
$zones = Zone::getZones();
foreach ($zones AS $zone)
echo ' <option value="'.(int)($zone['id_zone']).'"'.(($this->getFieldValue($obj, 'id_zone') == $zone['id_zone']) ? ' selected="selected"' : '').'>'.$zone['name'].'</option>';
$address_layout = AddressFormat::getAddressCountryFormat($obj->id);
if ($value = Tools::getValue('address_layout'))
$address_layout = $value;
echo ' </select>
<p>'.$this->l('Geographical zone where country is located').'</p>
</div>
<label>'.$this->l('Need zip code:').' </label>
<div class="margin-form">
<input type="radio" name="need_zip_code" id="need_zip_code_on" value="1" onchange="disableZipFormat();" '.((!$obj->id OR $this->getFieldValue($obj, 'need_zip_code')) ? 'checked="checked" ' : '').'/>
<label class="t" for="need_zip_code_on"> <img src="../img/admin/enabled.gif" alt="" title="'.$this->l('Yes').'" /></label>
<input type="radio" name="need_zip_code" id="need_zip_code_off" value="0" onchange="disableZipFormat();" '.((!$this->getFieldValue($obj, 'need_zip_code') AND $obj->id) ? 'checked="checked" ' : '').'/>
<label class="t" for="need_zip_code_off"> <img src="../img/admin/disabled.gif" alt="" title="'.$this->l('No').'" /></label>
</div>
<label class="zip_code_format">'.$this->l('Zip code format:').' </label>
<div class="margin-form zip_code_format">
<input type="text" name="zip_code_format" id="zip_code_format" value="'.$this->getFieldValue($obj, 'zip_code_format').'" onkeyup="$(\'#zip_code_format\').val($(\'#zip_code_format\').val().toUpperCase());" /> <sup>*</sup>
<p>'.$this->l('National zip code (L for a letter, N for a number and C for the Iso code), e.g., NNNNN for France. No verification if undefined').'.</p>
</div>
<label class="address_layout">'.$this->l('Address layout:').' </label>
<div class="margin-form" style="vertical-align: top;">
<div style="float:left">
<textarea id="ordered_fields" name="address_layout" style="width: 300px;height: 140px;">'.$address_layout.'</textarea>
</div>
<div style="float:left; margin-left:20px; width:340px;">
'.$this->l('Liable fields for the address information (click to have more details)').': '.$this->_displayValidFields().'
</div>
<div class="clear"></div>
<div style="margin:10px 0 10px 0;">
<a id="useLastDefaultLayout" style="margin-left:5px;" href="javascript:void(0)" onClick="resetLayout(\''.urlencode($address_layout).'\', \'lastDefault\');" class="button">'.
$this->l('Use the last registered layout').'</a>
<a id="useDefaultLayoutSystem" style="margin-left:5px;" href="javascript:void(0)" onClick="resetLayout(\''.urlencode($defaultLayout).'\', \'defaultSystem\');" class="button">'.
$this->l('Use a default layout').'</a>
<a id="useCurrentLastModifiedLayout" style="margin-left:5px;" href="javascript:void(0)" onClick="resetLayout(lastLayoutModified, \'currentModified\')" class="button">'.
$this->l('Use my current modified layout').'</a>
<a id="eraseCurrentLayout" style="margin-left:5px;" href="javascript:void(0)" onClick="resetLayout(\'\', \'erase\');" class="button">'.
$this->l('Clean layout').'</a>
<div style="margin-top:10px; padding-top:5px; height:10px;" id="explanationText"></div>
</div>
</div>
<label>'.$this->l('Status:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.((!$obj->id OR $this->getFieldValue($obj, 'active')) ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.((!$this->getFieldValue($obj, 'active') AND $obj->id) ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Enabled or disabled').'</p>
</div>
<label>'.$this->l('Contains states:').' </label>
<div class="margin-form">
<input type="radio" name="contains_states" id="contains_states_on" value="1" '.((!$obj->id OR $this->getFieldValue($obj, 'contains_states')) ? 'checked="checked" ' : '').'/>
<label class="t" for="contains_states_on"> <img src="../img/admin/enabled.gif" alt="" title="" />'.$this->l('Yes').'</label>
<input type="radio" name="contains_states" id="contains_states_off" value="0" '.((!$this->getFieldValue($obj, 'contains_states') AND $obj->id) ? 'checked="checked" ' : '').'/>
<label class="t" for="contains_states_off"> <img src="../img/admin/disabled.gif" alt="" title="" />'.$this->l('No').'</label>
</div>
<label>'.$this->l('Need tax identification number?').' </label>
<div class="margin-form">
<input type="radio" name="need_identification_number" id="need_identification_number_on" value="1" '.((!$obj->id OR $this->getFieldValue($obj, 'need_identification_number')) ? 'checked="checked" ' : '').'/>
<label class="t" for="need_identification_number_on"> <img src="../img/admin/enabled.gif" alt="" title="" />'.$this->l('Yes').'</label>
<input type="radio" name="need_identification_number" id="need_identification_number_off" value="0" '.((!$this->getFieldValue($obj, 'need_identification_number') AND $obj->id) ? 'checked="checked" ' : '').'/>
<label class="t" for="need_identification_number_off"> <img src="../img/admin/disabled.gif" alt="" title="" />'.$this->l('No').'</label>
</div>
<div class="clear"></div>
<label>'.$this->l('Display tax label:').' </label>
<div class="margin-form">
<input type="radio" name="display_tax_label" id="display_tax_label_on" value="1" '.((!$obj->id OR $this->getFieldValue($obj, 'display_tax_label')) ? 'checked="checked" ' : '').'/>
<label class="t" for="display_tax_label_on"> <img src="../img/admin/enabled.gif" alt="" title="" />'.$this->l('Yes').'</label>
<input type="radio" name="display_tax_label" id="display_tax_label_off" value="0" '.((!$this->getFieldValue($obj, 'display_tax_label') AND $obj->id) ? 'checked="checked" ' : '').'/>
<label class="t" for="display_tax_label_off"> <img src="../img/admin/disabled.gif" alt="" title="" />'.$this->l('No').'</label>
</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('Shop association:').'</label><div class="margin-form">';
$this->displayAssoShop();
echo '</div>';
}
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>
<script type="text/javascript">disableZipFormat();</script>';
}
}

View File

@@ -1,219 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
class AdminCounty extends AdminTab
{
public function __construct()
{
global $cookie;
$this->table = 'county';
$this->className = 'County';
$this->edit = true;
$this->delete = true;
$this->_select = 's.`name` AS state';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = a.`id_state`)';
$this->fieldsDisplay = array(
'id_county' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('County'), 'width' => 130, 'filter_key' => 'b!name'),
'state' => array('title' => $this->l('State'), 'width' => 70, 'filter_key' => 's!name'),
'a!active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'filter_key' => 'a!active'));
parent::__construct();
}
public function renderJS()
{
return
'<script type="text/javascript">
function addZipCode()
{
zipcodes = $("#zipcodes").val();
id_county = $("#id_county").val();
$.ajax({
type: "POST",
url: "ajax.php",
data: "ajaxAddZipCode=1&zipcodes="+zipcodes+"&id_county="+id_county+"&token='.$this->token.'",
async : true,
success: function(msg) {
res = msg.split(":");
if (res.length == 2)
{
$("#error-msg").html(res[1]);
$("#zipcodes").css("border", "2px solid #FF0000");
} else {
$("#error-msg").html("");
$("#zipcodes").val("");
$("#zipcodes").css("border", "1px solid #E0D0B1");
$("#zipcodes-list").html(msg);
}
}
});
}
function populateStates(id_country, id_state)
{
$.ajax({
url: "ajax.php",
cache: false,
data: "ajaxStates=1&no_empty=false&id_country="+id_country+"&id_state="+id_state,
success: function(html){
$("#id_state").html(html);
}
});
}
function removeZipCodes(zipcodes)
{
id_county = $("#id_county").val();
$.ajax({
type: "POST",
url: "ajax.php",
data: "ajaxRemoveZipCode=1&zipcodes="+zipcodes+"&id_county="+id_county+"&token='.$this->token.'",
async : true,
success: function(msg) {
$("#zipcodes-list").html(msg);
}
});
}
</script>';
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
$cur_id_country = 0;
$cur_id_state = 0;
if (isset($obj->id_state))
{
$cur_state = new State($obj->id_state);
if (Validate::isLoadedObject($cur_state))
{
$cur_id_country = $cur_state->id_country;
$cur_id_state = $cur_state->id;
}
}
echo $this->renderJS().
'<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
'.($obj->id ? '<input type="hidden" id="id_county" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/world.gif" />'.$this->l('Counties').'</legend>';
if (!isset($obj->id))
echo '<div class="hint clear" style="display:block;">'.$this->l('Save this county then you will be able to associate zipcodes').'</div><br />';
$countries = Country::getCountries($cookie->id_lang, true, true);
echo '<label>'.$this->l('Country:').' </label>
<div class="margin-form"><select id="id_country" onchange="populateStates($(this).val(), '.(int)($this->getFieldValue($obj, 'id_state')).');">';
foreach ($countries AS $country)
echo '<option value="'.(int)$country['id_country'].'" '.($cur_id_country == $country['id_country'] ? 'selected' : '').'>'.Tools::htmlentitiesUTF8($country['name']).'</option>';
echo '</select></div>';
echo '<label>'.$this->l('State:').' </label>
<div class="margin-form">
<select name="id_state" id="id_state">
</select>
</div>
<script type="text/javascript">
id_country = $("#id_country").val();
populateStates(id_country,'.(int)$cur_id_state.');
</script>';
echo
'<label>'.$this->l('Name:').' </label>
<div class="margin-form">
<input type="text" size="30" maxlength="64" name="name" value="'.htmlentities($this->getFieldValue($obj, 'name'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div>
<label>'.$this->l('Status:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.((!$obj->id OR $this->getFieldValue($obj, 'active')) ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.((!$this->getFieldValue($obj, 'active') AND $obj->id) ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Enabled or disabled').'</p>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />&nbsp;
<input type="submit" value="'.$this->l('Save and stay').'" name="submitAdd'.$this->table.'AndStay" class="button" />
</div>';
echo '<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>';
if (isset($obj->id))
{
echo '
<div class="margin-form">
'.$this->_renderZipCodeForm().'<br />
<div id="zipcodes-list">
'.AdminCounty::renderZipCodeList($obj->getZipCodes()).'
</div></div>';
}
echo '
</fieldset>
</form>';
}
protected function _renderZipCodeForm()
{
return '
<div>
Add Zip Codes:<br /> <input type="text" id="zipcodes" name="zipcodes" />
<a href="#" class="button" onclick="addZipCode()">Add</a>
<div id="error-msg" style="color: #FF0000"></div>
</div>';
}
public static function renderZipCodeList($zip_codes)
{
$html = '';
foreach ($zip_codes AS $zip_code)
{
$full_zip_code = $zip_code['from_zip_code'];
if ($zip_code['to_zip_code'] != 0)
$full_zip_code .= '-'.$zip_code['to_zip_code'];
$html .= '<div>'.Tools::htmlentitiesUTF8($full_zip_code).' <a href="#" onclick="removeZipCodes(\''.Tools::htmlentitiesUTF8($full_zip_code).'\')"><img src="../img/admin/delete.gif" alt="" /></a></div>';
}
return $html;
}
}

View File

@@ -1,240 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7300 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
class AdminCurrencies extends AdminTab
{
public function __construct()
{
$this->table = 'currency';
$this->className = 'Currency';
$this->lang = false;
$this->edit = true;
$this->delete = true;
$this->fieldsDisplay = array(
'id_currency' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Currency'), 'width' => 100),
'iso_code' => array('title' => $this->l('ISO code'), 'align' => 'center', 'width' => 35),
'iso_code_num' => array('title' => $this->l('ISO code num'), 'align' => 'center', 'width' => 35),
'sign' => array('title' => $this->l('Symbol'), 'width' => 20, 'align' => 'center', 'orderby' => false, 'search' => false),
'conversion_rate' => array('title' => $this->l('Conversion rate'), 'float' => true, 'align' => 'center', 'width' => 50, 'search' => false),
'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false));
$this->optionTitle = $this->l('Currencies options');
$this->_fieldsOptions = array(
'PS_CURRENCY_DEFAULT' => array(
'title' => $this->l('Default currency:'),
'desc' => $this->l('The default currency used in shop')
.'<div class=warn"><img src="../img/admin/warn2.png" />'.$this->l('If you change default currency, you will have to manually edit every product price.').'</div>',
'cast' => 'intval',
'type' => 'select',
'identifier' => 'id_currency',
'list' => Currency::getCurrencies()
),
);
$this->_where = 'AND a.`deleted` = 0';
parent::__construct();
}
public function postProcess()
{
global $currentIndex;
if (isset($_GET['delete'.$this->table]))
{
if ($this->tabAccess['delete'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()))
{
if ($object->id == Configuration::get('PS_CURRENCY_DEFAULT'))
$this->_errors[] = $this->l('You can\'t delete the default currency');
elseif ($object->delete())
Tools::redirectAdmin($currentIndex.'&conf=1'.'&token='.$this->token);
else
$this->_errors[] = Tools::displayError('An error occurred during deletion.');
}
else
$this->_errors[] = Tools::displayError('An error occurred while deleting object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
elseif ((isset($_GET['status'.$this->table]) OR isset($_GET['status'])) AND Tools::getValue($this->identifier))
{
if ($this->tabAccess['edit'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()))
{
if ($object->active AND $object->id == Configuration::get('PS_CURRENCY_DEFAULT'))
$this->_errors[] = $this->l('You can\'t disable the default currency');
elseif ($object->toggleStatus())
Tools::redirectAdmin($currentIndex.'&conf=5'.((($id_category = (int)(Tools::getValue('id_category'))) AND Tools::getValue('id_product')) ? '&id_category='.$id_category : '').'&token='.$this->token);
else
$this->_errors[] = Tools::displayError('An error occurred while updating status.');
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
elseif (Tools::getValue('submitOptions'.$this->table))
{
foreach ($this->_fieldsOptions as $key => $field)
{
Configuration::updateValue($key, $field['cast'](Tools::getValue($key)));
if ($key == 'PS_CURRENCY_DEFAULT')
Currency::refreshCurrencies();
}
Tools::redirectAdmin($currentIndex.'&conf=6'.'&token='.$this->token);
}
elseif (Tools::isSubmit('submitExchangesRates'))
{
if (!$this->_errors[] = Currency::refreshCurrencies())
Tools::redirectAdmin($currentIndex.'&conf=6'.'&token='.$this->token);
}
else
parent::postProcess();
}
public function displayOptionsList()
{
global $currentIndex;
parent::displayOptionsList();
echo '<br /><br />
<form action="'.$currentIndex.'&token='.$this->token.'" method="post">
<fieldset>
<legend><img src="../img/admin/exchangesrate.gif" />'.$this->l('Currency rates').'</legend>
<label>'.$this->l('Update currency rates').'</label>
<div class="margin-form">
<p>'.$this->l('Update your currencies exchanges rates with a real-time tool').'</p>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l('Update currency rates').'" name="submitExchangesRates" class="button" />
</div>
</fieldset>
</form>';
}
public function displayForm($isMainTab = true)
{
global $currentIndex;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/money.gif" />'.$this->l('Currencies').'</legend>
<label>'.$this->l('Currency:').' </label>
<div class="margin-form">
<input type="text" size="30" maxlength="32" name="name" value="'.htmlentities($this->getFieldValue($obj, 'name'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Only letters and the minus character are allowed').'<span class="hint-pointer">&nbsp;</span></span>
<p class="clear">'.$this->l('Will appear on Front Office, e.g., euro, dollar').'...</p>
</div>
<label>'.$this->l('ISO code:').' </label>
<div class="margin-form">
<input type="text" size="30" maxlength="32" name="iso_code" value="'.htmlentities($this->getFieldValue($obj, 'iso_code'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint-pointer">&nbsp;</span>
<p class="clear">'.$this->l('ISO code, e.g., USD for dollar, EUR for euro').'...</p>
</div>
<label>'.$this->l('Numeric ISO code:').' </label>
<div class="margin-form">
<input type="text" size="30" maxlength="32" name="iso_code_num" value="'.htmlentities($this->getFieldValue($obj, 'iso_code_num'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint-pointer">&nbsp;</span>
<p class="clear">'.$this->l('Numeric ISO code, e.g., 840 for dollar, 978 for euro').'...</p>
</div>
<label>'.$this->l('Symbol:').' </label>
<div class="margin-form">
<input type="text" size="3" maxlength="8" name="sign" value="'.htmlentities($this->getFieldValue($obj, 'sign'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<p class="clear">'.$this->l('Will appear on Front Office, e.g., &euro;, $').'...</p>
</div>
<label>'.$this->l('Conversion rate:').' </label>
<div class="margin-form">
<input type="text" size="3" maxlength="11" name="conversion_rate" value="'.htmlentities($this->getFieldValue($obj, 'conversion_rate')).'" /> <sup>*</sup>
<p class="clear">'.$this->l('Conversion rate from one unit of your shop\'s default currency (for example, 1€) to this currency. For example, if the default currency is euros and this currency is dollars, type \'1.20\'').' 1&euro; = $1.20</p>
</div>
<label>'.$this->l('Formatting:').' </label>
<div class="margin-form">
<select name="format">';
$currency_formats = array(
1 => 'X0,000.00 ('.$this->l('as with dollars').')',
2 => '0 000,00X ('.$this->l('as with euros').')',
3 => 'X0.000,00',
4 => '0,000.00X',
);
foreach ($currency_formats AS $nb => $desc)
echo '<option value="'.$nb.'"'.($this->getFieldValue($obj, 'format') == $nb ? 'selected="selected"' : '').'>'.$desc.'</option>';
echo '
</select>
<p class="clear">'.$this->l('Applies to all prices, e.g.,').' $1,240.15</p>
</div>
<label>'.$this->l('Decimals:').' </label>
<div class="margin-form">
<input type="radio" name="decimals" id="decimals_on" value="1" '.($this->getFieldValue($obj, 'decimals') ? 'checked="checked" ' : '').'/>
<label class="t" for="decimals_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" /></label>
<input type="radio" name="decimals" id="decimals_off" value="0" '.(!$this->getFieldValue($obj, 'decimals') ? 'checked="checked" ' : '').'/>
<label class="t" for="decimals_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" /></label>
<p>'.$this->l('Display decimals on prices').'</p>
</div>
<label>'.$this->l('Blank:').' </label>
<div class="margin-form">
<input type="radio" name="blank" id="blank_on" value="1" '.($this->getFieldValue($obj, 'blank') ? 'checked="checked" ' : '').'/>
<label class="t" for="blank_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="blank" id="blank_off" value="0" '.(!$this->getFieldValue($obj, 'blank') ? 'checked="checked" ' : '').'/>
<label class="t" for="blank_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Include a blank between sign and price, e.g.,').'<br />$1,240.15 -> $ 1,240.15</p>
</div>
<label>'.$this->l('Enable:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.($this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.(!$this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('Shop association:').'</label><div class="margin-form">';
$this->displayAssoShop();
echo '</div>';
}
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
}

View File

@@ -1,605 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7471 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminCustomerThreads extends AdminTab
{
public function __construct()
{
global $cookie;
$this->table = 'customer_thread';
$this->lang = false;
$this->className = 'CustomerThread';
$this->edit = false;
$this->view = true;
$this->delete = true;
$this->_select = 'CONCAT(c.firstname," ",c.lastname) as customer, cl.name as contact, l.name as language, group_concat(message) as messages, (
SELECT IFNULL(CONCAT(LEFT(e.firstname, 1),". ",e.lastname), "--")
FROM '._DB_PREFIX_.'customer_message cm2 INNER JOIN '._DB_PREFIX_.'employee e ON e.id_employee = cm2.id_employee
WHERE cm2.id_employee > 0 AND cm2.`id_customer_thread` = a.`id_customer_thread`
ORDER BY cm2.date_add DESC LIMIT 1) as employee';
$this->_group = 'GROUP BY cm.id_customer_thread';
$this->_join = '
LEFT JOIN `'._DB_PREFIX_.'customer` c ON c.`id_customer` = a.`id_customer`
LEFT JOIN `'._DB_PREFIX_.'customer_message` cm ON cm.`id_customer_thread` = a.`id_customer_thread`
LEFT JOIN `'._DB_PREFIX_.'lang` l ON l.`id_lang` = a.`id_lang`
LEFT JOIN `'._DB_PREFIX_.'contact_lang` cl ON (cl.`id_contact` = a.`id_contact` AND cl.`id_lang` = '.(int)$cookie->id_lang.')';
$contactArray = array();
$contacts = Contact::getContacts($cookie->id_lang);
foreach ($contacts AS $contact)
$contactArray[$contact['id_contact']] = $contact['name'];
$languageArray = array();
$languages = Language::getLanguages();
foreach ($languages AS $language)
$languageArray[$language['id_lang']] = $language['name'];
$statusArray = array(
'open' => $this->l('Open'),
'closed' => $this->l('Closed'),
'pending1' => $this->l('Pending 1'),
'pending2' => $this->l('Pending 2')
);
$imagesArray = array(
'open' => 'status_green.gif',
'closed' => 'status_red.gif',
'pending1' => 'status_orange.gif',
'pending2' => 'status_orange.gif'
);
$this->fieldsDisplay = array(
'id_customer_thread' => array('title' => $this->l('ID'), 'width' => 25),
'customer' => array('title' => $this->l('Customer'), 'width' => 100, 'filter_key' => 'customer', 'tmpTableFilter' => true),
'email' => array('title' => $this->l('E-mail'), 'width' => 100, 'filter_key' => 'a!email'),
'contact' => array('title' => $this->l('Type'), 'width' => 75, 'type' => 'select', 'select' => $contactArray, 'filter_key' => 'cl!id_contact', 'filter_type' => 'int'),
'language' => array('title' => $this->l('Language'), 'width' => 60, 'type' => 'select', 'select' => $languageArray, 'filter_key' => 'l!id_lang', 'filter_type' => 'int'),
'status' => array('title' => $this->l('Status'), 'width' => 50, 'type' => 'select', 'select' => $statusArray, 'icon' => $imagesArray, 'align' => 'center', 'filter_key' => 'a!status', 'filter_type' => 'string'),
'employee' => array('title' => $this->l('Employee'), 'width' => 100, 'filter_key' => 'employee', 'tmpTableFilter' => true),
'messages' => array('title' => $this->l('Messages'), 'width' => 50, 'filter_key' => 'messages', 'tmpTableFilter' => true, 'maxlength' => 0),
'date_upd' => array('title' => $this->l('Last message'), 'width' => 90)
);
$this->shopLinkType = 'shop';
parent::__construct();
}
public function postProcess()
{
global $currentIndex, $cookie, $link;
if ($id_customer_thread = (int)Tools::getValue('id_customer_thread'))
{
if (($id_contact = (int)Tools::getValue('id_contact')))
Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'customer_thread SET id_contact = '.(int)$id_contact.' WHERE id_customer_thread = '.(int)$id_customer_thread);
if ($id_status = (int)Tools::getValue('setstatus'))
{
$statusArray = array(1 => 'open', 2 => 'closed', 3 => 'pending1', 4 => 'pending2');
Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'customer_thread SET status = "'.$statusArray[$id_status].'" WHERE id_customer_thread = '.(int)$id_customer_thread.' LIMIT 1');
}
if (isset($_POST['id_employee_forward']))
{
// Todo: need to avoid doubles
$messages = Db::getInstance()->ExecuteS('
SELECT ct.*, cm.*, cl.name subject, CONCAT(e.firstname, \' \', e.lastname) employee_name, CONCAT(c.firstname, \' \', c.lastname) customer_name, c.firstname
FROM '._DB_PREFIX_.'customer_thread ct
LEFT JOIN '._DB_PREFIX_.'customer_message cm ON (ct.id_customer_thread = cm.id_customer_thread)
LEFT JOIN '._DB_PREFIX_.'contact_lang cl ON (cl.id_contact = ct.id_contact AND cl.id_lang = '.(int)$cookie->id_lang.')
LEFT OUTER JOIN '._DB_PREFIX_.'employee e ON e.id_employee = cm.id_employee
LEFT OUTER JOIN '._DB_PREFIX_.'customer c ON (c.email = ct.email)
WHERE ct.id_customer_thread = '.(int)Tools::getValue('id_customer_thread').'
ORDER BY cm.date_add DESC');
$output = '';
foreach ($messages AS $message)
$output .= $this->displayMsg($message, true, (int)Tools::getValue('id_employee_forward'));
$cm = new CustomerMessage();
$cm->id_employee = (int)$cookie->id_employee;
$cm->id_customer_thread = (int)Tools::getValue('id_customer_thread');
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
$currentEmployee = new Employee($cookie->id_employee);
if (($id_employee = (int)Tools::getValue('id_employee_forward')) AND ($employee = new Employee($id_employee)) AND Validate::isLoadedObject($employee))
{
$params = array(
'{messages}' => $output,
'{employee}' => $currentEmployee->firstname.' '.$currentEmployee->lastname,
'{comment}' => stripslashes($_POST['message_forward']));
Mail::Send((int)($cookie->id_lang), 'forward_msg', Mail::l('Fwd: Customer message'), $params,
$employee->email, $employee->firstname.' '.$employee->lastname,
$currentEmployee->email, $currentEmployee->firstname.' '.$currentEmployee->lastname);
$cm->message = $this->l('Message forwarded to').' '.$employee->firstname.' '.$employee->lastname."\n".$this->l('Comment:').' '.$_POST['message_forward'];
$cm->add();
}
elseif (($email = Tools::getValue('email')) AND Validate::isEmail($email))
{
$params = array(
'{messages}' => $output,
'{employee}' => $currentEmployee->firstname.' '.$currentEmployee->lastname,
'{comment}' => stripslashes($_POST['message_forward']));
Mail::Send((int)($cookie->id_lang), 'forward_msg', Mail::l('Fwd: Customer message'), $params,
$email, NULL,
$currentEmployee->email, $currentEmployee->firstname.' '.$currentEmployee->lastname);
$cm->message = $this->l('Message forwarded to').' '.$email."\n".$this->l('Comment:').' '.$_POST['message_forward'];
$cm->add();
}
else
echo '<div class="alert error">'.Tools::displayError('Email invalid.').'</div>';
}
if (Tools::isSubmit('submitReply'))
{
$ct = new CustomerThread($id_customer_thread);
$cm = new CustomerMessage();
$cm->id_employee = (int)$cookie->id_employee;
$cm->id_customer_thread = $ct->id;
$cm->message = Tools::htmlentitiesutf8(nl2br2(Tools::getValue('reply_message')));
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
if (isset($_FILES) AND !empty($_FILES['joinFile']['name']) AND $_FILES['joinFile']['error'] != 0)
$this->_errors[] = Tools::displayError('An error occurred with the file upload.');
else if ($cm->add())
{
$fileAttachment = NULL;
if (!empty($_FILES['joinFile']['name']))
{
$fileAttachment['content'] = file_get_contents($_FILES['joinFile']['tmp_name']);
$fileAttachment['name'] = $_FILES['joinFile']['name'];
$fileAttachment['mime'] = $_FILES['joinFile']['type'];
}
$params = array(
'{reply}' => nl2br2(Tools::getValue('reply_message')),
'{link}' => Tools::url($link->getPageLink('contact', true), 'id_customer_thread='.(int)($ct->id).'&token='.$ct->token),
);
Mail::Send($ct->id_lang, 'reply_msg', Mail::l('An answer to your message is available'), $params, Tools::getValue('msg_email'), NULL, NULL, NULL, $fileAttachment);
$ct->status = 'closed';
$ct->update();
Tools::redirectAdmin($currentIndex.'&id_customer_thread='.(int)$id_customer_thread.'&viewcustomer_thread&token='.Tools::getValue('token'));
}
else
$this->_errors[] = Tools::displayError('An error occurred, your message was not sent. Please contact your system administrator.');
}
}
return parent::postProcess();
}
public function display()
{
global $cookie;
if (isset($_GET['filename']) AND file_exists(_PS_UPLOAD_DIR_.$_GET['filename']))
self::openUploadedFile();
else if (isset($_GET['view'.$this->table]))
$this->viewcustomer_thread();
else
{
$this->getList((int)$cookie->id_lang, !Tools::getValue($this->table.'Orderby') ? 'date_upd' : NULL, !Tools::getValue($this->table.'Orderway') ? 'DESC' : NULL);
$this->displayList();
}
}
public function displayListHeader($token = NULL)
{
global $currentIndex, $cookie;
$contacts = Db::getInstance()->ExecuteS('
SELECT cl.*, COUNT(*) as total, (
SELECT id_customer_thread
FROM '._DB_PREFIX_.'customer_thread ct2
WHERE status = "open" AND ct.id_contact = ct2.id_contact
ORDER BY date_upd ASC
LIMIT 1
) as id_customer_thread
FROM '._DB_PREFIX_.'customer_thread ct
LEFT JOIN '._DB_PREFIX_.'contact_lang cl ON (cl.id_contact = ct.id_contact AND cl.id_lang = '.$cookie->id_lang.')
WHERE ct.status = "open"
GROUP BY ct.id_contact HAVING COUNT(*) > 0');
$categories = Db::getInstance()->ExecuteS('
SELECT cl.*
FROM '._DB_PREFIX_.'contact ct
LEFT JOIN '._DB_PREFIX_.'contact_lang cl ON (cl.id_contact = ct.id_contact AND cl.id_lang = '.$cookie->id_lang.')
WHERE ct.customer_service = 1');
$dim = count($categories);
echo '<div style="float:left;border:0;width:640px;">';
foreach ($categories as $key => $val)
{
$totalThread = 0;
$id_customer_thread = 0;
foreach ($contacts as $tmp => $tmp2)
if ($val['id_contact'] == $tmp2['id_contact'])
{
$totalThread = $tmp2['total'];
$id_customer_thread = $tmp2['id_customer_thread'];
break;
}
echo '<div style="background-color:#EFEFEF;float:left;margin:0 10px 10px 0;width:'.($dim > 6 ? '200' : '300').'px;border:1px solid #CFCFCF" >
<h3 style="overflow:hidden;line-height:25px;color:#812143;height:25px;margin:0;">&nbsp;'.$val['name'].'</h3>'.
($dim > 6 ? '' : '<p style="overflow:hidden;line-height:15px;height:45px;margin:0;padding:0 5px;">'.$val['description'].'</p>').
($totalThread == 0 ? '<h3 style="padding:0 5px;margin:0;height:23px;line-height:23px;background-color:#DEDEDE">'.$this->l('No new message').'</h3>'
: '<a href="'.$currentIndex.'&token='.Tools::getValue('token').'&id_customer_thread='.$id_customer_thread.'&viewcustomer_thread" style="padding:0 5px;display:block;height:23px;line-height:23px;border:0;" class="button">'.$totalThread.' '.($totalThread > 1 ? $this->l('new messages'): $this->l('new message')).'</a>').'
</div>';
}
echo '</div>';
$params = array(
$this->l('Total threads') => $all = Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'customer_thread'),
$this->l('Threads pending') => $pending = Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'customer_thread WHERE status LIKE "%pending%"'),
$this->l('Total customer messages') => Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'customer_message WHERE id_employee = 0'),
$this->l('Total employee messages') => Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'customer_message WHERE id_employee != 0'),
$this->l('Threads unread') => $unread = Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'customer_thread WHERE status = "open"'),
$this->l('Threads closed') => $all - ($unread + $pending));
echo '<div style="float:right;padding 0px;border:1px solid #CFCFCF;width:280px;">
<h3 class="button" style="margin:0;line-height:23px;height:23px;border:0;padding:0 5px;">'.$this->l('Customer service').' : '.$this->l('Statistics').'</h3>
<table cellspacing="1" class="table" style="border-collapse:separate;width:280px;border:0">';
$count = 0;
foreach ($params as $key => $val)
echo '<tr '.(++$count % 2 == 0 ? 'class="alt_row"' : '').'><td>'.$key.'</td><td>'.$val.'</td></tr>';
echo ' </table>
</div><p class="clear">&nbsp;</p>';
parent::displayListHeader($token);
}
private function openUploadedFile()
{
$filename = $_GET['filename'];
$extensions = array('.txt' => 'text/plain', '.rtf' => 'application/rtf', '.doc' => 'application/msword', '.docx'=> 'application/msword',
'.pdf' => 'application/pdf', '.zip' => 'multipart/x-zip', '.png' => 'image/png', '.jpeg' => 'image/jpeg', '.gif' => 'image/gif', '.jpg' => 'image/jpeg');
$extension = '';
foreach ($extensions AS $key => $val)
if (substr($filename, -4) == $key OR substr($filename, -5) == $key)
{
$extension = $val;
break;
}
ob_end_clean();
header('Content-Type: '.$extension);
header('Content-Disposition:attachment;filename="'.$filename.'"');
readfile(_PS_UPLOAD_DIR_.$filename);
die;
}
private function displayMsg($message, $email = false, $id_employee = null)
{
global $cookie, $currentIndex;
$customersToken = Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee));
$contacts = Contact::getContacts($cookie->id_lang);
if (!$email)
{
if (!empty($message['id_product']) AND empty($message['employee_name']))
$id_order_product = Db::getInstance()->getValue('
SELECT o.id_order
FROM '._DB_PREFIX_.'orders o
LEFT JOIN '._DB_PREFIX_.'order_detail od ON o.id_order = od.id_order
WHERE o.id_customer = '.(int)$message['id_customer'].'
AND od.product_id = '.(int)$message['id_product'].'
ORDER BY o.date_add DESC');
$output = '
<fieldset style="'.(!empty($message['employee_name']) ? 'background: rgb(255,236,242);' : '').'width:600px;margin-top:10px">
<legend '.(empty($message['employee_name']) ? '' : 'style="background:rgb(255,210,225)"').'>'.(
!empty($message['employee_name'])
? '<img src="../img/t/AdminCustomers.gif" alt="'.Configuration::get('PS_SHOP_NAME').'" /> '.Configuration::get('PS_SHOP_NAME').' - '.$message['employee_name']
: '<img src="'.__PS_BASE_URI__.'img/admin/tab-customers.gif" alt="'.Configuration::get('PS_SHOP_NAME').'" /> '.(
!empty($message['id_customer'])
? '<a href="index.php?tab=AdminCustomers&id_customer='.(int)($message['id_customer']).'&viewcustomer&token='.$customersToken.'" title="'.$this->l('View customer').'">'.$message['customer_name'].'</a>'
: $message['email']
)
).'</legend>
<div style="font-size:11px">'.(
(!empty($message['id_customer']) AND empty($message['employee_name']))
? '<b>'.$this->l('Customer ID:').'</b> <a href="index.php?tab=AdminCustomers&id_customer='.(int)($message['id_customer']).'&viewcustomer&token='.$customersToken.'" title="'.$this->l('View customer').'">'.(int)($message['id_customer']).' <img src="../img/admin/search.gif" alt="'.$this->l('view').'" /></a><br />'
: ''
).'
<b>'.$this->l('Sent on:').'</b> '.Tools::displayDate($message['date_add'], (int)($cookie->id_lang), true).'<br />'.(
empty($message['employee_name'])
? '<b>'.$this->l('Browser:').'</b> '.strip_tags($message['user_agent']).'<br />'
: ''
).(
(!empty($message['file_name']) AND file_exists(_PS_UPLOAD_DIR_.$message['file_name']))
? '<b>'.$this->l('File attachment').'</b> <a href="index.php?tab=AdminCustomerThreads&id_customer_thread='.$message['id_customer_thread'].'&viewcustomer_thread&token='.Tools::getAdminToken('AdminCustomerThreads'.(int)(Tab::getIdFromClassName('AdminCustomerThreads')).(int)($cookie->id_employee)).'&filename='.$message['file_name'].'" title="'.$this->l('View file').'"><img src="../img/admin/search.gif" alt="'.$this->l('view').'" /></a><br />'
: ''
).(
(!empty($message['id_order']) AND empty($message['employee_name']))
? '<b>'.$this->l('Order #').'</b> <a href="index.php?tab=AdminOrders&id_order='.(int)($message['id_order']).'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'" title="'.$this->l('View order').'">'.(int)($message['id_order']).' <img src="../img/admin/search.gif" alt="'.$this->l('view').'" /></a><br />'
: ''
).(
(!empty($message['id_product']) AND empty($message['employee_name']))
? '<b>'.$this->l('Product #').'</b> <a href="index.php?tab=AdminOrders&id_order='.(int)($id_order_product).'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'" title="'.$this->l('View order').'">'.(int)($message['id_product']).' <img src="../img/admin/search.gif" alt="'.$this->l('view').'" /></a><br />'
: ''
).'<br />
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<b>'.$this->l('Subject:').'</b>
<input type="hidden" name="id_customer_message" value="'.$message['id_customer_message'].'" />
<select name="id_contact" onchange="this.form.submit();">';
foreach ($contacts as $contact)
$output .= '<option value="'.(int)$contact['id_contact'].'" '.($contact['id_contact'] == $message['id_contact'] ? 'selected="selected"' : '').'>'.Tools::htmlentitiesutf8($contact['name']).'</option>';
$output .= '</select>
</form>';
}
else
{
$output = '<div style="font-size:11px">
'.($id_employee ? '<a href="'.Tools::getHttpHost(true).$currentIndex.'&token='.Tools::getAdminToken('AdminCustomerThreads'.(int)(Tab::getIdFromClassName('AdminCustomerThreads')).(int)($id_employee)).'&id_customer_thread='.(int)$message['id_customer_thread'].'&viewcustomer_thread">'.$this->l('View this thread').'</a><br />' : '').'
<b>'.$this->l('Sent by:').'</b> '.(!empty($message['customer_name']) ? $message['customer_name'].' ('.$message['email'].')' : $message['email'])
.((!empty($message['id_customer']) AND empty($message['employee_name'])) ? '<br /><b>'.$this->l('Customer ID:').'</b> '.(int)($message['id_customer']).'<br />' : '')
.((!empty($message['id_order']) AND empty($message['employee_name'])) ? '<br /><b>'.$this->l('Order #').':</b> '.(int)($message['id_order']).'<br />' : '')
.((!empty($message['id_product']) AND empty($message['employee_name'])) ? '<br /><b>'.$this->l('Product #').':</b> '.(int)($message['id_product']).'<br />' : '')
.'<br /><b>'.$this->l('Subject:').'</b> '.$message['subject'];
}
$message['message'] = preg_replace('/(https?:\/\/[a-z0-9#%&_=\(\)\.\? \+\-@\/]{6,1000})([\s\n<])/Uui', '<a href="\1">\1</a>\2', html_entity_decode($message['message'], ENT_NOQUOTES, 'UTF-8'));
$output .= '<br /><br />
<b>'.$this->l('Thread ID:').'</b> '.(int)$message['id_customer_thread'].'<br />
<b>'.$this->l('Message ID:').'</b> '.(int)$message['id_customer_message'].'<br />
<b>'.$this->l('Message:').'</b><br />
'.$message['message'].'
</div>';
if (!$email)
{
if (empty($message['employee_name']))
$output .= '
<p style="text-align:right">
<button style="font-family: Verdana; font-size: 11px; font-weight:bold; height: 65px; width: 120px;" onclick="$(\'#reply_to_'.(int)($message['id_customer_message']).'\').show(500); $(this).hide();">
<img src="'.__PS_BASE_URI__.'img/admin/contact.gif" alt="" style="margin-bottom: 5px;" /><br />'.$this->l('Reply to this message').'
</button>
</p>
<div id="reply_to_'.(int)($message['id_customer_message']).'" style="display: none; margin-top: 20px;"">
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post" enctype="multipart/form-data">
<p>'.$this->l('Please type your reply below:').'</p>
<textarea style="width: 450px; height: 175px;" name="reply_message">'.str_replace('\r\n', "\n", Configuration::get('PS_CUSTOMER_SERVICE_SIGNATURE', $message['id_lang'])).'</textarea>
<div style="width: 450px; text-align: right; font-style: italic; font-size: 9px; margin-top: 2px;">
'.$this->l('Your reply will be sent to:').' '.$message['email'].'
</div>
<div style="width: 450px; margin-top: 0px;">
<input type="file" name="joinFile"/>
<div>
<div style="width: 450px; text-align: center;">
<input type="submit" class="button" name="submitReply" value="'.$this->l('Send my reply').'" style="margin-top:20px;" />
<input type="hidden" name="id_customer_thread" value="'.(int)($message['id_customer_thread']).'" />
<input type="hidden" name="msg_email" value="'.$message['email'].'" />
</div>
</form>
</div>';
$output .= '
</fieldset>';
}
return $output;
}
public function viewcustomer_thread()
{
global $cookie, $currentIndex;
if (!($thread = $this->loadObject()))
return;
$cookie->{'customer_threadFilter_cl!id_contact'} = $thread->id_contact;
$employees = Db::getInstance()->ExecuteS('
SELECT e.id_employee, e.firstname, e.lastname FROM '._DB_PREFIX_.'employee e
WHERE e.active = 1 ORDER BY e.lastname ASC');
echo '
<h2>'.$this->l('Messages').'</h2>
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post" enctype="multipart/form-data">
<p>
<img src="../img/admin/msg-forward.png" alt="" style="vertical-align: middle;" /> '.$this->l('Forward this discussion to an employee:').'
<select name="id_employee_forward" style="vertical-align: middle;" onchange="
if ($(this).val() >= 0)
$(\'#message_forward\').show(400);
else
$(\'#message_forward\').hide(200);
if ($(this).val() == 0)
$(\'#message_forward_email\').show(200);
else
$(\'#message_forward_email\').hide(200);
">
<option value="-1">'.$this->l('-- Choose --').'</option>
<option value="0">'.$this->l('Someone else').'</option>';
foreach ($employees AS $employee)
echo ' <option value="'.(int)($employee['id_employee']).'">'.substr($employee['firstname'], 0, 1).'. '.$employee['lastname'].'</option>';
echo ' </select>
<div id="message_forward_email" style="display:none">
<b>'.$this->l('E-mail').'</b> <input type="text" name="email" />
</div>
<div id="message_forward" style="display:none;margin-bottom:10px">
<textarea name="message_forward" style="width: 500px; height: 80px; margin-top: 15px;" onclick="if ($(this).val() == \''.addslashes($this->l('You can add a comment here.')).'\') { $(this).val(\'\'); }">'.$this->l('You can add a comment here.').'</textarea><br />
<input type="Submit" name="submitForward" class="button" value="'.$this->l('Forward this discussion').'" style="margin-top: 10px;" />
</div>
</p>
</form>
<div class="clear">&nbsp;</div>';
$messages = Db::getInstance()->ExecuteS('
SELECT ct.*, cm.*, cl.name subject, CONCAT(e.firstname, \' \', e.lastname) employee_name, CONCAT(c.firstname, \' \', c.lastname) customer_name, c.firstname
FROM '._DB_PREFIX_.'customer_thread ct
LEFT JOIN '._DB_PREFIX_.'customer_message cm ON (ct.id_customer_thread = cm.id_customer_thread)
LEFT JOIN '._DB_PREFIX_.'contact_lang cl ON (cl.id_contact = ct.id_contact AND cl.id_lang = '.(int)$cookie->id_lang.')
LEFT JOIN '._DB_PREFIX_.'employee e ON e.id_employee = cm.id_employee
LEFT JOIN '._DB_PREFIX_.'customer c ON (IFNULL(ct.id_customer, ct.email) = IFNULL(c.id_customer, c.email))
WHERE ct.id_customer_thread = '.(int)Tools::getValue('id_customer_thread').'
ORDER BY cm.date_add DESC');
echo '<div style="float:right">';
$nextThread = Db::getInstance()->getValue('
SELECT id_customer_thread FROM '._DB_PREFIX_.'customer_thread ct
WHERE ct.status = "open" AND ct.date_upd = (
SELECT date_add FROM '._DB_PREFIX_.'customer_message
WHERE (id_employee IS NULL OR id_employee = 0) AND id_customer_thread = '.(int)$thread->id.'
ORDER BY date_add DESC LIMIT 1
)
'.($cookie->{'customer_threadFilter_cl!id_contact'} ? 'AND ct.id_contact = '.(int)$cookie->{'customer_threadFilter_cl!id_contact'} : '').'
'.($cookie->{'customer_threadFilter_l!id_lang'} ? 'AND ct.id_lang = '.(int)$cookie->{'customer_threadFilter_l!id_lang'} : '').
' ORDER BY ct.date_upd ASC');
if ($nextThread)
echo $this->displayButton('
<a href="'.$currentIndex.'&id_customer_thread='.(int)$nextThread.'&viewcustomer_thread&token='.$this->token.'">
<img src="../img/admin/next-msg.png" title="'.$this->l('Go to the oldest next unanswered message').'" style="margin-bottom: 10px;" />
<br />'.$this->l('Answer to the next unanswered message in this category').' &gt;
</a>');
else
echo $this->displayButton('
<img src="../img/admin/msg-ok.png" title="'.$this->l('Go to the oldest next unanswered message').'" style="margin-bottom: 10px;" />
<br />'.$this->l('The other messages in this category have been answered'));
if ($thread->status != "closed")
echo $this->displayButton('
<a href="'.$currentIndex.'&viewcustomer_thread&setstatus=2&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token.'">
<img src="../img/admin/msg-ok.png" style="margin-bottom:10px" />
<br />'.$this->l('Set this message as handled').'
</a>');
if ($thread->status != "pending1")
echo $this->displayButton('
<a href="'.$currentIndex.'&viewcustomer_thread&setstatus=3&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token.'">
<img src="../img/admin/msg-pending.png" style="margin-bottom:10px" />
<br />'.$this->l('Declare this message').'<br />'.$this->l('as "pending 1"').'<br />'.$this->l('(will be answered later)').'
</a>');
else
echo $this->displayButton('
<a href="'.$currentIndex.'&viewcustomer_thread&setstatus=1&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token.'">
<img src="../img/admin/msg-is-pending.png" style="margin-bottom:10px" />
<br />'.$this->l('Click here to disable pending status').'
</a>');
if ($thread->status != "pending2")
echo $this->displayButton('
<a href="'.$currentIndex.'&viewcustomer_thread&setstatus=4&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token.'">
<img src="../img/admin/msg-pending.png" style="margin-bottom:10px" />
<br />'.$this->l('Declare this message').'<br />'.$this->l('as "pending 2"').'<br />'.$this->l('(will be answered later)').'
</a>');
else
echo $this->displayButton('
<a href="'.$currentIndex.'&viewcustomer_thread&setstatus=1&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token.'">
<img src="../img/admin/msg-is-pending.png" style="margin-bottom:10px" />
<br />'.$this->l('Click here to disable pending status').'
</a>');
echo '</div>';
if ($thread->id_customer)
{
$customer = new Customer($thread->id_customer);
$products = $customer->getBoughtProducts();
$orders = Order::getCustomerOrders($customer->id);
echo '<div style="float:left;width:600px">';
if ($orders AND sizeof($orders))
{
$totalOK = 0;
$ordersOK = array();
$tokenOrders = Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee));
foreach ($orders as $order)
if ($order['valid'])
{
$ordersOK[] = $order;
$totalOK += $order['total_paid_real'];
}
if ($countOK = sizeof($ordersOK))
{
echo '<div style="float:left;margin-right:20px;">
<h2>'.$this->l('Orders').'</h2>
<table cellspacing="0" cellpadding="0" class="table float">
<tr>
<th class="center">'.$this->l('ID').'</th>
<th class="center">'.$this->l('Date').'</th>
<th class="center">'.$this->l('Products').'</th>
<th class="center">'.$this->l('Total paid').'</th>
<th class="center">'.$this->l('Payment').'</th>
<th class="center">'.$this->l('State').'</th>
<th class="center">'.$this->l('Actions').'</th>
</tr>';
$irow = 0;
foreach ($ordersOK AS $order)
echo '<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminOrders&id_order='.$order['id_order'].'&vieworder&token='.$tokenOrders.'\'">
<td class="center">'.$order['id_order'].'</td>
<td>'.Tools::displayDate($order['date_add'], (int)($cookie->id_lang)).'</td>
<td align="right">'.$order['nb_products'].'</td>
<td align="right">'.Tools::displayPrice($order['total_paid_real'], new Currency((int)($order['id_currency']))).'</td>
<td>'.$order['payment'].'</td>
<td>'.$order['order_state'].'</td>
<td align="center"><a href="?tab=AdminOrders&id_order='.$order['id_order'].'&vieworder&token='.$tokenOrders.'"><img src="../img/admin/details.gif" /></a></td>
</tr>';
echo '</table>
<h3 style="color:green;font-weight:700;margin-top:10px">'.$this->l('Validated Orders:').' '.$countOK.' '.$this->l('for').' '.Tools::displayPrice($totalOK, new Currency(Configuration::get('PS_CURRENCY_DEFAULT'))).'</h3>
</div>';
}
}
if ($products AND sizeof($products))
{
echo '<div style="float:left;margin-right:20px">
<h2>'.$this->l('Products').'</h2>
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th class="center">'.$this->l('Date').'</th>
<th class="center">'.$this->l('ID').'</th>
<th class="center">'.$this->l('Name').'</th>
<th class="center">'.$this->l('Quantity').'</th>
<th class="center">'.$this->l('Actions').'</th>
</tr>';
$irow = 0;
$tokenOrders = Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee));
foreach ($products AS $product)
echo '
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminOrders&id_order='.$product['id_order'].'&vieworder&token='.$tokenOrders.'\'">
<td>'.Tools::displayDate($product['date_add'], (int)($cookie->id_lang), true).'</td>
<td>'.$product['product_id'].'</td>
<td>'.$product['product_name'].'</td>
<td align="right">'.$product['product_quantity'].'</td>
<td align="center"><a href="?tab=AdminOrders&id_order='.$product['id_order'].'&vieworder&token='.$tokenOrders.'"><img src="../img/admin/details.gif" /></a></td>
</tr>';
echo '</table></div>';
}
echo '</div>';
}
echo '<div style="float:left;margin-top:10px">';
foreach ($messages AS $message)
echo $this->displayMsg($message);
echo '</div><div class="clear">&nbsp;</div>';
}
private function displayButton($content)
{
return '
<div style="margin-bottom:10px;border:1px solid #005500;width:200px;height:130px;padding:10px;background:#EFE">
<p style="text-align:center;font-size:15px;font-weight:bold">
'.$content.'
</p>
</div>';
}
}

View File

@@ -1,861 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7320 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminCustomers extends AdminTab
{
public function __construct()
{
$this->table = 'customer';
$this->className = 'Customer';
$this->lang = false;
$this->edit = true;
$this->view = true;
$this->delete = true;
$this->deleted = true;
$this->requiredDatabase = true;
$this->_select = '(YEAR(CURRENT_DATE)-YEAR(`birthday`)) - (RIGHT(CURRENT_DATE, 5)<RIGHT(`birthday`, 5)) as age, (
SELECT c.date_add FROM '._DB_PREFIX_.'guest g
LEFT JOIN '._DB_PREFIX_.'connections c ON c.id_guest = g.id_guest
WHERE g.id_customer = a.id_customer
ORDER BY c.date_add DESC
LIMIT 1
) as connect';
$genders = array(1 => $this->l('M'), 2 => $this->l('F'), 9 => $this->l('?'));
$this->fieldsDisplay = array(
'id_customer' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'id_gender' => array('title' => $this->l('Gender'), 'width' => 25, 'align' => 'center', 'icon' => array(1 => 'male.gif', 2 => 'female.gif', 'default' => 'unknown.gif'), 'orderby' => false, 'type' => 'select', 'select' => $genders, 'filter_key' => 'a!id_gender'),
'lastname' => array('title' => $this->l('Last Name'), 'width' => 80),
'firstname' => array('title' => $this->l('First name'), 'width' => 60),
'email' => array('title' => $this->l('E-mail address'), 'width' => 120, 'maxlength' => 19),
'age' => array('title' => $this->l('Age'), 'width' => 30, 'search' => false),
'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false),
'newsletter' => array('title' => $this->l('News.'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'callback' => 'printNewsIcon', 'orderby' => false),
'optin' => array('title' => $this->l('Opt.'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'callback' => 'printOptinIcon', 'orderby' => false),
'date_add' => array('title' => $this->l('Registration'), 'width' => 30, 'type' => 'date', 'align' => 'right'),
'connect' => array('title' => $this->l('Connection'), 'width' => 60, 'type' => 'datetime', 'search' => false));
$this->shopLinkType = 'shop';
$this->shopShareDatas = true;
$this->optionTitle = $this->l('Customers options');
$this->_fieldsOptions = array(
'PS_PASSWD_TIME_FRONT' => array('title' => $this->l('Regenerate password:'), 'desc' => $this->l('Security minimum time to wait to regenerate the password'),'validation' => 'isUnsignedInt', 'cast' => 'intval', 'size' => 5, 'type' => 'text', 'suffix' => ' '.$this->l('minutes'))
);
parent::__construct();
}
public function postProcess()
{
global $currentIndex;
if (Tools::isSubmit('submitDel'.$this->table) OR Tools::isSubmit('delete'.$this->table))
{
$deleteForm = '
<form action="'.htmlentities($_SERVER['REQUEST_URI']).'" method="post">
<fieldset><legend>'.$this->l('How do you want to delete your customer(s)?').'</legend>
'.$this->l('You have two ways to delete a customer, please choose what you want to do.').'
<p>
<input type="radio" name="deleteMode" value="real" id="deleteMode_real" />
<label for="deleteMode_real" style="float:none">'.$this->l('I want to delete my customer(s) for real, all data will be removed from the database. A customer with the same e-mail address will be able to register again.').'</label>
</p>
<p>
<input type="radio" name="deleteMode" value="deleted" id="deleteMode_deleted" />
<label for="deleteMode_deleted" style="float:none">'.$this->l('I don\'t want my customer(s) to register again. The customer(s) will be removed from this list but all data will be kept in the database.').'</label>
</p>';
foreach ($_POST as $key => $value)
if (is_array($value))
foreach ($value as $val)
$deleteForm .= '<input type="hidden" name="'.htmlentities($key).'[]" value="'.htmlentities($val).'" />';
else
$deleteForm .= '<input type="hidden" name="'.htmlentities($key).'" value="'.htmlentities($value).'" />';
$deleteForm .= ' <br /><input type="submit" class="button" value="'.$this->l(' Delete ').'" />
</fieldset>
</form>
<div class="clear">&nbsp;</div>';
}
if (Tools::getValue('submitAdd'.$this->table))
{
$groupList = Tools::getValue('groupBox');
/* Checking fields validity */
$this->validateRules();
if (!sizeof($this->_errors))
{
$id = (int)(Tools::getValue('id_'.$this->table));
if (isset($id) AND !empty($id))
{
if ($this->tabAccess['edit'] !== '1')
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
else
{
$object = new $this->className($id);
if (Validate::isLoadedObject($object))
{
$customer_email = strval(Tools::getValue('email'));
// check if e-mail already used
if ($customer_email != $object->email)
{
$customer = new Customer();
$customer->getByEmail($customer_email);
if ($customer->id)
$this->_errors[] = Tools::displayError('An account already exists for this e-mail address:').' '.$customer_email;
}
if (!is_array($groupList) OR sizeof($groupList) == 0)
$this->_errors[] = Tools::displayError('Customer must be in at least one group.');
else
if (!in_array(Tools::getValue('id_default_group'), $groupList))
$this->_errors[] = Tools::displayError('Default customer group must be selected in group box.');
// Updating customer's group
if (!sizeof($this->_errors))
{
$object->cleanGroups();
if (is_array($groupList) AND sizeof($groupList) > 0)
$object->addGroups($groupList);
}
}
else
$this->_errors[] = Tools::displayError('An error occurred while loading object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
}
else
{
if ($this->tabAccess['add'] === '1')
{
$object = new $this->className();
$this->copyFromPost($object, $this->table);
$shop = new Shop((int)$object->id_shop);
$object->id_group_shop = (int)$shop->id_group_shop;
if (!$object->add())
$this->_errors[] = Tools::displayError('An error occurred while creating object.').' <b>'.$this->table.' ('.mysql_error().')</b>';
elseif (($_POST[$this->identifier] = $object->id /* voluntary */) AND $this->postImage($object->id) AND !sizeof($this->_errors) AND $this->_redirect)
{
// Add Associated groups
$group_list = Tools::getValue('groupBox');
if (is_array($group_list) && sizeof($group_list) > 0)
$object->addGroups($group_list, true);
$parent_id = (int)(Tools::getValue('id_parent', 1));
// Save and stay on same form
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay'))
Tools::redirectAdmin($currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=3&update'.$this->table.'&token='.$this->token);
// Save and back to parent
if (Tools::isSubmit('submitAdd'.$this->table.'AndBackToParent'))
Tools::redirectAdmin($currentIndex.'&'.$this->identifier.'='.$parent_id.'&conf=3&token='.$this->token);
// Default behavior (save and back)
Tools::redirectAdmin($currentIndex.($parent_id ? '&'.$this->identifier.'='.$object->id : '').'&conf=3&token='.$this->token);
}
}
else
$this->_errors[] = Tools::displayError('You do not have permission to add here.');
}
}
}
elseif (Tools::isSubmit('delete'.$this->table) AND $this->tabAccess['delete'] === '1')
{
switch (Tools::getValue('deleteMode'))
{
case 'real':
$this->deleted = false;
Discount::deleteByIdCustomer((int)(Tools::getValue('id_customer')));
break;
case 'deleted':
$this->deleted = true;
break;
default:
echo $deleteForm;
if (isset($_POST['delete'.$this->table]))
unset($_POST['delete'.$this->table]);
if (isset($_GET['delete'.$this->table]))
unset($_GET['delete'.$this->table]);
break;
}
}
elseif (Tools::isSubmit('submitDel'.$this->table) AND $this->tabAccess['delete'] === '1')
{
switch (Tools::getValue('deleteMode'))
{
case 'real':
$this->deleted = false;
foreach (Tools::getValue('customerBox') as $id_customer)
Discount::deleteByIdCustomer((int)($id_customer));
break;
case 'deleted':
$this->deleted = true;
break;
default:
echo $deleteForm;
if (isset($_POST['submitDel'.$this->table]))
unset($_POST['submitDel'.$this->table]);
if (isset($_GET['submitDel'.$this->table]))
unset($_GET['submitDel'.$this->table]);
break;
}
}
elseif (Tools::isSubmit('submitGuestToCustomer') AND Tools::getValue('id_customer'))
{
if ($this->tabAccess['edit'] === '1')
{
$customer = new Customer((int)Tools::getValue('id_customer'));
if (!Validate::isLoadedObject($customer))
$this->_errors[] = Tools::displayError('This customer does not exist.');
if(Customer::customerExists($customer->email))
$this->_errors[] = Tools::displayError('This customer already exist as non-guest.');
elseif ($customer->transformToCustomer(Tools::getValue('id_lang', Configuration::get('PS_LANG_DEFAULT'))))
Tools::redirectAdmin($currentIndex.'&'.$this->identifier.'='.$customer->id.'&conf=3&token='.$this->token);
else
$this->_errors[] = Tools::displayError('An error occurred while updating customer.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}elseif (Tools::isSubmit('changeNewsletterVal') AND Tools::getValue('id_customer'))
{
$id_customer = (int)Tools::getValue('id_customer');
$customer = new Customer($id_customer);
if (!Validate::isLoadedObject($customer))
$this->_errors[] = Tools::displayError('An error occurred while updating customer.');
$update = Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'customer` SET newsletter = '.($customer->newsletter ? 0 : 1).' WHERE `id_customer` = '.(int)($customer->id));
if (!$update)
$this->_errors[] = Tools::displayError('An error occurred while updating customer.');
Tools::redirectAdmin($currentIndex.'&token='.$this->token);
}elseif (Tools::isSubmit('changeOptinVal') AND Tools::getValue('id_customer'))
{
$id_customer = (int)Tools::getValue('id_customer');
$customer = new Customer($id_customer);
if (!Validate::isLoadedObject($customer))
$this->_errors[] = Tools::displayError('An error occurred while updating customer.');
$update = Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'customer` SET optin = '.($customer->optin ? 0 : 1).' WHERE `id_customer` = '.(int)($customer->id));
if (!$update)
$this->_errors[] = Tools::displayError('An error occurred while updating customer.');
Tools::redirectAdmin($currentIndex.'&token='.$this->token);
}
return parent::postProcess();
}
public function viewcustomer()
{
global $currentIndex, $cookie, $link;
$irow = 0;
$configurations = Configuration::getMultiple(array('PS_LANG_DEFAULT', 'PS_CURRENCY_DEFAULT'));
$defaultLanguage = (int)($configurations['PS_LANG_DEFAULT']);
$defaultCurrency = (int)($configurations['PS_CURRENCY_DEFAULT']);
if (!($customer = $this->loadObject()))
return;
$customerStats = $customer->getStats();
$addresses = $customer->getAddresses($defaultLanguage);
$products = $customer->getBoughtProducts();
$discounts = Discount::getCustomerDiscounts($defaultLanguage, (int)$customer->id, false, false);
$orders = Order::getCustomerOrders((int)$customer->id, true);
$carts = Cart::getCustomerCarts((int)$customer->id);
$groups = $customer->getGroups();
$messages = CustomerThread::getCustomerMessages((int)$customer->id);
$referrers = Referrer::getReferrers((int)$customer->id);
if ($totalCustomer = Db::getInstance()->getValue('SELECT SUM(total_paid_real) FROM '._DB_PREFIX_.'orders WHERE id_customer = '.$customer->id.' AND valid = 1'))
{
Db::getInstance()->getValue('SELECT SQL_CALC_FOUND_ROWS COUNT(*) FROM '._DB_PREFIX_.'orders WHERE valid = 1 GROUP BY id_customer HAVING SUM(total_paid_real) > '.$totalCustomer);
$countBetterCustomers = (int)Db::getInstance()->getValue('SELECT FOUND_ROWS()') + 1;
}
else
$countBetterCustomers = '-';
$shop = new Shop((int)$customer->id_shop);
echo '
<fieldset style="width:400px;float: left"><div style="float: right"><a href="'.$currentIndex.'&addcustomer&id_customer='.$customer->id.'&token='.$this->token.'"><img src="../img/admin/edit.gif" /></a></div>
<span style="font-weight: bold; font-size: 14px;">'.$customer->firstname.' '.$customer->lastname.'</span>
<img src="../img/admin/'.($customer->id_gender == 2 ? 'female' : ($customer->id_gender == 1 ? 'male' : 'unknown')).'.gif" style="margin-bottom: 5px" /><br />
<a href="mailto:'.$customer->email.'" style="text-decoration: underline; color: blue">'.$customer->email.'</a><br /><br />
'.$this->l('ID:').' '.sprintf('%06d', $customer->id).'<br />
'.$this->l('Registration date:').' '.Tools::displayDate($customer->date_add, (int)($cookie->id_lang), true).'<br />
'.$this->l('Last visit:').' '.($customerStats['last_visit'] ? Tools::displayDate($customerStats['last_visit'], (int)($cookie->id_lang), true) : $this->l('never')).'<br />
'.($countBetterCustomers != '-' ? $this->l('Rank: #').' '.(int)$countBetterCustomers.'<br />' : '')
.(Tools::isMultiShopActivated() ? '<br />'.$this->l('Shop:').' '.$shop->name : '').'
</fieldset>
<fieldset style="width:300px;float:left;margin-left:50px">
<div style="float: right">
<a href="'.$currentIndex.'&addcustomer&id_customer='.$customer->id.'&token='.$this->token.'"><img src="../img/admin/edit.gif" /></a>
</div>
'.$this->l('Newsletter:').' '.($customer->newsletter ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />').'<br />
'.$this->l('Opt-in:').' '.($customer->optin ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />').'<br />
'.$this->l('Age:').' '.$customerStats['age'].' '.((!empty($customer->birthday['age'])) ? '('.Tools::displayDate($customer->birthday, (int)($cookie->id_lang)).')' : $this->l('unknown')).'<br /><br />
'.$this->l('Last update:').' '.Tools::displayDate($customer->date_upd, (int)($cookie->id_lang), true).'<br />
'.$this->l('Status:').' '.($customer->active ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />');
if ($customer->isGuest())
{
echo '
<div>
'.$this->l('This customer is registered as').' <b>'.$this->l('guest').'</b>';
if(!Customer::customerExists($customer->email))
{
echo '
<form method="POST" action="index.php?tab=AdminCustomers&id_customer='.(int)$customer->id.'&token='.Tools::getAdminTokenLite('AdminCustomers').'">
<input type="hidden" name="id_lang" value="'.(int)(sizeof($orders) ? $orders[0]['id_lang'] : Configuration::get('PS_LANG_DEFAULT')).'" />
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="'.$this->l('Transform to customer').'" /></p>
'.$this->l('This feature generates a random password and sends an e-mail to the customer
</form>');
}
else
echo '</div><div><b style="color:red;">'.$this->l('A registered customer account exists with the same email address').'</b>';
echo '
</div>
';
}
echo '
</fieldset>
<div class="clear">&nbsp;</div>';
echo '<fieldset style="height:190px"><legend><img src="../img/admin/cms.gif" /> '.$this->l('Add a private note').'</legend>
<p>'.$this->l('This note will be displayed to all the employees but not to the customer.').'</p>
<form action="ajax.php" method="post" onsubmit="saveCustomerNote();return false;" id="customer_note">
<textarea name="note" id="noteContent" style="width:600px;height:100px" onkeydown="$(\'#submitCustomerNote\').removeAttr(\'disabled\');">'.Tools::htmlentitiesUTF8($customer->note).'</textarea><br />
<input type="submit" id="submitCustomerNote" class="button" value="'.$this->l(' Save ').'" style="float:left;margin-top:5px" disabled="disabled" />
<span id="note_feedback" style="float:left;margin:10px 0 0 10px"></span>
</form>
</fieldset>
<div class="clear">&nbsp;</div>
<script type="text/javascript">
function saveCustomerNote()
{
$("#note_feedback").html("<img src=\"../img/loader.gif\" />").show();
var noteContent = $("#noteContent").val();
$.post("ajax.php", {submitCustomerNote:1,id_customer:'.(int)$customer->id.',note:noteContent}, function (r) {
$("#note_feedback").html("").hide();
if (r == "ok")
{
$("#note_feedback").html("<b style=\"color:green\">'.addslashes($this->l('Your note has been saved')).'</b>").fadeIn(400);
$("#submitCustomerNote").attr("disabled", "disabled");
}
else if (r == "error:validation")
$("#note_feedback").html("<b style=\"color:red\">'.addslashes($this->l('Error: your note is not valid')).'</b>").fadeIn(400);
else if (r == "error:update")
$("#note_feedback").html("<b style=\"color:red\">'.addslashes($this->l('Error: cannot save your note')).'</b>").fadeIn(400);
$("#note_feedback").fadeOut(3000);
});
}
</script>';
echo '<h2>'.$this->l('Messages').' ('.sizeof($messages).')</h2>';
if (sizeof($messages))
{
echo '
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th class="center">'.$this->l('Status').'</th>
<th class="center">'.$this->l('Message').'</th>
<th class="center">'.$this->l('Sent on').'</th>
</tr>';
foreach ($messages AS $message)
echo '<tr>
<td>'.$message['status'].'</td>
<td><a href="index.php?tab=AdminCustomerThreads&id_customer_thread='.(int)($message['id_customer_thread']).'&viewcustomer_thread&token='.Tools::getAdminTokenLite('AdminCustomerThreads').'">'.substr(strip_tags(html_entity_decode($message['message'], ENT_NOQUOTES, 'UTF-8')), 0, 75).'...</a></td>
<td>'.Tools::displayDate($message['date_add'], (int)($cookie->id_lang), true).'</td>
</tr>';
echo '</table>
<div class="clear">&nbsp;</div>';
}
else
echo $customer->firstname.' '.$customer->lastname.' '.$this->l('has never contacted you.');
// display hook specified to this page : AdminCustomers
if (($hook = Module::hookExec('adminCustomers', array('id_customer' => $customer->id))) !== false)
echo '<div>'.$hook.'</div>';
echo '<div class="clear">&nbsp;</div>';
echo '<h2>'.$this->l('Groups').' ('.sizeof($groups).')</h2>';
if ($groups AND sizeof($groups))
{
echo '
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th class="center">'.$this->l('ID').'</th>
<th class="center">'.$this->l('Name').'</th>
<th class="center">'.$this->l('Actions').'</th>
</tr>';
$tokenGroups = Tools::getAdminToken('AdminGroups'.(int)(Tab::getIdFromClassName('AdminGroups')).(int)($cookie->id_employee));
foreach ($groups AS $group)
{
$objGroup = new Group($group);
echo '
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminGroups&id_group='.$objGroup->id.'&viewgroup&token='.$tokenGroups.'\'">
<td class="center">'.$objGroup->id.'</td>
<td>'.$objGroup->name[$defaultLanguage].'</td>
<td align="center"><a href="?tab=AdminGroups&id_group='.$objGroup->id.'&viewgroup&token='.$tokenGroups.'"><img src="../img/admin/details.gif" /></a></td>
</tr>';
}
echo '
</table>';
}
echo '<div class="clear">&nbsp;</div>';
echo '<h2>'.$this->l('Orders').' ('.sizeof($orders).')</h2>';
if ($orders AND sizeof($orders))
{
$totalOK = 0;
$ordersOK = array();
$ordersKO = array();
$tokenOrders = Tools::getAdminToken('AdminOrders'.(int)Tab::getIdFromClassName('AdminOrders').(int)$cookie->id_employee);
foreach ($orders AS $order)
if ($order['valid'])
{
$ordersOK[] = $order;
$totalOK += $order['total_paid_real'];
}
else
$ordersKO[] = $order;
$orderHead = '
<table cellspacing="0" cellpadding="0" class="table float">
<tr>
<th class="center">'.$this->l('ID').'</th>
<th class="center">'.$this->l('Date').'</th>
<th class="center">'.$this->l('Products').'</th>
<th class="center">'.$this->l('Total paid').'</th>
<th class="center">'.$this->l('Payment').'</th>
<th class="center">'.$this->l('State').'</th>
<th class="center">'.$this->l('Actions').'</th>
</tr>';
$orderFoot = '</table>';
if ($countOK = sizeof($ordersOK))
{
echo '<div style="float:left;margin-right:20px"><h3 style="color:green;font-weight:700">'.$this->l('Valid orders:').' '.$countOK.' '.$this->l('for').' '.Tools::displayPrice($totalOK, new Currency($defaultCurrency)).'</h3>'.$orderHead;
foreach ($ordersOK AS $order)
echo '<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminOrders&id_order='.$order['id_order'].'&vieworder&token='.$tokenOrders.'\'">
<td class="center">'.$order['id_order'].'</td>
<td>'.Tools::displayDate($order['date_add'], (int)($cookie->id_lang)).'</td>
<td align="right">'.$order['nb_products'].'</td>
<td align="right">'.Tools::displayPrice($order['total_paid_real'], new Currency((int)($order['id_currency']))).'</td>
<td>'.$order['payment'].'</td>
<td>'.$order['order_state'].'</td>
<td align="center"><a href="?tab=AdminOrders&id_order='.$order['id_order'].'&vieworder&token='.$tokenOrders.'"><img src="../img/admin/details.gif" /></a></td>
</tr>';
echo $orderFoot.'</div>';
}
if ($countKO = sizeof($ordersKO))
{
echo '<div style="float:left;margin-right:20px"><h3 style="color:red;font-weight:700">'.$this->l('Invalid orders:').' '.$countKO.'</h3>'.$orderHead;
foreach ($ordersKO AS $order)
echo '
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminOrders&id_order='.$order['id_order'].'&vieworder&token='.$tokenOrders.'\'">
<td class="center">'.$order['id_order'].'</td>
<td>'.Tools::displayDate($order['date_add'], (int)($cookie->id_lang)).'</td>
<td align="right">'.$order['nb_products'].'</td>
<td align="right">'.Tools::displayPrice($order['total_paid_real'], new Currency((int)($order['id_currency']))).'</td>
<td>'.$order['payment'].'</td>
<td>'.$order['order_state'].'</td>
<td align="center"><a href="?tab=AdminOrders&id_order='.$order['id_order'].'&vieworder&token='.$tokenOrders.'"><img src="../img/admin/details.gif" /></a></td>
</tr>';
echo $orderFoot.'</div><div class="clear">&nbsp;</div>';
}
}
else
echo $customer->firstname.' '.$customer->lastname.' '.$this->l('has not placed any orders yet');
if ($products AND sizeof($products))
{
echo '<div class="clear">&nbsp;</div>
<h2>'.$this->l('Products').' ('.sizeof($products).')</h2>
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th class="center">'.$this->l('Date').'</th>
<th class="center">'.$this->l('Name').'</th>
<th class="center">'.$this->l('Quantity').'</th>
<th class="center">'.$this->l('Actions').'</th>
</tr>';
$tokenOrders = Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee));
foreach ($products AS $product)
echo '
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminOrders&id_order='.$product['id_order'].'&vieworder&token='.$tokenOrders.'\'">
<td>'.Tools::displayDate($product['date_add'], (int)($cookie->id_lang), true).'</td>
<td>'.$product['product_name'].'</td>
<td align="right">'.$product['product_quantity'].'</td>
<td align="center"><a href="?tab=AdminOrders&id_order='.$product['id_order'].'&vieworder&token='.$tokenOrders.'"><img src="../img/admin/details.gif" /></a></td>
</tr>';
echo '
</table>';
}
echo '<div class="clear">&nbsp;</div>
<h2>'.$this->l('Addresses').' ('.sizeof($addresses).')</h2>';
if (sizeof($addresses))
{
echo '
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th>'.$this->l('Company').'</th>
<th>'.$this->l('Name').'</th>
<th>'.$this->l('Address').'</th>
<th>'.$this->l('Country').'</th>
<th>'.$this->l('Phone number(s)').'</th>
<th>'.$this->l('Actions').'</th>
</tr>';
$tokenAddresses = Tools::getAdminToken('AdminAddresses'.(int)(Tab::getIdFromClassName('AdminAddresses')).(int)($cookie->id_employee));
foreach ($addresses AS $address)
echo '
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').'>
<td>'.($address['company'] ? $address['company'] : '--').'</td>
<td>'.$address['firstname'].' '.$address['lastname'].'</td>
<td>'.$address['address1'].($address['address2'] ? ' '.$address['address2'] : '').' '.$address['postcode'].' '.$address['city'].'</td>
<td>'.$address['country'].'</td>
<td>'.($address['phone'] ? ($address['phone'].($address['phone_mobile'] ? '<br />'.$address['phone_mobile'] : '')) : ($address['phone_mobile'] ? '<br />'.$address['phone_mobile'] : '--')).'</td>
<td align="center">
<a href="?tab=AdminAddresses&id_address='.$address['id_address'].'&addaddress&token='.$tokenAddresses.'"><img src="../img/admin/edit.gif" /></a>
<a href="?tab=AdminAddresses&id_address='.$address['id_address'].'&deleteaddress&token='.$tokenAddresses.'"><img src="../img/admin/delete.gif" /></a>
</td>
</tr>';
echo '
</table>';
}
else
echo $customer->firstname.' '.$customer->lastname.' '.$this->l('has not registered any addresses yet').'.';
echo '<div class="clear">&nbsp;</div>
<h2>'.$this->l('Discounts').' ('.sizeof($discounts).')</h2>';
if (sizeof($discounts))
{
echo '
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th>'.$this->l('ID').'</th>
<th>'.$this->l('Code').'</th>
<th>'.$this->l('Type').'</th>
<th>'.$this->l('Value').'</th>
<th>'.$this->l('Qty available').'</th>
<th>'.$this->l('Status').'</th>
<th>'.$this->l('Actions').'</th>
</tr>';
$tokenDiscounts = Tools::getAdminToken('AdminDiscounts'.(int)(Tab::getIdFromClassName('AdminDiscounts')).(int)($cookie->id_employee));
foreach ($discounts AS $discount)
{
echo '
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').'>
<td align="center">'.$discount['id_discount'].'</td>
<td>'.$discount['name'].'</td>
<td>'.$discount['type'].'</td>
<td align="right">'.$discount['value'].'</td>
<td align="center">'.$discount['quantity_for_user'].'</td>
<td align="center"><img src="../img/admin/'.($discount['active'] ? 'enabled.gif' : 'disabled.gif').'" alt="'.$this->l('Status').'" title="'.$this->l('Status').'" /></td>
<td align="center">
<a href="?tab=AdminDiscounts&id_discount='.$discount['id_discount'].'&adddiscount&token='.$tokenDiscounts.'"><img src="../img/admin/edit.gif" /></a>
<a href="?tab=AdminDiscounts&id_discount='.$discount['id_discount'].'&deletediscount&token='.$tokenDiscounts.'"><img src="../img/admin/delete.gif" /></a>
</td>
</tr>';
}
echo '
</table>';
}
else
echo $customer->firstname.' '.$customer->lastname.' '.$this->l('has no discount vouchers').'.';
echo '<div class="clear">&nbsp;</div>';
echo '<div style="float:left">
<h2>'.$this->l('Carts').' ('.sizeof($carts).')</h2>';
if ($carts AND sizeof($carts))
{
echo '
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th class="center">'.$this->l('ID').'</th>
<th class="center">'.$this->l('Date').'</th>
<th class="center">'.$this->l('Total').'</th>
<th class="center">'.$this->l('Carrier').'</th>
<th class="center">'.$this->l('Actions').'</th>
</tr>';
$tokenCarts = Tools::getAdminToken('AdminCarts'.(int)(Tab::getIdFromClassName('AdminCarts')).(int)($cookie->id_employee));
foreach ($carts AS $cart)
{
$cartI = new Cart((int)($cart['id_cart']));
$summary = $cartI->getSummaryDetails();
$currency = new Currency((int)($cart['id_currency']));
$carrier = new Carrier((int)($cart['id_carrier']));
echo '
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminCarts&id_cart='.$cart['id_cart'].'&viewcart&token='.$tokenCarts.'\'">
<td class="center">'.sprintf('%06d', $cart['id_cart']).'</td>
<td>'.Tools::displayDate($cart['date_add'], (int)($cookie->id_lang), true).'</td>
<td align="right">'.Tools::displayPrice($summary['total_price'], $currency).'</td>
<td>'.$carrier->name.'</td>
<td align="center"><a href="index.php?tab=AdminCarts&id_cart='.$cart['id_cart'].'&viewcart&token='.$tokenCarts.'"><img src="../img/admin/details.gif" /></a></td>
</tr>';
}
echo '
</table>';
}
else
echo $this->l('No cart available').'.';
echo '</div>';
$interested = Db::getInstance()->ExecuteS('SELECT DISTINCT id_product, c.id_cart, c.id_shop
FROM '._DB_PREFIX_.'cart_product cp
JOIN '._DB_PREFIX_.'cart c ON (c.id_cart = cp.id_cart)
WHERE c.id_customer = '.(int)$customer->id.'
AND cp.id_product NOT IN (SELECT product_id
FROM '._DB_PREFIX_.'orders o
JOIN '._DB_PREFIX_.'order_detail od ON (o.id_order = od.id_order)
WHERE o.valid = 1 AND o.id_customer = '.(int)$customer->id.')');
if (count($interested))
{
echo '<div style="float:left;margin-left:20px">
<h2>'.$this->l('Products').' ('.count($interested).')</h2>
<table cellspacing="0" cellpadding="0" class="table">';
foreach ($interested as $p)
{
$product = new Product((int)$p['id_product'], false, $cookie->id_lang, (int)$p['id_shop']);
echo '
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \''.$link->getProductLink((int)$product->id, $product->link_rewrite, Category::getLinkRewrite($product->id_category_default, (int)($cookie->id_lang))).'\'">
<td>'.(int)$product->id.'</td>
<td>'.Tools::htmlentitiesUTF8($product->name).'</td>
<td align="center"><a href="'.$link->getProductLink((int)$product->id, $product->link_rewrite, Category::getLinkRewrite($product->id_category_default, (int)($cookie->id_lang))).'"><img src="../img/admin/details.gif" /></a></td>
</tr>';
}
echo '</table></div>';
}
echo '<div class="clear">&nbsp;</div>';
/* Last connections */
$connections = $customer->getLastConnections();
if (sizeof($connections))
{
echo '<h2>'.$this->l('Last connections').'</h2>
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th style="width: 200px">'.$this->l('Date').'</th>
<th style="width: 100px">'.$this->l('Pages viewed').'</th>
<th style="width: 100px">'.$this->l('Total time').'</th>
<th style="width: 100px">'.$this->l('Origin').'</th>
<th style="width: 100px">'.$this->l('IP Address').'</th>
</tr>';
foreach ($connections as $connection)
echo '<tr>
<td>'.Tools::displayDate($connection['date_add'], (int)($cookie->id_lang), true).'</td>
<td>'.(int)($connection['pages']).'</td>
<td>'.$connection['time'].'</td>
<td>'.($connection['http_referer'] ? preg_replace('/^www./', '', parse_url($connection['http_referer'], PHP_URL_HOST)) : $this->l('Direct link')).'</td>
<td>'.$connection['ipaddress'].'</td>
</tr>';
echo '</table><div class="clear">&nbsp;</div>';
}
if (sizeof($referrers))
{
echo '<h2>'.$this->l('Referrers').'</h2>
<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th style="width: 200px">'.$this->l('Date').'</th>
<th style="width: 200px">'.$this->l('Name').'</th>
</tr>';
foreach ($referrers as $referrer)
echo '<tr>
<td>'.Tools::displayDate($referrer['date_add'], (int)($cookie->id_lang), true).'</td>
<td>'.$referrer['name'].'</td>
</tr>';
echo '</table><div class="clear">&nbsp;</div>';
}
echo '<a href="'.$currentIndex.'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to customer list').'</a><br />';
}
public function displayForm($isMainTab = true)
{
global $currentIndex;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
$birthday = explode('-', $this->getFieldValue($obj, 'birthday'));
$customer_groups = Tools::getValue('groupBox', $obj->getGroups());
$groups = Group::getGroups($this->_defaultFormLanguage, true);
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post" autocomplete="off">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/tab-customers.gif" />'.$this->l('Customer').'</legend>
<label>'.$this->l('Gender:').' </label>
<div class="margin-form">
<input type="radio" size="33" name="id_gender" id="gender_1" value="1" '.($this->getFieldValue($obj, 'id_gender') == 1 ? 'checked="checked" ' : '').'/>
<label class="t" for="gender_1"> '.$this->l('Male').'</label>
<input type="radio" size="33" name="id_gender" id="gender_2" value="2" '.($this->getFieldValue($obj, 'id_gender') == 2 ? 'checked="checked" ' : '').'/>
<label class="t" for="gender_2"> '.$this->l('Female').'</label>
<input type="radio" size="33" name="id_gender" id="gender_3" value="9" '.(($this->getFieldValue($obj, 'id_gender') == 9 OR !$this->getFieldValue($obj, 'id_gender')) ? 'checked="checked" ' : '').'/>
<label class="t" for="gender_3"> '.$this->l('Unknown').'</label>
</div>
<label>'.$this->l('Last name:').' </label>
<div class="margin-form">
<input type="text" size="33" name="lastname" value="'.htmlentities($this->getFieldValue($obj, 'lastname'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' 0-9!<>,;?=+()@#"<22>{}_$%:<span class="hint-pointer">&nbsp;</span></span>
</div>
<label>'.$this->l('First name:').' </label>
<div class="margin-form">
<input type="text" size="33" name="firstname" value="'.htmlentities($this->getFieldValue($obj, 'firstname'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' 0-9!<>,;?=+()@#"<22>{}_$%:<span class="hint-pointer">&nbsp;</span></span>
</div>
<label>'.$this->l('Password:').' </label>
<div class="margin-form">
<input type="password" size="33" name="passwd" value="" /> '.(!$obj->id ? '<sup>*</sup>' : '').'
<p>'.($obj->id ? $this->l('Leave blank if no change') : $this->l('5 characters min., only letters, numbers, or').' -_').'</p>
</div>
<label>'.$this->l('E-mail address:').' </label>
<div class="margin-form">
<input type="text" size="33" name="email" value="'.htmlentities($this->getFieldValue($obj, 'email'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div>
<label>'.$this->l('Birthday:').' </label>';
$sl_year = ($this->getFieldValue($obj, 'birthday')) ? $birthday[0] : 0;
$years = Tools::dateYears();
$sl_month = ($this->getFieldValue($obj, 'birthday')) ? $birthday[1] : 0;
$months = Tools::dateMonths();
$sl_day = ($this->getFieldValue($obj, 'birthday')) ? $birthday[2] : 0;
$days = Tools::dateDays();
$tab_months = array(
$this->l('January'),
$this->l('February'),
$this->l('March'),
$this->l('April'),
$this->l('May'),
$this->l('June'),
$this->l('July'),
$this->l('August'),
$this->l('September'),
$this->l('October'),
$this->l('November'),
$this->l('December'));
echo '
<div class="margin-form">
<select name="days">
<option value="">-</option>';
foreach ($days as $v)
echo '<option value="'.$v.'" '.($sl_day == $v ? 'selected="selected"' : '').'>'.$v.'</option>';
echo '
</select>
<select name="months">
<option value="">-</option>';
foreach ($months as $k => $v)
echo '<option value="'.$k.'" '.($sl_month == $k ? 'selected="selected"' : '').'>'.$this->l($v).'</option>';
echo '</select>
<select name="years">
<option value="">-</option>';
foreach ($years as $v)
echo '<option value="'.$v.'" '.($sl_year == $v ? 'selected="selected"' : '').'>'.$v.'</option>';
echo '</select>
</div>';
echo '<label>'.$this->l('Status:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.($this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"><img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.(!$this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Allow or disallow this customer to log in').'</p>
</div>
<label>'.$this->l('Newsletter:').' </label>
<div class="margin-form">
<input type="radio" name="newsletter" id="newsletter_on" value="1" '.($this->getFieldValue($obj, 'newsletter') ? 'checked="checked" ' : '').'/>
<label class="t" for="newsletter_on"><img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="newsletter" id="newsletter_off" value="0" '.(!$this->getFieldValue($obj, 'newsletter') ? 'checked="checked" ' : '').'/>
<label class="t" for="newsletter_off"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Customer will receive your newsletter via e-mail').'</p>
</div>
<label>'.$this->l('Opt-in:').' </label>
<div class="margin-form">
<input type="radio" name="optin" id="optin_on" value="1" '.($this->getFieldValue($obj, 'optin') ? 'checked="checked" ' : '').'/>
<label class="t" for="optin_on"><img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="optin" id="optin_off" value="0" '.(!$this->getFieldValue($obj, 'optin') ? 'checked="checked" ' : '').'/>
<label class="t" for="optin_off"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Customer will receive your ads via e-mail').'</p>
</div>
<label>'.$this->l('Default group:').' </label>
<div class="margin-form">
<select name="id_default_group" onchange="checkDefaultGroup(this.value);">';
foreach ($groups as $group)
echo '<option value="'.(int)($group['id_group']).'"'.($group['id_group'] == $obj->id_default_group ? ' selected="selected"' : '').'>'.htmlentities($group['name'], ENT_NOQUOTES, 'utf-8').'</option>';
echo '
</select>
<p>'.$this->l('Apply non-cumulative rules (e.g., price, display method, reduction)').'</p>
</div>
<label>'.$this->l('Groups:').' </label>
<div class="margin-form">';
if (sizeof($groups))
{
echo '
<table cellspacing="0" cellpadding="0" class="table" style="width: 29.5em;">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'groupBox[]\', this.checked)" /></th>
<th>'.$this->l('ID').'</th>
<th>'.$this->l('Group name').'</th>
</tr>';
$irow = 0;
foreach ($groups as $group)
{
echo '
<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td>'.'<input type="checkbox" name="groupBox[]" class="groupBox" id="groupBox_'.$group['id_group'].'" value="'.$group['id_group'].'" '.(in_array($group['id_group'], $customer_groups) ? 'checked="checked" ' : '').'/></td>
<td>'.$group['id_group'].'</td>
<td><label for="groupBox_'.$group['id_group'].'" class="t">'.$group['name'].'</label></td>
</tr>';
}
echo '
</table>
<p style="padding:0px; margin:10px 0px 10px 0px;">'.$this->l('Check all the box(es) of groups of which the customer is to be a member').'<sup> *</sup></p>
';
} else
echo '<p>'.$this->l('No group created').'</p>';
echo '
</div>';
if (Tools::isMultiShopActivated())
{
$shops = Shop::getShops();
echo '
<label>'.$this->l('Shop:').' </label>
<div class="margin-form">
<select name="id_shop">';
foreach ($shops as $shop)
echo '<option value="'.(int)($shop['id_shop']).'"'.($shop['id_shop'] == (int)Configuration::get('PS_SHOP_DEFAULT') ? ' selected="selected"' : '').'>'.$shop['name'].'</option>';
echo '
</select>';
}
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
public function getList($id_lang, $orderBy = NULL, $orderWay = NULL, $start = 0, $limit = NULL, $id_lang_shop = NULL)
{
global $cookie;
return parent::getList((int)($cookie->id_lang), !Tools::getValue($this->table.'Orderby') ? 'date_add' : NULL, !Tools::getValue($this->table.'Orderway') ? 'DESC' : NULL);
}
public function beforeDelete($object)
{
return $object->isUsed();
}
}

View File

@@ -1,150 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7465 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
class AdminDb extends AdminPreferences
{
public function __construct()
{
$this->className = 'Configuration';
$this->table = 'configuration';
$this->_fieldsDatabase = array(
'db_server' => array('title' => $this->l('Server:'), 'desc' => $this->l('IP or server name; \'localhost\' will work in most cases'), 'size' => 30, 'type' => 'text', 'required' => true, 'visibility' => Shop::CONTEXT_ALL),
'db_name' => array('title' => $this->l('Database:'), 'desc' => $this->l('Database name (e.g., \'prestashop\')'), 'size' => 30, 'type' => 'text', 'required' => true, 'visibility' => Shop::CONTEXT_ALL),
'db_prefix' => array('title' => $this->l('Prefix:'), 'size' => 30, 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL),
'db_user' => array('title' => $this->l('User:'), 'size' => 30, 'type' => 'text', 'required' => true, 'visibility' => Shop::CONTEXT_ALL),
'db_passwd' => array('title' => $this->l('Password:'), 'size' => 30, 'type' => 'password', 'desc' => $this->l('Leave blank if no change')), 'visibility' => Shop::CONTEXT_ALL);
parent::__construct();
}
public function postProcess()
{
global $currentIndex;
if (isset($_POST['submitDatabase'.$this->table]))
{
if ($this->tabAccess['edit'] === '1')
{
foreach ($this->_fieldsDatabase AS $field => $values)
if (isset($values['required']) AND $values['required'])
if (($value = Tools::getValue($field)) == false AND (string)$value != '0')
$this->_errors[] = Tools::displayError('field').' <b>'.$values['title'].'</b> '.Tools::displayError('is required.');
if (!sizeof($this->_errors))
{
/* Datas are not saved in database but in config/settings.inc.php */
$settings = array();
foreach ($_POST as $k => $value)
if ($value)
$settings['_'.Tools::strtoupper($k).'_'] = $value;
rewriteSettingsFile(NULL, NULL, $settings);
Tools::redirectAdmin($currentIndex.'&conf=6'.'&token='.$this->token);
}
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
if (Tools::isSubmit('submitEngine'))
{
if (!isset($_POST['tablesBox']) OR !sizeof($_POST['tablesBox']))
$this->_errors[] = Tools::displayError('You did not select any tables');
else
{
$available_engines = $this->_getEngines();
$tables_status = $this->_getTablesStatus();
$tables_engine = array();
foreach ($tables_status AS $table)
$tables_engine[$table['Name']] = $table['Engine'];
$engineType = pSQL(Tools::getValue('engineType'));
foreach ($_POST['tablesBox'] AS $table)
{
if ($engineType == $tables_engine[$table])
$this->_errors[] = $table.' '.$this->l('is already in').' '.$engineType;
else
if (!Db::getInstance()->Execute('ALTER TABLE '.pSQL($table).' ENGINE='.pSQL($engineType)))
$this->_errors[] = $this->l('Can\'t change engine for').' '.$table;
else
echo '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Engine change of').' '.$table.' '.$this->l('to').' '.$engineType.'</div>';
}
}
}
}
public function display()
{
global $currentIndex;
echo $this->displayWarning($this->l('Be VERY CAREFUL with these settings, as changes may cause your PrestaShop online store to malfunction. For all issues, check the config/settings.inc.php file.')).'<br />';
$this->_displayForm('database', $this->_fieldsDatabase, $this->l('Database'), 'width2', 'database_gear');
$engines = $this->_getEngines();
$irow = 0;
echo '<br /><fieldset class="width2"><legend>'.$this->l('MySQL Engine').'</legend><form name="updateEngine" action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post"><table cellspacing="0" cellpadding="0" class="table width2 clear">
<tr><th><input type="checkbox" onclick="checkDelBoxes(this.form, \'tablesBox[]\', this.checked)" class="noborder" name="checkme"></th><th>'.$this->l('Table').'</th><th>'.$this->l('Table Engine').'</th></tr>';
$tables_status = $this->_getTablesStatus();
foreach ($tables_status AS $table)
{
if (!preg_match('/^'._DB_PREFIX_.'.*/Ui', $table['Name']))
continue;
echo '<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td class="noborder"><input type="checkbox" name="tablesBox[]" value="'.$table['Name'].'"/></td><td>'.$table['Name'].'</td><td>'.$table['Engine'].'</td>
</tr>';
}
echo '</table><br />
<label for="dbEngine">'.$this->l('Change Engine to').'</label>
<div class="margin-form">
<select name="engineType">';
foreach ($engines AS $engine)
echo '<option value="'.$engine.'">'.$engine.'</option>';
echo '</select>
<input style="margin-left:15px;" class="button" type="submit" value="Submit" name="submitEngine" />
</div>
</fieldset>';
}
private function _getEngines()
{
$engines = Db::getInstance()->ExecuteS('SHOW ENGINES');
$allowed_engines = array();
foreach ($engines AS $engine)
{
if (in_array($engine['Engine'], array('InnoDB', 'MyISAM')) AND in_array($engine['Support'], array('DEFAULT', 'YES')))
$allowed_engines[] = $engine['Engine'];
}
return $allowed_engines;
}
private function _getTablesStatus()
{
return Db::getInstance()->ExecuteS('SHOW TABLE STATUS');
}
}

View File

@@ -1,104 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7060 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminDeliverySlip extends AdminTab
{
public function __construct()
{
global $cookie;
$this->table = 'delivery';
$this->optionTitle = $this->l('Delivery slips options');
$this->_fieldsOptions = array(
'PS_DELIVERY_PREFIX' => array('title' => $this->l('Delivery prefix:'), 'desc' => $this->l('Prefix used for delivery slips'), 'size' => 6, 'type' => 'textLang'),
'PS_DELIVERY_NUMBER' => array('title' => $this->l('Delivery number:'), 'desc' => $this->l('The next delivery slip will begin with this number, and then increase with each additional slip'), 'size' => 6, 'type' => 'text'),
);
parent::__construct();
}
public function displayForm($isMainTab = true)
{
global $currentIndex;
parent::displayForm();
$output = '
<h2>'.$this->l('Print PDF delivery slips').'</h2>
<fieldset>
<form action="'.$currentIndex.'&submitPrint=1&token='.$this->token.'" method="post">
<label>'.$this->l('From:').' </label>
<div class="margin-form">
<input type="text" size="4" maxlength="10" name="date_from" value="'.(date('Y-m-d')).'" style="width: 120px;" /> <sup>*</sup>
<p class="clear">'.$this->l('Format: 2007-12-31 (inclusive)').'</p>
</div>
<label>'.$this->l('To:').' </label>
<div class="margin-form">
<input type="text" size="4" maxlength="10" name="date_to" value="'.(date('Y-m-d')).'" style="width: 120px;" /> <sup>*</sup>
<p class="clear">'.$this->l('Format: 2008-12-31 (inclusive)').'</p>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l('Generate PDF file').'" name="submitPrint" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required fields').'</div>
</form>
</fieldset>';
echo $output;
}
public function display()
{
$this->displayForm();
$this->displayOptionsList();
}
public function postProcess()
{
global $currentIndex;
if (Tools::getValue('submitPrint'))
{
if (!Validate::isDate($_POST['date_from']))
$this->_errors[] = $this->l('Invalid from date');
if (!Validate::isDate($_POST['date_to']))
$this->_errors[] = $this->l('Invalid end date');
if (!sizeof($this->_errors))
{
$orders = Order::getOrdersIdByDate($_POST['date_from'], $_POST['date_to'], NULL, 'delivery');
if (sizeof($orders))
Tools::redirectAdmin('pdf.php?deliveryslips='.urlencode(serialize($orders)).'&token='.$this->token);
else
$this->_errors[] = $this->l('No delivery slip found for this period');
}
}
else
parent::postProcess();
}
}

View File

@@ -1,504 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7060 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminDiscounts extends AdminTab
{
public function __construct()
{
global $cookie;
$this->table = 'discount';
$this->className = 'Discount';
$this->lang = true;
$this->edit = true;
$this->delete = true;
$this->_select = 'dtl.`name` AS discount_type, s.name shop_name,
IF(a.id_discount_type = 1, CONCAT(a.value, " %"),
IF(a.id_discount_type = 2, CONCAT(a.value, " ", c.sign),
"--")) as strvalue';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'currency` c ON (c.`id_currency` = a.`id_currency`)
LEFT JOIN `'._DB_PREFIX_.'discount_type` dt ON (dt.`id_discount_type` = a.`id_discount_type`)
LEFT JOIN `'._DB_PREFIX_.'shop` s ON (s.`id_shop` = a.`id_shop`)
LEFT JOIN `'._DB_PREFIX_.'discount_type_lang` dtl ON (dt.`id_discount_type` = dtl.`id_discount_type` AND dtl.`id_lang` = '.(int)($cookie->id_lang).')';
$typesArray = array();
$types = Discount::getDiscountTypes((int)($cookie->id_lang));
foreach ($types AS $type)
$typesArray[$type['id_discount_type']] = $type['name'];
$this->fieldsDisplay = array(
'id_discount' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Code'), 'width' => 85, 'prefix' => '<span class="discount_name">', 'suffix' => '</span>', 'filter_key' => 'a!name'),
'shop_name' => array('title' => $this->l('Shop'), 'width' => 85, 'filter_key' => 's!name'),
'description' => array('title' => $this->l('Description'), 'width' => 100, 'filter_key' => 'b!description'),
'discount_type' => array('title' => $this->l('Type'), 'type' => 'select', 'select' => $typesArray, 'filter_key' => 'dt!id_discount_type'),
'strvalue' => array('title' => $this->l('Value'), 'width' => 50, 'align' => 'right', 'filter_key' => 'a!value'),
'quantity' => array('title' => $this->l('Qty'), 'width' => 40, 'align' => 'right'),
'date_to' => array('title' => $this->l('To'), 'width' => 60, 'type' => 'date', 'align' => 'right'),
'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false));
$this->optionTitle = $this->l('Discounts options');
$this->_fieldsOptions = array(
'PS_VOUCHERS' => array('title' => $this->l('Enable vouchers:'), 'desc' => $this->l('Allow the use of vouchers in shop'), 'cast' => 'intval', 'type' => 'bool'),
);
parent::__construct();
}
protected function copyFromPost(&$object, $table)
{
parent::copyFromPost($object, $table);
$object->cumulable = (!isset($_POST['cumulable']) ? false : true);
$object->cumulable_reduction = (!isset($_POST['cumulable_reduction']) ? false : true);
}
public function postProcess()
{
global $currentIndex, $cookie;
$token = Tools::getValue('token') ? Tools::getValue('token') : $this->token;
if ($discountName = Tools::getValue('name') AND Validate::isDiscountName($discountName) AND Discount::discountExists($discountName, Tools::getValue('id_discount')))
$this->_errors[] = Tools::displayError('A voucher of this name already exists. Please choose another name.');
if (Tools::getValue('submitAdd'.$this->table))
{
if (Tools::getValue('id_discount_type') == 0)
$this->_errors[] = Tools::displayError('Please set a type for this voucher.');
if (Tools::getValue('id_discount_type') == 2 AND Tools::getValue('id_currency') == 0)
$this->_errors[] = Tools::displayError('Please set a currency for this voucher.');
if ((Tools::getValue('id_discount_type') == 1 || Tools::getValue('id_discount_type') == 2) && !Tools::getValue('value'))
$this->_errors[] = Tools::displayError('Please set a amount for this voucher.');
if (!Validate::isBool_Id(Tools::getValue('id_target')))
$this->_errors[] = Tools::displayError('Invalid customer or group ID field');
else
{
$rules = explode('_', Tools::getValue('id_target'));
/* In form, there is one field for two differents fields in object*/
$_POST[($rules[0] ? 'id_group' : 'id_customer')] = $rules[1];
}
/* Checking fields validity */
$this->validateRules();
if (!sizeof($this->_errors))
{
$id = (int)(Tools::getValue($this->identifier));
/* Object update */
if (isset($id) AND !empty($id))
{
if ($this->tabAccess['edit'] === '1')
{
$object = new $this->className($id);
if (Validate::isLoadedObject($object))
{
/* Specific to objects which must not be deleted */
if ($this->deleted AND $this->beforeDelete($object))
{
$object->deleted = 1;
$object->update();
$objectNew = new $this->className();
$this->copyFromPost($objectNew, $this->table);
$shop = new Shop((int)$objectNew->id_shop);
$objectNew->id_group_shop = (int)$shop->id_group_shop;
$result = $objectNew->add();
if (Validate::isLoadedObject($objectNew))
$this->afterDelete($objectNew, $object->id);
}
else
{
if (($categories = Tools::getValue('categoryBox')) === false OR (!empty($categories) AND !is_array($categories)))
$this->_errors[] = Tools::displayError('Please set a category for this voucher.');
$this->copyFromPost($object, $this->table);
$shop = new Shop((int)$objectNew->id_shop);
$objectNew->id_group_shop = (int)$shop->id_group_shop;
$result = $object->update(true, false, $categories);
}
if (!$result)
$this->_errors[] = Tools::displayError('An error occurred while updating object.').' <b>'.$this->table.'</b>';
elseif ($this->postImage($object->id))
{
if ($back = Tools::getValue('back'))
Tools::redirectAdmin(urldecode($back).'&conf=4');
if (Tools::getValue('stay_here') == 'on' || Tools::getValue('stay_here') == 'true' || Tools::getValue('stay_here') == '1')
Tools::redirectAdmin($currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&updatescene&token='.$token);
Tools::redirectAdmin($currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&token='.$token);
}
}
else
$this->_errors[] = Tools::displayError('An error occurred while updating object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
/* Object creation */
else
{
if ($this->tabAccess['add'] === '1')
{
$object = new $this->className();
$this->copyFromPost($object, $this->table);
$shop = new Shop((int)$objectNew->id_shop);
$objectNew->id_group_shop = (int)$shop->id_group_shop;
$categories = Tools::getValue('categoryBox', null);
if (!$object->add(true, false, $categories))
$this->_errors[] = Tools::displayError('An error occurred while creating object.').' <b>'.$this->table.'</b>';
elseif (($_POST[$this->identifier] = $object->id /* voluntary */) AND $this->postImage($object->id) AND $this->_redirect)
Tools::redirectAdmin($currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=3&token='.$token);
}
else
$this->_errors[] = Tools::displayError('You do not have permission to add here.');
}
}
$this->_errors = array_unique($this->_errors);
}
else
return parent::postProcess();
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<script type="text/javascript">
function discountType()
{
if ($("#id_discount_type").val() == 0)
$("#value-div").css("display", "none");
else if ($("#id_discount_type").val() == 1)
{
$("#value-div").css("display", "block");
$("#percent-span").css("display", "block");
$("#id_currency").css("display", "none");
}
else if ($("#id_discount_type").val() == 2)
{
$("#value-div").css("display", "block");
$("#percent-span").css("display", "none");
$("#id_currency").css("display", "block");
$(\'#behavior_not_exhausted\').show();
}
else if ($("#id_discount_type").val() == 3)
$("#value-div").css("display", "none");
if ($(\'#id_discount_type\').val() != 2)
$(\'#behavior_not_exhausted\').hide();
}
$(document).ready(function(){
$("#id_discount_type").change(function(){discountType();});
discountType();
});
</script>
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" id="discount" name="discount" method="post" enctype="multipart/form-data">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/coupon.gif" />'.$this->l('Vouchers').'</legend>
<label>'.$this->l('Code:').' </label>
<div class="margin-form">
<input type="text" size="30" maxlength="32" name="name" value="'.htmlentities($this->getFieldValue($obj, 'name'), ENT_COMPAT, 'UTF-8').'" id="code" />
<sup>*</sup>
<img src="../img/admin/news-new.gif" onclick="gencode(8);" style="cursor: pointer" />
<span class="hint" name="help_box">'.$this->l('Invalid characters: numbers and').' !<>,;?=+()@#"<22>{}_$%:<span class="hint-pointer">&nbsp;</span></span>
<p class="clear">'.$this->l('The voucher\'s code, at least 3 characters long, which the customer types in during check-out').'</p>
</div>
<label>'.$this->l('Type:').' </label>
<div class="margin-form">
<select name="id_discount_type" id="id_discount_type" onchange="free_shipping()">
<option value="0">'.$this->l('-- Choose --').'</option>';
$discountTypes = Discount::getDiscountTypes((int)($cookie->id_lang));
foreach ($discountTypes AS $discountType)
echo '<option value="'.(int)($discountType['id_discount_type']).'"'.
(($this->getFieldValue($obj, 'id_discount_type') == $discountType['id_discount_type']) ? ' selected="selected"' : '').'>'.$discountType['name'].'</option>';
echo ' </select> <sup>*</sup>
</div>
<div id="value-div" style="display:none">
<label>'.$this->l('Value').'</label>
<div class="margin-form">
<input style="float:left;width:80px" type="text" name="value" id="discount_value" value="'.(float)($this->getFieldValue($obj, 'value')).'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\'); " />
<select id="id_currency" name="id_currency" style="float:left;margin-left:10px;width:50px;display:none">
<option value="0">--</option>';
foreach (Currency::getCurrencies() as $row)
echo ' <option value="'.(int)$row['id_currency'].'" '.(($this->getFieldValue($obj, 'id_currency') == $row['id_currency']) ? 'selected="selected"' : '').'>'.$row['sign'].'</option>';
echo ' </select>
<span id="percent-span" style="margin-left:10px;display:none;float:left;font-size:12px;font-weight:bold;color:black"> %</span>
<sup style="float:left;margin-left:5px">*</sup>
<p class="clear">'.$this->l('Either the monetary amount or the %, depending on Type selected above').'</p>
</div>
<div id="behavior_not_exhausted" style="display:none;">
<label>'.$this->l('Behavior not exhausted:').'</label>
<div class="margin-form">
<select name="behavior_not_exhausted">
<option value="1" '.($obj->behavior_not_exhausted === 1 ? 'selected="selected"' : '').'>'.$this->l('Reduce the voucher to the total order amount').'</option>
<option value="2" '.($obj->behavior_not_exhausted == 2 ? 'selected="selected"' : '').'>'.$this->l('Create a new voucher with remaining amount').'</option>
<option value="3" '.($obj->behavior_not_exhausted == 3 ? 'selected="selected"' : '').'>'.$this->l('Create negative invoice').'</option>
</select>
</div>
</div>
</div>
<label>'.$this->l('Description:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo ' <div id="description_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="description_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
<p class="clear">'.$this->l('Will appear in cart next to voucher code').'</p>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'description', 'description');
echo ' </div>
<div class="clear" / >
<label>'.$this->l('Categories:').' </label>
<div class="margin-form">
<table cellspacing="0" cellpadding="0" class="table" style="width: 600px;">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'categoryBox[]\', this.checked)" /></th>
<th>'.$this->l('ID').'</th>
<th>'.$this->l('Name').'</th>
</tr>';
$done = array();
$index = array();
$indexedCategories = isset($_POST['categoryBox']) ? $_POST['categoryBox'] : ($obj->id ? Discount::getCategories($obj->id) : array());
$categories = Category::getCategories((int)($cookie->id_lang), false);
foreach ($indexedCategories AS $k => $row)
$index[] = $row['id_category'];
$this->recurseCategoryForInclude((int)(Tools::getValue($this->identifier)), $index, $categories, $categories[0][1], 1, $obj->id);
echo '
</table>
<p style="padding:0px; margin:0px 0px 10px 0px;">'.$this->l('Mark all checkbox(es) of categories to which the discount is to be applied').'<sup> *</sup></p>
</div>
<div class="clear" / >
<label>'.$this->l('Total quantity:').' </label>
<div class="margin-form">
<input type="text" size="15" name="quantity" value="'.(int)($this->getFieldValue($obj, 'quantity')).'" /> <sup>*</sup>
<p class="clear">'.$this->l('Total quantity available (mainly for vouchers open to everyone)').'</p>
</div>
<label>'.$this->l('Qty per each user:').' </label>
<div class="margin-form">
<input type="text" size="15" name="quantity_per_user" value="'.(int)($this->getFieldValue($obj, 'quantity_per_user')).'" /> <sup>*</sup>
<p class="clear">'.$this->l('Number of times a single customer can use this voucher').'</p>
</div>
<label>'.$this->l('Minimum amount').'</label>
<div class="margin-form">
<input type="text" size="15" name="minimal" value="'.($this->getFieldValue($obj, 'minimal') ? (float)($this->getFieldValue($obj, 'minimal')) : '0').'" onkeyup="javascript:this.value = this.value.replace(/,/g, \'.\'); " /> <sup>*</sup>
<p class="clear">'.$this->l('0 if not applicable').'</p>
</div>
<div class="margin-form">
<p>
<input type="checkbox" name="cumulable"'.(($this->getFieldValue($obj, 'cumulable') == 1) ? ' checked="checked"' : '').' id="cumulable_on" value="1" />
<label class="t" for="cumulable_on"> '.$this->l('Cumulative with other vouchers').'</label>
</p>
</div>
<div class="margin-form">
<p>
<input type="checkbox" name="cumulable_reduction"'.(($this->getFieldValue($obj, 'cumulable_reduction') == 1) ? ' checked="checked"' : '').' id="cumulable_reduction_on" value="1" />
<label class="t" for="cumulable_reduction_on"> '.$this->l('Cumulative with price reductions').'</label>
</p>
</div>
<label for="id_shop">'.$this->l('Shop:').'</label>
<div class="margin-form">
<select name="id_shop" id="id_shop">';
$shops = Shop::getShops();
foreach ($shops AS $shop)
echo '<option value="'.$shop['id_shop'].'" '.($this->getFieldValue($obj, 'id_shop') == $shop['id_shop'] ? 'selected="selected"' : '').'>'.$shop['name'].'</option>';
echo '</select>
</div>
</label>
<label>'.$this->l('To be used by:').' </label>
<div class="margin-form">
<input type="hidden" name="id_customer" value="0">
<input type="hidden" name="id_group" value="0">
<select name="id_target" id="id_target">
<option value="0_0">-- '.$this->l('All customers').' --</option>
<optgroup label="'.$this->l('Groups').'" id="id_target_group">
</optgroup>
<optgroup label="'.$this->l('Customers').'" id="id_target_customers">
</optgroup>
</select><br />'.$this->l('Filter:').' <input type="text" size="25" name="filter" id="filter" onkeyup="fillCustomersAjax();" class="space" value="" />
<script type="text/javascript">
var formDiscount = document.layers ? document.forms.discount : document.discount;
function fillCustomersAjax()
{
var filterValue = \''.(($value = (int)($this->getFieldValue($obj, 'id_customer'))) ? '0_'.$value : (($value = (int)($this->getFieldValue($obj, 'id_group'))) ? '1_'.$value : '')).'\';
if ($(\'#filter\').val())
filterValue = $(\'#filter\').val();
$.getJSON("'.dirname($currentIndex).'/ajax.php",{ajaxDiscountCustomers:1,filter:filterValue},
function(obj) {
var groups_length = obj.groups.length;
if (obj.groups.length == 0)
groups_length = 1;
var customers_length = obj.customers.length;
if (obj.customers.length == 0)
customers_length = 1;
formDiscount.id_target.length = 1 + customers_length + groups_length;
if (obj.groups.length == 0)
{
formDiscount.id_target.options[1].value = -1;
formDiscount.id_target.options[1].text = \''.$this->l('No match found').'\';
formDiscount.id_target.options[1].className = "groups_filtered";
}
else
{
for (i = 0; i < obj.groups.length && i < 50; i++)
{
formDiscount.id_target.options[i+1].value = obj.groups[i]["value"];
formDiscount.id_target.options[i+1].text = obj.groups[i]["text"];
formDiscount.id_target.options[i+1].className = "groups_filtered";
}
if (obj.groups.length >= 50)
{
formDiscount.id_target.options[50].text = "'.$this->l('Too many results...',__CLASS__ , true, false).'";
formDiscount.id_target.options[50].value = "_";
formDiscount.id_target.options[50].className = "groups_filtered";
}
}
if (obj.customers.length == 0)
{
formDiscount.id_target.options[groups_length+1].value = -1;
formDiscount.id_target.options[groups_length+1].text = \''.$this->l('No match found').'\';
formDiscount.id_target.options[groups_length+1].className = "customers_filtered";
}
else
{
for (i = 0; i < obj.customers.length && i < 50; i++)
{
formDiscount.id_target.options[groups_length+1+i].value = obj.customers[i]["value"];
formDiscount.id_target.options[groups_length+1+i].text = obj.customers[i]["text"];
formDiscount.id_target.options[groups_length+1+i].className = "customers_filtered";
}
if (obj.customers.length >= 50)
{
formDiscount.id_target.options[groups_length+50+i].text = "'.$this->l('Too many results...',__CLASS__ , true, false).'";
formDiscount.id_target.options[groups_length+50+i].value = "_";
formDiscount.id_target.options[groups_length+50+i].className = "customers_filtered";
}
}
$(".groups_filtered").appendTo($("#id_target_group"));
$(".customers_filtered").appendTo($("#id_target_customers"));
if ($(\'#filter\').val())
{
if (formDiscount.id_target.options[1].value != -1)
formDiscount.id_target.options.selectedIndex = 1;
else
formDiscount.id_target.options.selectedIndex = 2;
}
else if(filterValue)
for (i = 0; i < (customers_length + groups_length); i++)
if (formDiscount.id_target.options[i+1].value == filterValue)
formDiscount.id_target.options.selectedIndex = i + 1;
}
);
}
fillCustomersAjax();
</script>
</div><br />';
includeDatepicker(array('date_from', 'date_to'), true);
echo '
<label>'.$this->l('From:').' </label>
<div class="margin-form">
<input type="text" size="20" id="date_from" name="date_from" value="'.($this->getFieldValue($obj, 'date_from') ? htmlentities($this->getFieldValue($obj, 'date_from'), ENT_COMPAT, 'UTF-8') : date('Y-m-d H:i:s')).'" /> <sup>*</sup>
<p class="clear">'.$this->l('Start date/time from which voucher can be used').'<br />'.$this->l('Format: YYYY-MM-DD HH:MM:SS').'</p>
</div>
<label>'.$this->l('To:').' </label>
<div class="margin-form">
<input type="text" size="20" id="date_to" name="date_to" value="'.($this->getFieldValue($obj, 'date_to') ? htmlentities($this->getFieldValue($obj, 'date_to'), ENT_COMPAT, 'UTF-8') : (date('Y') + 1).date('-m-d H:i:s')).'" /> <sup>*</sup>
<p class="clear">'.$this->l('End date/time at which voucher is no longer valid').'<br />'.$this->l('Format: YYYY-MM-DD HH:MM:SS').'</p>
</div>
<label>'.$this->l('Display the voucher in the cart summary:').' </label>
<div class="margin-form">
<input type="radio" name="cart_display" id="cart_active_on" value="1" '.($this->getFieldValue($obj, 'cart_display') ? 'checked="checked" ' : '').'/>
<label class="t" for="cart_display_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="cart_display" id="cart_active_off" value="0" '.(!$this->getFieldValue($obj, 'cart_display') ? 'checked="checked" ' : '').'/>
<label class="t" for="cart_display_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
</div>
<div class="clear" / >
<label>'.$this->l('Status:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.($this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.(!$this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Enable or disable voucher').'</p>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
/**
* Build a categories tree
*
* @param array $indexedCategories Array with categories where product is indexed (in order to check checkbox)
* @param array $categories Categories to list
* @param array $current Current category
* @param integer $id_category Current category id
*/
public static function recurseCategoryForInclude($id_obj, $indexedCategories, $categories, $current, $id_category = 1, $id_category_default = NULL, $has_suite = array())
{
global $done;
static $irow;
if (!isset($done[$current['infos']['id_parent']]))
$done[$current['infos']['id_parent']] = 0;
$done[$current['infos']['id_parent']] += 1;
$todo = sizeof($categories[$current['infos']['id_parent']]);
$doneC = $done[$current['infos']['id_parent']];
$level = $current['infos']['level_depth'] + 1;
echo '
<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td>
<input type="checkbox" name="categoryBox[]" class="categoryBox'.($id_category_default == $id_category ? ' id_category_default' : '').'" id="categoryBox_'.$id_category.'" value="'.$id_category.'"'.((in_array($id_category, $indexedCategories) OR ((int)(Tools::getValue('id_category')) == $id_category AND !(int)($id_obj)) OR Tools::getIsset('adddiscount')) ? ' checked="checked"' : '').' />
</td>
<td>
'.$id_category.'
</td>
<td>';
for ($i = 2; $i < $level; $i++)
echo '<img src="../img/admin/lvl_'.$has_suite[$i - 2].'.gif" alt="" style="vertical-align: middle;"/>';
echo '<img src="../img/admin/'.($level == 1 ? 'lv1.gif' : 'lv2_'.($todo == $doneC ? 'f' : 'b').'.gif').'" alt="" style="vertical-align: middle;"/> &nbsp;
<label for="categoryBox_'.$id_category.'" class="t">'.stripslashes($current['infos']['name']).'</label></td>
</tr>';
if ($level > 1)
$has_suite[] = ($todo == $doneC ? 0 : 1);
if (isset($categories[$id_category]))
foreach ($categories[$id_category] AS $key => $row)
if ($key != 'infos')
self::recurseCategoryForInclude($id_obj, $indexedCategories, $categories, $categories[$id_category][$key], $key, $id_category_default, $has_suite);
}
}

View File

@@ -1,108 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7465 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
class AdminEmails extends AdminPreferences
{
public function __construct()
{
global $cookie;
$this->className = 'Configuration';
$this->table = 'configuration';
foreach (Contact::getContacts((int)$cookie->id_lang) AS $contact)
$arr[] = array('email_message' => $contact['id_contact'], 'name' => $contact['name']);
$this->_fieldsEmail = array(
'PS_MAIL_EMAIL_MESSAGE' => array('title' => $this->l('Send e-mail to:'), 'desc' => $this->l('When customers send message from order page'), 'validation' => 'isUnsignedId', 'type' => 'select', 'cast' => 'intval', 'identifier' => 'email_message', 'list' => $arr),
'PS_MAIL_METHOD' => array('title' => '', 'validation' => 'isGenericName', 'required' => true, 'type' => 'radio', 'choices' => array(1 => $this->l('Use PHP mail() function. Recommended; works in most cases'), 2 => $this->l('Set my own SMTP parameters. For advanced users ONLY')), 'js' => array(1 => 'onclick="$(\'#SMTP_CONTAINER\').slideUp();"', 2 => 'onclick="$(\'#SMTP_CONTAINER\').slideDown();"'), 'visibility' => Shop::CONTEXT_ALL),
'PS_MAIL_TYPE' => array('title' => '', 'validation' => 'isGenericName', 'required' => true, 'type' => 'radio', 'choices' => array(1 => $this->l('Send e-mail as HTML'), 2 => $this->l('Send e-mail as Text'), 3 => $this->l('Both'))),
'SMTP_CONTAINER' => array('title' => '', 'type' => 'container'),
'PS_MAIL_DOMAIN' => array('title' => $this->l('Mail domain:'), 'desc' => $this->l('Fully qualified domain name (keep it empty if you do not know)'), 'validation' => 'isUrl', 'size' => 30, 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL),
'PS_MAIL_SERVER' => array('title' => $this->l('SMTP server:'), 'desc' => $this->l('IP or server name (e.g., smtp.mydomain.com)'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL),
'PS_MAIL_USER' => array('title' => $this->l('SMTP user:'), 'desc' => $this->l('Leave blank if not applicable'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text', 'visibility' => Shop::CONTEXT_ALL),
'PS_MAIL_PASSWD' => array('title' => $this->l('SMTP password:'), 'desc' => $this->l('Leave blank if not applicable'), 'validation' => 'isAnything', 'size' => 30, 'type' => 'password', 'visibility' => Shop::CONTEXT_ALL),
'PS_MAIL_SMTP_ENCRYPTION' => array('title' => $this->l('Encryption:'), 'desc' => $this->l('Use an encrypt protocol'), 'type' => 'select', 'cast' => 'strval', 'identifier' => 'mode', 'list' => array(array('mode' => 'off', 'name' => $this->l('None')), array('mode' => 'tls', 'name' => $this->l('TLS')), array('mode' => 'ssl', 'name' => $this->l('SSL'))), 'visibility' => Shop::CONTEXT_ALL),
'PS_MAIL_SMTP_PORT' => array('title' => $this->l('Port:'), 'desc' => $this->l('Number of port to use'), 'validation' => 'isInt', 'size' => 5, 'type' => 'text', 'cast' => 'intval', 'visibility' => Shop::CONTEXT_ALL),
'SMTP_CONTAINER_END' => array('title' => '', 'type' => 'container_end', 'content' => '<script type="text/javascript">if (getE("PS_MAIL_METHOD2_on").checked == false) { $(\'#SMTP_CONTAINER\').hide(); }</script>'));
parent::__construct();
}
public function postProcess()
{
if (isset($_POST['submitEmail'.$this->table]))
{
if ($this->tabAccess['edit'] === '1')
{
if ($_POST['PS_MAIL_METHOD'] == 2 AND (empty($_POST['PS_MAIL_SERVER']) OR empty($_POST['PS_MAIL_SMTP_PORT'])))
$this->_errors[] = Tools::displayError('You must define a SMTP server and a SMTP port. If you do not know, use the PHP mail() function instead.');
else
$this->_postConfig($this->_fieldsEmail);
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
}
public function display() {
$this->_displayForm('email', $this->_fieldsEmail, $this->l('E-mail'), 'width2', 'email');
$this->_displayMailTest();
}
private function _displayMailTest()
{
echo '
<fieldset class="width2" style="margin-top: 10px;">
<legend><img src="../img/admin/email.gif" alt="" /> '.$this->l('Test your e-mail configuration').'</legend>
<script type="text/javascript">
var textMsg = "'.$this->l('This is a test message, your server is now available to send email').'";
var textSubject = "'.$this->l('Test message - Prestashop').'";
var textSendOk = "'.$this->l('Mail is sent').'";
var textSendError= "'.$this->l('Error: please check your configuration').'";
var errorMail = "'.$this->l('This email address is wrong!').'";
</script>
<script type="text/javascript" src="'._PS_JS_DIR_.'sendMailTest.js"></script>
<div style="clear: both; padding-top: 15px;">
<label>'.$this->l('Send a test e-mail to').'</label>
<div class="margin-form">
<input type="text" name="testEmail" id="testEmail" value="'.Configuration::get('PS_SHOP_EMAIL').'" style="width:210px;margin-bottom:4px;" /><br />
<input type="hidden" id="PS_MAIL_METHOD" name="PS_MAIL_METHOD" value="'.Configuration::get('PS_MAIL_METHOD').'" />
<input type="hidden" id="PS_MAIL_SERVER" name="PS_MAIL_SERVER" value="'.Configuration::get('PS_MAIL_SERVER').'" />
<input type="hidden" id="PS_MAIL_USER" name="PS_MAIL_USER" value="'.Configuration::get('PS_MAIL_USER').'" />
<input type="hidden" id="PS_MAIL_PASSWD" name="PS_MAIL_PASSWD" value="'.Configuration::get('PS_MAIL_PASSWD').'" />
<input type="hidden" id="PS_MAIL_SMTP_PORT" name="PS_MAIL_SMTP_PORT" value="'.Configuration::get('PS_MAIL_SMTP_PORT').'" />
<input type="hidden" id="PS_MAIL_SMTP_ENCRYPTION" name="PS_MAIL_SMTP_ENCRYPTION" value="'.Configuration::get('PS_MAIL_SMTP_ENCRYPTION').'" />
<input type="button" class="button" name="btEmailTest" id="btEmailTest" value="'.$this->l('Send an e-mail test').'" onClick="verifyMail();" /><br />
<p id="mailResultCheck" style="display:none;"></p>
</div>
</div>
</fieldset>';
}
}

View File

@@ -1,221 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7210 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminEmployees extends AdminTab
{
/** @var array profiles list */
private $profilesArray = array();
public function __construct()
{
global $cookie;
$this->table = 'employee';
$this->className = 'Employee';
$this->lang = false;
$this->edit = true;
$this->delete = true;
$this->_select = 'pl.`name` AS profile';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'profile` p ON a.`id_profile` = p.`id_profile`
LEFT JOIN `'._DB_PREFIX_.'profile_lang` pl ON (pl.`id_profile` = p.`id_profile` AND pl.`id_lang` = '.(int)($cookie->id_lang).')';
$profiles = Profile::getProfiles((int)($cookie->id_lang));
if (!$profiles)
$this->_errors[] = Tools::displayError('No profile');
else
foreach ($profiles AS $profile)
$this->profilesArray[$profile['name']] = $profile['name'];
$this->fieldsDisplay = array(
'id_employee' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'lastname' => array('title' => $this->l('Last name'), 'width' => 130),
'firstname' => array('title' => $this->l('First name'), 'width' => 130),
'email' => array('title' => $this->l('E-mail address'), 'width' => 180),
'profile' => array('title' => $this->l('Profile'), 'width' => 90, 'type' => 'select', 'select' => $this->profilesArray, 'filter_key' => 'pl!name'),
'active' => array('title' => $this->l('Can log in'), 'align' => 'center', 'active' => 'status', 'type' => 'bool'));
$this->optionTitle = $this->l('Employees options');
$this->_fieldsOptions = array(
'PS_PASSWD_TIME_BACK' => array('title' => $this->l('Password regenerate:'), 'desc' => $this->l('Security minimum time to wait to regenerate a new password'), 'cast' => 'intval', 'size' => 5, 'type' => 'text', 'suffix' => ' '.$this->l('minutes'), 'visibility' => Shop::CONTEXT_ALL),
'PS_BO_ALLOW_EMPLOYEE_FORM_LANG' => array('title' => $this->l('Memorize form language:'), 'desc' => $this->l('Allow employees to save their own default form language'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'value', 'list' => array(
'0' => array('value' => 0, 'name' => $this->l('No')),
'1' => array('value' => 1, 'name' => $this->l('Yes'))
), 'visibility' => Shop::CONTEXT_ALL)
);
parent::__construct();
}
protected function _childValidation()
{
if (!($obj = $this->loadObject(true)))
return false;
$email = $this->getFieldValue($obj, 'email');
if (!Validate::isEmail($email))
$this->_errors[] = Tools::displayError('Invalid e-mail');
else if (Employee::employeeExists($email) AND !Tools::getValue('id_employee'))
$this->_errors[] = Tools::displayError('An account already exists for this e-mail address:').' '.$email;
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
$profiles = Profile::getProfiles((int)($cookie->id_lang));
echo '<script type="text/javascript" src="'._PS_JS_DIR_.'/jquery/jquery-colorpicker.js"></script>
<script type="text/javascript">
var employeePage = true;
</script>
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.((int)$this->tabAccess['view'] ? '' : '&updateemployee&id_employee='.(int)$obj->id).'" method="post" enctype="multipart/form-data" autocomplete="off">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
'.((int)$this->tabAccess['view'] ? '' : '<input type="hidden" name="back" value="'.$currentIndex.'&token='.$this->token.'&updateemployee&id_employee='.(int)$obj->id.'" />').'
<fieldset class="width3"><legend><img src="../img/admin/nav-user.gif" />'.$this->l('Employees').'</legend>
<label>'.$this->l('Last name:').' </label>
<div class="margin-form">
<input type="text" size="33" name="lastname" value="'.htmlentities($this->getFieldValue($obj, 'lastname'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div>
<label>'.$this->l('First name:').' </label>
<div class="margin-form">
<input type="text" size="33" name="firstname" value="'.htmlentities($this->getFieldValue($obj, 'firstname'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div>
<label>'.$this->l('Password:').' </label>
<div class="margin-form">
<input type="password" size="33" name="passwd" value="" /> <sup>*</sup>
<p>'.($obj->id ? $this->l('Leave blank if you do not want to change your password') : $this->l('Min. 8 characters; use only letters, numbers or').' -_').'</p>
</div>
<label>'.$this->l('E-mail address:').' </label>
<div class="margin-form">
<input type="text" size="33" name="email" value="'.htmlentities($this->getFieldValue($obj, 'email'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div><div class="clear">&nbsp;</div>
<label>'.$this->l('Back office color:').' </label>
<div class="margin-form">';
// Note : width= fix Firefox 4 display bug related to colorpicker librarie
echo '<input type="color" width="50px" data-hex="true" class="color mColorPickerInput" name="bo_color" value="'.htmlentities($this->getFieldValue($obj, 'bo_color'), ENT_COMPAT, 'UTF-8').'" />
<p>'.$this->l('Back office background will be displayed in this color. HTML colors only (e.g.,').' "lightblue", "#CC6600")</p>
</div><div class="clear">&nbsp;</div>
<label>'.$this->l('Language:').' </label>
<div class="margin-form">
<select name="id_lang">';
foreach (Language::getLanguages() as $lang)
echo ' <option value="'.(int)$lang['id_lang'].'" '.($this->getFieldValue($obj, 'id_lang') == $lang['id_lang'] ? 'selected="selected"' : '').'>'.Tools::htmlentitiesUTF8($lang['name']).'</option>';
echo ' </select> <sup>*</sup>
</div><div class="clear">&nbsp;</div>
<label>'.$this->l('Theme:').' </label>
<div class="margin-form">
<select name="bo_theme">';
$path = dirname(__FILE__).'/../themes/';
foreach (scandir($path) as $theme)
if ($theme[0] != '.' AND file_exists($path.$theme.'/admin.css'))
echo ' <option value="'.Tools::htmlentitiesUTF8($theme).'" '.($this->getFieldValue($obj, 'bo_theme') == $theme ? 'selected="selected"' : '').'>'.Tools::htmlentitiesUTF8($theme).'</option>';
echo ' </select> <sup>*</sup>
</div>';
if ((int)$this->tabAccess['edit'])
{
echo '<div class="clear">&nbsp;</div>
<label>'.$this->l('UI mode:').' </label>
<div class="margin-form">
<input type="radio" name="bo_uimode" id="uimode_on" value="hover" '.($this->getFieldValue($obj, 'bo_uimode') == 'hover' ? 'checked="checked" ' : '').'/>
<label class="t" for="uimode_on">'.$this->l('Hover on tabs').'</label>
<input type="radio" name="bo_uimode" id="uimode_off" value="click" '.($this->getFieldValue($obj, 'bo_uimode') == 'click' ? 'checked="checked" ' : '').'/>
<label class="t" for="uimode_off">'.$this->l('Click on tabs').'</label>
</div><div class="clear">&nbsp;</div>
<label>'.$this->l('Status:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.($this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.(!$this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Allow or disallow this employee to log into this Back Office').'</p>
</div>
<label>'.$this->l('Profile:').' </label>
<div class="margin-form">
<select name="id_profile">
<option value="">'.$this->l('-- Choose --').'</option>';
foreach ($profiles AS $profile)
echo '<option value="'.$profile['id_profile'].'"'.($profile['id_profile'] === $this->getFieldValue($obj, 'id_profile') ? ' selected="selected"' : '').'>'.$profile['name'].'</option>';
echo '</select> <sup>*</sup>
</div>';
}
echo '<div class="clear">&nbsp;</div>
<center>
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</center><div class="clear">&nbsp;</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
public function postProcess()
{
global $cookie;
if (Tools::isSubmit('deleteemployee') OR Tools::isSubmit('status') OR Tools::isSubmit('statusemployee'))
{
if ($cookie->id_employee == Tools::getValue('id_employee'))
{
$this->_errors[] = Tools::displayError('You cannot disable or delete your own account.');
return false;
}
$employee = new Employee(Tools::getValue('id_employee'));
if ($employee->isLastAdmin())
{
$this->_errors[] = Tools::displayError('You cannot disable or delete the last administrator account.');
return false;
}
}
elseif (Tools::isSubmit('submitAddemployee'))
{
$employee = new Employee((int)Tools::getValue('id_employee'));
if (!(int)$this->tabAccess['edit'])
$_POST['id_profile'] = $_GET['id_profile'] = $employee->id_profile;
if ($employee->isLastAdmin())
{
if (Tools::getValue('id_profile') != (int)_PS_ADMIN_PROFILE_)
{
$this->_errors[] = Tools::displayError('You should have at least one employee in the administrator group.');
return false;
}
if (Tools::getvalue('active') == 0)
{
$this->_errors[] = Tools::displayError('You cannot disable or delete the last administrator account.');
return false;
}
}
}
return parent::postProcess();
}
}

View File

@@ -1,212 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7331 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/tabs/AdminFeaturesValues.php');
class AdminFeatures extends AdminTab
{
public function __construct()
{
$this->adminFeaturesValues = new AdminFeaturesValues();
$this->table = 'feature';
$this->className = 'Feature';
$this->lang = true;
$this->edit = true;
$this->delete = true;
$this->fieldsDisplay = array(
'name' => array('title' => $this->l('Name'), 'width' => 128, 'filter_key' => 'b!name'),
'value' => array('title' => $this->l('Values'), 'width' => 255, 'orderby' => false, 'search' => false));
parent::__construct();
}
public function display()
{
global $currentIndex;
if ((isset($_POST['submitAddfeature_value']) AND sizeof($this->adminFeaturesValues->_errors))
OR isset($_GET['updatefeature_value']) OR isset($_GET['addfeature_value']))
{
$this->adminFeaturesValues->displayForm($this->token);
echo '<br /><br /><a href="'.$currentIndex.'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" alt="" /> '.$this->l('Back to the features list').'</a><br />';
}
else
{
parent::display();
$this->displayAssoGroupShop();
}
}
/* Report to AdminTab::displayList() for more details */
public function displayList()
{
global $currentIndex;
echo '<br />
<a href="'.$currentIndex.'&add'.$this->table.'&token='.$this->token.'"><img src="../img/admin/add.gif" border="0" /> <b>'.$this->l('Add a new feature').'</b></a><br />
<a href="'.$currentIndex.'&addfeature_value&token='.$this->token.'"><img src="../img/admin/add.gif" border="0" /> '.$this->l('Add a new feature value').'</a><br /><br />
'.$this->l('Click on a feature name to view its values and then click again if you want to hide them.').'<br /><br />';
$this->displayListHeader();
echo '<input type="hidden" name="groupid" value="0">';
if (!sizeof($this->_list))
echo '<tr><td class="center" colspan="'.sizeof($this->_list).'">'.$this->l('No features found.').'</td></tr>';
$irow = 0;
foreach ($this->_list AS $tr)
{
$id = (int)($tr['id_'.$this->table]);
echo '
<tr'.($irow++ % 2 ? ' class="alt_row"' : '').'>
<td style="vertical-align: top; padding: 4px 0 4px 0" class="center"><input type="checkbox" name="'.$this->table.'Box[]" value="'.$id.'" class="noborder" /></td>
<td style="width: 140px; vertical-align: top; padding: 4px 0 4px 0; cursor: pointer" onclick="$(\'#features_values_'.$id.'\').slideToggle();">'.$tr['name'].'</td>
<td style="vertical-align: top; padding: 4px 0 4px 0; width: 340px">
<div id="features_values_'.$id.'" style="display: none">
<table class="table" cellpadding="0" cellspacing="0">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'feature_value'.$id.'Box[]\', this.checked)" /></th>
<th width="100%">'.$this->l('Value').'</th>
<th>'.$this->l('Actions').'</th>
</tr>';
$features = FeatureValue::getFeatureValuesWithLang((int)(Configuration::get('PS_LANG_DEFAULT')), $id);
foreach ($features AS $feature)
{
echo '
<tr>
<td class="center"><input type="checkbox" name="feature_value'.$id.'Box[]" value="'.$feature['id_feature_value'].'" class="noborder" /></td>
<td>'.$feature['value'].'</td>
<td class="center">
<a href="'.$currentIndex.'&id_feature_value='.$feature['id_feature_value'].'&updatefeature_value&token='.$this->token.'">
<img src="../img/admin/edit.gif" border="0" alt="'.$this->l('Edit').'" title="'.$this->l('Edit').'" /></a>&nbsp;
<a href="'.$currentIndex.'&id_feature_value='.$feature['id_feature_value'].'&deletefeature_value&token='.$this->token.'"
onclick="return confirm(\''.$this->l('Delete value', __CLASS__, true, false).' #'.$feature['id_feature_value'].'?\');">
<img src="../img/admin/delete.gif" border="0" alt="'.$this->l('Delete').'" title="'.$this->l('Delete').'" /></a>
</td>
</tr>';
}
if (!sizeof($features))
echo '
<tr><td colspan="3" style="text-align:center">'.$this->l('No values defined').'</td></tr>';
echo '
</table>
<p><input type="Submit" class="button" name="submitDelfeature_value" value="'.$this->l('Delete selection').'"
onclick="changeFormParam(this.form, \'?tab=AdminFeatures\', '.$id.'); return confirm(\''.$this->l('Delete selected items?', __CLASS__, true, false).'\');" /></p>
</div>
</td>';
echo '
<td style="vertical-align: top; padding: 4px 0 4px 0" class="center">
<a href="'.$currentIndex.'&id_'.$this->table.'='.$id.'&update'.$this->table.'&token='.$this->token.'">
<img src="../img/admin/edit.gif" border="0" alt="'.$this->l('Edit').'" title="'.$this->l('Edit').'" /></a>&nbsp;
<a href="'.$currentIndex.'&id_'.$this->table.'='.$id.'&delete'.$this->table.'&token='.$this->token.'" onclick="return confirm(\''.$this->l('Delete item', __CLASS__, true, false).' #'.$id.'?\');">
<img src="../img/admin/delete.gif" border="0" alt="'.$this->l('Delete').'" title="'.$this->l('Delete').'" /></a>
</td>
</tr>';
}
$this->displayListFooter();
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<h2>'.$this->l('Add a new feature').'</h2>
<form action="'.$currentIndex.'&token='.$this->token.'"" method="post">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset class="width2">
<legend><img src="../img/t/AdminFeatures.gif" />'.$this->l('Add a new feature').'</legend>
<label>'.$this->l('Name:').'</label>
<div class="margin-form">';
foreach ($this->_languages AS $language)
echo '
<div id="name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="name_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'name', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name', 'name');
echo '
<div class="clear"></div>
</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('GroupShop association:').'</label><div class="margin-form">';
$this->displayAssoGroupShop();
echo '</div>';
}
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
public function displayErrors()
{
$this->adminFeaturesValues->displayErrors();
parent::displayErrors();
}
public function postProcess()
{
global $cookie, $currentIndex;
$this->adminFeaturesValues->tabAccess = Profile::getProfileAccess($cookie->profile, $this->id);
$this->adminFeaturesValues->postProcess($this->token);
if(Tools::getValue('submitDel'.$this->table))
{
if ($this->tabAccess['delete'] === '1')
{
if (isset($_POST[$this->table.'Box']))
{
$object = new $this->className();
if ($object->deleteSelection($_POST[$this->table.'Box']))
Tools::redirectAdmin($currentIndex.'&conf=2'.'&token='.$this->token);
$this->_errors[] = Tools::displayError('An error occurred while deleting selection.');
}
else
$this->_errors[] = Tools::displayError('You must select at least one element to delete.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
else
parent::postProcess();
}
}

View File

@@ -1,118 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
class AdminFeaturesValues extends AdminTab
{
public function __construct()
{
$this->table = 'feature_value';
$this->className = 'FeatureValue';
$this->lang = true;
$this->edit = true;
$this->delete = true;
parent::__construct();
}
/**
* Display form
*
* @global string $currentIndex Current URL in order to keep current Tab
*/
public function displayForm($isMainTab = true)
{
global $currentIndex;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
echo '
<h2>'.$this->l('Add a new feature value').'</h2>
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.Tools::getValue('token').'" method="post">
'.($obj->id ? '<input type="hidden" name="id_feature_value" value="'.$obj->id.'" />' : '').'
<fieldset class="width2">
<legend><img src="../img/t/AdminFeatures.gif" />'.$this->l('Add a new feature value').'</legend>
<label>'.$this->l('Value:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="value_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="value_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'value', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'value', 'value');
echo '
<div class="clear"></div>
</div>
<label>'.$this->l('Feature:').' </label>
<div class="margin-form">
<select name="id_feature">';
$features = Feature::getFeatures($this->_defaultFormLanguage);
foreach ($features AS $feature)
echo '<option value="'.$feature['id_feature'].'"'.($this->getFieldValue($obj, 'id_feature') == $feature['id_feature']? ' selected="selected"' : '').'>'.$feature['name'].'</option>';
echo '
</select><sup> *</sup>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
/**
* Manage page processing
*
* @global string $currentIndex Current URL in order to keep current Tab
*/
public function postProcess($token = NULL)
{
global $currentIndex;
if(Tools::getValue('submitDel'.$this->table))
{
if ($this->tabAccess['delete'] === '1')
{
if (isset($_POST[$this->table.$_POST['groupid'].'Box']))
{
$object = new $this->className();
if ($object->deleteSelection($_POST[$this->table.$_POST['groupid'].'Box']))
Tools::redirectAdmin($currentIndex.'&conf=2'.'&token='.($token ? $token : $this->token));
$this->_errors[] = Tools::displayError('An error occurred while deleting selection.');
}
else
$this->_errors[] = Tools::displayError('You must select at least one element to delete.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
else
parent::postProcess();
}
}

View File

@@ -1,190 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
class AdminGenerator extends AdminTab
{
public function __construct()
{
$this->_htFile = dirname(__FILE__).'/../../.htaccess';
$this->_rbFile = dirname(__FILE__).'/../../robots.txt';
$this->_smFile = dirname(__FILE__).'/../../sitemap.xml';
$this->_rbData = $this->_getRobotsContent();
return parent::__construct();
}
public function display()
{
global $currentIndex;
$languages = Language::getLanguages(false);
// Htaccess
echo '
<form action="'.$currentIndex.'&token='.$this->token.'" method="post" enctype="multipart/form-data">
<fieldset><legend><img src="../img/admin/htaccess.gif" />'.$this->l('Htaccess file generation').'</legend>
<p><b>'.$this->l('Warning:').'</b> '.$this->l('this tool can ONLY be used if you are hosted by an Apache web server. Please ask your webhost.').'</p>
<p>'.$this->l('This tool will automatically generate a ".htaccess" file that will give you the ability to do URL rewriting and to catch 404 errors.').'</p>
<p>'.$this->l('If you do not have "Friendly URL" enabled when generating the ".htaccess" file, this feature won\'t be available.').'</p>';
if ($this->_checkConfiguration($this->_htFile))
echo '
<div class="clear">&nbsp;</div>
<label for="imageCacheControl">'.$this->l('Optimization').'</label>
<div class="margin-form">
<input type="checkbox" name="PS_HTACCESS_CACHE_CONTROL" id="PS_HTACCESS_CACHE_CONTROL" value="1" '.(Configuration::get('PS_HTACCESS_CACHE_CONTROL') == 1 ? 'checked="checked"' : '').' />
<p>'.$this->l('This will add directives to your .htaccess file which should improve caching and compression.').'</p>
</div>
<div class="clear">&nbsp;</div>
<label for="imageCacheControl">'.$this->l('Friendly URL').'</label>
<div class="margin-form">
<input type="checkbox" name="PS_REWRITING_SETTINGS" id="PS_REWRITING_SETTINGS" value="1" '.(Configuration::get('PS_REWRITING_SETTINGS') ? 'checked="checked"' : '').' />
<p>'.$this->l('Enable only if your server allows URL rewriting.').'</p>
</div>
<div class="clear">&nbsp;</div>
<label for="specific_configuration">'.$this->l('Specific configuration').'</label>
<div class="margin-form">
<textarea rows="10" class="width3" id="specific_configuration" name="ps_htaccess_specific">'.Configuration::get('PS_HTACCESS_SPECIFIC').'</textarea>
<p>'.$this->l('Add here the specific directives of your host (SetEnv PHP_VER 5, AddType x-mapp-php5 .php...).').'</p>
</div>
<p class="clear" style="font-weight:bold;">'.$this->l('Generate your ".htaccess" file by clicking on the following button:').'<br /><br />
<input type="submit" value="'.$this->l('Generate .htaccess file').'" name="submitHtaccess" class="button" /></p>
<p>'.$this->l('This will erase your').'<b> '.$this->l('old').'</b> '.$this->l('.htaccess file!').'</p>';
else
echo '
<p style="color:red; font-weight:bold;">'.$this->l('Before being able to use this tool, you need to:').'</p>
<p>'.$this->l('- create a').' <b>'. $this->l('.htaccess').'</b> '.$this->l('blank file in directory').' <b>'.__PS_BASE_URI__.'</b>
<br />'.$this->l('- give it write permissions (CHMOD 666 on Unix system)').'</p>';
echo '</p></fieldset></form>';
// Robots
echo '<br /><br />
<form action="'.$currentIndex.'&token='.$this->token.'" method="post" enctype="multipart/form-data">
<fieldset><legend><img src="../img/admin/robots.gif" />'.$this->l('Robots file generation').'</legend>
<p><b>'.$this->l('Warning:').' </b>'.$this->l('Your file robots.txt MUST be in your website\'s root directory and nowhere else.').'</p>
<p>'.$this->l('eg: http://www.yoursite.com/robots.txt').'.</p>
<p>'.$this->l('This tool will automatically generate a "robots.txt" file that you can configure to deny access to search engines for some pages.').'</p>';
if ($this->_checkConfiguration($this->_rbFile))
echo '
<p style="font-weight:bold;">'.$this->l('Generate your "robots.txt" file by clicking on the following button:').'<br /><br />
<input type="submit" value="'.$this->l('Generate robots.txt file').'" name="submitRobots" class="button" /></p>
<p>'.$this->l('This will erase your').'<b> '.$this->l('old').'</b> '.$this->l('robots.txt file!').'</p>';
else
echo '
<p style="color:red; font-weight:bold;">'.$this->l('Before being able to use this tool, you need to:').'</p>
<p>'.$this->l('- create a').' <b>'. $this->l('robots.txt').'</b> '.$this->l('blank file in dir:').' <b>'.__PS_BASE_URI__.'</b>
<br />'.$this->l('- give it write permissions (CHMOD 666 on Unix system)').'</p>';
echo '</p></fieldset></form>';
}
public function _checkConfiguration($file)
{
if (file_exists($file))
return is_writable($file);
return is_writable(dirname($file));
}
function postProcess()
{
global $currentIndex;
if (Tools::isSubmit('submitHtaccess'))
{
if ($this->tabAccess['edit'] === '1')
{
Configuration::updateValue('PS_HTACCESS_CACHE_CONTROL', (int)Tools::getValue('PS_HTACCESS_CACHE_CONTROL'));
Configuration::updateValue('PS_REWRITING_SETTINGS', (int)Tools::getValue('PS_REWRITING_SETTINGS'));
Configuration::updateValue('PS_HTACCESS_SPECIFIC', Tools::getValue('ps_htaccess_specific'), true);
if (Tools::generateHtaccess($this->_htFile, Configuration::get('PS_REWRITING_SETTINGS'), Configuration::get('PS_HTACCESS_CACHE_CONTROL'), Tools::getValue('ps_htaccess_specific')))
Tools::redirectAdmin($currentIndex.'&conf=4&token='.$this->token);
$this->_errors[] = $this->l('Cannot write into file:').' <b>'.$this->_htFile.'</b><br />'.$this->l('Please check write permissions.');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
if (Tools::isSubmit('submitRobots'))
{
if ($this->tabAccess['edit'] === '1')
{
if (!$writeFd = @fopen($this->_rbFile, 'w'))
die ($this->l('Cannot write into file:').' <b>'.$this->_rbFile.'</b><br />'.$this->l('Please check write permissions.'));
else
{
// PS Comments
fwrite($writeFd, "# robots.txt automaticaly generated by PrestaShop e-commerce open-source solution\n");
fwrite($writeFd, "# http://www.prestashop.com - http://www.prestashop.com/forums\n\n");
fwrite($writeFd, "# This file is to prevent the crawling and indexing of certain parts\n");
fwrite($writeFd, "# of your site by web crawlers and spiders run by sites like Yahoo!\n");
fwrite($writeFd, "# and Google. By telling these \"robots\" where not to go on your site,\n");
fwrite($writeFd, "# you save bandwidth and server resources.\n\n");
fwrite($writeFd, "# For more information about the robots.txt standard, see:\n");
fwrite($writeFd, "# http://www.robotstxt.org/wc/robots.html\n\n");
// User-Agent
fwrite($writeFd, "User-agent: *\n");
// Directories
fwrite($writeFd, "# Directories\n");
foreach ($this->_rbData['Directories'] as $dir)
fwrite($writeFd, 'Disallow: '.__PS_BASE_URI__.$dir."\n");
// Files
fwrite($writeFd, "# Files\n");
foreach ($this->_rbData['Files'] as $file)
fwrite($writeFd, 'Disallow: '.__PS_BASE_URI__.$file."\n");
// Sitemap
fwrite($writeFd, "# Sitemap\n");
if (file_exists($this->_smFile))
if (filesize($this->_smFile))
fwrite($writeFd, 'Sitemap: '.(Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].__PS_BASE_URI__.'sitemap.xml'."\n");
fwrite($writeFd, "\n");
fclose($writeFd);
Tools::redirectAdmin($currentIndex.'&conf=4&token='.$this->token);
}
} else
$this->_errors[] = Tools::displayError('You do not have permission to edit here.');
}
}
public function _getRobotsContent()
{
$tab = array();
// Directories
$tab['Directories'] = array('classes/', 'config/', 'download/', 'mails/', 'modules/', 'translations/', 'tools/', 'lang-'.Language::getIsoById(Configuration::get('PS_LANG_DEFAULT')).'/');
// Files
$tab['Files'] = array('addresses.php', 'address.php', 'authentication.php', 'cart.php', 'discount.php', 'footer.php',
'get-file.php', 'header.php', 'history.php', 'identity.php', 'images.inc.php', 'init.php', 'my-account.php', 'order.php', 'order-opc.php',
'order-slip.php', 'order-detail.php', 'order-follow.php', 'order-return.php', 'order-confirmation.php', 'pagination.php', 'password.php',
'pdf-invoice.php', 'pdf-order-return.php', 'pdf-order-slip.php', 'product-sort.php', 'search.php', 'statistics.php','attachment.php', 'guest-tracking',
'*orderby=','*orderway=','*tag=','*id_currency=','*search_query=','*id_lang=','*back=','*utm_source=','*utm_medium=','*utm_campaign=','*n=');
return $tab;
}
}

View File

@@ -1,189 +0,0 @@
<?php
/*
* 2007-2011 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-2011 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
*/
class AdminGeolocation extends AdminTab
{
public function display()
{
global $currentIndex, $cookie;
echo '
<h2>'.$this->l('Geolocation').'</h2>
';
if (!$this->_isGeoLiteCityAvailable())
$this->displayWarning($this->l('In order to use Geolocation, please download').' <a href="http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz">'.$this->l('this file').'</a> '.$this->l('and decompress it into tools/geoip/ directory'));
echo '
<form method="POST" action="'.$currentIndex.'&token='.Tools::getValue('token').'">
<fieldset>
<legend><img src="../img/admin/world.gif" alt="" /> '.$this->l('Geolocation by IP').'</legend>
<label>'.$this->l('Geolocation by IP:').'</label>
<div class="margin-form">
<input type="radio" name="PS_GEOLOCATION_ENABLED" id="PS_GEOLOCATION_ENABLED_1" value="1" '.(Configuration::get('PS_GEOLOCATION_ENABLED') ? 'checked="checked"' : '').' /> <label class="t" for="PS_GEOLOCATION_ENABLED_1"><img src="../img/admin/enabled.gif" alt="" /> '.$this->l('Enabled').'</label>
<input type="radio" name="PS_GEOLOCATION_ENABLED" id="PS_GEOLOCATION_ENABLED_0" value="0" '.(!Configuration::get('PS_GEOLOCATION_ENABLED') ? 'checked="checked"' : '').' /> <label class="t" for="PS_GEOLOCATION_ENABLED_0"><img src="../img/admin/disabled.gif" alt="" /> '.$this->l('Disabled').'</label>
<p>'.$this->l('This option allows you, among other things, to restrict access to your shop for many countries. See below.').'</p>
</div>
<div class="margin-form">
<input type="submit" class="button" name="submitGeolocationConfiguration" value="'.$this->l('Save').'" />
</div>
</fieldset>
</form>
';
$allowedCountries = explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'));
echo '
<form method="POST" action="'.$currentIndex.'&token='.Tools::getValue('token').'">
<fieldset style="margin-top:10px;">
<legend><img src="../img/admin/world.gif" alt="" /> '.$this->l('Options').'</legend>
<div class="hint" style="display:block;margin-bottom:20px;">
'.$this->l('The following features are only available if you enable the Geolocation by IP feature.').'
</div>
<label>'.$this->l('Geolocation behavior for restricted countries:').'</label>
<div class="margin-form">
<select name="PS_GEOLOCATION_BEHAVIOR">
<option value="'._PS_GEOLOCATION_NO_CATALOG_.'" '.(Configuration::get('PS_GEOLOCATION_BEHAVIOR') == _PS_GEOLOCATION_NO_CATALOG_ ? 'selected' : '').'>'.$this->l('Visitors can\'t see your catalog').'</option>
<option value="'._PS_GEOLOCATION_NO_ORDER_.'" '.(Configuration::get('PS_GEOLOCATION_BEHAVIOR') == _PS_GEOLOCATION_NO_ORDER_ ? 'selected' : '').'>'.$this->l('Visitors can see your catalog but can\'t make an order').'</option>
</select>
</div>
<div class="clear" style="margin-top:10px;"></div>
<label>'.$this->l('Geolocation behavior for undefined countries:').'</label>
<div class="margin-form">
<select name="PS_GEOLOCATION_NA_BEHAVIOR">
<option value="-1" '.(Configuration::get('PS_GEOLOCATION_NA_BEHAVIOR') == -1 ? 'selected' : '').'>'.$this->l('All features are available').'</option>
<option value="'._PS_GEOLOCATION_NO_CATALOG_.'" '.(Configuration::get('PS_GEOLOCATION_NA_BEHAVIOR') == _PS_GEOLOCATION_NO_CATALOG_ ? 'selected' : '').'>'.$this->l('Visitors can\'t see your catalog').'</option>
<option value="'._PS_GEOLOCATION_NO_ORDER_.'" '.(Configuration::get('PS_GEOLOCATION_NA_BEHAVIOR') == _PS_GEOLOCATION_NO_ORDER_ ? 'selected' : '').'>'.$this->l('Visitors can see your catalog but can\'t make an order').'</option>
</select>
</div>
<div class="clear" style="margin-top:10px;"></div>
<label>'.$this->l('Select countries that can access your store:').'</label>
<div class="margin-form">
<table class="table" cellspacing="0">
<thead>
<tr>
<th><input type="checkbox" name="checkAll" onclick="checkDelBoxes(this.form, \'countries[]\', this.checked)" /></th>
<th>'.$this->l('Name').'</th>
<tr>
</thead>
<tbody>
';
foreach (Country::getCountries(intval($cookie->id_lang)) AS $country)
echo '
<tr>
<td><input type="checkbox" name="countries[]" value="'.strtoupper(Tools::htmlentitiesUTF8($country['iso_code'])).'" '.(in_array(strtoupper($country['iso_code']), $allowedCountries) ? 'checked="checked"' : '').' /></td>
<td>'.Tools::htmlentitiesUTF8($country['name']).'</td>
</tr>
';
echo '
</tbody>
</table>
</div>
<div class="margin-form">
<input type="submit" class="button" name="submitGeolocationCountries" value="'.$this->l('Save').'" />
</div>
</fieldset>
</form>
<form method="POST" action="'.$currentIndex.'&token='.Tools::getValue('token').'">
<fieldset style="margin-top:10px;">
<legend><img src="../img/admin/world.gif" alt="" /> '.$this->l('Whitelist of IP addresses').'</legend>
<div class="hint" style="display:block;margin-bottom:20px;">
'.$this->l('You can add many IP addresses, these addresses will always be allowed to access your shop (e.g. Google bots IP).').'
</div>
<label for="PS_GEOLOCATION_WHITELIST">'.$this->l('Allowed IP addresses:').'</label>
<div class="margin-form">
<textarea name="PS_GEOLOCATION_WHITELIST" id="PS_GEOLOCATION_WHITELIST" cols="80" rows="30">'.Tools::htmlentitiesUTF8(str_replace(';', "\n", Configuration::get('PS_GEOLOCATION_WHITELIST'))).'</textarea>
</div>
<div class="margin-form">
<input type="submit" class="button" name="submitGeolocationWhitelist" value="'.$this->l('Save').'" />
</div>
</fieldset>
</form>
';
}
public function postProcess()
{
global $currentIndex;
if (Tools::isSubmit('submitGeolocationConfiguration'))
{
if ($this->_isGeoLiteCityAvailable())
{
Configuration::updateValue('PS_GEOLOCATION_ENABLED', intval(Tools::getValue('PS_GEOLOCATION_ENABLED')));
Tools::redirectAdmin($currentIndex.'&token='.Tools::getValue('token').'&conf=4');
}
else
$this->_errors[] = Tools::displayError('Geolocation database is unavailable.');
}
if (Tools::isSubmit('submitGeolocationCountries'))
{
if (!is_array(Tools::getValue('countries')) OR !sizeof(Tools::getValue('countries')))
$this->_errors[] = Tools::displayError('Country selection is invalid');
else
{
Configuration::updateValue('PS_GEOLOCATION_BEHAVIOR', (!(int)(Tools::getValue('PS_GEOLOCATION_BEHAVIOR')) ? _PS_GEOLOCATION_NO_CATALOG_ : _PS_GEOLOCATION_NO_ORDER_));
Configuration::updateValue('PS_GEOLOCATION_NA_BEHAVIOR', (int)Tools::getValue('PS_GEOLOCATION_NA_BEHAVIOR'));
Configuration::updateValue('PS_ALLOWED_COUNTRIES', implode(';', Tools::getValue('countries')));
Tools::redirectAdmin($currentIndex.'&token='.Tools::getValue('token').'&conf=4');
}
}
if (Tools::isSubmit('submitGeolocationWhitelist'))
{
if (!Validate::isCleanHtml(Tools::getValue('PS_GEOLOCATION_WHITELIST')))
$this->_errors[] = Tools::displayError('Invalid whitelist');
else
{
Configuration::updateValue('PS_GEOLOCATION_WHITELIST', str_replace("\n", ';', str_replace("\r", '', Tools::getValue('PS_GEOLOCATION_WHITELIST'))));
Tools::redirectAdmin($currentIndex.'&token='.Tools::getValue('token').'&conf=4');
}
}
return parent::postProcess();
}
private function _isGeoLiteCityAvailable()
{
if (file_exists(_PS_GEOIP_DIR_.'GeoLiteCity.dat'))
return true;
return false;
}
}

View File

@@ -1,114 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminGroupShop extends AdminTab
{
public function __construct()
{
$this->table = 'group_shop';
$this->className = 'GroupShop';
$this->edit = true;
$this->delete = false;
$this->deleted = false;
$this->fieldsDisplay = array(
'id_group_shop' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('County'), 'width' => 130, 'filter_key' => 'b!name'),
'active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'filter_key' => 'active'));
parent::__construct();
}
public function postProcess()
{
if (Tools::isSubmit('delete'.$this->table) OR Tools::isSubmit('status') OR Tools::isSubmit('status'.$this->table))
{
$object = $this->loadObject();
if(GroupShop::getTotalGroupShops() == 1)
$this->_errors[] = Tools::displayError('You cannot delete or disable the last groupshop.');
elseif($object->haveShops())
$this->_errors[] = Tools::displayError('You cannot delete or disable a groupshop which have this shops using it.');
if (sizeof($this->_errors))
return false;
}
return parent::postProcess();
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm($isMainTab);
if (!($obj = $this->loadObject(true)))
return;
if (Shop::getTotalShops() > 1 AND $obj->id)
$disabled = 'disabled="disabled"';
else
$disabled = '';
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend>'.$this->l('GroupShop').'</legend><span class="hint" name="help_box" style="display:block;">'.$this->l('You can\'t edit GroupShop when you have more than one Shop').'</span><br />
<label for="name">'.$this->l('GroupShop name').'</label>
<div class="margin-form">
<input type="text" name="name" id="name" value="'.$this->getFieldValue($obj, 'name').'" />
</div>
<label for="share_datas">'.$this->l('Share datas').'</label>
<div class="margin-form">
<input type="radio" name="share_datas" '.$disabled.' id="share_datas_on" value="1" '.($this->getFieldValue($obj, 'share_datas') ? 'checked="checked" ' : '').'/>
<label class="t" for="share_datas_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="share_datas" '.$disabled.' id="share_datas_off" value="0" '.(!$this->getFieldValue($obj, 'share_datas') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Share customers, orders and carts between shops of this group').'</p>
</div>
<label for="share_stock">'.$this->l('Share stock').'</label>
<div class="margin-form">
<input type="radio" name="share_stock" '.$disabled.' id="share_stock_on" value="1" '.($this->getFieldValue($obj, 'share_stock') ? 'checked="checked" ' : '').'/>
<label class="t" for="share_stock_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="share_stock" '.$disabled.' id="share_datas_off" value="0" '.(!$this->getFieldValue($obj, 'share_stock') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Sare stock between shops of this group').'</p>
</div>
<label>'.$this->l('Status:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.($this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="active" id="active_off" value="0" '.(!$this->getFieldValue($obj, 'active') ? 'checked="checked" ' : '').'/>
<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p>'.$this->l('Enable or disable shop').'</p>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
}

View File

@@ -1,383 +0,0 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 7332 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminGroups extends AdminTab
{
public function __construct()
{
$this->table = 'group';
$this->className = 'Group';
$this->lang = true;
$this->edit = true;
$this->view = true;
$this->delete = true;
$this->_select = '
(SELECT COUNT(jcg.`id_customer`)
FROM `'._DB_PREFIX_.'customer_group` jcg
LEFT JOIN `'._DB_PREFIX_.'customer` jc ON (jc.`id_customer` = jcg.`id_customer`)
WHERE jc.`deleted` != 1
AND jcg.`id_group` = a.`id_group`) AS nb
';
$this->_group = 'GROUP BY a.id_group';
$this->_listSkipDelete = array(1);
$this->fieldsDisplay = array(
'id_group' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Name'), 'width' => 80, 'filter_key' => 'b!name'),
'reduction' => array('title' => $this->l('Discount'), 'width' => 50, 'align' => 'right'),
'nb' => array('title' => $this->l('Members'), 'width' => 25, 'align' => 'center'),
'date_add' => array('title' => $this->l('Creation date'), 'width' => 60, 'type' => 'date', 'align' => 'right'));
parent::__construct();
}
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
parent::displayForm();
if (!($obj = $this->loadObject(true)))
return;
$groupReductions = $obj->id ? GroupReduction::getGroupReductions($obj->id, (int)($cookie->id_lang)) : array();
$categories = Category::getSimpleCategories((int)($cookie->id_lang));
echo '
<form action="'.$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
<fieldset><legend><img src="../img/admin/tab-groups.gif" />'.$this->l('Group').'</legend>
<label>'.$this->l('Name:').' </label>
<div class="margin-form">';
foreach ($this->_languages as $language)
echo '
<div id="name_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input size="33" type="text" name="name_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'name', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /><sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' 0-9!<>,;?=+()@#"<22>{}_$%:<span class="hint-pointer">&nbsp;</span></span>
</div>';
$this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name', 'name');
$reduction = htmlentities($this->getFieldValue($obj, 'reduction'), ENT_COMPAT, 'UTF-8');
echo '
</div>
<div class="clear">&nbsp;</div>
<label>'.$this->l('Discount:').' </label>
<div class="margin-form">
<input type="text" size="5" name="reduction" value="'.($reduction ? $reduction : '0').'" /> '.$this->l('%').'
<p>'.$this->l('Will automatically apply this value as a discount on ALL shop\'s products for this group\'s members.').'</p>
</div>';
if ($obj->id)
{
echo '
<label>'.$this->l('Current category discount:').'</label>
<div class="margin-form">';
if ($groupReductions)
{
echo '<table>
<tr>
<th>'.$this->l('Category').'</th>
<th>'.$this->l('Value').'</th>
<th>'.$this->l('Action').'</th>
</tr>';
foreach ($groupReductions AS $groupReduction)
echo '
<tr>
<td>'.Tools::htmlentitiesUTF8($groupReduction['category_name']).'</td>
<td><input type="hidden" name="gr_id_group_reduction[]" value="'.(int)($groupReduction['id_group_reduction']).'" /><input type="text" name="gr_reduction[]" value="'.($groupReduction['reduction'] * 100).'" /></td>
<td><a href="'.$currentIndex.'&deleteGroupReduction&id_group_reduction='.(int)($groupReduction['id_group_reduction']).'&id_group='.(int)($obj->id).'&token='.$this->token.'"><img src="" alt="'.$this->l('Delete').'" /></a></td>
</tr>';
echo '</table>';
}
else
echo $this->l('No discount');
echo ' </div>';
}
echo '
<label>'.$this->l('Price display method:').' </label>
<div class="margin-form">
<select name="price_display_method">
<option value="'.PS_TAX_EXC.'"'.((int)($this->getFieldValue($obj, 'price_display_method')) == PS_TAX_EXC ? ' selected="selected"' : '').'>'.$this->l('Tax excluded').'</option>
<option value="'.PS_TAX_INC.'"'.((int)($this->getFieldValue($obj, 'price_display_method')) == PS_TAX_INC ? ' selected="selected"' : '').'>'.$this->l('Tax included').'</option>
</select>
<p>'.$this->l('How the prices are displayed on order summary for this customer group (tax included or excluded).').'</p>
</div>
<div class="clear">&nbsp;</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>';
if (Tools::isMultiShopActivated())
{
echo '<label>'.$this->l('GroupShop association:').'</label><div class="margin-form">';
$this->displayAssoGroupShop();
echo '</div>';
}
echo '
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form><br />';
if ($obj->id)
{
echo '
<form action="'.$currentIndex.'&update'.$this->table.'&id_group='.$obj->id.'&token='.$this->token.'" method="post" class="width3">
<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />
<fieldset><legend><img src="../img/admin/tab-groups.gif" />'.$this->l('New group discount').'</legend>
<label>'.$this->l('Category:').' </label>
<div class="margin-form">
<select name="id_category">';
foreach ($categories AS $category)
echo ' <option value="'.(int)($category['id_category']).'">'.Tools::htmlentitiesUTF8($category['name']).'</option>';
echo ' </select><sup>*</sup>
</div>
<label>'.$this->l('Discount (in %):').' </label>
<div class="margin-form">
<input type="text" name="reduction" value="" /><sup>*</sup>
</div>
<div class="clear">&nbsp;</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Add ').'" name="submitAddGroupReduction" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</form>';
}
}
public function viewgroup()
{
global $cookie;
$currentIndex = 'index.php?tab=AdminGroups';
if (!($obj = $this->loadObject(true)))
return;
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
echo '
<fieldset style="width: 400px">
<div style="float: right"><a href="'.$currentIndex.'&updategroup&id_group='.$obj->id.'&token='.$this->token.'"><img src="../img/admin/edit.gif" /></a></div>
<span style="font-weight: bold; font-size: 14px;">'.strval($obj->name[(int)($cookie->id_lang)]).'</span>
<div class="clear">&nbsp;</div>
'.$this->l('Discount:').' '.(float)($obj->reduction).$this->l('%').'
</fieldset>
<div class="clear">&nbsp;</div>';
$this->fieldsDisplay = (array(
'ID' => array('title' => $this->l('ID')),
'sex' => array('title' => $this->l('Sex')),
'name' => array('title' => $this->l('Name')),
'e-mail' => array('title' => $this->l('e-mail')),
'birthdate' => array('title' => $this->l('Birth date')),
'register_date' => array('title' => $this->l('Registration date')),
'orders' => array('title' => $this->l('Orders')),
'status' => array('title' => $this->l('Status')),
'actions' => array('title' => $this->l('Actions'))
));
if ($nbCustomers = $obj->getCustomers(true))
{
echo '<h2>'.$this->l('Customer members of this group').' ('.$nbCustomers.')</h2>';
// Pagination Begin
$customersPerPage = (Tools::getValue('customerPerPage') ? (int)Tools::getValue('customerPerPage') : 50);
$totalPages = ceil($nbCustomers / $customersPerPage);
$perPageOptions = array(20, 50, 100, 300);
$customerPageIndex = (Tools::getValue('customerPageIndex') && Tools::getValue('customerPageIndex') <= $totalPages ? (int)Tools::getValue('customerPageIndex') : 1);
$from = (Tools::getValue('customerPageIndex') ? ((int)$customerPageIndex - 1) * ((int)$customersPerPage) : 0);
$customers = $obj->getCustomers(false, $from, $customersPerPage);
echo '<tr>
<form method="post" action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'">
<td style="vertical-align: bottom;"><span style="float: left; height:30px">';
if ($customerPageIndex > 1)
{
echo '&nbsp<input type="image" onclick="document.getElementById(\'customerPageIndex\').value=1" src="../img/admin/list-prev2.gif">&nbsp';
echo '&nbsp<input type="image" onclick="document.getElementById(\'customerPageIndex\').value='.($customerPageIndex-1).'" src="../img/admin/list-prev.gif">&nbsp';
}
echo 'Page <b><select onChange="submit()" name="customerPageIndex" id="customerPageIndex">';
for ($i=1; $i <= $totalPages; $i++)
echo '<option value="'.$i.'"'.((int)$customerPageIndex === $i ? 'selected="selected"' : '').'>'.$i.'</option>';
echo '</select></b> / '.$totalPages;
if ($customerPageIndex < $totalPages)
{
echo '&nbsp<input type="image" onclick="document.getElementById(\'customerPageIndex\').value='.((int)$customerPageIndex+1).'" src="../img/admin/list-next.gif">';
echo '&nbsp<input type="image" onclick="document.getElementById(\'customerPageIndex\').value='.$totalPages.'" src="../img/admin/list-next2.gif">';
}
echo ' | Display
<select onchange="document.getElementById(\'customerPageIndex\').value=1; submit();" name="customerPerPage">';
foreach ($perPageOptions as $option)
echo '<option value="'.$option.'"'.((int)$customersPerPage == $option ? 'selected="selected"' : '').'>'.$option.'</option>';
echo ' </select> / '.$nbCustomers.' result(s)
</span><span class="clear"></span></td>
</form>
</tr>';
// Pagination End
echo '<table cellspacing="0" cellpadding="0" class="table widthfull">
<tr>';
foreach ($this->fieldsDisplay AS $field)
echo '<th'.(isset($field['width']) ? 'style="width: '.$field['width'].'"' : '').'>'.$field['title'].'</th>';
echo '
</tr>';
$irow = 0;
foreach ($customers AS $k => $customer)
{
$imgGender = $customer['id_gender'] == 1 ? '<img src="../img/admin/male.gif" alt="'.$this->l('Male').'" />' : ($customer['id_gender'] == 2 ? '<img src="../img/admin/female.gif" alt="'.$this->l('Female').'" />' : '');
echo '
<tr class="'.($irow++ % 2 ? 'alt_row' : '').'">
<td>'.$customer['id_customer'].'</td>
<td class="center">'.$imgGender.'</td>
<td>'.stripslashes($customer['lastname']).' '.stripslashes($customer['firstname']).'</td>
<td>'.stripslashes($customer['email']).'<a href="mailto:'.stripslashes($customer['email']).'"> <img src="../img/admin/email_edit.gif" alt="'.$this->l('Write to this customer').'" /></a></td>
<td>'.Tools::displayDate($customer['birthday'], (int)($cookie->id_lang)).'</td>
<td>'.Tools::displayDate($customer['date_add'], (int)($cookie->id_lang)).'</td>
<td>'.Order::getCustomerNbOrders($customer['id_customer']).'</td>
<td class="center"><img src="../img/admin/'.($customer['active'] ? 'enabled.gif' : 'forbbiden.gif').'" alt="" /></td>
<td class="center" width="60px">
<a href="index.php?tab=AdminCustomers&id_customer='.$customer['id_customer'].'&viewcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee)).'">
<img src="../img/admin/details.gif" alt="'.$this->l('View orders').'" /></a>
<a href="index.php?tab=AdminCustomers&id_customer='.$customer['id_customer'].'&addcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee)).'">
<img src="../img/admin/edit.gif" alt="'.$this->l('Modify this customer').'" /></a>
<a href="index.php?tab=AdminCustomers&id_customer='.$customer['id_customer'].'&deletecustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee)).'" onclick="return confirm(\''.$this->l('Are you sure?', __CLASS__, true, false).'\');">
<img src="../img/admin/delete.gif" alt="'.$this->l('Delete this customer').'" /></a>
</td>
</tr>';
}
echo '</table>';
}
else
echo '<p><img src="../img/admin/information.png" style="float:left;margin-right:5px;" alt="" /> '.$this->l('No user in this group.').'</p>';
}
public function postProcess()
{
global $currentIndex;
$token = Tools::getValue('token') ? Tools::getValue('token') : $this->token;
if (Tools::isSubmit('deleteGroupReduction'))
{
if ($this->tabAccess['delete'] === '1')
{
if (!$id_group_reduction = Tools::getValue('id_group_reduction'))
$this->_errors[] = Tools::displayError('Invalid group reduction ID');
else
{
$groupReduction = new GroupReduction((int)($id_group_reduction));
if (!$groupReduction->delete())
$this->_errors[] = Tools::displayError('An error occurred while deleting the group reduction');
else
Tools::redirectAdmin($currentIndex.'&update'.$this->table.'&id_group='.(int)(Tools::getValue('id_group')).'&conf=1&token='.$token);
}
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
if (Tools::isSubmit('submitAddGroupReduction'))
{
if ($this->tabAccess['add'] === '1')
{
if (!($obj = $this->loadObject()))
return;
$groupReduction = new GroupReduction();
if (!$id_category = Tools::getValue('id_category') OR !Validate::isUnsignedId($id_category))
$this->_errors[] = Tools::displayError('Wrong category ID');
elseif (!$reduction = Tools::getValue('reduction') OR !Validate::isPrice($reduction))
$this->_errors[] = Tools::displayError('Invalid reduction (must be a percentage)');
elseif (GroupReduction::doesExist((int)($obj->id), $id_category))
$this->_errors[] = Tools::displayError('A reduction already exists for this category.');
else
{
$groupReduction->id_category = (int)($id_category);
$groupReduction->id_group = (int)($obj->id);
$groupReduction->reduction = (float)($reduction) / 100;
if (!$groupReduction->add())
$this->_errors[] = Tools::displayError('An error occurred while adding a category group reduction.');
else
Tools::redirectAdmin($currentIndex.'&update'.$this->table.'&id_group='.(int)(Tools::getValue('id_group')).'&conf=3&token='.$this->token);
}
}
else
$this->_errors[] = Tools::displayError('You do not have permission to add here.');
}
if (Tools::isSubmit('submitAddgroup'))
{
if ($this->tabAccess['add'] === '1')
{
if (Tools::getValue('reduction') > 100 OR Tools::getValue('reduction') < 0)
$this->_errors[] = Tools::displayError('Reduction value is incorrect');
else
{
$id_group_reductions = Tools::getValue('gr_id_group_reduction');
$reductions = Tools::getValue('gr_reduction');
if ($id_group_reductions)
foreach ($id_group_reductions AS $key => $id_group_reduction)
if (!Validate::isUnsignedId($id_group_reductions[$key]) OR !Validate::isPrice($reductions[$key]))
$this->_errors[] = Tools::displayError();
else
{
$groupReduction = new GroupReduction((int)($id_group_reductions[$key]));
$groupReduction->reduction = $reductions[$key] / 100;
if (!$groupReduction->update())
$this->errors[] = Tools::displayError('Cannot update group reductions');
}
if (!sizeof($this->_errors))
parent::postProcess();
}
}
else
$this->_errors[] = Tools::displayError('You do not have permission to add here.');
}
elseif (isset($_GET['delete'.$this->table]))
{
if ($this->tabAccess['delete'] === '1')
{
if (Validate::isLoadedObject($object = $this->loadObject()))
{
if ($object->id == 1)
$this->_errors[] = Tools::displayError('You cannot delete default group.');
else
{
if ($object->delete())
Tools::redirectAdmin($currentIndex.'&conf=1&token='.$token);
$this->_errors[] = Tools::displayError('An error occurred during deletion.');
}
}
else
$this->_errors[] = Tools::displayError('An error occurred while deleting object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
}
else
$this->_errors[] = Tools::displayError('You do not have permission to delete here.');
}
else
parent::postProcess();
}
}

Some files were not shown because too many files have changed in this diff Show More