Compare commits

..

573 Commits

Author SHA1 Message Date
vAugagneur fbf01834f8 // CHANGELOG
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16730 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 15:45:41 +00:00
vAugagneur 4250fddbe4 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16728 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 15:08:14 +00:00
vAugagneur b1e130854f //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16727 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 14:47:52 +00:00
rGaillard cd5a54afd1 // Fix PSCFV-3529
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16726 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 14:44:01 +00:00
vChabot 756f1aa10e [-] BO : BugFix : #PSCFV-3537 : Product Indexing lost when editing a product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16725 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 14:09:44 +00:00
rGaillard ca80cbc4b1 // Fix small bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16724 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 13:55:43 +00:00
dMetzger 87af65d2e2 [-] BO : moved some code from AdminModulesController to AdminController because is is used on AdminHomeController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16723 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 13:32:26 +00:00
aFolletete 6b24f5203d // Add image verification
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16722 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 13:14:00 +00:00
rGaillard 3259b70a3c // Add small text
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16721 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 13:04:57 +00:00
vAugagneur 4815e5d2f5 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16719 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 12:40:55 +00:00
mDeflotte 9039939c7d [-] BO : #PSCFV-2596 - Hide custom features values from customization detail list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16718 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 12:37:21 +00:00
rGaillard b6515eaa17 [-] MO: fix smarty cache ttl on blocktopmenu and blockcategories
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16717 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 12:14:03 +00:00
dMetzger 5900ba8d1c [-] Installer : crash with mysql strict mode fixed (datetime has a range of 1000-9999)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16715 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 12:05:58 +00:00
vAugagneur 04be7149e5 [-] BO : fixed bug #PSCFV-3439 part2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16714 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 10:14:41 +00:00
fBrignoli 0d50493737 [-] BO : AdminProductController::updateTags has no return value
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16713 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 09:52:02 +00:00
dMetzger 6ea5d45b39 [-] FO : fixed warning when a discount wasn't associated to any reduction type (shipping, currency, percentage)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16712 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 09:47:53 +00:00
rGaillard 0b374458ec [-] BO: fix PSCFV-3468 bad real quantity was displayed on Instant Stock Status
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16711 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 09:44:07 +00:00
dMetzger 88823dc5eb [-] FO : double escape removed #PSCFV-3530 (already done in the controller)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16710 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 09:32:32 +00:00
mDeflotte c72240fb9f [-] FO : #PSCFV-PSCFV-2598 - Fix bug with features not ordering by position
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16709 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 09:29:29 +00:00
vChabot b7baa30c6c [-] TR : BugFix : #PSCFV-3470 : french mispelling
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16707 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 09:09:45 +00:00
mDeflotte d7eba5476f // Fix bug guest tracking using SSL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16705 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 08:41:00 +00:00
mDeflotte fa8e87432a // Refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16704 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 08:23:39 +00:00
vAugagneur 0cca874c81 [-] BO : fixed bug #PSCFV-3439
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16702 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-06 08:13:40 +00:00
rGaillard af786b1e0a // Fix random bugs with stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16693 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 17:15:19 +00:00
rGaillard ccec86cb0b [-] BO: Fix PSCFV-3384 bad count of product on admin suppliers listing
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16689 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 15:24:45 +00:00
rGaillard 18e8b087d3 [-] Core: Fix PSCFV-3092
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16687 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 14:40:31 +00:00
vAugagneur 0817e3bc08 [-] BO : fixed bug #PSCFV-3466
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16686 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 14:09:06 +00:00
mDeflotte b76c949926 [-] FO : #PSCFV-3392 - Bad CSS syntax
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16683 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 13:41:47 +00:00
vAugagneur 18c576ff5b [-] FO : fixed bug #PSCFV-3189
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16682 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 12:47:28 +00:00
mDeflotte 3e76816edb [-] BO : #PSCFV-3474 - Force ajax request to be synchron
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16681 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 12:45:52 +00:00
fBrignoli 3b6b4c174c [-] MO : Blockspecials - Bug Fixed #PSCFV-3360 - Price displayed even in catalog mode
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16680 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 09:42:20 +00:00
vAugagneur 54b631fc78 [-] MO : fixed bug #PSCFV-3010
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16679 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 08:39:53 +00:00
vAugagneur 4efb673969 [-] BO : fixed bug #PSCFV-3437
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16678 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 08:30:04 +00:00
dMetzger d69c97f145 // This bug should not happen, but sometimes it does ^^ #PSCFV-3452
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16677 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 08:10:21 +00:00
dMetzger a8263ee9ad // Filled a default message in customer privacy #PSCFV-3471
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16676 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 07:56:35 +00:00
vAugagneur 2c960d9bee [-] BO : fixed bug #PSCFV-3457 - part2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16675 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 07:56:18 +00:00
vAugagneur 747cfd729b [-] BO : fixed bug #PSCFV-3457
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16674 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-03 07:55:45 +00:00
dMetzger e8ad797150 // 1.5.0.15
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16671 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 17:56:49 +00:00
vChabot 49c1f7e870 [-] BO : BugFix : #PSCFV-3142 : Admin Tracking displaying categories from other shops
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16670 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 15:49:55 +00:00
vAugagneur ae58669d4a //oups first release
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16669 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 15:16:23 +00:00
vAugagneur 13f0dc7403 // CHANGELOG
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16668 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 15:11:17 +00:00
rGaillard 2107741896 // Delete context selection on AdminWarehouses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16667 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 15:01:02 +00:00
vAugagneur c4c69c3aee //fixed create root category
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16666 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 14:53:47 +00:00
lLefevre 0ffbb332c5 // Fix small bug when import supplier && manufacturer
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16665 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 14:51:28 +00:00
fBrignoli e0a39bed57 // missing comas #PSCFV-3464
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16663 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 13:24:33 +00:00
lLefevre 98f5c3629a // List front controllers recursively for add a new URL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16662 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 09:59:10 +00:00
mDeflotte 34428a7dab [-] FO : #PSCFV-3268 - Fix bug with cache and cart rule discount calculation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16661 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 09:07:18 +00:00
dMetzger f9258b8779 [-] Core : Swift exception(s) handled #PSCFI-6121
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16660 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 08:34:05 +00:00
vAugagneur c8d1619d0a //new cart icon in module list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16659 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-02 08:24:41 +00:00
vAugagneur 77a78537e7 //small link fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16654 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 16:08:35 +00:00
lLefevre 4bdeb8dce7 // Add translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16653 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 15:43:49 +00:00
lLefevre 1728cd923b // Fix a display error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16652 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 15:37:33 +00:00
vAugagneur 96bf42e183 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16651 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 15:36:11 +00:00
vChabot 90a3cc6a45 // fixing SQL #PSCFV-3366
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16650 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 15:28:23 +00:00
rGaillard 7149dacb74 [-] BO: Fix PSCFV-2994
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16648 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 14:43:44 +00:00
lLefevre a30d9539a2 // Remove Smarty comments for use checkbox button
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16647 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 14:17:38 +00:00
lLefevre f8117d50ce // Add translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16646 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 13:02:25 +00:00
vAugagneur 22d1771142 //Added more info on category for shop configuration
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16645 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 12:58:58 +00:00
rGaillard 793cdb720c // Small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16644 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 12:11:48 +00:00
dMetzger 8d8593d3de // #PSCFV-3434 but still need to refresh the page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16643 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 12:03:32 +00:00
dMetzger 9158cadf6c // Small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16642 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 11:36:09 +00:00
vChabot 2366a2cc8a // fixing condition on "add root category" URL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16641 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 10:04:05 +00:00
rGaillard 100703b2f8 // Small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16640 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 09:58:49 +00:00
mDeflotte 24421b248f // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16639 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 09:44:52 +00:00
mDeflotte 7767a81011 // Remove block my account from left column
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16638 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 09:23:07 +00:00
lLefevre a920359f1d // Performance when use getLinkRewrite() for categories
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16637 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 09:15:53 +00:00
mDeflotte 66dc8389dd [-] BO : #PSCFV-3366 - Not possible to create customizable fields on multishop context
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16635 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 08:15:35 +00:00
lLefevre 218236c1ee [-] TR : fix #PSCFV-3403 : check if is an object before loading stock data
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16634 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 07:45:00 +00:00
mDeflotte f0c11404bb // Blocklayered - Fix bug with ajax call on the BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16632 b9a71923-0436-4b27-9f14-aed3839534dd
2012-08-01 07:30:07 +00:00
dMetzger e930b5d08f // Perfs improved
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16629 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 16:32:44 +00:00
rGaillard 0f56795f2f // Increase typewatch wait time on backoffice orders PSCFV-3349
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16628 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 12:46:29 +00:00
rGaillard ea35da0a1a // Small fix context is all when multishop is not activated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16627 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 12:33:43 +00:00
lLefevre fce1d9a60d [-] TR : fix #PSCFV-3436
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16625 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 12:23:51 +00:00
fBrignoli f4d03c95db [-] FO : Bug Fixed #PSCFV-3417 - Wrong total order price calculation with tax disabled
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16624 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 12:18:10 +00:00
lLefevre a22276d161 [-] TR : fix #PSCFV-3425
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16623 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 10:01:03 +00:00
rGaillard d16dfdab01 [-] BO: Fix PSCFV-3315 bad invoice after deleting a product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16622 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 09:47:09 +00:00
vAugagneur 62c3e09cc6 [+] BO : added new cool feature
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16619 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 09:30:30 +00:00
rGaillard b37a36eba5 [*] Core: you can now associate modules to order states in order to add extra mail vars
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16618 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 09:18:41 +00:00
dMetzger 58f7fb1c03 [-] MO : blockcart retrocompatibility
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16617 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 08:43:21 +00:00
fBrignoli cd14749055 [-] FO : Bug Fixed #PSCFV-3407 - Only index page allows an empty url_rewrite
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16616 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 08:40:16 +00:00
dMetzger 656f87440d [-] MO : blockadvertising update did not update the image extension #PSCFV-3355
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16615 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 07:58:27 +00:00
mDeflotte b57854c3da [-] FO : #PSCFV-3388 - Fix bug with js product combination id
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16614 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-31 07:15:16 +00:00
rGaillard 22d4e61e54 // Fix currency storage in backoffice orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16611 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-30 15:32:22 +00:00
rGaillard 2ce01cc89e [-] BO: Fix PSCFV-3345 display of prices with a currency different than default on backoffice orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16610 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-30 15:24:29 +00:00
aFolletete 78a39a3fbc [-] BO : fixed bug #PSCFV-3376 - BO - Dashboard - Information message wich is sending to a forbidden access page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16609 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-30 15:16:18 +00:00
dMetzger 8f2f4b3be4 // Translation fixed #PSCFV-3419
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16607 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-30 14:48:08 +00:00
dMetzger 121d9abc2c [-] BO : you could not remove a gift once it had been set #PSCFV-3420
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16606 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-30 14:35:59 +00:00
rGaillard ee34eeab59 [-] BO: Fix PSCFV-3217 SQL error on Instant Stock Status
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16604 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-30 13:38:35 +00:00
vChabot 7c9d4ee5db [-] FO : BugFix : #PSCFV-3283 : Customer group deleted when updating personnal informations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16601 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-30 12:21:52 +00:00
lLefevre d62949ed65 [-] TR : fix #PSCFV-3374
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16599 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-27 14:14:07 +00:00
lLefevre 356348f90a // Fix a mistake
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16598 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-27 13:49:22 +00:00
mDeflotte a3f9f55291 [-] FO : #PSCFV-3362 - Order detail ajax call must use SSL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16597 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-27 13:43:34 +00:00
vAugagneur aebc243b87 [-] BO : fixed bug #PSCFV-3383
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16596 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-27 12:36:02 +00:00
vAugagneur c45bbc958c [-] BO : fixed bug #PSCFV-3142
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16590 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 14:18:01 +00:00
mDeflotte 1384d579d4 [-] FO : #PSCFV-3365 - Add missing vars assigned to the tpl on refreshing carrier durring account creation on the OPC
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16589 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 14:06:01 +00:00
lLefevre 57ff2be0e5 [-] TR : fix #PSCFV-3358
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16588 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 14:05:50 +00:00
vAugagneur 116221b382 //fixed bug "this product does not exist in this shop."
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16587 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 14:03:08 +00:00
mDeflotte 0835613ee2 [-] FO : #PSCFV-3365 - Add missing vars assigned to the tpl on refreshing carrier durring account creation on the OPC
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16586 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 13:58:58 +00:00
vChabot f07f7712af // fixing sql error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16585 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 13:56:20 +00:00
vChabot 7fca32e3dc [-] BO : BugFix : #PSCFV-3334 : Price Rules : Catalog Price Rules - In condition group when you want to make a condition with categories, in the list appears every categories from every stores
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16584 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 13:52:05 +00:00
vAugagneur 13b93ddaef [-] BO : fixed bug #PSCFV-3338
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16583 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 13:46:19 +00:00
vAugagneur db081565c3 [-] BO : fixed bug #PSCFV-3352
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16582 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 13:03:54 +00:00
mDeflotte 0a30c492fd [-] FO : #PSCFV-3356 - Update delivery price on selecting a free shipping option
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16581 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 12:52:02 +00:00
vAugagneur bca8b9d275 [-] BO : fixed bug #PSCFV-3342
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16580 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 12:07:42 +00:00
lLefevre 6e027b2d19 [-] TR : fix #PSCFV-3229
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16579 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 09:56:43 +00:00
vAugagneur 26624d9f2f [-] BO : fixed bug #PSCFV-3352
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16578 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 09:20:37 +00:00
mDeflotte 02fac949bf [-] BO : #PSCFV-3213 - Fix bug with FO product url on the BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16577 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 08:29:44 +00:00
lLefevre ae796bedfa [-] TR : fix #PSCFV-3253
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16576 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-26 07:50:24 +00:00
mDeflotte b51a097ae0 [-] FO : #PSCFV-3318 - Guest Tracking retrocompatibility with old theme
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16574 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 15:46:08 +00:00
vAugagneur 9e54583319 [-] BO : fixed bug #PSCFV-3336
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16573 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 15:44:09 +00:00
lLefevre d3529c7d73 // Fix bug when use the combination import by CSV file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16572 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 15:38:10 +00:00
mDeflotte a1d01b0986 [-] FO : #PSCFV-3242 - Add PS version in cookie hach name
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16571 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 15:30:47 +00:00
vChabot f03879cdf2 [-] FO : BugFix : #PSCFV-3332 : Error for multiple store products
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16570 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 14:23:18 +00:00
fBrignoli d30f381961 [-] BO : Bug fixed related to #PSCFV-2954 - order slip do not include VAT on carriers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16569 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 13:57:15 +00:00
lLefevre 57dcc5b694 // Fix bug when use the product import by CSV file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16568 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 13:53:43 +00:00
aFolletete e056653fed [-] Classes : fixed bug #PSCFV-3260 - Bug when add product to existing order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16567 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 13:53:42 +00:00
mDeflotte ad4c7dec2b [-] FO : #PSCFV-3318 - Guest Tracking must use order reference and not order id
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16566 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 13:00:43 +00:00
mDeflotte f782f88006 [-] FO : #PSCFV-3318 - Guest Tracking must use order reference and not order id
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16565 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 12:11:25 +00:00
fBrignoli bd28cc6e4b [-] MO : Watermark - Bug Fixed #PSCFV-2770 - Watermark is not working
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16564 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 09:30:56 +00:00
lLefevre 9665448bd2 [-] TR : fix #PSCFV-3269 : remove call to PSQL() which is unnecessary
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16563 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 09:02:39 +00:00
lLefevre ff0bdb5532 [-] Bo : replace constant _PS_THEME_DIR_ by _PS_MAIL_DIR_ when send a email
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16562 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 08:34:17 +00:00
mDeflotte 6b62f6c3ed // By 1.5.1 we means certainly 1.5.0.1
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16561 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 08:03:42 +00:00
dMetzger 34c85b6114 [-] WS : creation of new product combination returned an error #PSCFV-3333
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16560 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 07:21:23 +00:00
vAugagneur 8b459e499e //remove unused code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16559 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-25 07:09:36 +00:00
dMetzger a90af8cd44 // Quick patch for multishop_specific / need to be check by vAugagneur #PSCFV-3329
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16556 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 17:48:18 +00:00
vAugagneur 7eec6c7294 //fixed multishop CRUD bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16555 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 16:45:52 +00:00
vChabot acb7dd35ed [-] BO : BugFix : #PSCFV-3235 : Multistore : unable to duplicate a product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16552 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 15:40:14 +00:00
mDeflotte 691d6b3851 // #PSCFV-3327 - Fix little bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16551 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 15:06:51 +00:00
lLefevre 785834c4e1 // small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16550 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 15:04:27 +00:00
lLefevre f2233e08d0 [-] BO : fix #PSCFV-3278 : add a parameter id_shop in a method Mail::send() && normalize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16549 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 14:13:11 +00:00
dMetzger 096bc90802 [-] BO : cart rules are now cleaned when a component of a product rule (like a product, a category, a supplier...) is deleted
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16548 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 13:11:56 +00:00
mDeflotte 412cae1d51 [-] FO : #PSCFV-3268 - Fix bug with cache cartrule badly fill
// This fix is not "clean". It would be intersting to take more time to found a better solution

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16547 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 13:08:44 +00:00
mDeflotte 63737a93ec [-] FO : #PSCFV-3083 - Fix bug with quantity update on cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16546 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 12:13:06 +00:00
fBrignoli 14615f68cf [-] BO : Bug Fixed #PSCFV-3125 - Fields already filled when creating a new supplier
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16545 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 12:01:59 +00:00
lLefevre 6a8af608ed [-] TR : fix #PSCFV-3200
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16544 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 09:34:52 +00:00
dMetzger 7e2e5caf20 [-] FO : fixed price display precision in the product sheet template #PSCFI-6111
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16543 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 09:11:29 +00:00
lLefevre d2a11f04a4 [-] BO : fix #PSCFV-3280
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16542 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 09:02:36 +00:00
dMetzger 87bd54df2d [-] BO : inappropriate condition fixed for module access #PSCFV-3312
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16541 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 08:47:00 +00:00
dMetzger 8fce66e370 [*] BO : sending a mail is a little less strict with wrong parameters - it tries to send the e-mail, not to die!
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16539 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 08:23:25 +00:00
vAugagneur eb398f1a9f //norme
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16538 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 08:23:21 +00:00
vAugagneur 9db5f5729a //small improvement
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16537 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 08:18:28 +00:00
lLefevre d6df4781c5 [-] BO : Product : add missing properties
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16536 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 07:57:42 +00:00
mDeflotte a4c8e9823f [-] BO : #PSCFV-3206 - Add description for the field "Shop name" on the shop configuration.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16535 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-24 07:42:50 +00:00
lLefevre 66757871af [-] BO : fix #PSCFV-3207 && normalize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16530 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 15:06:06 +00:00
vAugagneur 9986903af7 [-] BO : fixed bug #PSCFV-3261
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16529 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 14:18:01 +00:00
dMetzger da117efe58 [*] BO : you can now disable automatic indexation of the products #PSCFV-3258
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16528 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 10:55:35 +00:00
lLefevre 6a5d3f8e0e [-] BO : fix #PSCFV-3284
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16527 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 09:48:37 +00:00
fBrignoli 27780c81b4 [-] BO : Bug Fixed #PSCFV-3270 - CSV Import addresses + multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16526 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 09:11:56 +00:00
vAugagneur 791b15dc07 //small import improvement
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16525 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 09:08:04 +00:00
lLefevre a33e23e100 [-] BO : fix #PSCFV-3244
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16524 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 08:39:25 +00:00
vAugagneur a32bd610ab [-] BO : fixed bug #PSCFV-2826
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16523 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 08:25:56 +00:00
dMetzger fdcd40e055 [-] installer : missing italian translations #PSCFV-3289
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16522 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 07:42:36 +00:00
dMetzger 4f2683dfa6 [-] MO : multishop update for sekeywords #PSCFV-3271
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16521 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-23 07:36:49 +00:00
lLefevre cc0dd39784 [-] BO : fix #PSCFV-3244
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16511 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-20 14:29:16 +00:00
lLefevre f9dac67c18 [-] BO : fix #PSCFV-3276
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16510 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-20 14:16:54 +00:00
mDeflotte fe2542ef07 [-] MO : #PSCFV-3274 - Blockcart, fix bug with gift products
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16508 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-20 13:37:01 +00:00
lLefevre 39d14f3713 [-] BO : fix #PSCFV-3277
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16507 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-20 12:43:09 +00:00
aFolletete c766c393a1 // fixed little issue on wishlist
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16506 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-20 12:42:53 +00:00
aFolletete 4f9c604d33 // fixed backward compatibility issue
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16505 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-20 12:41:20 +00:00
vChabot ce5109ea1d [-] FO : BugFix : #PSCFV-3182 : In 5 steps order process, when login, the 5 steps are displaying but they should not.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16504 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-20 09:17:22 +00:00
mDeflotte 4c5328f03d [-] MO : #PSCFV-3274 - No links to remove discounts without code in module blockcart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16503 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-20 08:54:47 +00:00
rGaillard 00ae6f21d9 // This is now not possible to delete default shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16499 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 16:24:59 +00:00
rGaillard 9273c14e87 // Small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16497 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 15:28:17 +00:00
rGaillard 4e39c6d41e [-] BO: Fix PSCFV-3095 display of gifts product on backoffice order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16496 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 14:03:56 +00:00
mDeflotte 863e540c0d [-] FO : #PSCFV-3267 - Summary ajax return do not contain the correct price without discount
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16495 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 13:44:06 +00:00
rGaillard 988f0480eb [-] BO: Fix PSCFV-2682 BackOffice order with customized datas on windows
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16493 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 13:12:15 +00:00
rGaillard c17d577131 // Fix PHP notice
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16491 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 12:35:51 +00:00
fGaillard 63a11e0bb4 // Link added on premium activation optional parameter
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16490 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 12:27:49 +00:00
rGaillard cfb8b89481 // Fix various bugs with customized products in backoffice order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16489 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 12:26:04 +00:00
fGaillard 3ce1a5e5d9 // Premium activation optional images added (PayPal)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16488 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 12:17:43 +00:00
mDeflotte ace372812d // Moving displayJavascriptAlert() to the end of Ajax.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16487 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 12:17:03 +00:00
mDeflotte b519556a62 // Blocklayered: Fix bug with noindex
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16486 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 10:07:29 +00:00
rGaillard bb704d1550 [-] BO: Fix smarty error with customized datas on orders view when product have no image
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16485 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-19 09:27:21 +00:00
vChabot b269ebe1a9 [-] BO : BugFix : #PSCFV-2205 : Combination attributes are displayed as many time as they are associated to a shop.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16476 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 15:35:51 +00:00
mDeflotte f01147ebd8 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16475 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 14:33:14 +00:00
lLefevre b8184785d1 [-] BO : fix #PSCFV-3243
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16474 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 14:29:09 +00:00
mDeflotte 0c0fa767b5 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16473 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 14:27:55 +00:00
mDeflotte 4ec108f632 // Blocklayered: Translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16472 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 14:17:45 +00:00
mDeflotte fb4b137f65 // Blocklayered: Add option no-index to filter category
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16470 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 13:54:13 +00:00
lLefevre 723320062b [-] BO : fix #PSCFV-3190
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16469 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 13:03:06 +00:00
lLefevre e6b13787f3 [-] BO : fix #PSCFV-3194
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16468 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 09:53:54 +00:00
lLefevre 810692e577 [-] BO : fix #PSCFV-3244
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16467 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 09:17:33 +00:00
mDeflotte 8c991aea82 [-] BO : #/PSCFV-3246 - Change french translation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16466 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 09:05:01 +00:00
mDeflotte d084167163 [-] BO : #PSCFV-3247 - Fix link to edit customer profile
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16465 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 08:54:30 +00:00
mDeflotte 29ec710ed1 [-] MO : #PSCFV-3223 - Fix bug with blocktags module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16464 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 08:44:08 +00:00
mDeflotte d94785b76a // Fix bug with Product::priceCalculation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16463 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-18 08:40:09 +00:00
fBrignoli 23a13e7121 [-] PDF : Bug Fixed #PSCFV-3225 - Translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16459 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 15:45:58 +00:00
mDeflotte d7bd6c7181 [-] BO : #PSCFV-3234 - Change error message
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16457 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 14:39:33 +00:00
mDeflotte b87f534566 // Little fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16456 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 14:15:51 +00:00
fBrignoli b2ba507b03 [-] BO : Bug Fixed ##PSCFV-3128 - part 2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16455 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 14:14:24 +00:00
rGaillard 506117423f // Fix small bug on product page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16454 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 12:27:54 +00:00
fBrignoli 26c3e81764 [-] BO : Bug Fixed #PSCFV-3128 - Incorrect voucher value via product return
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16453 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 09:31:11 +00:00
lLefevre 7a20095102 [-] BO : fix #PSCFV-3200
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16452 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 09:23:25 +00:00
mDeflotte e6cdcfd266 [-] FO : #PSCFV-2746 - Improve product return errors
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16451 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 08:49:13 +00:00
mDeflotte 303bfdd00c // Fix little bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16450 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-17 08:41:38 +00:00
rGaillard a606873630 [-] BO: Fix some bugs on advanced stock management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16446 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 18:29:34 +00:00
rGaillard 09cb7eff9b [-] BO: Synchronize stock when change associated warehouses to product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16445 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 17:27:40 +00:00
rGaillard 7a54d4b647 [-] BO: synchronise stock after transfert between 2 warehouses
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16444 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 16:37:19 +00:00
vAugagneur 78db02cafb //small import fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16443 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 16:01:32 +00:00
vAugagneur ba1e9b59e5 [-] BO : fixed bug #PSCFV-3202
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16442 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 15:35:32 +00:00
aFolletete 31bc0a7867 // clean code
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16441 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 14:31:24 +00:00
mDeflotte 367496bfe8 [-] BO : #PSCFV-3222 - Fix array unique strange working
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16439 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 13:44:38 +00:00
rGaillard ff27b55c3a // Delete useless file...
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16438 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 12:09:01 +00:00
rGaillard 1effa0b026 // Small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16436 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 10:08:28 +00:00
rGaillard 951a6ba171 [-] Core: Fix PSCFV-2695 advanced stock management fix when you have no warehouse
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16435 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 09:54:01 +00:00
rGaillard 8fbd0cc439 [-] Core: Fix PSCFV-2984 specific price rules are deleted on all products when you edit one
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16434 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 09:26:19 +00:00
vAugagneur fe99abfc57 //small import fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16433 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 09:14:41 +00:00
rGaillard 30ea30c6f4 [-] Core: Fix PSCFV-3161 storage specific prices in orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16432 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 08:29:59 +00:00
mDeflotte d5dfb4cfdb [-] BO : #PSCFV-3192 - Product::getAttributeGroups return duplicated attributes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16431 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 08:22:09 +00:00
vAugagneur 758a0cead8 [-] BO : fixed bug #PSCFV-3088 - customer import with multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16430 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-16 07:55:14 +00:00
rGaillard a711041580 // Small fixes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16426 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 18:25:39 +00:00
rGaillard 4e3dbfb5cb [-] BO: Fix random bugs on backoffice order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16424 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 17:23:58 +00:00
rGaillard f691d01bce // Fix combinations on product page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16423 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 16:27:28 +00:00
rGaillard e1c0bcf502 [-] BO: Fix PSCFV-3186
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16422 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 15:51:44 +00:00
rGaillard 17285402c3 [-] Core: Fix PSCFV-3161 stockage of reduction was bad in database
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16421 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 15:20:53 +00:00
dMetzger cd815caaed // #PSCFV-3185
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16420 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 15:14:59 +00:00
lLefevre 93a3b6f617 // Update translation in AdminImportController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16419 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 14:56:37 +00:00
lLefevre 75a19e7e26 [-] BO : fix #PSCFV-3198
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16418 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 14:45:36 +00:00
rGaillard 84941bc9a3 [-] FO: Fix bad non discounted price displayed on shopping cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16417 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 13:54:40 +00:00
fBrignoli 248efe091c [-] BO : Bug Fixed #PSCFV-3122 - Cart rules applied 2 times on shipping fees if the order is splitted
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16416 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 13:42:21 +00:00
rGaillard 7828d5990c [-] BO: Fix bug with combinations on changing price impact
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16414 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 13:23:56 +00:00
lLefevre 8dbc25825e // Fix small bug when export language pack
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16413 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 13:17:43 +00:00
rGaillard f7ffb002df [-] Core: Fix PSCFV-3138 sometime product price setted to 0 on combinations with specific prices
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16412 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 13:07:58 +00:00
mDeflotte cab8b2b251 [-] BO : #PSCFV-3192 - Product::getAttributeGroups return duplicated attributes
// Fix little bug

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16411 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 12:35:52 +00:00
mDeflotte 681302369f [-] MO : #PSCFV-3193 Blocktopmenu - Fix css bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16410 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 11:56:58 +00:00
rGaillard ad370ee93c [-] FO: Fix PSCFV-3114 bad quantity discount applied with specific price rules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16409 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 10:12:25 +00:00
mDeflotte d2cfbf4c88 // Fix little bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16408 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 09:35:10 +00:00
mDeflotte 6ecc41aef2 // Fix little bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16407 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 09:32:29 +00:00
mDeflotte 15d23c2bef // Fix little bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16406 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 09:29:46 +00:00
mDeflotte 0dacaa5802 // Blocklayered: Fix little bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16405 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 09:27:33 +00:00
rGaillard 2cd8a77b6c [-] Core : Delete stock_available for combinations in the import
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16404 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 08:58:51 +00:00
rGaillard d29a1efd19 [-] Core : Fix PSCFV-2898 delete stock_available after combination deletion
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16403 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 08:52:42 +00:00
lLefevre c7fe97d5d3 [-] BO : fix #PSCFV-3102
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16402 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 08:23:39 +00:00
mDeflotte b572d67367 // Add tabs traduction files
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16401 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 08:09:16 +00:00
mDeflotte bb73414e79 // Remove unuseful template lines
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16400 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 08:08:23 +00:00
mDeflotte 3a72ee0d5d // By default module blockcart is on the right collumn
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16399 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 08:04:05 +00:00
mDeflotte 6c39413878 // Change commentary
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16398 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 08:01:59 +00:00
mDeflotte a342ee66f2 // Fix little css bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16396 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 07:58:18 +00:00
dMetzger e832255c15 [-] BO : original product price was not set in the order detail table #PSCFV-3159
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16395 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 07:37:15 +00:00
dMetzger 0992092a83 // Remove doubled semi-colons #PSCFV-3185
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16394 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-13 07:14:58 +00:00
fGaillard 7dc2d930ac [-] MO : #PNM-293 : Block CMS bug fix (contact url)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16391 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 21:11:48 +00:00
dMetzger cfd04410e3 // Fixed warning
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16389 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 17:54:09 +00:00
dMetzger eb86772dd5 [*] MO : missing logo added #PSCFV-3010
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16388 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 17:17:08 +00:00
fBrignoli 2628e92f50 // missing file
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16387 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 16:48:54 +00:00
fBrignoli 7af140d285 [-] PDF : Canadian taxes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16386 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 16:45:14 +00:00
dMetzger cf395ce0ca // Translation #PSCFV-3183
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16385 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 16:42:57 +00:00
lLefevre 2500044f02 [-] BO : fix #PSCFV-3143
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16384 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 16:12:41 +00:00
lLefevre e5a9972694 [-] BO : fix #PSCFV-3145
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16383 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 16:07:53 +00:00
dMetzger ca50c363a3 // Localization pack updated #PSCFV-1916
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16382 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 15:54:31 +00:00
dMetzger 61d4e45a1a [-] BO : fixed problem with case sensitive path #PSCFV-3179
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16381 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 15:15:12 +00:00
dMetzger aabef58c30 [-] BO : fixed alt text for duplication #PSCFV-3180
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16380 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 15:12:29 +00:00
vChabot 65858ff28c [-] BO : BugFix : #PSCFV-3178 : Attributes are duplicated in the attribute value creation form dropdown list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16378 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 14:42:18 +00:00
lLefevre 055f87d757 [-] BO : #PSCFV-3175 : fix price excluded when import product width specific price
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16376 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 14:07:07 +00:00
dMetzger 0473de59d3 // Remove double #PSCFV-3172
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16375 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 13:47:45 +00:00
lLefevre 248c4e9c9e [-] BO : fix strict standard #PSCFV-3173
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16374 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 13:05:20 +00:00
mDeflotte dc35aaa83c [-] BO : #PSCFV-3000 - Send an email on changing an order from the BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16372 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 12:05:19 +00:00
lLefevre 9bc7869e2b [*] TR : update English translations key for Errors
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16371 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 10:14:41 +00:00
lLefevre a594a9a21d [*] TR : update English translations key for Modules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16370 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 10:08:13 +00:00
lLefevre 75cbe6f6ec [*] TR : update English translations key for Back Office
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16369 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 10:04:56 +00:00
lLefevre 93a30017e8 [*] TR : update English translations key for Front Office
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16367 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 09:51:03 +00:00
lLefevre 6034497158 [*] TR : update Italian translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16365 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 08:34:34 +00:00
lLefevre f12b0a3b3d [*] TR : update Spanish translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16364 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 08:27:31 +00:00
lLefevre c15f528f78 [*] TR : update Deutsch translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16363 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 08:20:34 +00:00
lLefevre 06a0953eef [*] TR : update french translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16362 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 08:12:39 +00:00
vChabot 6723ecce83 [-] BO : BugFix : #PSCFV-3069 : OrderDetail->purchase_supplier_price is not saved in DB
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16361 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 08:01:04 +00:00
dMetzger d975f571b3 [-] BO : patch to grid engines fixed #PSCFV-3153
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16360 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 07:44:54 +00:00
dMetzger 5761c8af29 [-] BO : fixed access rights in employee permissions #PSCFV-3157
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16359 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-12 07:33:27 +00:00
fBrignoli 71d5f6fbe5 [-] BO : Bug Fixed #PSCFV-3090 - Outstanding exception in the outstanding tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16356 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 16:28:40 +00:00
fBrignoli 33d172e720 [-] BO : Bug Fixed #PSCFV-3093 - typo in JS
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16355 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 16:11:47 +00:00
dMetzger 66e01b5f67 [-] BO : product state did not show in the back office search #PSCFV-3150
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16354 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 15:54:17 +00:00
rGaillard f39226c85e // Fix some bug on advanced stock management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16353 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 15:46:39 +00:00
vChabot 3940cb70ce [-] BO : BugFix : #PSCFV-3120 : Multishop : employees without shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16351 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 15:40:04 +00:00
rGaillard d6937e9d94 // Fix bad variable name on PaymentModule.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16350 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 15:30:18 +00:00
rGaillard 2eaea9cb80 [-] FO: Fix dispatcher which not allow underscores on rewrited urls
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16349 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 15:09:51 +00:00
lLefevre 040ff69c10 [-] BO : fix #PSCFV-3022
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16348 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 14:50:29 +00:00
gCharmes c5a85a4cfa [-] BO : Fix the graph engine path
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16347 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 14:38:58 +00:00
mDeflotte 713fd39fcc [-] BO : #PSCFV-3146 - Customer Thread, fix encoding chars bugs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16346 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 14:17:19 +00:00
mDeflotte 511cfac95a [-] BO : #PSCFV-3146 - Customer Thread, fix encoding chars bugs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16345 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 14:17:03 +00:00
lLefevre b0f363bcc3 [-] BO : fix #PSCFV-3022
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16344 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 14:16:28 +00:00
mDeflotte c9592c4101 [-] BO : #PSCFV-3064 - Fix bug on creating order using a cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16342 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 13:33:23 +00:00
dMetzger 38cc37536d [-] MO : fixed deprecated link in blocktopmenu (search form)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16341 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 13:32:15 +00:00
lLefevre e0d1459701 [-] BO : fix #PSCFV-3106 : Patchouli mistake
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16339 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 13:04:42 +00:00
dMetzger 9fae45b209 [-] BO : advanced stock management should not appear when the advanced stock management is deactivated #PSCFV-3141
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16338 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 12:47:29 +00:00
dMetzger 2acb3d6f5f // Improvement of the fix of a previous bug #PSCFV-2804
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16337 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 12:43:28 +00:00
dMetzger 71bd9ce8a1 // Old code cleaning & #PSCFV-3144
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16336 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 12:37:12 +00:00
mDeflotte 3ab0e214b5 // Removing debug call
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16335 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 12:34:43 +00:00
vChabot 1fe456ce71 [-] BO : BugFix : #PSCFV-3031 : Unable to edit categories from the list
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16333 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 12:17:21 +00:00
dMetzger 15a5e7fa6c [*] FO : better management in the priority between the cart rules #PSCFV-2804
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16332 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 10:07:16 +00:00
lLefevre f106616521 [-] BO : fix #PSCFV-3046
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16331 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 10:00:34 +00:00
mDeflotte 73728fe9b4 [-] MO : #PSCFV-3049 - Fix Bug with module block search
// Removing code duplication

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16329 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 09:58:10 +00:00
vChabot b08fb5ab7f [-] BO : BugFix : #PSCFV-3033 : attributes and values in multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16328 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 09:13:56 +00:00
vChabot 8bf12a6daa [-] BO : BugFix : #PSCFV-3033 : features in multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16327 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 08:52:53 +00:00
mDeflotte b2a616aba3 [-] FO : #PSCFV-3121 - New JS vars baseUri. This vars must be used instead of baseDir for ajax queries.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16326 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 08:48:28 +00:00
lLefevre 2016c46568 [*] BO : #PSCFV-2671 : Added a new currency format for Switzerland
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16324 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 08:20:23 +00:00
dMetzger 9e5da97084 [-] Installer : changed Guam zone #PSCFV-3134
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16322 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-11 08:01:08 +00:00
vSchoener 8c0a47ef3a [-] CORE : Fixed bug #PSCFV-2862. onclick evet properly calle.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16317 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 15:52:52 +00:00
mDeflotte 2f17afcc30 [-] FO : #PSCFV-3034 - Add return quantity to order detail
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16312 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 14:09:18 +00:00
mDeflotte b5a0c212de // Translation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16311 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 14:06:44 +00:00
mDeflotte 073808a853 // Fix little bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16310 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 14:05:03 +00:00
lLefevre 73adcdf9b0 [-] BO : fix #PSCFV-3127
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16309 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 13:57:00 +00:00
rGaillard 4f7f921120 [-] FO: Fix lang links when url rewrite is not activated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16308 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 13:29:02 +00:00
lLefevre 868eaa32fd // Fix translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16307 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 13:03:23 +00:00
dMetzger b284210026 // Payment module now fully use the context #PSCFV-2845
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16306 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 12:54:33 +00:00
lLefevre 8d4efa7dec [-] BO : fix #PSCFV-3131
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16305 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 12:31:20 +00:00
dMetzger a37c3bfea2 // Block advertising module rewritten for multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16304 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 10:05:14 +00:00
lLefevre 2f361c3bde [*] BO : #PSCFV-3007 : Now you can create a voucher when you create a partial refund on the BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16303 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 10:03:35 +00:00
rGaillard 7597decfba [-] FO : fix PSCFV-2948 display of specific prices on the product for combinations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16302 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 09:57:47 +00:00
mDeflotte 1dec53057d [-] BO : #PSCFV-3126 - Change mail object. Mail object must be unique for a specific template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16301 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 09:38:20 +00:00
vChabot 954d067119 [-] MO : BugFix : #PSCFV-2831 : ProductComments module : css override #fancybox-wrap and #fancybox-content
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16300 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 09:31:58 +00:00
rGaillard f5a192e27e [-] FO: fix display of quantity discount prices
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16299 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 09:09:15 +00:00
mDeflotte 8abbcecc54 [-] Installer : #PSCFV-3042 - Fix bug with installer and hook_module position
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16298 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 09:04:24 +00:00
vAugagneur a1923c21a7 //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16297 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 09:01:22 +00:00
vChabot f8408b1099 [-] FO : BugFix : #PSCFV-2837 : City not displaying in address selection of checkout process
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16296 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 08:46:45 +00:00
dMetzger 744a221075 // Changed the way the multistore associations are loaded, far from perfect, but still better and overridable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16295 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-10 07:11:16 +00:00
mDeflotte e8b686d928 [-] BO : #PSCFV-3112 - Fix bug with payment by cheque and multishipping
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16294 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 16:30:12 +00:00
dMetzger 649cb9af43 // Changed the name of a multishop variable to multishop_specific, in order to avoid confusion
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16293 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 15:48:22 +00:00
rGaillard 8343cb58d5 [-] BO: Fix combinations creation on multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16292 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 15:41:07 +00:00
lLefevre 1b72cbdee1 [-] BO : fix #PSCFV-3116
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16291 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 15:39:08 +00:00
lLefevre b06cb8d6e2 [*] BO : Added translation for the template which are overridden on the BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16290 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 14:32:04 +00:00
vChabot 7c160a8073 [-] BO : BugFix : #PSCFV-2965 : Localization : updating default currency does not change currency on BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16289 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 14:18:12 +00:00
dMetzger 647070205b [*] BO : Added an override capability for the admin templates
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16288 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 14:12:37 +00:00
lLefevre 0296058d15 [-] BO : fix #PSCFV-3117
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16287 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 14:03:43 +00:00
lLefevre 03d4350fca [-] BO : fix #PSCFV-3101
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16286 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 13:55:13 +00:00
dMetzger c51c83edc0 [*] BO : added a new Validate method "isPercentage"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16285 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 13:05:31 +00:00
dMetzger acc15c9e55 [-] BO : you do not need to add the admin controller in the core, the override directory is enough
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16284 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 12:56:51 +00:00
mDeflotte 2ea9ef528f // Blocklayered: Fix bug with product order select on 1.5
// Theme 1.5: Fix bug on change product order with the select on the bottom of the page

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16282 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 12:41:38 +00:00
dMetzger 9074e8ed52 [*] BO : updated the "risk" class to the new 1.5 system (+several improvments)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16281 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 12:35:11 +00:00
mDeflotte e7f6e0f2b9 // Block contact: after a fresh install, phone number have a line break
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16280 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 12:28:32 +00:00
fBrignoli e802d2669a // clean
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16278 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 09:59:03 +00:00
fBrignoli 6d3bed914a [-] BO : Undefined tax calculator
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16277 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 09:48:58 +00:00
lLefevre 3c2973aa02 [*] TR : Update English translation : step 1
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16276 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 09:43:17 +00:00
fBrignoli ce3e408315 [-] PDF : Bug Fixed #PSCFV-2735 - Missing tax details in order slip
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16275 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 09:35:58 +00:00
mDeflotte fd02884d76 // Shipping line must not be hidded when shipping are offered
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16274 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 09:21:54 +00:00
vAugagneur a6a2c63aa9 [-] BO : fixed bug #PSCFV-2878 - Displaying wrong link in the SEO tab of a product using multistore
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16273 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 09:11:13 +00:00
mDeflotte 351e8f0eda [-] BO : #PSCFV-3111 - Avoid double click on saving button
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16272 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 09:10:04 +00:00
lLefevre a5f5a7fad7 [-] BO : #PSCFV-3039 : Add customer thread when i have a order message
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16271 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 08:46:11 +00:00
mDeflotte b8cf0fe3e4 [-] FO : #PSCFV-3100 - With OPC shpping cost are not refreshed correctly
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16270 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 08:07:46 +00:00
lLefevre 81e6d2c488 [-] BO : fix #PSCFV-2955
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16269 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-09 07:55:21 +00:00
mDeflotte ff23b59fe2 [-] FO : #PSCFV-3099 - Fix bug with multishipping on changing billing address
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16268 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 15:13:31 +00:00
vAugagneur b3b7a1f9b9 //small fix on block contact part 2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16267 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 15:12:49 +00:00
vAugagneur 249808e175 //small fix on block contact
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16266 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 15:11:25 +00:00
vAugagneur 099ad93161 //small multi-store fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16265 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 15:07:18 +00:00
lLefevre 88545619f2 [-] BO : Fix W3C errors
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16264 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 14:32:35 +00:00
mDeflotte 259f1e5fe7 [-] FO : #PSCFV-3079 - Change scene image size
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16262 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 13:12:28 +00:00
lLefevre ddbd363946 [-] BO : fix #PSCFV-3087
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16261 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 12:55:48 +00:00
mDeflotte 49ab58a185 // Avoid line break on prices
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16260 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 12:35:36 +00:00
mDeflotte 0b6ce64392 [-] BO : #PSCFV-3086 - Improve visibility of some elements on return details
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16259 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 12:25:03 +00:00
mDeflotte 8e198c6e74 [-] FO : #PSCFV-3083 - Fix bug on up/down quantity on the cart
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16258 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 09:10:51 +00:00
lLefevre 5de4802237 // Fix small bug when the product are not weight
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16257 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 08:49:13 +00:00
mDeflotte 042356615a [-] MO : #PSCFV-3059 - Block menu top invert add/remove item
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16255 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 08:11:10 +00:00
mDeflotte 7be37af016 // Fix little bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16254 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 07:43:44 +00:00
mDeflotte 7a2eeea33f [-] FO : #PSCFV-3016 - Fix bug on removing quantity of a product with a customisation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16253 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 07:40:32 +00:00
mDeflotte 53b29b879b [-] FO : #PSCFV-3016 - Fix bug on removing quantity of a product with a customisation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16252 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 07:20:12 +00:00
lLefevre b029115994 [-] BO : fix #PSCFV-3076
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16251 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-06 07:02:41 +00:00
fBrignoli 1341b40e5b [-] PDF : Bug Fixed #PSCFV-3044 - Images incorrectly displayed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16250 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 15:40:45 +00:00
lLefevre d3e2a6811a [-] BO : fix #PSCFV-3070
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16249 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 15:40:40 +00:00
lLefevre 991938edad [-] BO : #PSCFV-3036 : fix bug and fix notice and fix deprecated function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16248 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 15:35:13 +00:00
gCharmes ae4ebb9a1f [-] BO : FIx issue failling the multilang field length validation on products
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16247 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 15:30:14 +00:00
vAugagneur 2128d67569 //small fix on total_paid_real
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16246 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 15:23:45 +00:00
mDeflotte 51179caeff [-] MO : #PSCFV-3057 - Block cart: If no products, block cart is never displayed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16245 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 15:04:20 +00:00
dMetzger 64648e0826 [-] BO : Fixed SQL crash with an empty shop list #PSCFV-2946
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16243 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 14:18:22 +00:00
vAugagneur 0b98d953d2 //
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16242 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 14:12:52 +00:00
dMetzger 7b10eb5f32 [-] Installer : The boolean for the cart rule activation wasn't assigned correctly when updating from 1.4 to 1.5 #PSCFV-2847
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16241 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 14:08:22 +00:00
lLefevre 17d3312a60 // fix translation bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16240 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 13:45:06 +00:00
mDeflotte d1b864fa6f [-] FO : #PSCFV-3055 - Part 2 : Hidding shipping price if a cart rule make shipping free
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16239 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 13:44:48 +00:00
mDeflotte 923216dfa4 [-] BO : #PSCFV-3066 - Fix bug on selecting delivery option
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16238 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 13:20:38 +00:00
mDeflotte fd36dd7130 // Fix bug: undefined variable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16237 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 12:59:57 +00:00
vAugagneur 74b71ae1fb [-] MO : fixed #PSCFV-2978 - Block reinsurance shows incorrect when its text is changed to work with other language than English
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16236 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 12:42:15 +00:00
mDeflotte a1311dba2d [-] BO : #PSCFV-3055 - Part 1 : Improving displaying of resume cart (payment step)
[-] BO : #PSCFV-3055 - Part 1 : If there is a rules with free shipping, shipping prices are not displayed

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16234 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 12:40:40 +00:00
vAugagneur 98a0e4ddc1 [-] BO : fixed #PSCFV-3058 SAV multi fix part 2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16233 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 11:56:52 +00:00
vAugagneur 52b881723f [-] BO : fixed #PSCFV-3058 SAV multi fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16231 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 10:27:26 +00:00
lLefevre 28a95c3dd0 [-] BO : fix #PSCFV-2883
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16230 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 09:46:12 +00:00
vAugagneur bd3b4657f4 [-] BO : fixed #PSCFV-3005 - problems to create a shop for contact with multishop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16229 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 09:43:52 +00:00
lLefevre be6d51c91f [-] BO : fix #PSCFV-3032
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16228 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 09:02:14 +00:00
dMetzger 99f70c236e // Screencast deprecated #PSCFV-3003
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16227 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 08:59:47 +00:00
vAugagneur be8152e15b //fixed smarty cache on block category
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16226 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 08:55:41 +00:00
mDeflotte 17f7f1ade9 // Translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16225 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 08:45:12 +00:00
lLefevre 486e156a91 [-] BO : fix #PSCFV-3027
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16224 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 08:30:17 +00:00
lLefevre 20095a4276 [-] BO : fix #PSCFV-3041
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16223 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 07:58:23 +00:00
mDeflotte 1997bf6efb [-] BO : #PSCFV-3011 - Add details of refund and returned products on the BO order page.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16222 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 07:40:11 +00:00
vAugagneur 718e6a3b55 [-] BO : fixed #PSCFV-3043 - can't active language in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16221 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-05 07:22:31 +00:00
mDeflotte aa894d037b [-] FO : #PSCFV-2993 #PSCFV-2811 - Default carriers and carrier sorting where ignored
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16217 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 14:29:14 +00:00
mDeflotte 4d56b1a250 [-] FO : #PSCFV-2993 #PSCFV-2811 - Default carriers and carrier sorting where ignored
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16216 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 14:24:56 +00:00
fGaillard 8f02c15e0b // Cast added on Shop ID (int)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16215 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 13:44:36 +00:00
fGaillard 851fcb1dc0 [-] MO : #PNM-286 : Block top menu bug fix (Shop ID)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16213 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 13:16:01 +00:00
lLefevre b45cc923ad // Add tabs file when add a new language
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16209 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 09:47:24 +00:00
mDeflotte 72d36e4878 [-] FO : #PSCFV-3014 - On account creation, address delivery of all cart products must be set with the user address
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16206 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 08:35:41 +00:00
mDeflotte d3cb83022b [-] BO : #PSCFV-2925 - CMS tab, display notice "Array to string conversion" with php 5.4
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16204 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 08:06:39 +00:00
lLefevre 5582d8a1a9 [*] BO : Update Italian translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16203 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 07:37:06 +00:00
lLefevre d8c4a9013a [*] BO : Update Deutsch translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16202 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 07:33:50 +00:00
lLefevre f38fbe8d1a [*] BO : Update Spanish translations (#PSCFV-3024)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16201 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-04 07:27:52 +00:00
lLefevre 09db9501ae [*] BO : Update Italian translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16199 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 16:14:41 +00:00
lLefevre 7a5a1eae90 [*] BO : Update Deutsch translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16198 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 16:05:43 +00:00
fBrignoli 1af491ee06 [-] BO : Bug Fixed #PSCFI-5506 - Incorrect product price in BO
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16197 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 16:05:03 +00:00
mDeflotte eac104f017 [-] BO : #PSCFV-3006 - Change presentation of group selects
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16193 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 13:02:09 +00:00
mDeflotte 98d07a75a0 [-] MO : #PSCFV-2924 - Cannot comment a product if there already comments validated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16192 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 12:40:51 +00:00
mDeflotte 5eb6a331cd [-] FO : #PSCFV-2981 - Fix bug with url rewrite and subdomain "www"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16191 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 11:54:22 +00:00
lLefevre 5c42986c13 [-] BO : fix translation #PSCFV-2998
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16190 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 09:56:53 +00:00
lLefevre b63dbdeb83 [-] BO : fix #PSCFV-2983 : add iso_code in URI's for robots.txt
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16189 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 09:46:06 +00:00
mDeflotte dc45e6c19a // Fix bug with switchlanguage durring install
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16187 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 09:25:02 +00:00
mDeflotte d782798926 // Smarty fix bugs with php version < 5.2.3
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16184 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 09:07:33 +00:00
mDeflotte c6038d7e92 // Block Wishlist : update some links for 1.5 style
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16183 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 07:48:09 +00:00
mDeflotte 5068e5a413 // Add class on body to hide / show left and right column
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16182 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 07:45:24 +00:00
dMetzger a2e58f645c // Fixed typo #PSCFV-2995
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16181 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-03 07:43:31 +00:00
mDeflotte 125cb023e6 // Fix bugs on module wishlist
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16180 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 16:11:24 +00:00
fBrignoli ed3fb8daaa [-] PDF : Bug Fixed #PSCFV-2788 - Incorrect discount value if free shipping
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16179 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 15:24:32 +00:00
mDeflotte 5f26752083 [-] MO : #PSCFI-5815 - Fix bug on chrome with Chrome
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16177 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 15:11:10 +00:00
mDeflotte 97245ef94a [-] BO : #PSCFV-2956 - Fix bug on creating carriers
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16176 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 15:00:32 +00:00
mDeflotte 447d86b6c6 [-] FO : #PSCFV-2951 - Fix bug with dispatcher and route rule with multilanguage
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16175 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 14:16:47 +00:00
fSerny 9eb888533c [-] INSTALLER : Add hook alias - #PSCFV-2742
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16174 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 08:59:09 +00:00
fSerny 5959b96b2e [-] MO : Fix hook name on differents modules - #PSCFV-2784
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16173 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 08:51:05 +00:00
fSerny 9c778c181f [-] MO : Fix on BlocTopMenu hook name - #PSCFV-2784
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16172 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 08:00:33 +00:00
fSerny 9b10959334 [-] PROJECT : Fix on PS module compliancy check - #PSCFV-2783
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16171 b9a71923-0436-4b27-9f14-aed3839534dd
2012-07-02 07:40:36 +00:00
mDeflotte 3d6119fc64 // Fix bug with dispatcher on going from a page in a language to an other one with an other language
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16170 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 14:53:32 +00:00
vChabot 6a01c12854 [-] BO : BugFix : #PSCFV-2973 : Product Return : unable to create a product return
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16169 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 14:06:50 +00:00
fBrignoli 6e559febd0 [-] BO : Bug Fixed #PSCFV-2116 - Import combinations images
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16168 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 13:14:26 +00:00
lLefevre f2953a3b6c [-] BO : fix #PSCFV-2889
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16167 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 12:56:26 +00:00
mDeflotte 1cd518a67c [-] BO : #PSCFV-2947 - isArrowKey doesn't always return a valaue
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16165 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 11:38:51 +00:00
lLefevre 0f8348b77a [-] BO : fix #PSCFV-2953
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16164 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 08:55:29 +00:00
vChabot 1c16baec21 [-] BO : BugFix : #PSCFV-2958 : Tags do not work after import
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16162 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 08:42:53 +00:00
vChabot 7842e563d0 [-] BO : BugFix : #PSCFV-2960 : Exception thrown when updating customer email
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16161 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 07:43:05 +00:00
fSerny 0819f09899 // Commit config.xml
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16160 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 07:32:27 +00:00
lLefevre 59fc3c388f [-] BO : fix #PSCFV-2961
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16159 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 07:22:00 +00:00
lLefevre 5b0354f7ce [-] BO : fix #PSCFV-2962
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16158 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-29 07:18:03 +00:00
rGaillard fb5e6841a8 [-] BO: Fix PSCFV-2754 keep informations on form validation error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16157 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-28 22:12:31 +00:00
rGaillard 13e466a268 [-] BO: Fix PSCFV-2818 application of specific price rules when multiple conditions of same type in the same group
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16156 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-28 21:48:21 +00:00
lLefevre e91b3d8a2c [-] BO : #PSCFV-2972 : fix unnecessary message
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16155 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-28 16:46:11 +00:00
vChabot 5d044d3e91 [-] FO : BugFix : #PSCFV-2970 : Order history displays an error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16154 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-28 15:56:14 +00:00
vSchoener dce088b5b4 [-] MO : Fixed bug #PNM-284. Use correctly the new controller for the validation process
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16153 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-28 15:32:09 +00:00
lLefevre c0cb57d5f8 [-] BO : #PSCFV-2964 : Display error when PDF translation doesn't exist
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16152 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-28 15:11:21 +00:00
lLefevre 676cbfbf49 [-] BO : fix #PSCFV-2941
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16151 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-28 14:20:33 +00:00
mDeflotte 02b59d164d [-] MO : #PSCFI-5957 - Blocklayered - Fix bug with price ordering
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16149 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-28 07:15:51 +00:00
mDeflotte 03943fe896 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16148 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-27 15:04:43 +00:00
mDeflotte ece13322e1 // Pdf, do not use order id but order reference
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16147 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-27 14:53:22 +00:00
mDeflotte e1bb609176 // Blocklayered - Fix bug with price ordering
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16145 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-27 14:23:14 +00:00
fBrignoli 3cfcf0124b [-] PDF : Bug Fixed #PSCFV-2516 - Unable to print invoice when the physical url has been removed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16144 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-27 14:08:39 +00:00
fBrignoli aee0fa85e6 [-] PDF : Bug Fixed #PSCFV-2945 - Basic Authentication + TCPDF : Beware if you need to modify the getLogo think to symlinks, vhosts etc ...
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16141 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-27 09:44:01 +00:00
mDeflotte 943f83f2ee // Remove html entities form JS string
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16140 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-27 08:06:00 +00:00
vChabot 817c319620 [-] BO : BugFix : #PSCFV-2844 : Problem in image associated to shop (AdminImportController)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16139 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-27 08:04:15 +00:00
mDeflotte 641d2b296b // Change commentaries
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16137 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 15:24:10 +00:00
mDeflotte 3c1c6fb7e0 [-] FO : #PSCFV-2920 - Hidding order number, use order reference instead
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16136 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 15:19:35 +00:00
vSchoener dce26dab08 [+] CORE : Add version_compare tools to align version sent with alignVersionNumber method.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16135 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 13:31:17 +00:00
lLefevre 8a1bf45ae0 [-] PDF : #PSCFV-2795 : Add font : freeserif and fix bug in tcpdf.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16134 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 13:01:18 +00:00
dMetzger 07007e3a02 [-] Installer : theme name deprecated #PSCFV-2937
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16133 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 11:41:48 +00:00
vChabot 23743b6561 [-] FO : BugFix : #PSCFV-2896 : Every contacts from contact page are displayed, without shop restriction
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16132 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 09:59:14 +00:00
vChabot f0d03142f3 [-] BO : BugFix : #PSCFV-2823 : Product::priceCalculation() returns null specific_price after two calls
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16131 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 08:51:10 +00:00
fBrignoli d8c404bda7 [-] PDF : Bug Fixed #PSCFV-2773 - Front office, error on generating RMA form
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16129 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 08:26:43 +00:00
fBrignoli 9327d5d6be [-] PDF : Bug Fixed #PSCFV-2912 - .htaccess & index.php in the PDF folder
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16128 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-26 08:03:08 +00:00
mDeflotte a706fa1cea // Fix bug with multishipping on user login with OPC
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16125 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-25 15:31:12 +00:00
tDidierjean a50320270a [-] FO : fix bug #PSCFV-2902 - Minor category.css validation issue
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16123 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-25 14:57:33 +00:00
tDidierjean f5590a4230 [-] FO : fix bug #PSCFV-2901 - Minor authentication.css validate issue
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16122 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-25 14:55:15 +00:00
rGaillard 3caca74140 [-] BO: Fix bugs with stock management
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16121 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-25 14:46:03 +00:00
tDidierjean a6150e4e28 [-] BO : fix bug #PSCFV-2897 - JS error on combination page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16119 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-25 14:29:39 +00:00
mDeflotte 58c9e3baa5 [-] MO : #PSCFV-2868 - Fix addslashes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16116 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-25 12:26:07 +00:00
vChabot 6eeeb37b9e [-] MO : BugFix : #PSCFV-2822 : ProductComment module : submitNewMessage url problem
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16115 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-25 09:52:35 +00:00
mDeflotte f87876d494 [-] MO : #PSCFV-2922 - Blocklayered, make sure url ordering parameters is each time the same
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16113 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-25 09:16:20 +00:00
rGaillard eb3b7e564b [-] FO: Fix PSCFV-2766 logo store cannot be changed
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16112 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-22 09:55:05 +00:00
rGaillard b37c0dc297 // Cookies subdomain & bug fix on stocks
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16110 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-21 16:11:30 +00:00
rGaillard 5db490c0e2 // Fix many bug with stock
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16108 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-21 10:41:11 +00:00
rGaillard fb0ce1bcbd [-] FO: Cookie are now sharing when your shop is sharing orders from others shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16107 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-21 09:54:58 +00:00
mDeflotte 9099ec040f // Fix bug with module store
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16105 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-21 09:02:32 +00:00
rGaillard 9413d97e45 [-] BO: Fix product import when you have only one shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16104 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-21 08:16:15 +00:00
fSerny 41a79ee53f [-] INSTALLER : Fix demo product installed (Search class) - #PSCFV-2880
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16103 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 15:59:18 +00:00
fSerny ea78daf330 [-] BO : Fixing modules permissions system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16102 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 15:48:46 +00:00
rGaillard 5e0505cf05 [-] MO: Blocktopmenu add links to shop
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16101 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 15:38:08 +00:00
mMarinetti 5867b2ff20 [-] BO : Fixed #PSCFV-2759
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16098 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 14:18:27 +00:00
lLefevre 6e5469b9e3 [-] MO : productcomments : fix #PSCFV-2890
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16097 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 13:47:30 +00:00
lLefevre 8fc6e8f3ab [-] WS : #PSCFV-2888 : Fix bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16094 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 13:13:57 +00:00
mMarinetti f6dd6ced3b // norms / fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16092 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 09:47:03 +00:00
lLefevre a0a405e974 [-] BO : #PSTP-73 : fix bug translations in AdminStatsTabController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16091 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 08:43:22 +00:00
rMalie 35e7fa4c4d // Fix default id lang in localization packs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16090 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 08:36:51 +00:00
lLefevre 0119a39358 [-] MO: StatsForecast: fix division by zero
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16089 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-20 08:34:14 +00:00
rGaillard 7f38dfdb1f // Optimizations and clean ajax.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16087 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 16:47:04 +00:00
rGaillard 5cefe6f822 // Fix product-list small bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16086 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 16:45:45 +00:00
lLefevre 24c58e35ed [-] BO : #PSCFV-2851 : fix bug when export a theme
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16085 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 15:36:42 +00:00
rMalie 9357b43172 // Remove AdminStatsConf during upgrade #PSCFV-2869
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16084 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 14:50:09 +00:00
rMalie 3622a3362c // Fix double click on install button #PSCFV-2873
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16083 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 14:45:05 +00:00
vAugagneur 2342294493 [-] BO : fixed bug on customer edit when context is in "all shop" or "group shop"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16082 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 13:53:43 +00:00
rGaillard 2efce57799 // Clean ajax.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16081 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 13:20:07 +00:00
vAugagneur 8a5ee83850 [-] BO : fixed bug #PSCFV-2604
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16080 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 13:14:08 +00:00
vAugagneur 640d07e356 [-] BO : fixed bug #PSCFV-2731
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16079 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 12:41:20 +00:00
vAugagneur 01e1f8af09 [-] MO : fixed bug #PSCFV-2874 - blocklink_shop.id_shop is varchar, It must be integer.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16078 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 12:30:17 +00:00
rGaillard 369a94466a [-] BO: Update product specific price rules on update
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16077 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 09:59:14 +00:00
vAugagneur db52d33267 [-] MO : fixed bug #PSCFV-2853 - bug in the blocklink : you can not update the title block or edit links.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16076 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 09:29:22 +00:00
rGaillard 528392a746 // delete csv.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16075 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 09:27:33 +00:00
rGaillard a8faffe2ce // delete ajax_send_mail_test.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16074 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 08:40:44 +00:00
vAugagneur d1a6dc44bb [-] BO : fixed bug #PSCFV-2756 - error in installation 1.5 RC Warning on copy()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16073 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 07:30:30 +00:00
mDeflotte 3b221c3b44 // Correct bad named vars "sparate" instead of "separate"
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16072 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-19 07:15:40 +00:00
mDeflotte e87f6d9bc6 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16069 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 15:23:25 +00:00
mDeflotte b867115dd7 // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16068 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 14:47:13 +00:00
rGaillard 476a2959fd // Upgrader specific prices
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16065 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 14:10:25 +00:00
vAugagneur 0fd642237f [-] BO : fixed bug #PSCFV-2843 - Can't create first level admin tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16064 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 14:08:45 +00:00
lLefevre 5565791f61 // Add deutshch translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16062 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:54:38 +00:00
mMarinetti 346d047c1d // second fix for migrate_orders fetchAll()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16061 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:41:48 +00:00
mDeflotte deb1f96b0c [-] FO : #PSCFV-2840 - Fix bug with typewatch on the opc (qty change) and multishipping
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16060 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:32:51 +00:00
mDeflotte 0289bb6b3e // Normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16059 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:31:03 +00:00
mMarinetti 51c48dc083 // now migrate_orders will works also without pdo ... thanks again to rGaillard \!
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16058 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:30:56 +00:00
mMarinetti 54eedabc12 // fix column in statssearch when upgrading from 1.3/1.4/1.5/1.5.0.13
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16057 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:20:10 +00:00
mMarinetti 4e3ffe58cc // upgrade display error optimization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16054 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:02:52 +00:00
mDeflotte 98e4df8889 // Up version number of the blocklayered
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16053 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:02:47 +00:00
mMarinetti 6f3d6f2635 // upgrade display error optimization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16052 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:02:24 +00:00
mDeflotte 7b10496294 [-] MO : #PSCFV-2858 - Fix bugs with non latin chars. Htmlentities was not usefull
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16051 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 13:01:42 +00:00
rMalie 5e5e16a056 // cashondelivery adapted for 1.5 (controllers)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16050 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 12:16:45 +00:00
mMarinetti 7c9d5e5efa // fix fatal error on installer when show columns error in migrate_orders, thanks to Rémi :)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16049 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 11:29:12 +00:00
mMarinetti 0445e6f140 [-] MO : Fixed #PSCFV-2864 column name statssearch.id_group_shop is now id_shop_group, thanks to Fabien :)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16048 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 09:27:05 +00:00
mDeflotte f219a108bd // Blocklayered: Add all collumns of the product_lang
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16046 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 09:26:29 +00:00
vAugagneur 14a0d8eb84 [-] BO : fixed bug #PSCFV-2859 - part 2
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16045 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 09:16:13 +00:00
vAugagneur c9ff52e949 [-] BO : fixed bug #PSCFV-2859 - In my preferences, user can change his her profile
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16044 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 09:14:19 +00:00
rGaillard 9ef9e6a7b6 [-] Installer: Fix PSCFV-2565 unique specific_price
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16043 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 09:10:11 +00:00
lLefevre fa55df1634 [-] BO : #PSCFV-2835 : fix bugs in webservices translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16042 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 09:00:16 +00:00
mDeflotte 28e689b25f // Fix bug with position of features
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16041 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-18 07:43:43 +00:00
mDeflotte 2cadcf694c // Add translation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16039 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-15 15:34:56 +00:00
lLefevre d04c50ce77 // Fix the encoding error when import tabs translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16036 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-15 14:13:19 +00:00
rGaillard 788364120e // ajax.php clean and bug fixes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16035 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-15 13:22:07 +00:00
mDeflotte 462df22866 // Fix syntax bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16034 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-15 10:01:16 +00:00
mDeflotte e47e2f4c51 [-] BO : #PSCFV-2790 - Fix bug with Stock Advanced
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16033 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-15 09:39:50 +00:00
mDeflotte 6fa6a37361 // Blocklayered - Fix missing pagination vars
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16031 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-15 08:09:19 +00:00
vAugagneur 97df2a2095 [-] CLASSES : fixed bug #PSCFV-2836 - Warning on Category::recurseLiteCategTree()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16030 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-15 07:14:58 +00:00
rGaillard b2b29c4270 // Performance optimizations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16024 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 14:11:11 +00:00
aFolletete 3e46c466a8 // fix issue in feeder module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16023 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 14:02:14 +00:00
vChabot 32b0f72b74 [-] MO : BugFix : #PSCFV-2830 : Product Comments module does not publish guest comment, returns exception.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16022 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 13:32:53 +00:00
aFolletete d7d2e08050 // clean useless INNER JOIN
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16021 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 13:30:56 +00:00
vAugagneur 7b35975139 [-] FO : fixed bug #PSCFV-2760 - live edit close confirm
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16020 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 13:19:23 +00:00
vAugagneur 40fb308337 [-] BO : fixed bug #PSCFV-2779 - live edit not working + friendly URL
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16019 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 13:06:52 +00:00
rMalie add5ab42ea // Fix index.php in dispatcher
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16018 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 13:04:24 +00:00
vAugagneur 70bec3b36d //small fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16017 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 12:41:19 +00:00
vChabot 7c24c50d9b [-] MO : BugFix : #PSCFV-2821 : ProductComment module does not save grade with only one criterion
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16016 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 09:24:28 +00:00
vAugagneur 6f375155d2 [-] BO : fixed bug #PSCFV-2828 - Changing the default attribute : no refresh
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16015 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 09:03:44 +00:00
aKorczak 9ea230bb0a [-] WS : Fix id_shop to not being mandatory
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16014 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 08:59:03 +00:00
vAugagneur 12420b5b67 [-] BO : fixed bug #PSCFV-2827 - AdminProducts : Customer autocomplete on specific price not available
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16013 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-14 08:15:25 +00:00
vChabot 021272870f [-] BO : BugFix : #PSCFV-2798 : Multistore : BUG on the "modify products page" with another shop device
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16010 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-13 13:23:52 +00:00
mDeflotte fa866d7057 [-] Project : #PSCFV-2790 - Fix bug with stock synchronization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16007 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-13 12:18:15 +00:00
lLefevre baf17b2ed4 [-] BO : #PSCFV-2736 : import product : fix bug when the image isn't uploaded
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16005 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-13 09:39:51 +00:00
fSerny e806afacb2 // Small fix on translation system
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16004 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-13 08:31:06 +00:00
aNiassy 785232d450 [-] FO : Added a simple space in order to be more readable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16003 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-13 08:16:18 +00:00
aNiassy 7447131226 [-] FO : #PSCFI-5795 : fixed a bug where the opc freeze when an Order is to 0
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16002 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-13 08:12:16 +00:00
aNiassy 19d6ec53e4 [-] FO : #PSCFI-5795 : fixed a bug where the opc freeze when an Order is to 0
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16001 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-13 08:10:12 +00:00
rMalie 2239cfe7ae // Fix redirection in Shop::initialize()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16000 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 15:58:27 +00:00
lLefevre 9a511f6775 [-] Bo : #PSCFV-2680 : fix bug
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15999 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 15:51:08 +00:00
mMarinetti 1aed09363b [-] MO : cashondelivery - translations files are now into translations dir
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15998 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 15:11:45 +00:00
lLefevre b8c048c47b [*] BO : export name tabs by ISO code : check name of tab
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15997 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 15:11:24 +00:00
lLefevre 753f07f69a [*] BO : export name tabs by ISO code when export translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15994 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 14:46:37 +00:00
mDeflotte 1f6dceea85 // Fix bug with bad parameter format send to getModuletranslation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15992 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 13:51:37 +00:00
mDeflotte df596c0889 // Blocklayered - Define our own unSerialize
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15990 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 13:27:39 +00:00
rMalie 034e6a7e7f // Fix critical spelling bug on jquery cookie file name
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15989 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 13:12:32 +00:00
lLefevre 8d51b1e56e [-] MO : blocklayered : #PSCFV-2796 : add charset UTF-8 in SQL tables
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15988 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 13:09:50 +00:00
dMetzger a4965d51d2 [-] Installer : fixed Norway zone
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15987 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 13:01:39 +00:00
rMalie a2036766ed // Fix double cast of denis
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15985 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 12:59:59 +00:00
dMetzger 92df33378e // Fixed an icon problem in the BO module page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15983 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 12:44:19 +00:00
lLefevre d22dee0237 // Add tabs.php when use getFilesList() method in LanguageCore class
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15982 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 12:27:23 +00:00
rGaillard 90d54cae7a // Improve performances
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15981 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 12:11:54 +00:00
rMalie e321f30f4e // Fix language switch (equal is not equal to equal equal)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15980 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 09:31:01 +00:00
lLefevre 47402f886a // Fix bug when install fixtures
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15979 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 09:30:49 +00:00
rGaillard 24630365bd [-] BO: fix PSCFV-2778 display bad stock with product_attributes
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15978 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 08:28:22 +00:00
dMetzger 92ddfdef29 [*] BO : from 300 to 40 queries in Modules tab, does not really speed up the page, but eases my mind
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15977 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 08:21:58 +00:00
lLefevre e9322d3938 // Fix bug translations when email subject are empty
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15976 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 07:50:24 +00:00
mMarinetti 42595bf71c // compatibility fix, #PSCFV-2793
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15975 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 07:41:20 +00:00
vAugagneur dd23a5ceaf [-] CLASSES : fixed bug #PSCFV-2786 - Error in getOrderInvoice function
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15974 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-12 07:06:45 +00:00
mMarinetti cd3dce4a82 // fix upgrade script missing tab images (and all img located in /install/data/img/ immediates subdir) #PSCFV-2749, #PSCFV-2506
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15973 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 15:29:43 +00:00
mDeflotte 8562c2c9b4 // Fix bug with redirection on IE and dev mod enable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15972 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 15:21:38 +00:00
mDeflotte cf48d1793b // Trads
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15971 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 14:48:57 +00:00
dMetzger 168bda9273 [-] FO : potential divide by zero removed #PSCFV-2787
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15970 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 14:36:16 +00:00
vChabot 4584db99fe // fixing display table #PSCFV-2737
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15969 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 14:29:19 +00:00
mMarinetti 208bc3d810 // fix undefined variable res
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15968 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 13:59:16 +00:00
mDeflotte 04c342a1b9 [-] BO : #PSCFV-2638 - Fix bug combination mess up in product/quantities
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15967 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 13:41:09 +00:00
vChabot adcdca708d [-] BO : BugFix : #PSCFV-2761 : Change a default language by shop is not possible
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15966 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 13:37:16 +00:00
vAugagneur a0560569a4 [-] CLASSES : fixed bug #PSCFV-2769 - Accolade missing in AdminTab.php
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15963 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 07:33:56 +00:00
lLefevre 4f26efba41 // fix little mistake in translations
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15962 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 07:32:59 +00:00
vAugagneur cb24a781b3 [-] INSTALLER : fixed bug #PSCFV-2751 - Prestashop 1.5 needs more than 32MB for PHP memory_limit but it is not tested at setup
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15961 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-11 07:28:44 +00:00
lLefevre 062f497b0b [-] BO : #PSCFV-2758 : fix error when use Tools::displayErrors()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15956 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-08 14:54:59 +00:00
mDeflotte dbcff517b4 [-] BO : #PSCFV-2739 - Hide button merchandise return if disable
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15952 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-08 08:44:50 +00:00
mDeflotte 40057f1f74 // Improve error/success message render durring the account creation on opc
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15951 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-08 07:55:02 +00:00
mDeflotte 9c47a9b59d [-] FO : #PSCFV-2623 - Fix address redirection
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15950 b9a71923-0436-4b27-9f14-aed3839534dd
2012-06-08 07:34:33 +00:00
766 changed files with 24704 additions and 16191 deletions
+5 -297
View File
@@ -66,11 +66,6 @@ if (Tools::isSubmit('installBoughtModule'))
die(displayJavascriptAlert('Module copied to disk'));
}
function displayJavascriptAlert($s)
{
echo '<script type="text/javascript">alert(\''.addslashes($s).'\');</script>';
}
if (Tools::isSubmit('ajaxReferrers'))
{
require(_PS_CONTROLLER_DIR_.'admin/AdminReferrersController.php');
@@ -136,16 +131,6 @@ if (Tools::isSubmit('ajaxStates') AND Tools::isSubmit('id_country'))
die($list);
}
if (Tools::isSubmit('submitCustomerNote') AND $id_customer = (int)Tools::getValue('id_customer'))
{
$note = html_entity_decode(Tools::getValue('note'));
if (!empty($note) AND !Validate::isCleanHtml($note))
die ('error:validation');
if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer SET `note` = "'.pSQL($note, true).'" WHERE id_customer = '.(int)$id_customer.' LIMIT 1'))
die ('error:update');
die('ok');
}
if (Tools::getValue('form_language_id'))
{
if (!($context->cookie->employee_form_lang = (int)(Tools::getValue('form_language_id'))))
@@ -153,74 +138,6 @@ if (Tools::getValue('form_language_id'))
die ('Form language updated.');
}
if (Tools::getValue('submitPublishProduct'))
{
if (Tools::getIsset('id_product'))
{
$id_product = (int)(Tools::getValue('id_product'));
$id_tab_catalog = (int)(Tab::getIdFromClassName('AdminProducts'));
$token = Tools::getAdminToken('AdminProducts'.(int)($id_tab_catalog).(int)$context->employee->id);
$bo_product_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminProducts&id_product='.$id_product.'&updateproduct&token='.$token;
if (Tools::getValue('redirect'))
die($bo_product_url);
$profileAccess = Profile::getProfileAccess($context->employee->id_profile, $id_tab_catalog);
if($profileAccess['edit'])
{
$product = new Product((int)(Tools::getValue('id_product')));
if (!Validate::isLoadedObject($product))
die('error: invalid id');
$product->active = 1;
if ($product->save())
die($bo_product_url);
else
die('error: saving');
} else {
die('error: permissions');
}
}
else
die ('error: parameters');
}
if (Tools::getValue('submitPublishCMS'))
{
if (Tools::getIsset('id_cms'))
{
$id_cms = (int)(Tools::getValue('id_cms'));
$id_tab_cms = (int)(Tab::getIdFromClassName('AdminCmsContent'));
$token = Tools::getAdminToken('AdminCmsContent'.(int)($id_tab_cms).(int)$context->employee->id);
$bo_cms_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminCmsContent&id_cms='.(int)$id_cms.'&updatecms&token='.$token;
if (Tools::getValue('redirect'))
die($bo_cms_url);
$profileAccess = Profile::getProfileAccess($context->employee->id_profile, $id_tab_cms);
if($profileAccess['edit'])
{
$cms = new CMS((int)(Tools::getValue('id_cms')));
if (!Validate::isLoadedObject($cms))
die('error: invalid id');
$cms->active = 1;
if ($cms->save())
die($bo_cms_url);
else
die('error: saving');
} else {
die('error: permissions');
}
}
else
die ('error: parameters');
}
if (Tools::isSubmit('submitTrackClickOnHelp'))
{
$label = Tools::getValue('label');
@@ -230,36 +147,6 @@ if (Tools::isSubmit('submitTrackClickOnHelp'))
HelpAccess::trackClick($label, $version);
}
if (Tools::isSubmit('saveImportMatchs'))
{
$match = implode('|', Tools::getValue('type_value'));
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'import_match` (
`id_import_match` ,
`name` ,
`match`,
`skip`
)
VALUES (
NULL ,
\''.pSQL(Tools::getValue('newImportMatchs')).'\',
\''.pSQL($match).'\',
\''.pSQL(Tools::getValue('skip')).'\'
)');
die('{"id" : "'.Db::getInstance()->Insert_ID().'"}');
}
if (Tools::isSubmit('deleteImportMatchs'))
{
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'import_match` WHERE `id_import_match` = '.(int)Tools::getValue('idImportMatchs'));
}
if (Tools::isSubmit('loadImportMatchs'))
{
$return = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'import_match` WHERE `id_import_match` = '.(int)Tools::getValue('idImportMatchs'));
die('{"id" : "'.$return[0]['id_import_match'].'", "matchs" : "'.$return[0]['match'].'", "skip" : "'.$return[0]['skip'].'"}');
}
if (Tools::isSubmit('toggleScreencast'))
{
if (Validate::isLoadedObject($context->employee))
@@ -269,190 +156,6 @@ if (Tools::isSubmit('toggleScreencast'))
}
}
if (Tools::isSubmit('getHookableList'))
{
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_)
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
/* PrestaShop demo mode*/
if (!count(Tools::getValue('hooks_list')))
die('{"hasError" : true, "errors" : ["Live Edit : no module on this page"]}');
$modules_list = Tools::getValue('modules_list');
$hooks_list = Tools::getValue('hooks_list');
$hookableList = array();
foreach ($modules_list as $module)
{
$module = trim($module);
if (!$module)
continue;
$moduleInstance = Module::getInstanceByName($module);
foreach ($hooks_list as $hook_name)
{
$hook_name = trim($hook_name);
if (!$hook_name)
continue;
if (!array_key_exists($hook_name, $hookableList))
$hookableList[$hook_name] = array();
if ($moduleInstance->isHookableOn($hook_name))
array_push($hookableList[$hook_name], str_replace('_', '-', $module));
}
}
$hookableList['hasError'] = false;
die(Tools::jsonEncode($hookableList));
}
if (Tools::isSubmit('getHookableModuleList'))
{
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_)
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
/* PrestaShop demo mode*/
include('../init.php');
$hook_name = Tools::getValue('hook');
$hookableModulesList = array();
$modules = Db::getInstance()->executeS('SELECT id_module, name FROM `'._DB_PREFIX_.'module` ');
foreach ($modules as $module)
{
if (file_exists(_PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php'))
{
include_once(_PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php');
$mod = new $module['name']();
if ($mod->isHookableOn($hook_name))
$hookableModulesList[] = array('id' => (int)$mod->id, 'name' => $mod->displayName, 'display' => Hook::exec($hook_name, array(), (int)$mod->id));
}
}
die(Tools::jsonEncode($hookableModulesList));
}
if (Tools::isSubmit('saveHook'))
{
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_)
die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}');
$hooks_list = explode(',', Tools::getValue('hooks_list'));
$id_shop = (int)Tools::getValue('id_shop');
if (!$id_shop)
$id_shop = Context::getContext()->shop->id;
$res = true;
$hookableList = array();
// $_POST['hook'] is an array of id_module
$hooks_list = Tools::getValue('hook');
foreach ($hooks_list as $id_hook => $modules)
{
// 1st, drop all previous hooked modules
$sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module`
WHERE `id_hook` = '.(int)$id_hook.'
AND id_shop = '.$id_shop;
$res &= Db::getInstance()->execute($sql);
$i = 1;
$value = '';
$ids = array();
// then prepare sql query to rehook all chosen modules(id_module, id_shop, id_hook, position)
// position is i (autoincremented)
foreach ($modules as $id_module)
{
if (!in_array($id_module, $ids))
{
$ids[] = $id_module;
$value .= '('.(int)$id_module.', '.$id_shop.', '.(int)$id_hook.', '.$i.'),';
}
$i++;
}
$value = rtrim($value, ',');
$res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook_module`
(id_module, id_shop, id_hook, position)
VALUES '.$value);
}
if ($res)
$hasError = true;
else
$hasError = false;
die('{"hasError" : false, "errors" : ""}');
}
if (Tools::isSubmit('getAdminHomeElement'))
{
$result = array();
$protocol = Tools::usingSecureMode() ? 'https' : 'http';
$isoUser = Context::getContext()->language->iso_code;
$isoCountry = Context::getContext()->country->iso_code;
$stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 5)));
// SCREENCAST
if (@fsockopen('api.prestashop.com', 80, $errno, $errst, 3))
$result['screencast'] = 'OK';
else
$result['screencast'] = 'NOK';
// PREACTIVATION
$content = @file_get_contents($protocol.'://api.prestashop.com/partner/preactivation/preactivation-block.php?version=1.0&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&protocol='.$protocol.'&url='.urlencode($_SERVER['HTTP_HOST']).'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&date_creation='._PS_CREATION_DATE_.'&v='._PS_VERSION_.'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context);
if (!$content)
$result['partner_preactivation'] = 'NOK';
else
{
$content = explode('|', $content);
if ($content[0] == 'OK' && Validate::isCleanHtml($content[2]) && Validate::isCleanHtml($content[1]))
{
$result['partner_preactivation'] = $content[2];
$content[1] = explode('#%#', $content[1]);
foreach ($content[1] as $partnerPopUp)
if ($partnerPopUp)
{
$partnerPopUp = explode('%%', $partnerPopUp);
if (!Configuration::get('PS_PREACTIVATION_'.strtoupper($partnerPopUp[0])))
{
$result['partner_preactivation'] .= $partnerPopUp[1];
Configuration::updateValue('PS_PREACTIVATION_'.strtoupper($partnerPopUp[0]), 'TRUE');
}
}
}
else
$result['partner_preactivation'] = 'NOK';
}
// PREACTIVATION PAYPAL WARNING
$content = @file_get_contents('https://api.prestashop.com/partner/preactivation/preactivation-warnings.php?version=1.0&partner=paypal&iso_country='.Tools::strtolower(Context::getContext()->country->iso_code).'&iso_lang='.Tools::strtolower(Context::getContext()->language->iso_code).'&id_lang='.(int)Context::getContext()->language->id.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context);
$content = explode('|', $content);
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
Configuration::updateValue('PS_PREACTIVATION_PAYPAL_WARNING', $content[1]);
else
Configuration::updateValue('PS_PREACTIVATION_PAYPAL_WARNING', '');
// DISCOVER PRESTASHOP
$content = @file_get_contents($protocol.'://api.prestashop.com/partner/prestashop/prestashop-link.php?iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id, false, $stream_context);
if (!$content)
$result['discover_prestashop'] = 'NOK';
else
{
$content = explode('|', $content);
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
$result['discover_prestashop'] = $content[1];
else
$result['discover_prestashop'] = 'NOK';
if (@fsockopen('api.prestashop.com', 80, $errno, $errst, 3))
$result['discover_prestashop'] .= '<iframe frameborder="no" style="margin: 0px; padding: 0px; width: 315px; height: 290px;" src="'.$protocol.'://api.prestashop.com/rss/news2.php?v='._PS_VERSION_.'&lang='.$isoUser.'"></iframe>';
$content = @file_get_contents($protocol.'://api.prestashop.com/partner/paypal/paypal-tips.php?protocol='.$protocol.'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id, false, $stream_context);
$content = explode('|', $content);
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
$result['discover_prestashop'] .= $content[1];
}
die(Tools::jsonEncode($result));
}
if (Tools::isSubmit('getChildrenCategories') && Tools::isSubmit('id_category_parent'))
{
$children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id, null, Tools::getValue('use_shop_context'));
@@ -627,3 +330,8 @@ if (Tools::isSubmit('getZones'))
$array = array('hasError' => false, 'errors' => '', 'data' => $html);
die(Tools::jsonEncode($html));
}
function displayJavascriptAlert($s)
{
echo '<script type="text/javascript">alert(\''.addslashes($s).'\');</script>';
}
-50
View File
@@ -1,50 +0,0 @@
<?php
/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2012 PrestaShop SA
* @version Release: $Revision: 6844 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_ADMIN_DIR_', getcwd());
include_once(dirname(__FILE__).'/../config/config.inc.php');
/* Getting cookie or logout */
require_once(dirname(__FILE__).'/init.php');
if (Tools::getValue('token') != Tools::getAdminTokenLite('AdminEmails'))
die(Tools::displayError());
$smtpChecked = (trim($_POST['mailMethod']) == 'smtp');
$smtpServer = $_POST['smtpSrv'];
$content = urldecode($_POST['testMsg']);
$content = utf8_encode(html_entity_decode($content));
$subject = urldecode($_POST['testSubject']);
$type = 'text/html';
$to = $_POST['testEmail'];
$from = Configuration::get('PS_SHOP_EMAIL');
$smtpLogin = $_POST['smtpLogin'];
$smtpPassword = (!empty($_POST['smtpPassword'])) ? urldecode($_POST['smtpPassword']) : Configuration::get('PS_MAIL_PASSWD');
$smtpPort = $_POST['smtpPort'];
$smtpEncryption = $_POST['smtpEnc'];
$result = Mail::sendMailTest(Tools::htmlentitiesUTF8($smtpChecked), Tools::htmlentitiesUTF8($smtpServer), Tools::htmlentitiesUTF8($content), Tools::htmlentitiesUTF8($subject), Tools::htmlentitiesUTF8($type), Tools::htmlentitiesUTF8($to), Tools::htmlentitiesUTF8($from), Tools::htmlentitiesUTF8($smtpLogin), Tools::htmlentitiesUTF8($smtpPassword), Tools::htmlentitiesUTF8($smtpPort), Tools::htmlentitiesUTF8($smtpEncryption));
die($result === true ? 'ok' : $result);
-85
View File
@@ -1,85 +0,0 @@
<?php
/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2012 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* @since 1.5.0
*/
define('_PS_ADMIN_DIR_', getcwd());
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
if (!Context::getContext()->employee->id)
Tools::redirectAdmin('index.php?controller=AdminLogin');
/*
* Functions allowed
*/
$functions = array(
'id_supply_order' => 'exportSupplyOrder',
);
/*
* Depending on $_GET, call the corresponding function
*/
foreach ($functions as $var => $function)
{
if (isset($_GET[$var]))
{
call_user_func($function);
die;
}
}
/**
* Function used for SupplyOrder
*/
function exportSupplyOrder()
{
//@TODO Checks if employee has enough access to export
if (!isset($_GET['id_supply_order']))
die (Tools::displayError('Missing supply order ID'));
$id_supply_order = (int)$_GET['id_supply_order'];
$supply_order = new SupplyOrder($id_supply_order);
if (!Validate::isLoadedObject($supply_order))
die(Tools::displayError('Cannot find this supply order in the database'));
$details = $supply_order->getEntriesCollection($supply_order->id_lang);
exportCSV($details, 'supply_order_'.$supply_order->reference.'_details');
}
/**
* Main function to export CSV
* @param object|Array $object
* @param string $template
*/
function exportCSV(&$object, $filename)
{
$csv = new CSV($object, $filename);
$csv->export();
}
+28
View File
@@ -499,3 +499,31 @@ ul.listForm li {padding-bottom:3px;}
.selected-line {background:#fff1b5;}
#changedFiles ul{list-style-type: square; padding-left: 40px;}
.tooltip { position: relative; }
.tooltip .tooltip_content {
z-index: 100;
text-align: left;
display: none;
white-space: nowrap;
position: absolute;
padding: 5px 5px;
background: black;
color: white;
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
margin-top: 5px;
}
.tooltip .tooltip_label { cursor: pointer; }
.tooltip .title { text-align: center; padding-bottom: 5px; display: block; font-weight: bold }
.tooltip:hover .tooltip_content { display: block; }
.tooltip_button {
border: 1px solid silver;
border-radius: 3px;
padding: 0 3px;
background: -moz-linear-gradient(top, #ddd, #aaa);
background: -o-linear-gradient(top, #ddd, #aaa);
background: -webkit-linear-gradient(top, #ddd, #aaa);
background: linear-gradient(top, #ddd, #aaa);
color: #666
}
+23 -23
View File
@@ -147,29 +147,29 @@ a.module_toggle_all{color: #268CCD;}
/*toolbarBox*/
.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
.toolbarBox .pageTitle { margin-left:10px; line-height:48px}
.toolbarBox .pageTitle h3 {font-size: 2em; font-weight: bold; line-height: 48px; margin: 0; padding: 0;}
.toolbarBox ul.cc_button {float:right;margin:0;padding:0;}
.toolbarBox ul.cc_button li {color: #666666; float: left; height: 48px; list-style: none outside none; padding: 1px 1px 3px 4px; text-align: center;}
.toolbarBox a.toolbar_btn { border-width: 1px;font-size:11px;cursor: pointer; display: block; float: left; padding: 1px 5px; white-space: nowrap; text-shadow: 0 1px 0 #ffffff;;}
.toolbarBox .pageTitle h3 {font-size: 2em; font-weight: bold; line-height: 48px; margin: 0; padding: 0}
.toolbarBox ul.cc_button {float:right;margin:0;padding:0}
.toolbarBox ul.cc_button li {color: #666666; float: left; height: 48px; list-style: none outside none; padding: 1px 1px 3px 4px; text-align: center}
.toolbarBox a.toolbar_btn { border-width: 1px;font-size:11px;cursor: pointer; display: block; float: left; padding: 1px 5px; white-space: nowrap; text-shadow: 0 1px 0 #ffffff}
.toolbarBox a.toolbar_btn:hover {}
.toolbarBox .toolbar_btn span{ display: block;float: none;height: 32px;margin: 0 auto;width: 32px;}
.toolbarBox .process-icon-delete { background-image: url('../img/process-icon-delete.png');}
.toolbarBox .process-icon-duplicate { background-image: url('../img/process-icon-duplicate.png');}
.toolbarBox .process-icon-preview { background-image: url('../img/process-icon-preview.png');}
.toolbarBox .process-icon-stats { background-image: url('../img/process-icon-stats.png');}
.toolbarBox .process-icon-cancel { background-image: url('../img/process-icon-cancel.png');}
.toolbarBox .process-icon-new, .toolbarBox .process-icon-newAttributes{ background-image: url('../img/process-icon-new.png');}
.toolbarBox .process-icon-save, .toolbarBox .process-icon-save-settings { background-image: url('../img/process-icon-save.png');}
.toolbarBox .process-icon-save-and-stay { background-image: url('../img/process-icon-save-and-stay.png');}
.toolbarBox .process-icon-edit { background-image: url('../img/process-icon-edit.png');}
.toolbarBox .process-icon-back { background-image: url('../img/process-icon-back.png');}
.toolbarBox .process-icon-refresh-index { background-image: url('../img/process-icon-refresh-index.png');}
.toolbarBox .process-icon-refresh-cache { background-image: url('../img/process-icon-refresh-cache.png');}
.toolbarBox .process-icon-save-calendar { background-image: url('../img/process-icon-save-calendar.png');}
.toolbarBox .process-icon-new-module { background-image: url('../img/process-icon-new-module.png');}
.toolbarBox .process-icon-new-module-addon { background-image: url('../img/process-icon-new-module-addon.png');}
.toolbarBox .toolbar_btn span{ display: block;float: none;height: 32px;margin: 0 auto;width: 32px}
.toolbarBox .process-icon-delete { background-image: url('../img/process-icon-delete.png')}
.toolbarBox .process-icon-duplicate { background-image: url('../img/process-icon-duplicate.png')}
.toolbarBox .process-icon-preview { background-image: url('../img/process-icon-preview.png')}
.toolbarBox .process-icon-stats { background-image: url('../img/process-icon-stats.png')}
.toolbarBox .process-icon-cancel { background-image: url('../img/process-icon-cancel.png')}
.toolbarBox .process-icon-new, .toolbarBox .process-icon-newAttributes{ background-image: url('../img/process-icon-new.png')}
.toolbarBox .process-icon-save, .toolbarBox .process-icon-save-settings { background-image: url('../img/process-icon-save.png')}
.toolbarBox .process-icon-save-and-stay { background-image: url('../img/process-icon-save-and-stay.png')}
.toolbarBox .process-icon-edit { background-image: url('../img/process-icon-edit.png')}
.toolbarBox .process-icon-back { background-image: url('../img/process-icon-back.png')}
.toolbarBox .process-icon-refresh-index { background-image: url('../img/process-icon-refresh-index.png')}
.toolbarBox .process-icon-refresh-cache { background-image: url('../img/process-icon-refresh-cache.png')}
.toolbarBox .process-icon-save-calendar { background-image: url('../img/process-icon-save-calendar.png')}
.toolbarBox .process-icon-new-module { background-image: url('../img/process-icon-new-module.png')}
.toolbarBox .process-icon-new-module-addon { background-image: url('../img/process-icon-new-module-addon.png')}
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1;}
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1}
/*button upload files*/
.qq-upload-button {background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent;
@@ -231,7 +231,8 @@ form#product, form#access_form{ background-color:#ebedf4; border:1px solid #cc
#moduleContainer .moduleDesc .metadata dl dt { font-weight:bold; padding-right:5px;}
#moduleContainer .moduleDesc p.desc { color:#666; font-size:12px; display:block; clear:both;}
#moduleContainer .setup {background-color:#6db300; font-size:10px; color:#fff; text-transform:uppercase; position:relative; left:10px; padding:0px 4px; display: inline-block; border-radius:3px;}
#moduleContainer .setup.non-install { background-color:#ec7000;}
#moduleContainer .setup.non-install { border: solid 1px #ec7000; background-color: #ffedb1; color: #ec7000}
#moduleContainer .setup.must-have { background-color: #ec7000;}
#moduleContainer .setup.off{ background-color:#ccc;}
#moduleContainer .row-actions-module span { padding-right:5px;}
#moduleContainer .row-actions-module span a { font-size:12px;}
@@ -243,7 +244,6 @@ form#product, form#access_form{ background-color:#ebedf4; border:1px solid #cc
#moduleContainer .moduleName {font-size:12px; color:#3A6EA7;font-weight:bold;}
#moduleContainer .moduleFavDesc { font-family:Georgia; font-style:italic; color:#666;}
/*FOOTER*/
#footer {height:40px; font-size:12px;clear:both;font-size:0.9em;color:#666666}
#footer .footer_link, #footer .footer_link:hover {color:#D41958;}
@@ -83,7 +83,7 @@
}
});
}
perfect_access_js_gestion(this, perm, id_tab, tabsize, tabnumber, table, '{$id_tab_access}');
perfect_access_js_gestion(this, perm, id_tab, tabsize, tabnumber, table);
$.ajax({
url: "{$link->getAdminLink('AdminAccess')}",
@@ -122,15 +122,16 @@
var perm = tout[1];
var id_profile = tout[2];
var enabled = $(this).is(':checked') ? 1 : 0;
var enabled_attr = $(this).is(':checked') ? true : false;
var table = 'table#table_module_'+id_profile;
if (id_module == -1)
$(table+' .ajax-ma-'+perm).each(function(key, value) {
$(this).attr("checked", enabled);
$(this).attr("checked", enabled_attr);
});
else if (!enabled)
$(table+' #ajax-ma-'+perm+'-master').each(function(key, value) {
$(this).attr("checked", enabled);
$(this).attr("checked", enabled_attr);
});
$.ajax({
@@ -78,9 +78,9 @@
</div>
</div>
<div style="float: left; width: 570px;">
<div class="hint" style="width: 570px; padding-left: 45px; margin-bottom: 15px; display: block; position: inherit;">{l s='The Combinations Generator is a tool which allows you to easily create a series of combinations by selecting the related attributes. For example, if you are selling T-Shirts, in 3 different sizes and 2 different colors, the Generator will create 6 combinations for you.'}</div>
<div class="hint" style="width: 570px; padding-left: 45px; margin-bottom: 15px; display: block; position: inherit;">{l s='The Combinations Generator is a tool which allows you to easily create a series of combinations by selecting the related attributes. For example, if you are selling T-Shirts in 3 different sizes and 2 different colors, the Generator will create 6 combinations for you.'}</div>
<p>{l s='You are currently generating combinations for the following product:'} <b>{$product_name|escape:'htmlall':'UTF-8'}</b></p>
<h4>{l s='Step 1: On the left side, Select the attributes you want to use (Holding down the "CTRL" Key on your keyboard and validating by clicking on "Add"'}</h4>
<h4>{l s='Step 1: On the left side, Select the attributes you want to use (Hold down the "CTRL" Key on your keyboard and validate by clicking on "Add")'}</h4>
<div>
{foreach $attribute_groups as $k => $attribute_group}
{if isset($attribute_js[$attribute_group['id_attribute_group']])}
@@ -28,6 +28,16 @@
{block name="override_header"}
{if isset($backup_url) && isset($backup_weight)}
<fieldset>
<legend><img src="../img/admin/AdminBackup.gif" alt="" class="icon" /> {l s='Download'}</legend>
<p style="font-size: 13px;">
<a href="{$backup_url}"><img src="../img/admin/AdminBackup.gif" alt="" class="icon" /></a>
<b><a href="{$backup_url}">{l s='Download the Backup file'} ({$backup_weight}{l s='MB'})</a></b><br /><br />
{l s='Tip: You can also download this file over your FTP. Backup files are located in "admin/backups" directory.'}</p>
</fieldset><br /><br />
{/if}
<div class="error width1" style="float: left; margin-right: 10px;">
<p>{l s='Disclaimer before creating a new Backup'}</p>
<ol style="font-size: 11px; font-weight: normal; line-height: 20px; padding-left: 10px;">
@@ -55,20 +55,6 @@
<div id="country_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
<table>
<tr>
<td>
<p><strong>{l s='Selected countries'}</strong></p>
<select name="country_select[]" id="country_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$countries.selected item='country'}
<option value="{$country.id_country|intval}">&nbsp;{$country.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="country_select_remove"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
{l s='Remove'} &gt;&gt;
</a>
</td>
<td style="padding-left:20px;">
<p><strong>{l s='Unselected countries'}</strong></p>
<select id="country_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
@@ -80,7 +66,21 @@
id="country_select_add"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Add'}
{l s='Add'} &gt;&gt;
</a>
</td>
<td>
<p><strong>{l s='Selected countries'}</strong></p>
<select name="country_select[]" id="country_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$countries.selected item='country'}
<option value="{$country.id_country|intval}">&nbsp;{$country.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="country_select_remove"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Remove'}
</a>
</td>
</tr>
@@ -93,20 +93,6 @@
<div id="carrier_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
<table>
<tr>
<td>
<p><strong>{l s='Selected carriers'}</strong></p>
<select name="carrier_select[]" id="carrier_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$carriers.selected item='carrier'}
<option value="{$carrier.id_carrier|intval}">&nbsp;{$carrier.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="carrier_select_remove"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
{l s='Remove'} &gt;&gt;
</a>
</td>
<td style="padding-left:20px;">
<p><strong>{l s='Unselected carriers'}</strong></p>
<select id="carrier_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
@@ -118,7 +104,21 @@
id="carrier_select_add"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Add'}
{l s='Add'} &gt;&gt;
</a>
</td>
<td>
<p><strong>{l s='Selected carriers'}</strong></p>
<select name="carrier_select[]" id="carrier_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$carriers.selected item='carrier'}
<option value="{$carrier.id_carrier|intval}">&nbsp;{$carrier.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="carrier_select_remove"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Remove'}
</a>
</td>
</tr>
@@ -132,20 +132,6 @@
<div id="group_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
<table>
<tr>
<td>
<p><strong>{l s='Selected groups'}</strong></p>
<select name="group_select[]" id="group_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$groups.selected item='group'}
<option value="{$group.id_group|intval}">&nbsp;{$group.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="group_select_remove"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
{l s='Remove'} &gt;&gt;
</a>
</td>
<td style="padding-left:20px;">
<p><strong>{l s='Unselected groups'}</strong></p>
<select id="group_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
@@ -157,7 +143,21 @@
id="group_select_add"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Add'}
{l s='Add'} &gt;&gt;
</a>
</td>
<td>
<p><strong>{l s='Selected groups'}</strong></p>
<select name="group_select[]" id="group_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$groups.selected item='group'}
<option value="{$group.id_group|intval}">&nbsp;{$group.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="group_select_remove"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Remove'}
</a>
</td>
</tr>
@@ -171,20 +171,6 @@
<div id="cart_rule_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
<table>
<tr>
<td>
<p><strong>{l s='Combinable cart rules'}</strong></p>
<select name="cart_rule_select[]" id="cart_rule_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$cart_rules.selected item='cart_rule'}
<option value="{$cart_rule.id_cart_rule|intval}">&nbsp;{$cart_rule.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="cart_rule_select_remove"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
{l s='Remove'} &gt;&gt;
</a>
</td>
<td style="padding-left:20px;">
<p><strong>{l s='Uncombinable cart rules'}</strong></p>
<select id="cart_rule_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple="">
@@ -196,7 +182,21 @@
id="cart_rule_select_add"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Add'}
{l s='Add'} &gt;&gt;
</a>
</td>
<td>
<p><strong>{l s='Combinable cart rules'}</strong></p>
<select name="cart_rule_select[]" id="cart_rule_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$cart_rules.selected item='cart_rule'}
<option value="{$cart_rule.id_cart_rule|intval}">&nbsp;{$cart_rule.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="cart_rule_select_remove"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
</a>
</td>
</tr>
@@ -221,20 +221,6 @@
<div id="shop_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
<table>
<tr>
<td>
<p><strong>{l s='Selected shops'}</strong></p>
<select name="shop_select[]" id="shop_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$shops.selected item='shop'}
<option value="{$shop.id_shop|intval}">&nbsp;{$shop.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="shop_select_remove"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
{l s='Remove'} &gt;&gt;
</a>
</td>
<td style="padding-left:20px;">
<p><strong>{l s='Unselected shops'}</strong></p>
<select id="shop_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
@@ -246,7 +232,21 @@
id="shop_select_add"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Add'}
{l s='Add'} &gt;&gt;
</a>
</td>
<td>
<p><strong>{l s='Selected shops'}</strong></p>
<select name="shop_select[]" id="shop_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
{foreach from=$shops.selected item='shop'}
<option value="{$shop.id_shop|intval}">&nbsp;{$shop.name|escape}</option>
{/foreach}
</select><br /><br />
<a
id="shop_select_remove"
style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Remove'}
</a>
</td>
</tr>
@@ -1,5 +1,23 @@
<table>
<tr>
<td style="padding-left:20px">
<p><strong>{l s='Unselected'}</strong></p>
<select
id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_1"
style="border:1px solid #AAAAAA;width:400px;height:160px"
multiple
>
{foreach from=$product_rule_itemlist.unselected item='item'}
<option value="{$item.id|intval}">&nbsp;{$item.name}</option>
{/foreach}
</select><br /><br />
<a
id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
{l s='Add'} &gt;&gt;
</a>
</td>
<td>
<p><strong>{l s='Selected'}</strong></p>
<select
@@ -17,25 +35,7 @@
id="product_rule_select_{$product_rule_group_id}_{$product_rule_id}_remove"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
{l s='Remove'} &gt;&gt;
</a>
</td>
<td style="padding-left:20px">
<p><strong>{l s='Unselected'}</strong></p>
<select
id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_1"
style="border:1px solid #AAAAAA;width:400px;height:160px"
multiple
>
{foreach from=$product_rule_itemlist.unselected item='item'}
<option value="{$item.id|intval}">&nbsp;{$item.name}</option>
{/foreach}
</select><br /><br />
<a
id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add"
style="cursor:pointer;text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px"
>
&lt;&lt; {l s='Add'}
&lt;&lt; {l s='Remove'}
</a>
</td>
</tr>
@@ -132,7 +132,7 @@
</a>
</td>
<td align="center">{displayWtPriceWithCurrency price=$product.product_price currency=$currency}</td>
<td align="center" class="productQuantity">{math equation='x - y' x=$product.cart_quantity y=$product.customization_quantity}</td>
<td align="center" class="productQuantity">{math equation='x - y' x=$product.cart_quantity y=$product.customization_quantity|intval}</td>
<td align="center" class="productQuantity">{$product.qty_in_stock}</td>
<td align="right">{displayWtPriceWithCurrency price=$product.product_total currency=$currency}</td>
</tr>
@@ -25,6 +25,29 @@
*}
{extends file="helpers/form/form.tpl"}
{block name="input"}
{if $input.type == 'file'}
{if isset($input.display_image) && $input.display_image}
{if isset($fields_value.image) && $fields_value.image}
<div id="image">
{$fields_value.image}
<p align="center">{l s='File size'} {$fields_value.size}kb</p>
{if $shared_category}
<p class="warn">{l s='If you delete this picture it\'s will be deleted for all shared shop'}</p>
{/if}
<br>
<a href="{$current}&{$identifier}={$form_id}&token={$token}&{if $shared_category}forcedeleteImage=1{else}deleteImage=1{/if}">
<img src="../img/admin/delete.gif" alt="{l s='Delete'}" /> {l s='Delete'}
</a>
</div><br />
{/if}
{/if}
<input type="file" name="{$input.name}" {if isset($input.id)}id="{$input.id}"{/if} />
{if !empty($input.hint)}<span class="hint" name="help_box">{$input.hint}<span class="hint-pointer">&nbsp;</span></span>{/if}
{else}
{$smarty.block.parent}
{/if}
{/block}
{block name="description"}
{$smarty.block.parent}
{if ($input.name == 'groupBox')}
@@ -35,4 +58,4 @@
<span>{$input.customer}</span><br />
</p>
{/if}
{/block}
{/block}
@@ -109,7 +109,7 @@
}
function resetLayout(defaultLayout, type) {
if (confirm("{l s='Are you sure you want to restore the default address format for this country?'}"))
if (confirm("{l s='Are you sure you want to restore the default address format for this country?' js=1}"))
$("#ordered_fields").val(unescape(defaultLayout.replace(/\+/g, " ")));
}
@@ -92,7 +92,7 @@
{if !empty($message.id_product) && empty($message.id_employee)}
<dl>
<dt>{l s='Product #'}</dt>
<dd><a href="index.php?tab=AdminOrders&id_order={$id_order_product}&vieworder&token={getAdminToken tab='AdminOrders'}" title="{l s='View order'}">
<dd><a href="index.php?tab=AdminProducts&id_product={$message.id_product}&updateproduct&token={getAdminToken tab='AdminProducts'}" title="{l s='View order'}">
{$message.id_product} <img src="../img/admin/search.gif" alt="{l s='view'}" />
</a></dd>
</dl>
@@ -35,8 +35,8 @@
$.ajax({
type: "POST",
url: "ajax.php",
data: "submitCustomerNote=1&id_customer={$customer->id}&note="+noteContent,
url: "index.php",
data: "token={getAdminToken tab='AdminCustomers'}&tab=AdminCustomers&ajax=1&action=updateCustomerNote&id_customer={$customer->id}&note="+noteContent,
async : true,
success: function(r) {
$('#note_feedback').html('').hide();
@@ -59,7 +59,7 @@
<div class="info-customer-left">
<div style="float: right">
<a href="{$current}&addcustomer&id_customer={$customer->id}&token={$token}">
<a href="{$current}&updatecustomer&id_customer={$customer->id}&token={$token}">
<img src="../img/admin/edit.gif" />
</a>
</div>
@@ -92,7 +92,7 @@
<div>
{l s='This customer is registered as'} <b>{l s='guest'}</b>
{if !$customer_exists}
<form method="POST" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
<input type="hidden" name="id_lang" value="{$id_lang}" />
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform to customer account'}" /></p>
{l s='This feature generates a random password and sends an e-mail to the customer'}
@@ -161,9 +161,9 @@
{if $groups AND count($groups)}
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
<colgroup>
<col width="10px"></col>
<col width=""></col>
<col width="70px"></col>
<col width="10px">
<col width="">
<col width="70px">
</colgroup>
<tr>
<th height="39px" class="right">{l s='ID'}</th>
@@ -192,13 +192,13 @@
</h3>
<table cellspacing="0" cellpadding="0" class="table" style="width:100%; text-align:left;">
<colgroup>
<col width="10px"></col>
<col width="100px"></col>
<col width="100px"></col>
<col width=""></col>
<col width="50px"></col>
<col width="80px"></col>
<col width="70px"></col>
<col width="10px">
<col width="100px">
<col width="100px">
<col width="">
<col width="50px">
<col width="80px">
<col width="70px">
</colgroup>
<tr>
<th height="39px" class="center">{l s='ID'}</th>
@@ -229,13 +229,13 @@
<h3 style="color:red;font-weight:normal;">{l s='Invalid orders:'} {$count_ko}</h3>
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
<colgroup>
<col width="10px"></col>
<col width="100px"></col>
<col width=""></col>
<col width=""></col>
<col width="100px"></col>
<col width="100px"></col>
<col width="52px"></col>
<col width="10px">
<col width="100px">
<col width="">
<col width="">
<col width="100px">
<col width="100px">
<col width="52px">
</colgroup>
<tr>
<th height="39px" class="center">{l s='ID'}</th>
@@ -270,10 +270,10 @@
<h2>{l s='Products'} ({count($products)})</h2>
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
<colgroup>
<col width="50px"></col>
<col width=""></col>
<col width="60px"></col>
<col width="70px"></col>
<col width="50px">
<col width="">
<col width="60px">
<col width="70px">
</colgroup>
<tr>
<th height="39px" class="center">{l s='Date'}</th>
@@ -297,12 +297,12 @@
{if count($addresses)}
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
<colgroup>
<col width="120px"></col>
<col width="120px"></col>
<col width=""></col>
<col width="100px"></col>
<col width="170px"></col>
<col width="70px"></col>
<col width="120px">
<col width="120px">
<col width="">
<col width="100px">
<col width="170px">
<col width="70px">
</colgroup>
<tr>
<th height="39px">{l s='Company'}</th>
@@ -371,11 +371,11 @@
{if $carts AND count($carts)}
<table cellspacing="0" cellpadding="0" class="table" style="width:100%">
<colgroup>
<col width="50px"></col>
<col width="150px"></col>
<col width=""></col>
<col width="70px"></col>
<col width="50px"></col>
<col width="50px">
<col width="150px">
<col width="">
<col width="70px">
<col width="50px">
</colgroup>
<tr>
<th height="39px" class="center">{l s='ID'}</th>
@@ -404,9 +404,9 @@
<h2>{l s='Products'} ({count($interested)})</h2>
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
<colgroup>
<col width="10px"></col>
<col width=""></col>
<col width="50px"></col>
<col width="10px">
<col width="">
<col width="50px">
</colgroup>
{foreach $interested as $key => $p}
<tr {if $key %2}class="alt_row"{/if} style="cursor: pointer" onclick="document.location = '{$p['url']}'">
@@ -426,11 +426,11 @@
<h2>{l s='Last connections'}</h2>
<table cellspacing="0" cellpadding="0" class="table" style="width:100%;">
<colgroup>
<col width="150px"></col>
<col width="100px"></col>
<col width="100px"></col>
<col width=""></col>
<col width="150px"></col>
<col width="150px">
<col width="100px">
<col width="100px">
<col width="">
<col width="150px">
</colgroup>
<tr>
<th height="39px;">{l s='Date'}</th>
@@ -30,7 +30,7 @@
{if $input['type'] == 'modules'}
<div style="{if !$form_id}display:none{/if}">
<div class="separation"></div>
<label>{l s='Modules restrictions:'}</label>
<label>{l s='Module restrictions:'}</label>
</div>
{elseif $input['type'] == 'group_discount_category'}
<div style="{if !$form_id}display:none{/if}">
@@ -44,14 +44,16 @@
<p>{l s='To receive PrestaShop update warnings, you need to activate'} <b>allow_url_fopen</b> [<a href="http://www.php.net/manual/{$isoUser}/ref.filesystem.php">{l s='more info on php.net'}</a>]</p>
<p>{l s='If you don\'t know how to do this, please contact your hosting provider!'}</p><br />
{/if}
{* Screencast deprecated, but I keep the code in case it is updated later
{if $employee->bo_show_screencast}
<div id="adminpresentation" style="display:block;">
<div id="adminpresentation" style="display:block">
<h2>{l s='Video'}</h2>
<div id="video">
<a href="{$protocol}://screencasts.prestashop.com/v1.5/screencast.php?iso_lang={$isoUser}" id="screencast_fancybox"><img height="128" width="220" src="../img/admin/preview_fr.jpg" /><span class="mask-player"></span></a>
</div>
<div id="video-content">
<p>{l s='Take part in the e-commerce adventure with PrestaShop, the fast, powerful, and customizable e-commerce solution. With more than 275 features, PrestaShop will help you create a world of opportunities without limits. Discover the solution that has already conquered more than 120,000 merchants worldwide!'}</p>
<p>{l s='Take part in the e-commerce adventure with PrestaShop, the fast, powerful, and customizable e-commerce solution. With more than 275 features, PrestaShop will help you create a world of opportunities without limits. Discover the solution that already powers more than 120,000 active stores worldwide!'}</p>
</div>
<div id="footer_iframe_home">
<!--<a href="#">{l s='View more video tutorials'}</a>-->
@@ -95,6 +97,7 @@ $(document).ready(function() {
});
</script>
{/if}
*}
<h2>{l s='Quick links'}</h2>
<ul class="F_list clearfix">
@@ -69,7 +69,7 @@
<div style="display: none">
<div id="upload_file_import" style="padding-left: 10px; background-color: #EBEDF4; border: 1px solid #CCCED7">
<div class="clear">&nbsp;</div>
<form action="{$current}&token={$token}" method="POST" enctype="multipart/form-data">
<form action="{$current}&token={$token}" method="post" enctype="multipart/form-data">
<label class="clear" style="width:160px; text-align: left;">{l s='Select your CSV file'} </label>
<div class="margin-form" style="padding-left:190px;">
<input name="file" type="file" />
@@ -211,7 +211,7 @@
</div>
<div class="clear">
<br /><br />{l s='* Required field'}
<br /><br />{l s='*Required field'}
</div>
</fieldset>
@@ -29,6 +29,7 @@
{block name="override_tpl"}
<script type="text/javascript">
var errorEmpty = "{l s='Please name your matching configuration to save.'}"
var token = '{$token}';
</script>
<div id="container-customer">
<h2>{l s='View your data'}</h2>
@@ -34,7 +34,7 @@
<input type="radio" name="{$key}" id="{$key}_off" value="0" {if !$field['value']} checked="checked"{/if}{if isset($field['js']['off'])} {$field['js']['off']}{/if}/>
<label class="t" for="{$key}_off"> {l s='No'}</label>
{if !$field['mod_rewrite']}
<span class="warning_mod_rewrite">{l s='URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URL you must activate this mod.'}</span>
<span class="warning_mod_rewrite">{l s='URL rewriting (mod_rewrite) is not active on your server. If you want to use Friendly URLs you must activate this mod.'}</span>
<div class="clear"></div>
{/if}
{else}
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{if $add_permission eq '1'}
{if isset($logged_on_addons)}
<!--start addons login-->
@@ -70,7 +70,7 @@
{/if}
{/if}
{/if}
<!--start filter module-->
<style>.ac_results { border:1px solid #C2C4D9; }</style>
@@ -87,8 +87,9 @@
<select name="module_type" id="module_type_filter" {if $showTypeModules ne 'allModules' && $showTypeModules ne ''}style="background-color:#49B2FF;color:white;"{/if}>
<option value="allModules" {if $showTypeModules eq 'allModules'}selected="selected"{/if}>{l s='All Modules'}</option>
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Native Modules'}</option>
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partner Modules'}</option>
<option value="nativeModules" {if $showTypeModules eq 'nativeModules'}selected="selected"{/if}>{l s='Free Modules'}</option>
<option value="partnerModules" {if $showTypeModules eq 'partnerModules'}selected="selected"{/if}>{l s='Partner Modules (Free)'}</option>
<option value="mustHaveModules" {if $showTypeModules eq 'mustHaveModules'}selected="selected"{/if}>{l s='Must Have'}</option>
{if isset($logged_on_addons)}<option value="addonsModules" {if $showTypeModules eq 'addonsModules'}selected="selected"{/if}>{l s='Modules purchased on Addons'}</option>{/if}
<optgroup label="{l s='Authors'}">
{foreach from=$list_modules_authors key=module_author item=status}
@@ -28,14 +28,17 @@
<div class="toolbarBox toolbarHead">
<ul class="cc_button">
{if $add_permission eq '1'}
<li>
<a id="desc-module-new" class="toolbar_btn" href="#top_container" onclick="$('#module_install').slideToggle();" title="{l s='Add new module'}">
<span class="process-icon-new-module" ></span>
<div>{l s='Add new module'}</div>
</a>
</li>
{/if}
</ul>
<div class="pageTitle">
<h3><span id="current_obj" style="font-weight: normal;"><span class="breadcrumb item-0">Module</span> : <span class="breadcrumb item-1">{l s='List of modules'}</span></span></h3>
</div>
@@ -43,7 +46,7 @@
</div>
</div>
{if $add_permission eq '1'}
<div id="module_install" style="width:500px;margin-top:5px;{if !isset($smarty.post.downloadflag)}display: none;{/if}">
<fieldset>
<legend><img src="../img/admin/add.gif" alt="{l s='Add a new module'}" class="middle" /> {l s='Add a new module'}</legend>
@@ -63,5 +66,5 @@
</fieldset>
<br />
</div>
{/if}
@@ -48,7 +48,17 @@
<td><img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}"></td>
<td>
<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
<h3>{$module->displayName}{if isset($module->id) && $module->id gt 0}<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>{else}<span class="setup non-install">{l s='Not installed'}</span>{/if}</h3>
<h3>{$module->displayName}
{if isset($module->type) && $module->type == 'addonsMustHave'}
<span class="setup must-have">{l s='Must Have'}</span>
{else}
{if isset($module->id) && $module->id gt 0}
<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>
{else}
<span class="setup non-install">{l s='Not installed'}</span>
{/if}
{/if}
</h3>
<div class="metadata">
{if isset($module->author) && !empty($module->author)}
<dl class="">
@@ -76,10 +86,20 @@
</td>
<td>
<ul id="list-action-button">
{if $module->id && isset($module->version_addons) && $module->version_addons}
<li><a href="{$module->options.update_url}" class="button updated"><span>{l s='Update it!'}</span></a></li>
{/if}
<li><a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed"><span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span></a></li>
{if isset($module->type) && $module->type == 'addonsMustHave'}
<li>
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span><img src="../img/admin/cart_addons.png">&nbsp;&nbsp;{displayPrice price=$module->price currency=$module->id_currency}</span></a>
</li>
{else}
{if $module->id && isset($module->version_addons) && $module->version_addons}
<li><a href="{$module->options.update_url}" class="button updated"><span>{l s='Update it!'}</span></a></li>
{/if}
<li>
<a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed">
<span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span>
</a>
</li>
{/if}
</ul>
</td>
</tr>
@@ -72,11 +72,11 @@
<a name="{$hook['name']}"/>
<table cellpadding="0" cellspacing="0" class="table widthfull space {if $hook['module_count'] >= 2} tableDnD{/if}" id="{$hook['id_hook']}">
<colgroup>
<col width="10"></col>
<col width="30"></col>
<col width="40"></col>
<col width=""></col>
<col width="50"></col>
<col width="10">
<col width="30">
<col width="40">
<col width="">
<col width="50">
</colgroup>
<tr class="nodrag nodrop"><th colspan="5"> {if $hook['module_count'] && $can_move}
<input type="checkbox" id="Ghook{$hook['id_hook']}" style="margin-right: 2px;" onclick="hookCheckboxes({$hook['id_hook']}, 0, this)"/>
@@ -26,7 +26,7 @@
{if $product.customizedDatas}
<tr class="customized customized-{$product.id_order_detail}">
<input type="hidden" class="edit_product_id_order_detail" value="{$product.id_order_detail}" />
<td align="center">{if ($product.image->id)}{$product.image_tag}{else}'--'{/if}</td>
<td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{else}--{/if}</td>
<td>
<a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']} - {l s='customized'}</span><br />
@@ -23,7 +23,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<form method="POST" action="{$current_index}&viewOrder&id_order={$order->id|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<label>{l s='Name'}</label>
<div class="margin-form">
<input type="text" name="discount_name" value="" />
@@ -74,4 +74,4 @@
<input class="button" type="submit" name="submitNewVoucher" value="{l s='Add'}" />&nbsp;
<a href="#" id="cancel_add_voucher">{l s='Cancel'}</a>
</p>
</form>
@@ -82,12 +82,12 @@
--
{else}
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}&nbsp;
{if $document->getGlobalRestPaid()}
{if $document->getTotalPaid()}
<span style="color:red;font-weight:bold;">
{if $document->getGlobalRestPaid() >= 0}
({displayPrice price=$document->getGlobalRestPaid() currency=$currency->id} {l s='not paid'})
{else}
({displayPrice price=-$document->getGlobalRestPaid() currency=$currency->id} {l s='overpaid'})
{if $document->getRestPaid() > 0}
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
{else if $document->getRestPaid() < 0}
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
{/if}
</span>
{/if}
@@ -57,13 +57,43 @@
</span>
{/if}
</td>
{if ($order->hasBeenPaid())}<td align="center" class="productQuantity">{$product['product_quantity_refunded']}</td>{/if}
{if ($order->hasBeenDelivered())}<td align="center" class="productQuantity">{$product['product_quantity_return']}</td>{/if}
{if ($order->hasBeenPaid())}
<td align="center" class="productQuantity">
{$product['product_quantity_refunded']}
{if count($product['refund_history'])}
<span class="tooltip">
<span class="tooltip_label tooltip_button">+</span>
<div class="tooltip_content">
<span class="title">{l s='Refund history'}</span>
{foreach $product['refund_history'] as $refund}
{l s='%1s - %2s' sprintf=[{dateFormat date=$refund.date_add}, {displayPrice price=$refund.amount_tax_incl}]}<br />
{/foreach}
</div>
</span>
{/if}
</td>
{/if}
{if $order->hasBeenDelivered() || $order->hasProductReturned()}
<td align="center" class="productQuantity">
{$product['product_quantity_return']}
{if count($product['return_history'])}
<span class="tooltip">
<span class="tooltip_label tooltip_button">+</span>
<div class="tooltip_content">
<span class="title">{l s='Return history'}</span>
{foreach $product['return_history'] as $return}
{l s='%1s - %2s - %3s' sprintf=[{dateFormat date=$return.date_add}, $return.product_quantity, $return.state]}<br />
{/foreach}
</div>
</span>
{/if}
</td>
{/if}
<td align="center" class="productQuantity product_stock">{$product['current_stock']}</td>
<td align="center" class="total_product">
{displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id}
</td>
<td colspan="2" style="display: none;" class="add_product_fields">&nbsp;</th>
<td colspan="2" style="display: none;" class="add_product_fields">&nbsp;</td>
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$product['product_quantity_return']}" />
<input type="hidden" name="totalQty" id="totalQty" value="{$product['product_quantity']}" />
@@ -25,11 +25,11 @@
*}
<table class="table" width="100%" cellspacing="0" cellpadding="0" id="shipping_table">
<colgroup>
<col width="15%"></col>
<col width="15%"></col>
<col width=""></col>
<col width="10%"></col>
<col width="20%"></col>
<col width="15%">
<col width="15%">
<col width="">
<col width="10%">
<col width="20%">
</colgroup>
<thead>
<tr>
@@ -58,7 +58,7 @@
<td>
<span id="shipping_number_show">{if $line.url && $line.tracking_number}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}</span>
{if $line.can_edit}
<form style="display: inline;" method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$order->id|escape:'htmlall':'UTF-8'}">
<form style="display: inline;" method="post" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$order->id|escape:'htmlall':'UTF-8'}">
<span class="shipping_number_edit" style="display:none;">
<input type="hidden" name="id_order_carrier" value="{$line.id_order_carrier|htmlentities}" />
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
@@ -51,7 +51,7 @@
$('#product').typeWatch({
captureLength: 1,
highlight: true,
wait: 100,
wait: 750,
callback: function(){ searchProducts(); }
});
$('#payment_module_name').change(function() {
@@ -69,10 +69,10 @@
$('#id_currency').change(function() {
updateCurrency();
});
$('#id_lang').change(function() {
$('#id_lang').change(function(){
updateLang();
});
$('#delivery_option,#carrier_recycled_package,#order_gift,#gift_message,#id_address_delivery').change(function() {
$('#delivery_option,#carrier_recycled_package,#order_gift,#gift_message').change(function() {
updateDeliveryOption();
});
$('#shipping_price').change(function() {
@@ -139,7 +139,7 @@
$('.delete_product').live('click', function(e) {
e.preventDefault();
var to_delete = $(this).attr('rel').split('_');
deleteProduct(to_delete[1], to_delete[2]);
deleteProduct(to_delete[1], to_delete[2], to_delete[3]);
});
$('.delete_discount').live('click', function(e) {
e.preventDefault();
@@ -174,7 +174,7 @@
}
});
});
$('.duplicate_order').live('click', function(e) {
e.preventDefault();
duplicateOrder($(this).attr('rel'));
@@ -184,7 +184,7 @@
if ($(this).val() != cart_quantity[$(this).attr('rel')])
{
var product = $(this).attr('rel').split('_');
updateQty(product[0], product[1], $(this).val() - cart_quantity[$(this).attr('rel')]);
updateQty(product[0], product[1], product[2], $(this).val() - cart_quantity[$(this).attr('rel')]);
}
});
$('.increaseqty_product, .decreaseqty_product').live('click', function(e) {
@@ -193,7 +193,7 @@
var sign = '';
if ($(this).hasClass('decreaseqty_product'))
sign = '-';
updateQty(product[0], product[1], sign+1);
updateQty(product[0], product[1],product[2], sign+1);
});
$('#id_product').live('keydown', function(e) {
$(this).click();
@@ -234,10 +234,6 @@
}
});
});
/*$('.fancybox').live('click', function(e) {
$(this).fancybox().trigger('click');
return false;
});*/
resetBind();
});
@@ -252,7 +248,7 @@
onClosed: useCart(id_cart)
});*/
}
function add_cart_rule(id_cart_rule)
{
$.ajax({
@@ -355,7 +351,7 @@
$.ajax({
type:"POST",
url: "{$link->getAdminLink('AdminCarts')}",
async: true,
async: false,
dataType: "json",
data : {
ajax: "1",
@@ -371,12 +367,12 @@
}
});
}
function getSummary()
{
useCart(id_cart);
}
function deleteVoucher(id_cart_rule)
{
$.ajax({
@@ -400,7 +396,7 @@
});
}
function deleteProduct(id_product, id_product_attribute)
function deleteProduct(id_product, id_product_attribute, id_customization)
{
$.ajax({
type:"POST",
@@ -414,6 +410,7 @@
action: "deleteProduct",
id_product: id_product,
id_product_attribute: id_product_attribute,
id_customization: id_customization,
id_cart: id_cart,
id_customer: id_customer
},
@@ -470,7 +467,7 @@
$.ajax({
type:"POST",
url : "{$link->getAdminLink('AdminCarts')}",
async: true,
async: false,
dataType: "json",
data : {
ajax: "1",
@@ -552,7 +549,7 @@
var attributes_html = '';
var customization_html = '';
stock = {};
if(res.found)
{
$('#products_err').hide();
@@ -563,14 +560,15 @@
products_found += '<option '+(this.combinations.length > 0 ? 'rel="'+this.qty_in_stock+'"' : '')+' value="'+this.id_product+'">'+this.name+(this.combinations.length == 0 ? ' - '+this.formatted_price : '')+'</option>';
attributes_html += '<select class="id_product_attribute" id="ipa_'+this.id_product+'" style="display:none;">';
var id_product = this.id_product;
stock[id_product] = new Array();
if (this.customizable == '1')
{
customization_html += '<fieldset class="width3"><legend>{l s='Customization'}</legend><form id="customization_'+id_product+'" class="id_customization" method="post" enctype="multipart/form-data" action="'+admin_cart_link+'" style="display:none;">';
customization_html += '<input type="hidden" name="id_product" value="'+id_product+'"';
customization_html += '<input type="hidden" name="id_cart" value="'+id_cart+'"';
customization_html += '<input type="hidden" name="action" value="updateCustomizationFields"';
customization_html += '<input type="hidden" name="id_customer" value="'+id_customer+'"';
customization_html += '<input type="hidden" name="ajax" value="1"';
customization_html += '<input type="hidden" name="id_product" value="'+id_product+'" />';
customization_html += '<input type="hidden" name="id_cart" value="'+id_cart+'" />';
customization_html += '<input type="hidden" name="action" value="updateCustomizationFields" />';
customization_html += '<input type="hidden" name="id_customer" value="'+id_customer+'" />';
customization_html += '<input type="hidden" name="ajax" value="1" />';
$.each(this.customization_fields, function() {
customization_html += '<p><label for="customization_'+id_product+'_'+this.id_customization_field+'">';
if (this.required == 1)
@@ -584,13 +582,13 @@
});
customization_html += '</fieldset></form>';
}
$.each(this.combinations, function() {
attributes_html += '<option rel="'+this.qty_in_stock+'" '+(this.default_on == 1 ? 'selected="selected"' : '')+' value="'+this.id_product_attribute+'">'+this.attributes+' - '+this.formatted_price+'</option>';
stock[id_product][this.id_product_attribute] = this.qty_in_stock;
});
stock[this.id_product] = this.stock;
stock[this.id_product][0] = this.stock[0];
attributes_html += '</select>';
});
products_found += '</select>';
@@ -611,7 +609,7 @@
}
});
}
function display_product_customizations()
{
if ($('#products_found #customization_list').contents().find('#customization_'+$('#id_product option:selected').val()).children().length === 0)
@@ -624,7 +622,7 @@
$('#products_found #customization_list').css('height',$('#products_found #customization_list').contents().find('#customization_'+$('#id_product option:selected').val()).height()+95+'px');
}
}
function display_product_attributes()
{
if ($('#ipa_'+$('#id_product option:selected').val()+' option').length === 0)
@@ -637,17 +635,21 @@
}
}
function updateCartProducts(products)
function updateCartProducts(products, gifts)
{
var cart_content = '';
$.each(products, function() {
cart_quantity[this.id_product+'_'+this.id_product_attribute] = this.cart_quantity;
cart_quantity[Number(this.id_product)+'_'+Number(this.id_product_attribute)+'_'+Number(this.id_customization)] = this.cart_quantity;
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td><td><input type="text" size="7" rel="'+this.id_product+'_'+this.id_product_attribute+'" class="product_unit_price" value="'+this.price+'" />&nbsp;<span class="currency_sign"></span></td><td>';
cart_content += '<div style="float:left;"><a href="#" class="increaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'" ><img src="../img/admin/up.gif" /></a><br /><a href="#" class="decreaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'"><img src="../img/admin/down.gif" /></a></div>';
cart_content += '<div style="float:left;"><input type="text" rel="'+this.id_product+'_'+this.id_product_attribute+'" class="cart_quantity" size="2" value="'+this.cart_quantity+'" />';
cart_content += '<a href="#" class="delete_product" rel="delete_'+this.id_product+'_'+this.id_product_attribute+'" ><img src="../img/admin/delete.gif" /></a>';
cart_content += '<div style="float:left;"><a href="#" class="increaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><img src="../img/admin/up.gif" /></a><br /><a href="#" class="decreaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'"><img src="../img/admin/down.gif" /></a></div>';
cart_content += '<div style="float:left;"><input type="text" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" class="cart_quantity" size="2" value="'+this.cart_quantity+'" />';
cart_content += '<a href="#" class="delete_product" rel="delete_'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><img src="../img/admin/delete.gif" /></a>';
cart_content += '</div></td><td>'+this.total+'&nbsp;<span class="currency_sign"></span></td></tr>';
});
$.each(gifts, function() {
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td>';
cart_content += '<td>{l s='Gift !'}</td><td>'+this.cart_quantity+'</td><td>{l s='Gift !'}</td></tr>';
});
$('#customer_cart tbody').html(cart_content);
}
@@ -674,7 +676,7 @@
function displaySummary(jsonSummary)
{
updateCartProducts(jsonSummary.summary.products);
updateCartProducts(jsonSummary.summary.products, jsonSummary.summary.gift_products);
updateCartVouchers(jsonSummary.summary.discounts);
updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice);
@@ -682,7 +684,7 @@
$('#carriers_part,#summary_part').hide();
else
$('#carriers_part,#summary_part').show();
updateDeliveryOptionList(jsonSummary.delivery_option_list);
if (jsonSummary.cart.gift == 1)
@@ -697,7 +699,7 @@
$('#free_shipping').attr('checked', true);
else
$('#free_shipping').removeAttr('checked');
$('#gift_message').html(jsonSummary.cart.gift_message);
if(!changed_shipping_price)
$('#shipping_price').html('<b>'+jsonSummary.summary.total_shipping+'</b>');
@@ -722,7 +724,7 @@
resetBind();
}
function updateQty(id_product, id_product_attribute, qty)
function updateQty(id_product, id_product_attribute, id_customization, qty)
{
$.ajax({
type:"POST",
@@ -736,6 +738,7 @@
action: "updateQty",
id_product: id_product,
id_product_attribute: id_product_attribute,
id_customization: id_customization,
qty: qty,
id_customer: id_customer,
id_cart: id_cart,
@@ -773,7 +776,7 @@
else
{
$('#products_err').hide();
updateQty(id_product, $('#ipa_'+id_product+' option:selected').val(), $('#qty').val());
updateQty(id_product, $('#ipa_'+id_product+' option:selected').val(), 0, $('#qty').val());
}
}
@@ -879,7 +882,7 @@
}
});
}
function updateAddressesList(addresses, id_address_delivery, id_address_invoice)
{
var addresses_delivery_options = '';
@@ -905,7 +908,7 @@
$('#addresses_err').hide();
$('#address_delivery, #address_invoice').show();
}
$('#id_address_delivery').html(addresses_delivery_options);
$('#id_address_invoice').html(addresses_invoice_options);
$('#address_delivery_detail').html(address_delivery_detail);
@@ -932,6 +935,7 @@
success : function(res)
{
displaySummary(res);
updateDeliveryOption();
}
});
}
@@ -990,12 +994,12 @@
<div>
<table cellspacing="0" cellpadding="0" class="table width5" id="customer_cart">
<colgroup>
<col width="50px"></col>
<col width=""></col>
<col width="90px"></col>
<col width="100px"></col>
<col width="50px"></col>
<col width="50px"></col>
<col width="50px">
<col width="">
<col width="90px">
<col width="100px">
<col width="50px">
<col width="50px">
</colgroup>
<thead>
<tr>
@@ -1042,10 +1046,10 @@
<h3>{l s='Carts:'}</h3>
<table cellspacing="0" cellpadding="0" class="table width5">
<colgroup>
<col width="10px"></col>
<col width=""></col>
<col width="70px"></col>
<col width="50px"></col>
<col width="10px">
<col width="">
<col width="70px">
<col width="50px">
</colgroup>
<thead>
<tr>
@@ -1063,13 +1067,13 @@
<h3>{l s='Orders:'}</h3>
<table cellspacing="0" cellpadding="0" class="table width5">
<colgroup>
<col width="10px"></col>
<col width="50px"></col>
<col width=""></col>
<col width="90px"></col>
<col width="100px"></col>
<col width="250px"></col>
<col width="50px"></col>
<col width="10px">
<col width="50px">
<col width="">
<col width="90px">
<col width="100px">
<col width="250px">
<col width="50px">
</colgroup>
<thead>
<tr>
@@ -1215,3 +1219,4 @@
<div id="loader">
</div>
</div>
@@ -121,10 +121,10 @@
<!-- History of status -->
<table cellspacing="0" cellpadding="0" class="table history-status" style="width: 100%;">
<colgroup>
<col width="1%"></col>
<col width=""></col>
<col width="20%"></col>
<col width="20%"></col>
<col width="1%">
<col width="">
<col width="20%">
<col width="20%">
</colgroup>
{foreach from=$history item=row key=key}
{if ($key == 0)}
@@ -155,7 +155,7 @@
{if ($customer->isGuest())}
{l s='This order has been placed by a guest.'}
{if (!Customer::customerExists($customer->email))}
<form method="POST" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
<input type="hidden" name="id_lang" value="{$order->id_lang}" />
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform guest into customer'}" /></p>
{l s='This feature will generate a random password and send an e-mail to the customer'}
@@ -211,7 +211,7 @@
<thead>
<tr>
<th width="10%">
{l s='Order n°'}
{l s='Order no.'}
</th>
<th>
{l s='Status'}
@@ -260,7 +260,7 @@
<legend><img src="../img/admin/money.gif" /> {l s='Payment'}</legend>
{if (!$order->valid && sizeof($currencies) > 1)}
<form method="post" action="{$currentIndex}&viewOrder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<form method="post" action="{$currentIndex}&viewOrder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<p class="warn">{l s='Don\'t forget to update your conversion rate before make this change.'}</p>
<label>{l s='Don\'t forget to update your conversion rate before make this change.'}</label>
<select name="new_currency">
@@ -272,7 +272,7 @@
</select>
<input type="submit" class="button" name="submitChangeCurrency" value="{l s='Change'}" />
</form>
<hr />
<hr class="clear"/>
{/if}
{if count($order->getOrderPayments()) > 0}
@@ -293,15 +293,15 @@
</p>
{/if}
<form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
<table class="table" width="100%" cellspacing="0" cellpadding="0">
<colgroup>
<col width="15%"></col>
<col width=""></col>
<col width="20%"></col>
<col width="10%"></col>
<col width="10%"></col>
<col width="1%"></col>
<col width="15%">
<col width="">
<col width="20%">
<col width="10%">
<col width="10%">
<col width="1%">
</colgroup>
<thead>
<tr>
@@ -471,9 +471,9 @@
<td>{$line.type}</td>
<td>{$line.state_name}</td>
<td>
<span id="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{else if isset($line.tracking_number)}{$line.tracking_number}{/if}</span>
<span id="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number}">{$line.tracking_number}</a>{elseif isset($line.tracking_number)}{$line.tracking_number}{/if}</span>
{if $line.can_edit}
<form style="display: inline;" method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|escape:'htmlall':'UTF-8'}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'htmlall':'UTF-8'}{else}0{/if}">
<form style="display: inline;" method="post" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$order->id}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|escape:'htmlall':'UTF-8'}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'htmlall':'UTF-8'}{else}0{/if}">
<span class="shipping_number_edit" style="display:none;">
<input type="text" name="tracking_number" value="{$line.tracking_number|htmlentities}" />
<input type="submit" class="button" name="submitShippingNumber" value="{l s='Update'}" />
@@ -504,13 +504,13 @@
<div class="container-command container-command-top-spacing">
<!-- Addresses -->
{if !$order->isVirtual()}
<div style="width: 49%; float:left;"></contact>
<div style="width: 49%; float:left;">
<!-- Shipping address -->
<fieldset>
<legend><img src="../img/admin/delivery.gif" alt="{l s='Shipping address'}" />{l s='Shipping address'}</legend>
{if $can_edit}
<form method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}">
<form method="post" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$order->id}">
<div style="margin-bottom:5px;">
<p>
<select name="id_address">
@@ -534,13 +534,13 @@
</fieldset>
</div>
{/if}
<div style="width: 49%; float:right;"></contact>
<div style="width: 49%; float:right;">
<!-- Invoice address -->
<fieldset>
<legend><img src="../img/admin/invoice.gif" alt="{l s='Invoice address'}" />{l s='Invoice address'}</legend>
{if $can_edit}
<form method="POST" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}">
<form method="post" action="{$link->getAdminLink('AdminOrders')}&vieworder&id_order={$order->id}">
<div style="margin-bottom:5px;">
<p>
<select name="id_address">
@@ -565,7 +565,7 @@
<div class="clear" style="margin-bottom: 10px;"></div>
</div>
<form style="width: 98%" class="container-command-top-spacing" action="{$current_index}&vieworder&token={$smarty.get.token}" method="post" onsubmit="return orderDeleteProduct('{l s='Cannot return this product'}', '{l s='Quantity to cancel is greater than quantity available'}');">
<form style="width: 98%" class="container-command-top-spacing" action="{$current_index}&vieworder&token={$smarty.get.token}&id_order={$order->id}" method="post" onsubmit="return orderDeleteProduct('{l s='Cannot return this product'}', '{l s='Quantity to cancel is greater than quantity available'}');">
<input type="hidden" name="id_order" value="{$order->id}" />
<fieldset style="width: 100%; ">
<div style="display: none">
@@ -590,7 +590,7 @@
<th style="width: 15%; text-align: center">{l s='Unit Price'} <sup>*</sup></th>
<th style="width: 4%; text-align: center">{l s='Qty'}</th>
{if ($order->hasBeenPaid())}<th style="width: 3%; text-align: center">{l s='Refunded'}</th>{/if}
{if ($order->hasBeenDelivered())}<th style="width: 3%; text-align: center">{l s='Returned'}</th>{/if}
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}<th style="width: 3%; text-align: center">{l s='Returned'}</th>{/if}
<th style="width: 10%; text-align: center">{l s='Available quantity'}</th>
<th style="width: 10%; text-align: center">{l s='Total'} <sup>*</sup></th>
<th colspan="2" style="display: none;" class="add_product_fields">&nbsp;</th>
@@ -690,7 +690,7 @@
</td>
{if $can_edit}
<td class="center">
<a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img src="../img/admin/delete.gif" alt="{l s='Delete voucher'}" /></a>
<a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}"><img src="../img/admin/delete.gif" alt="{l s='Delete voucher'}" /></a>
</td>
{/if}
</tr>
@@ -714,22 +714,23 @@
<div style="clear:both; height:15px;">&nbsp;</div>
<div style="float: right; width: 160px; display: none;" class="standard_refund_fields">
{if ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN'))}
<input type="checkbox" id="reinjectQuantities" name="reinjectQuantities" class="button" />&nbsp;<label for="reinjectQuantities" style="float:none; font-weight:normal;">{l s='Re-stock products'}</label><br />
{/if}
{if ((!$order->hasBeenDelivered() && $order->hasBeenPaid()) || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
<input type="checkbox" id="generateCreditSlip" name="generateCreditSlip" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateCreditSlip" style="float:none; font-weight:normal;">{l s='Generate a credit slip'}</label><br />
<input type="checkbox" id="generateDiscount" name="generateDiscount" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br />
<span id="spanShippingBack" style="display:none;"><input type="checkbox" id="shippingBack" name="shippingBack" class="button" />&nbsp;<label for="shippingBack" style="float:none; font-weight:normal;">{l s='Repay shipping costs'}</label><br /></span>
{/if}
{if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
<div style="text-align:center; margin-top:5px;">
<input type="submit" name="cancelProduct" value="{if $order->hasBeenDelivered()}{l s='Return products'}{elseif $order->hasBeenPaid()}{l s='Refund products'}{else}{l s='Cancel products'}{/if}" class="button" style="margin-top:8px;" />
</div>
{/if}
{if ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN'))}
<input type="checkbox" id="reinjectQuantities" name="reinjectQuantities" class="button" />&nbsp;<label for="reinjectQuantities" style="float:none; font-weight:normal;">{l s='Re-stock products'}</label><br />
{/if}
{if ((!$order->hasBeenDelivered() && $order->hasBeenPaid()) || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
<input type="checkbox" id="generateCreditSlip" name="generateCreditSlip" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateCreditSlip" style="float:none; font-weight:normal;">{l s='Generate a credit slip'}</label><br />
<input type="checkbox" id="generateDiscount" name="generateDiscount" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br />
<span id="spanShippingBack" style="display:none;"><input type="checkbox" id="shippingBack" name="shippingBack" class="button" />&nbsp;<label for="shippingBack" style="float:none; font-weight:normal;">{l s='Repay shipping costs'}</label><br /></span>
{/if}
{if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Configuration::get('PS_ORDER_RETURN')))}
<div style="text-align:center; margin-top:5px;">
<input type="submit" name="cancelProduct" value="{if $order->hasBeenDelivered()}{l s='Return products'}{elseif $order->hasBeenPaid()}{l s='Refund products'}{else}{l s='Cancel products'}{/if}" class="button" style="margin-top:8px;" />
</div>
{/if}
</div>
<div style="float: right; width: 160px; display: none;" class="partial_refund_fields">
<div style="float: right; width: 160px; display:none;" class="partial_refund_fields">
<div style="text-align:center; margin-top:5px;">
<input type="checkbox" id="generateDiscountRefund" name="generateDiscountRefund" class="button" onclick="toggleShippingCost(this)" />&nbsp;<label for="generateDiscount" style="float:none; font-weight:normal;">{l s='Generate a voucher'}</label><br />
<input type="submit" name="partialRefund" value="{l s='Partial refund'}" class="button" style="margin-top:8px;" />
</div>
</div>
@@ -37,13 +37,13 @@
</div>
{/foreach}
<sup>&nbsp;*</sup>
<p class="preference_description">{l s='Maximum 32 characters.'}</p>
</div>
<p class="margin-form preference_description">{l s='Maximum 32 characters.'}</p>
<div class="clear">&nbsp;</div>
<label>{l s='Description:'} </label>
<div class="margin-form translatable">
{foreach $languages as $language}
<div id="attachment_description_{$language.id_lang}" style="display: {if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
<div class="lang_{$language.id_lang}" style="display: {if $language.id_lang == $default_form_language}block{else}none{/if}; float: left;">
<textarea name="attachment_description_{$language.id_lang}">{$attachment_description[$language.id_lang]|escape:'htmlall':'UTF-8'}</textarea>
</div>
{/foreach}
@@ -90,4 +90,10 @@
</table>
<div class="clear">&nbsp;</div>
<input type="hidden" name="arrayAttachments" id="arrayAttachments" value="{foreach $attach1 as $attach}{$attach.id_attachment},{/foreach}" />
<script type="text/javascript">
var iso = '{$iso_tiny_mce}';
var pathCSS = '{$smarty.const._THEME_CSS_DIR_}';
var ad = '{$ad}';
</script>
{/if}
@@ -28,17 +28,24 @@
<input type="hidden" name="submitted_tabs[]" value="Customization" />
<h4>{l s='Add or modify customizable properties'}</h4>
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"}
<div class="separation"></div><br />
<table cellpadding="5" style="width:100%">
<tr>
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">{l s='File fields:'}</td>
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
<label>{l s='File fields:'}</label>
</td>
<td style="padding-bottom:5px;">
<input type="text" name="uploadable_files" id="uploadable_files" size="4" value="{$uploadable_files|htmlentities}" />
<p class="preference_description">{l s='Number of upload file fields displayed'}</p>
</td>
</tr>
<tr>
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">{l s='Text fields:'}</td>
<td style="width:150px;text-align:right;padding-right:10px;font-weight:bold;vertical-align:top;" valign="top">
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
<label>{l s='Text fields:'}</label>
</td>
<td style="padding-bottom:5px;">
<input type="text" name="text_fields" id="text_fields" size="4" value="{$text_fields|htmlentities}" />
<p class="preference_description">{l s='Number of text fields displayed'}</p>
@@ -38,22 +38,22 @@
<br />
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
<colgroup>
<col width="300"></col>
<col width=""></col>
<col width="300"></col>
<col width="300">
<col width="">
<col width="300">
</colgroup>
<tr>
<th height="39px">{l s='Feature'}</td>
<th>{l s='Pre-defined value'}</td>
<th><u>{l s='or'}</u> {l s='Customized value'}</td>
<th height="39px">{l s='Feature'}</th>
<th>{l s='Pre-defined value'}</th>
<th><u>{l s='or'}</u> {l s='Customized value'}</th>
</tr>
</table>
{foreach from=$available_features item=available_feature}
<table cellpadding="5" style="background-color:#fff; width: 100%;border:1px solid #ccc; border-top:none; padding:4px 6px;">
<colgroup>
<col width="300"></col>
<col width=""></col>
<col width="300"></col>
<col width="300">
<col width="">
<col width="300">
</colgroup>
<tr>
<td>{$available_feature.name}</td>
@@ -27,6 +27,6 @@
{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
<label style="float: none">
<input type="checkbox" style="vertical-align: text-bottom" onclick="$('#product-tab-content-{$product_tab} input[name^=\'multishop_check[\']').attr('checked', this.checked); ProductMultishop.checkAll{$product_tab}()" />
{l s='Check / uncheck all (you are editing this page for several shops, some fields like "name" or "price" are disabled, you have to check these fields in order to edit them for these shops)'}
{l s='Check/uncheck all (you are editing this page for several shops, some fields like "name" or "price" are disabled, you have to check these fields in order to edit them for these shops)'}
</label>
{/if}
@@ -27,80 +27,81 @@
<script type="text/javascript">
var product_url = '{$link->getAdminLink('AdminProducts', true)}';
var Customer = {
"hiddenField": jQuery('#id_customer'),
"field": jQuery('#customer'),
"container": jQuery('#customers'),
"loader": jQuery('#customerLoader'),
"init": function() {
jQuery(Customer.field).typeWatch({
"captureLength": 1,
"highlight": true,
"wait": 50,
"callback": Customer.search
}).focus(Customer.placeholderIn).blur(Customer.placeholderOut);
},
"placeholderIn": function() {
if (this.value == '{l s='All customers'}') {
this.value = '';
}
},
"placeholderOut": function() {
if (this.value == '') {
this.value = '{l s='All customers'}';
}
},
"search": function()
{
Customer.showLoader();
jQuery.ajax({
"type": "POST",
"url": "{$link->getAdminLink('AdminCustomers')}",
"async": true,
"dataType": "json",
"data": {
"ajax": "1",
"token": "{getAdminToken tab='AdminCustomers'}",
"tab": "AdminCustomers",
"action": "searchCustomers",
"customer_search": Customer.field.val()
},
"success": Customer.success
});
},
"success": function(result)
{
if(result.found) {
var html = '<ul class="clearfix">';
jQuery.each(result.customers, function() {
html += '<li><a class="fancybox" href="{$link->getAdminLink('AdminCustomers')}&id_customer='+this.id_customer+'&viewcustomer&liteDisplaying=1">'+this.firstname+' '+this.lastname+'</a>'+(this.birthday ? ' - '+this.birthday:'')+'<br/>';
html += '<a href="mailto:'+this.email+'">'+this.email+'</a><br />';
html += '<a onclick="Customer.select('+this.id_customer+', \''+this.firstname+' '+this.lastname+'\'); return false;" href="#" class="button">{l s='Choose'}</a></li>';
$(document).ready(function () {
var Customer = {
"hiddenField": jQuery('#id_customer'),
"field": jQuery('#customer'),
"container": jQuery('#customers'),
"loader": jQuery('#customerLoader'),
"init": function() {
jQuery(Customer.field).typeWatch({
"captureLength": 1,
"highlight": true,
"wait": 50,
"callback": Customer.search
}).focus(Customer.placeholderIn).blur(Customer.placeholderOut);
},
"placeholderIn": function() {
if (this.value == '{l s='All customers'}') {
this.value = '';
}
},
"placeholderOut": function() {
if (this.value == '') {
this.value = '{l s='All customers'}';
}
},
"search": function()
{
Customer.showLoader();
jQuery.ajax({
"type": "POST",
"url": "{$link->getAdminLink('AdminCustomers')}",
"async": true,
"dataType": "json",
"data": {
"ajax": "1",
"token": "{getAdminToken tab='AdminCustomers'}",
"tab": "AdminCustomers",
"action": "searchCustomers",
"customer_search": Customer.field.val()
},
"success": Customer.success
});
html += '</ul>';
},
"success": function(result)
{
if(result.found) {
var html = '<ul class="clearfix">';
jQuery.each(result.customers, function() {
html += '<li><a class="fancybox" href="{$link->getAdminLink('AdminCustomers')}&id_customer='+this.id_customer+'&viewcustomer&liteDisplaying=1">'+this.firstname+' '+this.lastname+'</a>'+(this.birthday ? ' - '+this.birthday:'')+'<br/>';
html += '<a href="mailto:'+this.email+'">'+this.email+'</a><br />';
html += '<a onclick="Customer.select('+this.id_customer+', \''+this.firstname+' '+this.lastname+'\'); return false;" href="#" class="button">{l s='Choose'}</a></li>';
});
html += '</ul>';
}
else
html = '<div class="warn">{l s='No customers found'}</div>';
Customer.hideLoader();
Customer.container.html(html);
jQuery('.fancybox', Customer.container).fancybox();
},
"select": function(id_customer, fullname)
{
Customer.hiddenField.val(id_customer);
Customer.field.val(fullname);
Customer.container.empty();
return false;
},
"showLoader": function() {
Customer.loader.fadeIn();
},
"hideLoader": function() {
Customer.loader.fadeOut();
}
else
html = '<div class="warn">{l s='No customers found'}</div>';
Customer.hideLoader();
Customer.container.html(html);
jQuery('.fancybox', Customer.container).fancybox();
},
"select": function(id_customer, fullname)
{
Customer.hiddenField.val(id_customer);
Customer.field.val(fullname);
Customer.container.empty();
return false;
},
"showLoader": function() {
Customer.loader.fadeIn();
},
"hideLoader": function() {
Customer.loader.fadeOut();
}
};
jQuery(document).ready(Customer.init);
};
Customer.init();
});
</script>
{* END CUSTOMER AUTO-COMPLETE / TO REFACTO *}
@@ -120,7 +121,7 @@ jQuery(document).ready(Customer.init);
<label>{l s='Pre-tax wholesale price:'}</label>
</td>
<td style="padding-bottom:5px;">
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{$product->wholesale_price|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" id="wholesale_price" type="text" value="{{toolsConvertPrice price=$product->wholesale_price}|string_format:'%.2f'}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
<p class="preference_description">{l s='The wholesale price at which you bought this product'}</p>
</td>
</tr>
@@ -131,8 +132,8 @@ jQuery(document).ready(Customer.init);
<label>{l s='Pre-tax retail price:'}</label>
</td>
<td style="padding-bottom:5px;">
<input type="hidden" id="priceTEReal" name="price" value="{$product->price}" />
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{$product->price|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix}
<input type="hidden" id="priceTEReal" name="price" value="{toolsConvertPrice price=$product->price}" />
{$currency->prefix}<input size="11" maxlength="14" id="priceTE" name="price_displayed" type="text" value="{{toolsConvertPrice price=$product->price}|string_format:'%.2f'}" onchange="noComma('priceTE'); $('#priceTEReal').val(this.value);" onkeyup="$('#priceType').val('TE'); $('#priceTEReal').val(this.value.replace(/,/g, '.')); if (isArrowKey(event)) return; calcPriceTI();" />{$currency->suffix}
<p class="preference_description">{l s='The pre-tax retail price to sell this product'}</p>
</td>
</tr>
@@ -209,7 +210,7 @@ jQuery(document).ready(Customer.init);
{l s='per'} <span id="unity_second">{$product->unity}</span> {l s='with tax'}
</span>
{/if}
<p>{l s='e.g. per lb'}</p>
<p>{l s='e.g. per lb'}</p>
</td>
</tr>
<tr>
@@ -384,7 +385,7 @@ jQuery(document).ready(Customer.init);
</div>
</div>
<table style="text-align: center;width:100%" class="table" cellpadding="0" cellspacing="0" id="specific_prices_list">
<table style="text-align: left;width:100%" class="table" cellpadding="0" cellspacing="0" id="specific_prices_list">
<thead>
<tr>
<th class="cell border" style="width: 12%;">{l s='Rule'}</th>
@@ -394,11 +395,10 @@ jQuery(document).ready(Customer.init);
<th class="cell border" style="width: 11%;">{l s='Country'}</th>
<th class="cell border" style="width: 13%;">{l s='Group'}</th>
<th class="cell border" style="width: 13%;">{l s='Customer'}</th>
<th class="cell border" style="width: 12%;">{l s='Price'} {if $country_display_tax_label}{l s='(tax excl.)'}{/if}</th>
<th class="cell border" style="width: 10%;">{l s='Reduction'}</th>
<th class="cell border" style="width: 13%;">{l s='Fixed price'}</th>
<th class="cell border" style="width: 13%;">{l s='Impact'}</th>
<th class="cell border" style="width: 15%;">{l s='Period'}</th>
<th class="cell border" style="width: 10%;">{l s='From (quantity)'}</th>
<th class="cell border" style="width: 15%;">{l s='Final price'} {if $country_display_tax_label}{l s='(tax excl.)'}{/if}</th>
<th class="cell border" style="width: 13%;">{l s='From (quantity)'}</th>
<th class="cell border" style="width: 2%;">{l s='Action'}</th>
</tr>
</thead>
@@ -34,7 +34,7 @@
<p>{l s='You can manually specify the quantities for the product/each product combination, or choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}</p>
<p>{l s='In this case, the quantities correspond to the quantitites of the real stock in the warehouses associated to the current shop or current group of shops.'}</p>
<br/>
<p>{l s='For packs, if it has products that use the advanced stock management, you have to specify a common warehouse for these products in the pack.'}</p>
<p>{l s='For packs, if it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}</p>
<p>{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}</p>
</div>
<br />
@@ -83,7 +83,7 @@
<label style="float:none;font-weight:normal" for="depends_on_stock_1">
{l s='Available quantities for current product and its combinations are based on stock in the warehouses'}
{if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack}
&nbsp;-&nbsp;<b>{l s='This requires you to enable the advanced stock management globally or for this product.'}</b>
&nbsp;-&nbsp;<b>{l s='This requires you to enable advanced stock management globally or for this product.'}</b>
{else if $product->cache_is_pack}
&nbsp;-&nbsp;<b>{l s='This parameter depends on the product(s) in the pack.'}</b>
{/if}
@@ -117,8 +117,8 @@
<td valign="top" style="text-align:left;vertical-align:top;">
<table class="table" cellpadding="0" cellspacing="0" style="width:100%;">
<colgroup>
<col width="50"></col>
<col></col>
<col width="50">
<col>
</colgroup>
<thead>
<tr>
@@ -87,7 +87,7 @@
onmousedown="updateFriendlyURLByName();">{l s='Generate'}</a>&nbsp;
{l s='Friendly URL from product name.'}<br /><br />
{l s='Product link will look like this:'}
{if $ps_ssl_enabled}https://{else}http://{/if}{$smarty.server.SERVER_NAME}{$smarty.const.__PS_BASE_URI__}{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html</p>
{$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html</p>
</td>
</tr>
</table>
@@ -60,7 +60,7 @@
</td>
</tr>
<tr>
<td class="col-left"><label>{l s='Additional shipping cost:'}</label></td>
<td class="col-left"><label>{l s='Additional shipping cost (per quantity):'}</label></td>
<td style="padding-bottom:5px;">{$currency->prefix}<input type="text" name="additional_shipping_cost"
value="{$product->additional_shipping_cost|htmlentities}" />{$currency->suffix}
{if $country_display_tax_label}{l s='tax excl.'}{/if}
@@ -117,7 +117,7 @@
{* [begin] virtual product *}
<div id="virtual_good" {if !$product->productDownload->id || $product->productDownload->active}style="display:none"{/if} >
<div>
<label>{l s='Does this product has an associated file?'}</label>
<label>{l s='Does this product have an associated file?'}</label>
<label style="width:50px"><input type="radio" value="1" name="is_virtual_file" {if $product_downloaded}checked="checked"{/if} />{l s='Yes'}</label>
<label style="width:50px;"><input type="radio" value="0" name="is_virtual_file" {if !$product_downloaded}checked="checked"{/if} />{l s='No'}</label>
</div><br />
@@ -45,7 +45,7 @@
<li>
{l s='The field `request_uri` is the URL from which the customers come to your website.'}<br />
{l s='For example, if the visitor accesses a product page, the URL will be'} "{$uri}music-ipods/1-ipod-nano.html".<br />
{l s='This is interesting because you can add some tags or tokens in the links pointing to your website.'}
{l s='This is helpful because you can add some tags or tokens in the links pointing to your website.'}
{l s='For example, you can post a link "%dindex.php?prestashop" in the forum and get statistics by entering "%prestashop" in the field `request_uri`. You will get all the visitors coming from the forum.'}
{l s='This method is more reliable than the `http_referer` one, but there is a danger: if a search engine read a page with your link, then it will be displayed in its results and you will have not only the forum visitors, but also the ones from the search engine.'}
</li>
@@ -27,7 +27,7 @@
{extends file="helpers/list/list_header.tpl"}
{block name="override_header"}
<script language="javascript">
<script language="javascript" type="text/javascript">
$(function() {
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
var btn_submit_calendar = $('#submitDatePicker');
@@ -27,7 +27,7 @@
{extends file="helpers/view/view.tpl"}
{block name="override_tpl"}
<script language="javascript">
<script language="javascript" type="text/javascript">
$(function() {
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
var btn_submit_calendar = $('#submitDatePicker');
@@ -28,12 +28,12 @@
{block name="input"}
{if $input.type == 'text_customer'}
{$customer->firstname} {$customer->lastname}
<span class="normal-text">{$customer->firstname} {$customer->lastname}</span>
<p style="clear: both">
<a href="{$url_customer}">{l s='View details on customer page'}</a>
</p>
{elseif $input.type == 'text_order'}
{$text_order}
<span class="normal-text">{$text_order}</span>
<p style="clear: both">
<a href="{$url_order}">{l s='View details on order page'}</a>
</p>
@@ -80,7 +80,7 @@ $(function() {
{/if}
{if isset($customers)}
{if !$customers}
<h3>{l s='No customers matching your query'} : {$query}</h3>
<h3>{l s='There are no customers matching your query'} : {$query}</h3>
{else}
<h3>{l s='Customer matching your query'} : {$query}</h3>
{$customers}
@@ -29,7 +29,7 @@
{/if}
<div class="multishop-left">
<div class="multishop-title">{l s='Multishop tree'}</div>
<div class="multishop-title">{l s='Multistore tree'}</div>
{include file="controllers/shop/tree.tpl" selected_tree_id=$selected_tree_id}
</div>
<div class="multishop-right">{$content}</div>
@@ -114,6 +114,10 @@
{/block}
{block name="script"}
var ids_category = new Array();
{foreach $ids_category as $key => $id_category}
ids_category[{$key}] = {$id_category};
{/foreach}
$(document).ready(function() {
$('input[name=useImportData]').click(function() {
if ($(this).attr('id') == 'useImportData_on')
@@ -121,5 +125,21 @@
else
$('#shop_list, #data_list').slideUp('slow');
});
$('#id_category, #importFromShop').change(function(){
shop_id = $('#importFromShop').val();
category_id = $('#id_category').val();
if (ids_category[shop_id] != category_id)
disableProductsDuplication();
else
enableProductsDuplication();
});
});
function disableProductsDuplication()
{
$('input[name="importData[product_attribute]"], input[name="importData[image]"], input[name="importData[product]"], input[name="importData[stock_available]"], input[name="importData[discount]"]').removeAttr('checked').attr('disabled', 'disabled');
}
function enableProductsDuplication()
{
$('input[name="importData[product_attribute]"], input[name="importData[image]"], input[name="importData[product]"], input[name="importData[stock_available]"], input[name="importData[discount]"]').removeAttr('disabled').attr('checked', 'checked');
}
{/block}
@@ -27,7 +27,7 @@
{extends file="helpers/view/view.tpl"}
{block name="override_tpl"}
<script language="javascript">
<script language="javascript" type="text/javascript">
$(function() {
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
var btn_submit_calendar = $('#submitDatePicker');
@@ -49,13 +49,13 @@
<h3><a href="?tab=AdminProducts&id_product={$product->id}&updateproduct&token={getAdminToken tab='AdminProducts'}">{$product->name}</a></h3>
<table border="0" cellpadding="0" cellspacing="0" class="table" style="width:100%;">
<colgroup>
<col></col>
<col width="190"></col>
<col width="190"></col>
<col width="80"></col>
<col width="80"></col>
<col width="80"></col>
<col width="80"></col>
<col>
<col width="190">
<col width="190">
<col width="80">
<col width="80">
<col width="80">
<col width="80">
</colgroup>
<tr>
<th style="height:40px;">{l s='Attribute name'}</th>
@@ -25,7 +25,7 @@
*}
{extends file="helpers/list/list_header.tpl"}
{block name=override_header}
<script language="javascript">
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$('input.quantity_received_today').live('click', function() {
/* checks checkbox when the input is clicked */
@@ -31,31 +31,31 @@
<h3>{l s='Products'}</h3>
<table class="double_select">
<tr>
<td>
<select multiple id="select_left" name="products[]">
{foreach from=$field.products item='product'}
<option value="{$product.id_product}">{$product.name}</option>
{/foreach}
</select>
<span class="hint" name="help_box">{l s='Double-click to move to other column'}<span class="hint-pointer">&nbsp;</span></span>
<br /><br />
<a href="#" id="move_to_right" class="multiple_select_remove">
{l s='Remove'} &gt;&gt;
</a>
</td>
<td style="padding-left:20px;">
<select multiple id="select_right">
<select multiple id="select_left">
{foreach from=$field.products_unselected item='product'}
<option value="{$product.id_product}">{$product.name}</option>
{/foreach}
</select>
<span class="hint" name="help_box">{l s='Double-click to move to other column'}<span class="hint-pointer">&nbsp;</span></span>
<br /><br />
<a href="#" id="move_to_left" class="multiple_select_add">
&lt;&lt; {l s='Add'}
<a href="#" id="move_to_right" class="multiple_select_add">
{l s='Add'} &gt;&gt;
</a>
</div>
</td>
<td>
<select multiple id="select_right" name="products[]">
{foreach from=$field.products item='product'}
<option value="{$product.id_product}">{$product.name}</option>
{/foreach}
</select>
<span class="hint" name="help_box">{l s='Double-click to move to other column'}<span class="hint-pointer">&nbsp;</span></span>
<br /><br />
<a href="#" id="move_to_left" class="multiple_select_remove">
&lt;&lt; {l s='Remove'}
</a>
</td>
</tr>
</table>
</div>
@@ -198,7 +198,7 @@
<div style="float:left;">
<input type="submit" value="{l s=' Copy '}" name="submitCopyLang" class="button" style="margin:25px 0px 0px 25px;" />
</div>
<p style="clear: left; padding: 16px 0px 0px 0px;"><span style="font-style: bold; color: red;">*</span> {l s='Language files (as indicated at Tools > Languages > Edition) must be complete to allow copying of translations'}</p>
<p style="clear: left; padding: 16px 0px 0px 0px;"><span style="font-style: bold; color: red;">*</span> {l s='Language files must be complete to allow copying of translations'}</p>
</fieldset>
</form>
{/block}
@@ -108,10 +108,10 @@
{$missing_translations_module = 0}
{/if}
<fieldset>
<legend style="cursor : pointer" onclick="$('#{$theme_name}_{$module_name}_{$template_name}').slideToggle();">{if $theme_name === 'default'}{l s='default'}{else}{$theme_name}{/if} - {$template_name}
<legend style="cursor : pointer" onclick="$('#{$theme_name}_{$module_name}_{$template_name|replace:'.':'_'}').slideToggle();">{if $theme_name === 'default'}{l s='default'}{else}{$theme_name}{/if} - {$template_name}
<font color="blue">{$newLang|count}</font> {l s='expressions'} (<font color="red">{$missing_translations_module}</font>)
</legend>
<div name="{$type}_div" id="{$theme_name}_{$module_name}_{$template_name}" style="display:{if $missing_translations_module}block{else}none{/if}">
<div name="{$type}_div" id="{$theme_name}_{$module_name}_{$template_name|replace:'.':'_'}" style="display:{if $missing_translations_module}block{else}none{/if}">
<table cellpadding="2">
{foreach $newLang as $key => $value}
<tr>
+2 -2
View File
@@ -202,11 +202,11 @@
{foreach $tabs AS $t}
<li class="submenu_size maintab {if $t.current}active{/if}" id="maintab{$t.id_tab}">
<span class="title">
<img src="{$t.img}" alt="" />{$t.name}
<img src="{$t.img}" alt="" />{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}
</span>
<ul class="submenu">
{foreach from=$t.sub_tabs item=t2}
<li><a href="{$t2.href}">{$t2.name}</a></li>
<li><a href="{$t2.href}">{if $t2.name eq ''}{$t2.class_name}{else}{$t2.name}{/if}</a></li>
{/foreach}
</ul>
</li>
@@ -109,7 +109,7 @@ function check_all_shop() {
{assign var=checked value=false}
{/if}
<tr>
<td>
<td {if $groupData['disable_shops']}style="font-style:italic;background-color:#CFC4FF"{/if}>
<img style="vertical-align:middle;" alt="" src="../img/admin/lv3_{if $j < count($groupData['shops']) - 1}b{else}f{/if}.png" />
<label class="child">
<input class="input_shop"
@@ -118,7 +118,9 @@ function check_all_shop() {
shop_id="{$shopID}"
name="checkBoxShopAsso_{$table}[{$shopID}]"
id="checkedBox_{$shopID}"
{if $checked} checked="checked"{/if} />
{if $checked} checked="checked"{/if}
{if $groupData['disable_shops']} readonly="readonly" onclick="return false"{/if}
/>
{$shopData['name']}
</label>
</td>
@@ -40,7 +40,7 @@
{foreach $fieldset.form as $key => $field}
{if $key == 'legend'}
<legend>
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title|escape:'htmlall':'UTF-8'}}" />{/if}
{if isset($field.image)}<img src="{$field.image}" alt="{$field.title|escape:'htmlall':'UTF-8'}" />{/if}
{$field.title}
</legend>
{elseif $key == 'description' && $field}
@@ -23,6 +23,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$href}" class="default" title="{$action}" {if isset($name)}name="{$name}{/if}">
<a href="{$href}" class="default" title="{$action}" {if isset($name)}name="{$name}"{/if}>
<img src="../img/admin/asterisk.gif" alt="{$action}" />
</a>
@@ -59,7 +59,7 @@
{/if}
{if !$categoryData['hide_multishop_checkbox'] && $use_multishop}
<input type="checkbox" style="vertical-align: text-top" onclick="checkAllMultishopDefaultValue(this)" /> <b>{l s='Check / uncheck all'}</b> {l s='(check boxes if you want to set a custom value for this shop or group shop context)'}
<input type="checkbox" style="vertical-align: text-top" onclick="checkAllMultishopDefaultValue(this)" /> <b>{l s='Check/uncheck all'}</b> {l s='(check boxes if you want to set a custom value for this shop or group shop context)'}
<div class="separation"></div>
{/if}
@@ -105,13 +105,12 @@
<label class="t" for="{$key}_{$k}"> {$v}</label><br />
{/foreach}
<br />
{*{elseif $field['type'] == 'checkbox'}
{elseif $field['type'] == 'checkbox'}
{foreach $field['choices'] AS $k => $v}
<input type="checkbox" name="{$key}" id="{$key}{$k}_on" value="{$k|intval}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
<label class="t" for="{$key}{$k}_on"> {$v}</label><br />
{/foreach}
<br />
*}
{elseif $field['type'] == 'text'}
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
{if isset($field['suffix'])}&nbsp;{$field['suffix']|strval}{/if}
@@ -38,7 +38,8 @@
{/foreach}
</ul>
<script language="javascript">
<script language="javascript" type="text/javascript">
var submited = false
$(function() {
//get reference on save link
btn_save = $('span[class~="process-icon-save"]').parent();
@@ -82,6 +83,11 @@
//submit the form
{block name=formSubmit}
btn_save.click(function() {
// Avoid double click
if (submited)
return false;
submited = true;
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
+6 -3
View File
@@ -278,9 +278,12 @@ class AddressCore extends ObjectModel
{
if (isset(self::$_idCountries[$id_address]))
return self::$_idCountries[$id_address];
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT `id_country`, `id_state`, `vat_number`, `postcode` FROM `'._DB_PREFIX_.'address`
WHERE `id_address` = '.(int)$id_address);
if ($id_address)
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT `id_country`, `id_state`, `vat_number`, `postcode` FROM `'._DB_PREFIX_.'address`
WHERE `id_address` = '.(int)$id_address);
else
$result = false;
self::$_idCountries[$id_address] = $result;
return $result;
}
+5 -4
View File
@@ -474,10 +474,11 @@ abstract class AdminTabCore
/* Checking for maximum multilingual fields size */
foreach ($rules['sizeLang'] as $fieldLang => $maxLength)
foreach ($languages as $language)
{
if (Tools::getValue($fieldLang.'_'.$language['id_lang']) !== false && Tools::strlen(Tools::getValue($fieldLang.'_'.$language['id_lang'])) > $maxLength)
$this->_errors[] = sprintf(Tools::displayError('field %1$s is too long. (%2$d chars max, html chars including)'), call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), $maxLength);
$this->_errors[] = $this->l('the field').' <b>'.call_user_func(array($className, 'displayFieldName'), $fieldLang, $className).' ('.$language['name'].')</b> '.$this->l('is too long').' ('.$maxLength.' '.$this->l('chars max, html chars including').')';
}
/* Overload this method for custom checking */
$this->_childValidation();
@@ -1304,10 +1305,10 @@ abstract class AdminTabCore
$whereShop = Shop::addSqlRestriction($this->shopShareDatas, 'a', $this->shopLinkType);
}
$assos = Shop::getAssoTables();
if (isset($assos[$this->table]) && $assos[$this->table]['type'] == 'shop')
$asso = Shop::getAssoTable($this->table);
if ($asso !== false && $assos['type'] == 'shop')
{
$filterKey = $assos[$this->table]['type'];
$filterKey = $asso['type'];
$idenfierShop = Shop::getContextListShopID();
}
+9 -20
View File
@@ -73,30 +73,19 @@ class AttributeCore extends ObjectModel
public function delete()
{
$result = Db::getInstance()->executeS('
SELECT `id_product_attribute`
FROM `'._DB_PREFIX_.'product_attribute_combination`
WHERE `'.$this->def['primary'].'` = '.(int)$this->id
);
if ($result === false)
return false;
$combination_ids = array();
if (Db::getInstance()->numRows())
if (!$this->hasMultishopEntries())
{
foreach ($result as $row)
$combination_ids[] = (int)$row['id_product_attribute'];
$combinations = new Collection('Combination');
$combinations->where('id_product', '=', $this->id);
$combinations->where($this->def['primary'], '=', $this->id);
foreach ($combinations as $combination)
$combination->delete();
// Delete associated restrictions on cart rules
CartRule::cleanProductRuleIntegrity('attributes', $this->id);
/* Reinitializing position */
$this->cleanPositions((int)$this->id_attribute_group);
}
/* Reinitializing position */
$this->cleanPositions((int)$this->id_attribute_group);
$return = parent::delete();
if ($return)
Hook::exec('actionAttributeDelete', array('id_attribute' => $this->id));
@@ -354,4 +343,4 @@ class AttributeCore extends ObjectModel
return (is_numeric($position)) ? $position : -1;
}
}
}
+33 -28
View File
@@ -110,33 +110,36 @@ class AttributeGroupCore extends ObjectModel
public function delete()
{
/* Select children in order to find linked combinations */
$attribute_ids = Db::getInstance()->executeS('
SELECT `id_attribute`
FROM `'._DB_PREFIX_.'attribute`
WHERE `id_attribute_group` = '.(int)$this->id
);
if ($attribute_ids === false)
return false;
/* Removing attributes to the found combinations */
$to_remove = array();
foreach ($attribute_ids as $attribute)
$to_remove[] = (int)$attribute['id_attribute'];
if (!empty($to_remove) && Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'product_attribute_combination`
WHERE `id_attribute`
IN ('.implode(', ', $to_remove).')') === false)
return false;
/* Remove combinations if they do not possess attributes anymore */
if (!AttributeGroup::cleanDeadCombinations())
return false;
/* Also delete related attributes */
if (Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'attribute_lang`
WHERE `id_attribute`
IN (SELECT id_attribute FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id.')') === false ||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id) === false)
return false;
if (!$this->hasMultishopEntries())
{
/* Select children in order to find linked combinations */
$attribute_ids = Db::getInstance()->executeS('
SELECT `id_attribute`
FROM `'._DB_PREFIX_.'attribute`
WHERE `id_attribute_group` = '.(int)$this->id
);
if ($attribute_ids === false)
return false;
/* Removing attributes to the found combinations */
$to_remove = array();
foreach ($attribute_ids as $attribute)
$to_remove[] = (int)$attribute['id_attribute'];
if (!empty($to_remove) && Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'product_attribute_combination`
WHERE `id_attribute`
IN ('.implode(', ', $to_remove).')') === false)
return false;
/* Remove combinations if they do not possess attributes anymore */
if (!AttributeGroup::cleanDeadCombinations())
return false;
/* Also delete related attributes */
if (Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'attribute_lang`
WHERE `id_attribute`
IN (SELECT id_attribute FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id.')') === false ||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id) === false)
return false;
}
$return = parent::delete();
if ($return)
Hook::exec('actionAttributeGroupDelete', array('id_attribute_group' => $this->id));
@@ -157,6 +160,7 @@ class AttributeGroupCore extends ObjectModel
return Db::getInstance()->executeS('
SELECT *
FROM `'._DB_PREFIX_.'attribute` a
'.Shop::addSqlAssociation('attribute', 'a').'
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.')
WHERE a.`id_attribute_group` = '.(int)$id_attribute_group.'
@@ -176,8 +180,9 @@ class AttributeGroupCore extends ObjectModel
return array();
return Db::getInstance()->executeS('
SELECT *
SELECT DISTINCT agl.`name`, ag.*, agl.*
FROM `'._DB_PREFIX_.'attribute_group` ag
'.Shop::addSqlAssociation('attribute_group', 'ag').'
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND `id_lang` = '.(int)$id_lang.')
ORDER BY `name` ASC
+17 -7
View File
@@ -149,7 +149,7 @@ class CarrierCore extends ObjectModel
protected static $cache_tax_rule = array();
protected $webserviceParameters = array(
protected $webserviceParameters = array(
'fields' => array(
'deleted' => array(),
'is_module' => array(),
@@ -183,11 +183,9 @@ class CarrierCore extends ObjectModel
$this->position = Carrier::getHigherPosition() + 1;
if (!parent::add($autodate, $null_values) || !Validate::isLoadedObject($this))
return false;
if (!Db::getInstance()->executeS('SELECT `id_carrier` FROM `'._DB_PREFIX_.$this->def['table'].'` WHERE `deleted` = 0'))
if (!$count = Db::getInstance()->getValue('SELECT count(`id_carrier`) FROM `'._DB_PREFIX_.$this->def['table'].'` WHERE `deleted` = 0'))
return false;
if (!$num_rows = Db::getInstance()->NumRows())
return false;
if ((int)$num_rows == 1)
if ($count == 1)
Configuration::updateValue('PS_CARRIER_DEFAULT', (int)$this->id);
// Register reference
@@ -991,11 +989,23 @@ class CarrierCore extends ObjectModel
*/
public function getTaxesRate(Address $address)
{
$tax_manager = TaxManagerFactory::getManager($address, $this->getIdTaxRulesGroup());
$tax_calculator = $tax_manager->getTaxCalculator();
$tax_calculator = $this->getTaxCalculator($address);
return $tax_calculator->getTotalRate();
}
/**
* Returns the taxes calculator associated to the carrier
*
* @since 1.5
* @param Address $address
* @return
*/
public function getTaxCalculator(Address $address)
{
$tax_manager = TaxManagerFactory::getManager($address, $this->getIdTaxRulesGroup());
return $tax_manager->getTaxCalculator();
}
/**
* This tricky method generates a sql clause to check if ranged data are overloaded by multishop
*
+123 -39
View File
@@ -470,10 +470,11 @@ class CartCore extends ObjectModel
if (Customization::isFeatureActive())
{
$sql->select('cu.`id_customization`, cu.`quantity` AS customization_quantity');
$sql->leftJoin('customization', 'cu', 'p.`id_product` = cu.`id_product`');
$sql->leftJoin('customization', 'cu',
'p.`id_product` = cu.`id_product` AND cp.`id_product_attribute` = cu.id_product_attribute AND cu.id_cart='.(int)$this->id);
}
else
$sql->select('0 AS customization_quantity');
$sql->select('0 AS customization_quantity, 0 AS id_customization');
if (Combination::isFeatureActive())
{
@@ -498,7 +499,6 @@ class CartCore extends ObjectModel
'p.`reference` AS reference, p.`supplier_reference` AS supplier_reference, p.`ean13`,
p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity'
);
$result = Db::getInstance()->executeS($sql);
// Reset the cache before the following return, or else an empty cart will add dozens of queries
@@ -1259,9 +1259,10 @@ class CartCore extends ObjectModel
*
* @param boolean $withTaxes With or without taxes
* @param integer $type Total type
* @param boolean $use_cache Allow using cache of the method CartRule::getContextualValue
* @return float Order total
*/
public function getOrderTotal($with_taxes = true, $type = Cart::BOTH, $products = null, $id_carrier = null)
public function getOrderTotal($with_taxes = true, $type = Cart::BOTH, $products = null, $id_carrier = null, $use_cache = true)
{
if (!$this->id)
return 0;
@@ -1312,8 +1313,12 @@ class CartCore extends ObjectModel
if ($type == Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING)
$type = Cart::ONLY_PRODUCTS;
$param_product = true;
if (is_null($products))
{
$param_product = false;
$products = $this->getProducts();
}
if ($type == Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING)
{
@@ -1444,7 +1449,7 @@ class CartCore extends ObjectModel
{
// If the cart rule offers free shipping, add the shipping cost
if ($with_shipping && $cart_rule['obj']->free_shipping)
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_SHIPPING), 2);
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_SHIPPING, ($param_product ? $package : null), $use_cache), 2);
// If the cart rule is a free gift, then add the free gift value only if the gift is in this package
if ((int)$cart_rule['obj']->gift_product)
@@ -1458,13 +1463,13 @@ class CartCore extends ObjectModel
$in_order = true;
if ($in_order)
$order_total_discount += $cart_rule['obj']->getContextualValue($with_taxes, null, CartRule::FILTER_ACTION_GIFT, $package);
$order_total_discount += $cart_rule['obj']->getContextualValue($with_taxes, null, CartRule::FILTER_ACTION_GIFT, $package, $use_cache);
}
// If the cart rule offers a reduction, the amount is prorated (with the products in the package)
if ($cart_rule['obj']->reduction_percent > 0 || $cart_rule['obj']->reduction_amount > 0)
{
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_REDUCTION, $package), 2);
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_REDUCTION, $package, $use_cache), 2);
}
}
@@ -1782,6 +1787,7 @@ class CartCore extends ObjectModel
* unique_carrier => true, // Does this option use a unique carrier
* total_price_with_tax => 12.5,
* total_price_without_tax => 12.5,
* position => 5, // Average of the carrier position
* ),
* ),
* );
@@ -1798,8 +1804,10 @@ class CartCore extends ObjectModel
$carrier_collection = array();
$package_list = $this->getPackageList();
// Foreach addresses
foreach ($package_list as $id_address => $packages)
{
// Initialize vars
$delivery_option_list[$id_address] = array();
$carriers_price[$id_address] = array();
$common_carriers = null;
@@ -1807,13 +1815,16 @@ class CartCore extends ObjectModel
$best_grade_carriers = array();
$carriers_instance = array();
// Get country
if ($id_address)
{
$address = new Address($id_address);
$country = new Country($address->id_country);
} else
}
else
$country = $default_country;
// Foreach packages, get the carriers with best price, best position and best grade
foreach ($packages as $id_package => $package)
{
// No carriers available
@@ -1825,6 +1836,7 @@ class CartCore extends ObjectModel
$carriers_price[$id_address][$id_package] = array();
// Get all common carriers for each packages to the same address
if (is_null($common_carriers))
$common_carriers = $package['carrier_list'];
else
@@ -1835,10 +1847,12 @@ class CartCore extends ObjectModel
$best_grade = null;
$best_grade_carrier = null;
// Foreach carriers of the package, calculate his price, check if it the best price, position and grade
foreach ($package['carrier_list'] as $id_carrier)
{
if (!isset($carriers_instance[$id_carrier]))
$carriers_instance[$id_carrier] = new Carrier($id_carrier);
$price_with_tax = $this->getPackageShippingCost($id_carrier, true, $country, $package['product_list']);
$price_without_tax = $this->getPackageShippingCost($id_carrier, false, $country, $package['product_list']);
if (is_null($best_price) || $price_with_tax < $best_price)
@@ -1862,9 +1876,11 @@ class CartCore extends ObjectModel
$best_grade_carriers[$id_package] = $best_grade_carrier;
}
// Reset $best_price_carrier, it's now an array
$best_price_carrier = array();
$key = '';
// Get the delivery option with the lower price
foreach ($best_price_carriers as $id_package => $id_carrier)
{
$key .= $id_carrier.',';
@@ -1882,6 +1898,7 @@ class CartCore extends ObjectModel
$best_price_carrier[$id_carrier]['instance'] = $carriers_instance[$id_carrier];
}
// Add the delivery option with best price as best price
$delivery_option_list[$id_address][$key] = array(
'carrier_list' => $best_price_carrier,
'is_best_price' => true,
@@ -1889,9 +1906,11 @@ class CartCore extends ObjectModel
'unique_carrier' => (count($best_price_carrier) <= 1)
);
// Reset $best_grade_carrier, it's now an array
$best_grade_carrier = array();
$key = '';
// Get the delivery option with the best grade
foreach ($best_grade_carriers as $id_package => $id_carrier)
{
$key .= $id_carrier.',';
@@ -1908,16 +1927,17 @@ class CartCore extends ObjectModel
$best_grade_carrier[$id_carrier]['product_list'] = array_merge($best_grade_carrier[$id_carrier]['product_list'], $packages[$id_package]['product_list']);
$best_grade_carrier[$id_carrier]['instance'] = $carriers_instance[$id_carrier];
}
// Add the delivery option with best grade as best grade
if (!isset($delivery_option_list[$id_address][$key]))
$delivery_option_list[$id_address][$key] = array(
'carrier_list' => $best_grade_carrier,
'is_best_price' => false,
'unique_carrier' => (count($best_grade_carrier) <= 1)
);
$delivery_option_list[$id_address][$key]['is_best_grade'] = true;
// Get all delivery options with a unique carrier
foreach ($common_carriers as $id_carrier)
{
$price = 0;
@@ -1956,35 +1976,75 @@ class CartCore extends ObjectModel
else
$delivery_option_list[$id_address][$key]['unique_carrier'] = (count($delivery_option_list[$id_address][$key]['carrier_list']) <= 1);
}
foreach ($delivery_option_list as $id_address => $delivery_option)
foreach ($delivery_option as $key => $value)
{
$total_price_with_tax = 0;
$total_price_without_tax = 0;
foreach ($value['carrier_list'] as $id_carrier => $data)
{
$total_price_with_tax += $data['price_with_tax'];
$total_price_without_tax += $data['price_without_tax'];
if (!isset($carrier_collection[$id_carrier]))
$carrier_collection[$id_carrier] = new Carrier($id_carrier);
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['instance'] = $carrier_collection[$id_carrier];
if (file_exists(_PS_SHIP_IMG_DIR_.$id_carrier.'.jpg'))
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = _THEME_SHIP_DIR_.$id_carrier.'.jpg';
else
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = false;
}
$delivery_option_list[$id_address][$key]['total_price_with_tax'] = $total_price_with_tax;
$delivery_option_list[$id_address][$key]['total_price_without_tax'] = $total_price_without_tax;
}
}
// For each delivery options :
// - Set the carrier list
// - Calculate the price
// - Calculate the average position
foreach ($delivery_option_list as $id_address => $delivery_option)
foreach ($delivery_option as $key => $value)
{
$total_price_with_tax = 0;
$total_price_without_tax = 0;
$position = 0;
foreach ($value['carrier_list'] as $id_carrier => $data)
{
$total_price_with_tax += $data['price_with_tax'];
$total_price_without_tax += $data['price_without_tax'];
if (!isset($carrier_collection[$id_carrier]))
$carrier_collection[$id_carrier] = new Carrier($id_carrier);
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['instance'] = $carrier_collection[$id_carrier];
if (file_exists(_PS_SHIP_IMG_DIR_.$id_carrier.'.jpg'))
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = _THEME_SHIP_DIR_.$id_carrier.'.jpg';
else
$delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = false;
$position += $carrier_collection[$id_carrier]->position;
}
$delivery_option_list[$id_address][$key]['total_price_with_tax'] = $total_price_with_tax;
$delivery_option_list[$id_address][$key]['total_price_without_tax'] = $total_price_without_tax;
$delivery_option_list[$id_address][$key]['position'] = $position / count($value['carrier_list']);
}
// Sort delivery option list
foreach ($delivery_option_list as &$array)
uasort ($array, array('Cart', 'sortDeliveryOptionList'));
$cache = $delivery_option_list;
return $delivery_option_list;
}
/**
*
* Sort list of option delivery by parameters define in the BO
* @param $option1
* @param $option2
* @return int -1 if $option 1 must be placed before and 1 if the $option1 must be placed after the $option2
*/
public static function sortDeliveryOptionList($option1, $option2)
{
static $order_by_price = null;
static $order_way = null;
if (is_null($order_by_price))
$order_by_price = !Configuration::get('PS_CARRIER_DEFAULT_SORT');
if (is_null($order_way))
$order_way = Configuration::get('PS_CARRIER_DEFAULT_ORDER');
if ($order_by_price)
if ($order_way)
return ($option1['total_price_with_tax'] < $option2['total_price_with_tax']) * 2 - 1; // return -1 or 1
else
return ($option1['total_price_with_tax'] >= $option2['total_price_with_tax']) * 2 - 1; // return -1 or 1
else
if ($order_way)
return ($option1['position'] < $option2['position']) * 2 - 1; // return -1 or 1
else
return ($option1['position'] >= $option2['position']) * 2 - 1; // return -1 or 1
}
public function carrierIsSelected($id_carrier, $id_address)
{
$delivery_option = $this->getDeliveryOption();
@@ -2183,8 +2243,12 @@ class CartCore extends ObjectModel
* Get the delivery option seleted, or if no delivery option was selected, the cheapest option for each address
* @return array delivery option
*/
public function getDeliveryOption($default_country = null, $dontAutoSeletectOptions = false)
public function getDeliveryOption($default_country = null, $dontAutoSeletectOptions = false, $use_cache = true)
{
static $cache = array(0 => false, 1 => false);
if ($cache[(int)$dontAutoSeletectOptions] !== false && $use_cache)
return $cache[(int)$dontAutoSeletectOptions];
$delivery_option_list = $this->getDeliveryOptionList($default_country);
// The delivery option was selected
@@ -2200,7 +2264,10 @@ class CartCore extends ObjectModel
}
if ($validated)
{
$cache[(int)$dontAutoSeletectOptions] = $delivery_option;
return $delivery_option;
}
}
if ($dontAutoSeletectOptions)
@@ -2209,13 +2276,31 @@ class CartCore extends ObjectModel
// No delivery option selected or delivery option selected is not valid, get the better for all options
$delivery_option = array();
foreach ($delivery_option_list as $id_address => $options)
{
foreach ($options as $key => $option)
if ($option['is_best_price'])
if (Configuration::get('PS_CARRIER_DEFAULT') == -1 && $option['is_best_price'])
{
$delivery_option[$id_address] = $key;
break;
}
elseif (Configuration::get('PS_CARRIER_DEFAULT') == -2 && $option['is_best_grade'])
{
$delivery_option[$id_address] = $key;
break;
}
elseif ($option['unique_carrier'] && in_array(Configuration::get('PS_CARRIER_DEFAULT'), array_keys($option['carrier_list'])))
{
$delivery_option[$id_address] = $key;
break;
}
reset($options);
if (!isset($delivery_option[$id_address]))
$delivery_option[$id_address] = key($options);
}
$cache[(int)$dontAutoSeletectOptions] = $delivery_option;
return $delivery_option;
}
@@ -2230,7 +2315,7 @@ class CartCore extends ObjectModel
public function getTotalShippingCost($delivery_option = null, $use_tax = true, Country $default_country = null)
{
if (is_null($delivery_option))
$delivery_option = $this->getDeliveryOption($default_country);
$delivery_option = $this->getDeliveryOption($default_country, false, false);
$total_shipping = 0;
$delivery_option_list = $this->getDeliveryOptionList();
@@ -2458,7 +2543,7 @@ class CartCore extends ObjectModel
$free_fees_price = 0;
if (isset($configuration['PS_SHIPPING_FREE_PRICE']))
$free_fees_price = Tools::convertPrice((float)$configuration['PS_SHIPPING_FREE_PRICE'], Currency::getCurrencyInstance((int)$this->id_currency));
$orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);
$orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING, null, null, false);
if ($orderTotalwithDiscounts >= (float)($free_fees_price) && (float)($free_fees_price) > 0)
return $shipping_cost;
@@ -2571,7 +2656,7 @@ class CartCore extends ObjectModel
$total_weight = 0;
foreach ($products as $product)
{
if (is_null($product['weight_attribute']))
if (!isset($product['weight_attribute']) || is_null($product['weight_attribute']))
$total_weight += $product['weight'] * $product['cart_quantity'];
else
$total_weight += $product['weight_attribute'] * $product['cart_quantity'];
@@ -2717,7 +2802,6 @@ class CartCore extends ObjectModel
'formattedAddresses' => $formatted_addresses,
'products' => array_values($products),
'gift_products' => $gift_products,
//'products_raw' => $this->getProducts(false),
'discounts' => $cart_rules,
'is_virtual_cart' => (int)$this->isVirtualCart(),
'total_discounts' => $total_discounts,
+114 -40
View File
@@ -97,7 +97,7 @@ class CartRuleCore extends ObjectModel
'product_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'shop_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'free_shipping' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'reduction_percent' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'reduction_percent' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPercentage'),
'reduction_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'reduction_tax' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'reduction_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
@@ -252,6 +252,7 @@ class CartRuleCore extends ObjectModel
$cart_rule['value'] = 0;
$cart_rule['minimal'] = $cart_rule['minimum_amount'];
$cart_rule['cumulable'] = !$cart_rule['cart_rule_restriction'];
$cart_rule['id_discount_type'] = false;
if ($cart_rule['free_shipping'])
$cart_rule['id_discount_type'] = Discount::FREE_SHIPPING;
elseif ($cart_rule['reduction_percent'] > 0)
@@ -401,27 +402,6 @@ class CartRuleCore extends ObjectModel
return (!$display_error) ? false : Tools::displayError('You cannot use this voucher anymore (usage limit reached)');
}
$otherCartRules = $context->cart->getCartRules();
if (count($otherCartRules))
foreach ($otherCartRules as $otherCartRule)
{
if ($otherCartRule['id_cart_rule'] == $this->id && !$alreadyInCart)
return (!$display_error) ? false : Tools::displayError('This voucher is already in your cart');
if ($this->cart_rule_restriction && $otherCartRule['cart_rule_restriction'] && $otherCartRule['id_cart_rule'] != $this->id)
{
$combinable = Db::getInstance()->getValue('
SELECT id_cart_rule_1
FROM '._DB_PREFIX_.'cart_rule_combination
WHERE (id_cart_rule_1 = '.(int)$this->id.' AND id_cart_rule_2 = '.(int)$otherCartRule['id_cart_rule'].')
OR (id_cart_rule_2 = '.(int)$this->id.' AND id_cart_rule_1 = '.(int)$otherCartRule['id_cart_rule'].')');
if (!$combinable)
{
$cart_rule = new CartRule($otherCartRule['cart_rule_restriction'], $context->cart->id_lang);
return (!$display_error) ? false : Tools::displayError('This voucher is not combinable with an other voucher already in your cart:').' '.$cart_rule->name;
}
}
}
// Get an intersection of the customer groups and the cart rule groups (if the customer is not logged in, the default group is 1)
if ($this->group_restriction)
{
@@ -508,13 +488,17 @@ class CartRuleCore extends ObjectModel
// If a product is given for free in this rule and already in the cart, the price is subtracted
if ($this->gift_product && $alreadyInCart)
{
$in_cart = (bool)Db::getInstance()->getValue('
SELECT id_product
FROM '._DB_PREFIX_.'cart_product
WHERE id_product = '.(int)$this->gift_product.'
AND id_product_attribute = '.(int)$this->gift_product_attribute.'
AND id_cart = '.(int)$context->cart->id);
if ($in_cart)
$query = new DbQuery();
$query->select('id_product');
$query->from('cart_product');
$query->where('id_product = '.(int)$this->gift_product);
$query->where('id_cart = '.(int)$context->cart->id);
if ((int)$this->gift_product_attribute)
$query->where('id_product_attribute = '.(int)$this->gift_product_attribute);
if (Db::getInstance()->getValue($query))
{
$ref = false;
$product_price = Product::getPriceStatic(
@@ -534,6 +518,35 @@ class CartRuleCore extends ObjectModel
if ($cartTotal < $minimum_amount)
return (!$display_error) ? false : Tools::displayError('You have not reached the minimum amount required to use this voucher');
}
// Check if the voucher is already in the cart of if a non compatible voucher is in the cart
// Important note: this MUST be the last check, because if the tested cart rule has priority over a non combinable one in the cart, we will switch them
$otherCartRules = $context->cart->getCartRules();
if (count($otherCartRules))
foreach ($otherCartRules as $otherCartRule)
{
if ($otherCartRule['id_cart_rule'] == $this->id && !$alreadyInCart)
return (!$display_error) ? false : Tools::displayError('This voucher is already in your cart');
if ($this->cart_rule_restriction && $otherCartRule['cart_rule_restriction'] && $otherCartRule['id_cart_rule'] != $this->id)
{
$combinable = Db::getInstance()->getValue('
SELECT id_cart_rule_1
FROM '._DB_PREFIX_.'cart_rule_combination
WHERE (id_cart_rule_1 = '.(int)$this->id.' AND id_cart_rule_2 = '.(int)$otherCartRule['id_cart_rule'].')
OR (id_cart_rule_2 = '.(int)$this->id.' AND id_cart_rule_1 = '.(int)$otherCartRule['id_cart_rule'].')');
if (!$combinable)
{
$cart_rule = new CartRule($otherCartRule['cart_rule_restriction'], $context->cart->id_lang);
// The cart rules are not combinable and the cart rule currently in the cart has priority over the one tested
if ($cart_rule->priority <= $this->priority)
return (!$display_error) ? false : Tools::displayError('This voucher is not combinable with an other voucher already in your cart:').' '.$cart_rule->name;
// But if the cart rule that is tested has priority over the one in the cart, we remove the one in the cart and keep this new one
else
$context->cart->removeCartRule($cart_rule->id);
}
}
}
if (!$display_error)
return true;
}
@@ -599,7 +612,7 @@ class CartRuleCore extends ObjectModel
break;
case 'categories':
$cartCategories = Db::getInstance()->executeS('
SELECT cp.quantity, cp.`id_product`, catp.`id_category`
SELECT cp.quantity, cp.`id_product`, cp.`id_product_attribute`, catp.`id_category`
FROM `'._DB_PREFIX_.'cart_product` cp
LEFT JOIN `'._DB_PREFIX_.'category_product` catp ON cp.id_product = catp.id_product
WHERE cp.`id_cart` = '.(int)$context->cart->id.'
@@ -607,13 +620,18 @@ class CartRuleCore extends ObjectModel
$countMatchingProducts = 0;
$matchingProductsList = array();
foreach ($cartCategories as $cartCategory)
if (in_array($cartCategory['id_category'], $productRule['values']))
if (in_array($cartCategory['id_category'], $productRule['values'])
// We also check that the product is not already in the matching product list, because there are doubles in the query results (when the product is in multiple categories)
&& !in_array($cartCategory['id_product'].'-'.$cartCategory['id_product_attribute'], $matchingProductsList))
{
$countMatchingProducts += $cartCategory['quantity'];
$matchingProductsList[] = $cartCategory['id_product'].'-0';
$matchingProductsList[] = $cartCategory['id_product'].'-'.$cartCategory['id_product_attribute'];
}
if ($countMatchingProducts < $productRuleGroup['quantity'])
return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products');
// Attribute id is not important for this filter in the global list, so the ids are replaced by 0
foreach ($matchingProductsList as &$matchingProduct)
$matchingProduct = preg_replace('/^([0-9]+)-[0-9]+$/', '$1-0', $matchingProduct);
$eligibleProductsList = CartRule::array_uintersect($eligibleProductsList, $matchingProductsList);
break;
case 'manufacturers':
@@ -699,9 +717,10 @@ class CartRuleCore extends ObjectModel
*
* @param bool $use_tax
* @param Context $context
* @param boolean $use_cache Allow using cache to avoid multiple free gift using multishipping
* @return float|int|string
*/
public function getContextualValue($use_tax, Context $context = null, $filter = null, $package = null)
public function getContextualValue($use_tax, Context $context = null, $filter = null, $package = null, $use_cache = true)
{
if (!CartRule::isFeatureActive())
return 0;
@@ -799,8 +818,12 @@ class CartRuleCore extends ObjectModel
if ($this->reduction_amount)
{
$prorata = 1;
if (!is_null($package))
$prorata = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS, $package['products']) / $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS);
if (!is_null($package) && count($all_products))
{
$total_products = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS);
if ($total_products)
$prorata = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS, $package['products']) / $total_products;
}
$reduction_amount = $this->reduction_amount;
// If we need to convert the voucher value to the cart currency
@@ -878,16 +901,17 @@ class CartRuleCore extends ObjectModel
{
$id_address = (is_null($package) ? 0 : $package['id_address']);
foreach ($package_products as $product)
if ($product['id_product'] == $this->gift_product && $product['id_product_attribute'] == $this->gift_product_attribute)
if ($product['id_product'] == $this->gift_product && ($product['id_product_attribute'] == $this->gift_product_attribute || !(int)$this->gift_product_attribute))
{
// The free gift coupon must be applied to one product only (needed for multi-shipping which manage multiple product lists)
if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product])
|| CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == $id_address
|| CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0
|| $id_address == 0)
|| $id_address == 0
|| !$use_cache)
{
$reduction_value += ($use_tax ? $product['price_wt'] : $product['price']);
if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product]) || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0)
if ($use_cache && (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product]) || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0))
CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] = $id_address;
break;
}
@@ -896,6 +920,15 @@ class CartRuleCore extends ObjectModel
return $reduction_value;
}
/**
* Make sure caches are empty
* Must be called before calling multiple time getContextualValue()
*/
public static function cleanCache()
{
self::$only_one_gift = array();
}
protected function getCartRuleCombinations()
{
@@ -939,9 +972,9 @@ class CartRuleCore extends ObjectModel
$shop_list = '';
if ($type == 'shop')
{
$shop_list = ' AND t.id_shop IN (';
$shops = Context::getContext()->employee->getAssociatedShops();
$shop_list .= implode(array_map('intval', $shops), ',').')';
if (count($shops))
$shop_list = ' AND t.id_shop IN ('.implode(array_map('intval', $shops), ',').') ';
}
if (!Validate::isLoadedObject($this) OR $this->{$type.'_restriction'} == 0)
@@ -1056,6 +1089,7 @@ class CartRuleCore extends ObjectModel
ORDER BY priority');
$cartRules = ObjectModel::hydrateCollection('CartRule', $result);
foreach ($cartRules as $cartRule)
if ($cartRule->checkValidity($context, false, false))
$context->cart->addCartRule($cartRule->id);
@@ -1069,6 +1103,46 @@ class CartRuleCore extends ObjectModel
{
return (bool)Configuration::get('PS_CART_RULE_FEATURE_ACTIVE');
}
/* When an entity associated to a product rule (product, category, attribute, supplier, manufacturer...) is deleted, the product rules must be updated */
public static function cleanProductRuleIntegrity($type, $list)
{
// Type must be available in the 'type' enum of the table cart_rule_product_rule
if (!in_array($type, array('products', 'categories', 'attributes', 'manufacturers', 'suppliers')))
return false;
// This check must not be removed because this var is used a few lines below
$list = (is_array($list) ? implode(',', array_map('intval', $list)) : (int)$list);
if (!preg_match('/^[0-9,]+$/', $list))
return false;
// Delete associated restrictions on cart rules
Db::getInstance()->execute('
DELETE crprv
FROM `'._DB_PREFIX_.'cart_rule_product_rule` crpr
LEFT JOIN `'._DB_PREFIX_.'cart_rule_product_rule_value` crprv ON crpr.`id_product_rule` = crprv.`id_product_rule`
WHERE crpr.`type` = "'.pSQL($type).'"
AND crprv.`id_item` IN ('.$list.')'); // $list is checked a few lines above
// Delete the product rules that does not have any values
if (Db::getInstance()->Affected_Rows() > 0)
Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule`
WHERE `id_product_rule` NOT IN (SELECT id_product_rule FROM `'._DB_PREFIX_.'cart_rule_product_rule_value`)');
// If the product rules were the only conditions of a product rule group, delete the product rule group
if (Db::getInstance()->Affected_Rows() > 0)
Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_group`
WHERE `id_product_rule_group` NOT IN (SELECT id_product_rule_group FROM `'._DB_PREFIX_.'cart_rule_product_rule`)');
// If the product rule group were the only restrictions of a cart rule, update de cart rule restriction cache
if (Db::getInstance()->Affected_Rows() > 0)
Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'cart_rule` cr
LEFT JOIN `'._DB_PREFIX_.'cart_rule_product_rule_group` crprg ON cr.id_cart_rule = crprg.id_cart_rule
SET product_restriction = IF(crprg.id_product_rule_group IS NULL, 0, 1)');
return true;
}
/**
* @static
+46 -74
View File
@@ -79,12 +79,6 @@ class CategoryCore extends ObjectModel
public $groupBox;
/** @var boolean does the product have to be removed during the delete process */
public $remove_products = true;
/** @var boolean does the product have to be disable during the delete process */
public $disable_products = false;
protected static $_links = array();
/**
@@ -256,12 +250,18 @@ class CategoryCore extends ObjectModel
$children[] = $categ->recurseLiteCategTree($max_depth, $current_depth + 1, $id_lang, $excluded_ids_array);
}
}
if (is_array($this->description))
foreach ($this->description as $lang => $description)
$this->description[$lang] = Category::getDescriptionClean($description);
else
$this->description = Category::getDescriptionClean($this->description);
return array(
'id' => (int)$this->id_category,
'link' => Context::getContext()->link->getCategoryLink($this->id, $this->link_rewrite),
'name' => $this->name,
'desc'=> Category::getDescriptionClean($this->description),
'desc'=> $this->description,
'children' => $children
);
}
@@ -305,72 +305,31 @@ class CategoryCore extends ObjectModel
$this->clearCache();
/* Get childs categories */
$to_delete = array((int)$this->id);
$this->recursiveDelete($to_delete, (int)$this->id);
$to_delete = array_unique($to_delete);
/* Delete category and its child from database */
$list = count($to_delete) > 1 ? implode(',', array_map('intval', $to_delete)) : (int)$this->id;
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category` WHERE `id_category` IN ('.$list.')');
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_lang` WHERE `id_category` IN ('.$list.')');
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_product` WHERE `id_category` IN ('.$list.')');
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_category` IN ('.$list.')');
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_shop` WHERE `id_category` IN ('.$list.')');
Category::cleanPositions($this->id_parent);
/* Delete category images and its children images */
$tmp_category = new Category();
foreach ($to_delete as $id_category)
$all_cat = $this->getAllChildren();
$all_cat[] = $this;
foreach ($all_cat as $cat)
{
$tmp_category->id = (int)$id_category;
$tmp_category->deleteImage();
}
/* Delete or link products which were not in others categories */
$result = Db::getInstance()->executeS('
SELECT `id_product`
FROM `'._DB_PREFIX_.'product`
WHERE `id_product` NOT IN (SELECT `id_product` FROM `'._DB_PREFIX_.'category_product`)
');
foreach ($result as $p)
{
$product = new Product((int)$p['id_product']);
if (Validate::isLoadedObject($product))
parent::delete();
if (!$this->hasMultishopEntries())
{
if ($this->remove_products || $this->id_parent == 0)
$product->delete();
else
{
if ($this->disable_products)
$product->active = 0;
$product->addToCategories($this->id_parent);
$product->save();
}
$cat->deleteImage();
$cat->cleanGroups();
$cat->cleanAssoProducts();
// Delete associated restrictions on cart rules
CartRule::cleanProductRuleIntegrity('categories', array($cat->id));
Category::cleanPositions($cat->id_parent);
/* Delete Categories in GroupReduction */
if (GroupReduction::getGroupReductionByCategoryId((int)$cat->id))
GroupReduction::deleteCategory($cat->id);
}
}
/* Set category default to Home category where categorie no more exists */
$result = Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'product_shop`
SET `id_category_default` = '.(int)Configuration::get('PS_HOME_CATEGORY').'
WHERE `id_category_default`
NOT IN (SELECT `id_category` FROM `'._DB_PREFIX_.'category`)
');
/* Rebuild the nested tree */
if (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree)
if (!$this->hasMultishopEntries() && (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree))
Category::regenerateEntireNtree();
Hook::exec('actionCategoryDelete', array('category' => $this));
/* Delete Categories in GroupReduction */
foreach ($to_delete as $category)
if (GroupReduction::getGroupReductionByCategoryId((int)$category))
GroupReduction::deleteCategory($category);
return true;
}
@@ -516,9 +475,11 @@ class CategoryCore extends ObjectModel
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`'.Shop::addSqlRestrictionOnLang('cl').')
'.Shop::addSqlAssociation('category', 'c').'
WHERE cl.`id_lang` = '.(int)$id_lang.'
AND c.`id_category` != '.Configuration::get('PS_ROOT_CATEGORY').'
GROUP BY c.id_category
ORDER BY c.`position`');
ORDER BY c.`id_category`, category_shop.`position`');
}
public function getShopID()
@@ -877,12 +838,15 @@ class CategoryCore extends ObjectModel
return self::$_links[$id_category.'-'.$id_lang];
$result = Db::getInstance()->getRow('
SELECT cl.`link_rewrite`
FROM `'._DB_PREFIX_.'category` c
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').'
WHERE `id_lang` = '.(int)$id_lang.'
AND c.`id_category` = '.(int)$id_category);
SELECT cl.`link_rewrite`
FROM `'._DB_PREFIX_.'category_lang` cl
WHERE `id_lang` = '.(int)$id_lang.'
'.Shop::addSqlRestrictionOnLang('cl').'
AND cl.`id_category` = '.(int)$id_category
);
self::$_links[$id_category.'-'.$id_lang] = $result['link_rewrite'];
return $result['link_rewrite'];
}
@@ -971,7 +935,7 @@ class CategoryCore extends ObjectModel
$categories = null;
$id_current = $this->id;
if (count(Category::getCategoriesWithoutParent()) > 1)
if (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1)
$context->shop->id_category = Category::getTopCategory()->id;
elseif (!$context->shop->id)
$context->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
@@ -1032,6 +996,11 @@ class CategoryCore extends ObjectModel
{
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_category` = '.(int)$this->id);
}
public function cleanAssoProducts()
{
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_product` WHERE `id_category` = '.(int)$this->id);
}
public function addGroups($groups)
{
@@ -1168,8 +1137,10 @@ class CategoryCore extends ObjectModel
* @param mixed $id_category_parent
* @return boolean true if succeed
*/
public static function cleanPositions($id_category_parent)
public static function cleanPositions($id_category_parent = null)
{
if ($id_category_parent === null)
return;
$return = true;
$id = Context::getContext()->shop->id;
@@ -1342,6 +1313,7 @@ class CategoryCore extends ObjectModel
SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, cl.`id_lang`
FROM `'._DB_PREFIX_.'category` c
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
'.Shop::addSqlAssociation('category', 'c').'
WHERE cl.`id_lang` = '.(int)$id_lang.'
AND c.`id_category` IN ('.implode(',', array_map('intval', $ids_category)).')
');
+5 -3
View File
@@ -63,7 +63,6 @@ class CombinationCore extends ObjectModel
public static $definition = array(
'table' => 'product_attribute',
'primary' => 'id_product_attribute',
'multishop' => true,
'fields' => array(
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'location' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64),
@@ -101,7 +100,10 @@ class CombinationCore extends ObjectModel
{
if (!parent::delete())
return false;
// Removes the product from StockAvailable, for the current shop
StockAvailable::removeProductFromStockAvailable((int)$this->id_product, (int)$this->id);
if (!$this->hasMultishopEntries() && !$this->deleteAssociations())
return false;
return true;
@@ -138,7 +140,7 @@ class CombinationCore extends ObjectModel
$ids_attributes = array();
foreach ($values as $value)
$ids_attributes[] = $value['id'];
return $this->setAttributes($values);
return $this->setAttributes($ids_attributes);
}
public function getWsProductOptionValues()
+45 -45
View File
@@ -93,9 +93,9 @@ class ConfigurationCore extends ObjectModel
*/
public static function getIdByName($key, $id_shop_group = null, $id_shop = null)
{
if (is_null($id_shop))
if ($id_shop === null)
$id_shop = Shop::getContextShopID();
if (is_null($id_shop_group))
if ($id_shop_group === null)
$id_shop_group = Shop::getContextShopGroupID();
$sql = 'SELECT id_configuration
@@ -146,19 +146,23 @@ class ConfigurationCore extends ObjectModel
*/
public static function get($key, $id_lang = null, $id_shop_group = null, $id_shop = null)
{
// If conf if not initialized, try manual query
if (!self::$_CONF)
{
Configuration::loadConfiguration();
if (!self::$_CONF)
return Db::getInstance()->getValue('SELECT `value` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = "'.pSQL($key).'"');
}
$id_lang = (int)$id_lang;
if (is_null($id_shop))
if ($id_shop === null)
$id_shop = Shop::getContextShopID();
if (is_null($id_shop_group))
if ($id_shop_group === null)
$id_shop_group = Shop::getContextShopGroupID();
if (!isset(self::$_CONF[$id_lang]))
$id_lang = 0;
// If conf if not initialized, try manual query
if (!self::$_CONF)
return Db::getInstance()->getValue('SELECT `value` FROM '._DB_PREFIX_.'configuration WHERE `name` = \''.pSQL($key).'\'');
if ($id_shop && Configuration::hasKey($key, $id_lang, null, $id_shop))
return self::$_CONF[$id_lang]['shop'][$id_shop][$key];
else if ($id_shop_group && Configuration::hasKey($key, $id_lang, $id_shop_group))
@@ -203,9 +207,9 @@ class ConfigurationCore extends ObjectModel
throw new PrestaShopException('keys var is not an array');
$id_lang = (int)$id_lang;
if (is_null($id_shop))
if ($id_shop === null)
$id_shop = Shop::getContextShopID();
if (is_null($id_shop_group))
if ($id_shop_group === null)
$id_shop_group = Shop::getContextShopGroupID();
$results = array();
@@ -246,9 +250,9 @@ class ConfigurationCore extends ObjectModel
if (!Validate::isConfigName($key))
die(Tools::displayError());
if (is_null($id_shop))
if ($id_shop === null)
$id_shop = Shop::getContextShopID();
if (is_null($id_shop_group))
if ($id_shop_group === null)
$id_shop_group = Shop::getContextShopGroupID();
if (!is_array($values))
@@ -293,9 +297,9 @@ class ConfigurationCore extends ObjectModel
if (!Validate::isConfigName($key))
die(Tools::displayError());
if (is_null($id_shop))
if ($id_shop === null)
$id_shop = Shop::getContextShopID();
if (is_null($id_shop_group))
if ($id_shop_group === null)
$id_shop_group = Shop::getContextShopGroupID();
if (!is_array($values))
@@ -379,17 +383,20 @@ class ConfigurationCore extends ObjectModel
if (!Validate::isConfigName($key))
return false;
$sql = 'DELETE FROM `'._DB_PREFIX_.'configuration_lang`
WHERE `id_configuration` IN (
SELECT `id_configuration`
FROM `'._DB_PREFIX_.'configuration`
WHERE `name` = \''.pSQL($key).'\'
)';
$result = Db::getInstance()->execute($sql);
$result = Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'configuration_lang`
WHERE `id_configuration` IN (
SELECT `id_configuration`
FROM `'._DB_PREFIX_.'configuration`
WHERE `name` = "'.pSQL($key).'"
)');
$sql = 'DELETE FROM `'._DB_PREFIX_.'configuration`
WHERE `name` = \''.pSQL($key).'\'';
$result2 = Db::getInstance()->execute($sql);
$result2 = Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'configuration`
WHERE `name` = "'.pSQL($key).'"');
self::$_CONF = null;
return ($result && $result2);
}
@@ -401,29 +408,22 @@ class ConfigurationCore extends ObjectModel
public static function deleteFromContext($key)
{
if (Shop::getContext() == Shop::CONTEXT_ALL)
$id_shop = $id_shop_group = null;
else if (Shop::getContext() == Shop::CONTEXT_GROUP)
{
$id_shop_group = Shop::getContextShopGroupID();
$id_shop = null;
}
else
{
$id_shop_group = Shop::getContextShopGroupID();
$id_shop = Shop::getContextShopID();
}
if (!$id_shop && !$id_shop_group)
return;
$id_shop = null;
$id_shop_group = Shop::getContextShopGroupID();
if (Shop::getContext() == Shop::CONTEXT_SHOP)
$id_shop = Shop::getContextShopID();
$id = Configuration::getIdByName($key, $id_shop_group, $id_shop);
$sql = 'DELETE FROM '._DB_PREFIX_.'configuration
WHERE id_configuration = '.$id;
Db::getInstance()->execute($sql);
$sql = 'DELETE FROM '._DB_PREFIX_.'configuration_lang
WHERE id_configuration = '.$id;
Db::getInstance()->execute($sql);
Db::getInstance()->execute('
DELETE FROM '._DB_PREFIX_.'configuration
WHERE id_configuration = '.(int)$id);
Db::getInstance()->execute('
DELETE FROM '._DB_PREFIX_.'configuration_lang
WHERE id_configuration = '.(int)$id);
self::$_CONF = null;
}
/**
+3
View File
@@ -66,12 +66,15 @@ class ContactCore extends ObjectModel
*/
public static function getContacts($id_lang)
{
$shop_ids = Shop::getContextListShopID();
$sql = 'SELECT *
FROM `'._DB_PREFIX_.'contact` c
'.Shop::addSqlAssociation('contact', 'c', false).'
LEFT JOIN `'._DB_PREFIX_.'contact_lang` cl ON (c.`id_contact` = cl.`id_contact`)
WHERE cl.`id_lang` = '.(int)$id_lang.'
AND contact_shop.`id_shop` IN ('.implode(', ', array_map('intval', $shop_ids)).')
ORDER BY `name` ASC';
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
}
+26 -11
View File
@@ -59,11 +59,11 @@ class CookieCore
* @param $name Cookie name before encrypting
* @param $path
*/
public function __construct($name, $path = '', $expire = null)
public function __construct($name, $path = '', $expire = null, $shared_urls = null)
{
$this->_content = array();
$this->_expire = isset($expire) ? (int)($expire) : (time() + 1728000);
$this->_name = md5($name);
$this->_name = md5(_PS_VERSION_.$name);
$this->_path = trim(Context::getContext()->shop->physical_uri.$path, '/\\').'/';
if ($this->_path{0} != '/') $this->_path = '/'.$this->_path;
$this->_path = rawurlencode($this->_path);
@@ -71,7 +71,7 @@ class CookieCore
$this->_path = str_replace('%7E', '~', $this->_path);
$this->_key = _COOKIE_KEY_;
$this->_iv = _COOKIE_IV_;
$this->_domain = $this->getDomain();
$this->_domain = $this->getDomain($shared_urls);
if (Configuration::get('PS_CIPHER_ALGORITHM'))
$this->_cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_);
else
@@ -79,7 +79,7 @@ class CookieCore
$this->update();
}
protected function getDomain()
protected function getDomain($shared_urls = null)
{
$r = '!(?:(\w+)://)?(?:(\w+)\:(\w+)@)?([^/:]+)?(?:\:(\d*))?([^#?]+)?(?:\?([^#]+))?(?:#(.+$))?!i';
preg_match ($r, Tools::getHttpHost(false, false), $out);
@@ -89,8 +89,23 @@ class CookieCore
return false;
if (!strstr(Tools::getHttpHost(false, false), '.'))
return false;
$domain = $out[4];
$domain = false;
if ($shared_urls !== null)
{
foreach ($shared_urls as $shared_url)
{
if ($shared_url != $out[4])
continue;
if (preg_match('/^(?:.*\.)?([^.]*(?:.{2,3})?\..{2,3})$/Ui', $shared_url, $res))
{
$domain = '.'.$res[1];
break;
}
}
}
if (!$domain)
$domain = $out[4];
return $domain;
}
@@ -258,8 +273,8 @@ class CookieCore
{
$tmpTab2 = explode('|', $keyAndValue);
if (count($tmpTab2) == 2)
$this->_content[$tmpTab2[0]] = $tmpTab2[1];
}
$this->_content[$tmpTab2[0]] = $tmpTab2[1];
}
/* Blowfish fix */
if (isset($this->_content['checksum']))
$this->_content['checksum'] = (int)($this->_content['checksum']);
@@ -294,7 +309,7 @@ class CookieCore
else
{
$content = 0;
$time = time() - 1;
$time = 1;
}
if (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */
return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0);
@@ -303,8 +318,8 @@ class CookieCore
}
/**
* Save cookie with setcookie()
*/
* Save cookie with setcookie()
*/
public function write()
{
$cookie = '';
+38 -7
View File
@@ -177,7 +177,7 @@ class CustomerCore extends ObjectModel
'max_payment_days' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false),
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false),
'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false),
'note' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 65000, 'copy_post' => false),
'note' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'size' => 65000, 'copy_post' => false),
'is_guest' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false),
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false),
'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false),
@@ -198,7 +198,10 @@ class CustomerCore extends ObjectModel
$this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days);
$this->secure_key = md5(uniqid(rand(), true));
$this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_FRONT').'minutes'));
if ($this->newsletter && !Validate::isDate($this->newsletter_date_add))
$this->newsletter_date_add = date('Y-m-d H:i:s');
if ($this->id_default_group == _PS_DEFAULT_CUSTOMER_GROUP_)
if ($this->is_guest)
$this->id_default_group = Configuration::get('PS_GUEST_GROUP');
@@ -216,9 +219,11 @@ class CustomerCore extends ObjectModel
public function update($nullValues = false)
{
$this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days);
if ($this->newsletter && !$this->newsletter_date_add)
if ($this->newsletter && !Validate::isDate($this->newsletter_date_add))
$this->newsletter_date_add = date('Y-m-d H:i:s');
$this->updateGroup($this->groupBox);
if (Context::getContext()->controller->controller_type == 'admin')
$this->updateGroup($this->groupBox);
return parent::update(true);
}
@@ -280,6 +285,24 @@ class CustomerCore extends ObjectModel
return $this;
}
/**
* Retrieve customers by email address
*
* @static
* @param $email
* @return array
*/
public static function getCustomersByEmail($email)
{
$sql = 'SELECT *
FROM `'._DB_PREFIX_.'customer`
WHERE `email` = \''.pSQL($email).'\'
'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER);
return Db::getInstance()->ExecuteS($sql);
}
/**
* Check id the customer is active or not
*
@@ -531,7 +554,7 @@ class CustomerCore extends ObjectModel
public static function getGroupsStatic($id_customer)
{
if (!Group::isFeatureActive())
if (!Group::isFeatureActive() || $id_customer == 0)
return array(Configuration::get('PS_CUSTOMER_GROUP'));
if (!isset(self::$_customer_groups[$id_customer]))
@@ -645,7 +668,14 @@ class CustomerCore extends ObjectModel
Mail::l('Your guest account has been transformed to customer account', (int)$id_lang),
$vars,
$this->email,
$this->firstname.' '.$this->lastname
$this->firstname.' '.$this->lastname,
null,
null,
null,
null,
_PS_MAIL_DIR_,
false,
(int)$this->id_shop
);
return true;
}
@@ -730,7 +760,8 @@ class CustomerCore extends ObjectModel
$query = new DbQuery();
$query->select('SUM(op.amount)');
$query->from('order_payment', 'op');
$query->leftJoin('orders', 'o', 'op.id_order = o.id_order');
$query->leftJoin('order_invoice_payment', 'oip', 'op.id_order_payment = oip.id_order_payment');
$query->leftJoin('orders', 'o', 'oip.id_order = o.id_order');
$query->groupBy('o.id_customer');
$query->where('o.id_customer = '.(int)$this->id);
$total_rest = (float)Db::getInstance()->getValue($query->build());
+155 -110
View File
@@ -51,15 +51,15 @@ class DispatcherCore
'rule' => '{category:/}{id}-{rewrite}{-:ean13}.html',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_product'),
'rewrite' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'ean13' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'category' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'categories' => array('regexp' => '[/a-zA-Z0-9-\pL]*'),
'reference' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'manufacturer' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'supplier' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'ean13' => array('regexp' => '[0-9\pL]*'),
'category' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'categories' => array('regexp' => '[/_a-zA-Z0-9-\pL]*'),
'reference' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'manufacturer' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'supplier' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'price' => array('regexp' => '[0-9\.,]*'),
'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
),
@@ -71,9 +71,9 @@ class DispatcherCore
'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'),
/* Selected filters is used by the module blocklayered */
'selected_filters' => array('regexp' => '.*', 'param' => 'selected_filters'),
'rewrite' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
),
),
'category_rule' => array(
@@ -81,9 +81,9 @@ class DispatcherCore
'rule' => '{id}-{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'),
'rewrite' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
),
),
'supplier_rule' => array(
@@ -91,9 +91,9 @@ class DispatcherCore
'rule' => '{id}__{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_supplier'),
'rewrite' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
),
),
'manufacturer_rule' => array(
@@ -101,9 +101,9 @@ class DispatcherCore
'rule' => '{id}_{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_manufacturer'),
'rewrite' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
),
),
'cms_rule' => array(
@@ -111,9 +111,9 @@ class DispatcherCore
'rule' => 'content/{id}-{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_cms'),
'rewrite' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
),
),
'cms_category_rule' => array(
@@ -121,17 +121,17 @@ class DispatcherCore
'rule' => 'content/category/{id}-{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_cms_category'),
'rewrite' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
),
),
'module' => array(
'controller' => null,
'rule' => 'module/{module}{/:controller}',
'keywords' => array(
'module' => array('regexp' => '[a-zA-Z0-9_-]+', 'param' => 'module'),
'controller' => array('regexp' => '[a-zA-Z0-9_-]+', 'param' => 'controller'),
'module' => array('regexp' => '[_a-zA-Z0-9_-]+', 'param' => 'module'),
'controller' => array('regexp' => '[_a-zA-Z0-9_-]+', 'param' => 'controller'),
),
'params' => array(
'fc' => 'module',
@@ -143,7 +143,9 @@ class DispatcherCore
* @var bool If true, use routes to build URL (mod rewrite must be activated)
*/
protected $use_routes = false;
protected $multilang_activated = false;
/**
* @var array List of loaded routes
*/
@@ -218,15 +220,17 @@ class DispatcherCore
$this->controller_not_found = 'pagenotfound';
$this->default_controller = 'index';
}
$this->setRequestUri();
// Switch language if needed (only on front)
if ($this->front_controller == self::FC_FRONT)
Tools::switchLanguage();
if (Language::isMultiLanguageActivated())
$this->multilang_activated = true;
$this->loadRoutes();
// Get request uri (HTTP_X_REWRITE_URL is used by IIS)
if (isset($_SERVER['REQUEST_URI']))
$this->request_uri = $_SERVER['REQUEST_URI'];
else if (isset($_SERVER['HTTP_X_REWRITE_URL']))
$this->request_uri = $_SERVER['HTTP_X_REWRITE_URL'];
$this->request_uri = rawurldecode($this->request_uri);
}
/**
@@ -235,15 +239,6 @@ class DispatcherCore
public function dispatch()
{
$controller_class = '';
$this->request_uri = preg_replace('#^'.preg_quote(Context::getContext()->shop->getBaseURI(), '#').'#i', '/', $this->request_uri);
// If there are several languages, get language from uri
if ($this->use_routes && Language::isMultiLanguageActivated())
if (preg_match('#^/([a-z]{2})/#', $this->request_uri, $m))
{
$_GET['isolang'] = $m[1];
$this->request_uri = substr($this->request_uri, 3);
}
// Get current controller
$this->getController();
@@ -255,7 +250,7 @@ class DispatcherCore
{
// Dispatch front office controller
case self::FC_FRONT :
$controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_);
$controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_, _PS_OVERRIDE_DIR_.'controllers/front/');
$controllers['index'] = 'IndexController';
if (isset($controllers['auth']))
@@ -315,7 +310,7 @@ class DispatcherCore
}
else
{
$controllers = Dispatcher::getControllers(array(_PS_ADMIN_DIR_.'/tabs/', _PS_ADMIN_CONTROLLER_DIR_));
$controllers = Dispatcher::getControllers(array(_PS_ADMIN_DIR_.'/tabs/', _PS_ADMIN_CONTROLLER_DIR_, _PS_OVERRIDE_DIR_.'controllers/admin/'));
if (!isset($controllers[$this->controller]))
$this->controller = $this->controller_not_found;
$controller_class = $controllers[$this->controller];
@@ -357,41 +352,67 @@ class DispatcherCore
$e->displayMessage();
}
}
/**
* Set request uri and iso lang
*/
protected function setRequestUri()
{
// Get request uri (HTTP_X_REWRITE_URL is used by IIS)
if (isset($_SERVER['REQUEST_URI']))
$this->request_uri = $_SERVER['REQUEST_URI'];
else if (isset($_SERVER['HTTP_X_REWRITE_URL']))
$this->request_uri = $_SERVER['HTTP_X_REWRITE_URL'];
$this->request_uri = rawurldecode($this->request_uri);
$this->request_uri = preg_replace('#^'.preg_quote(Context::getContext()->shop->getBaseURI(), '#').'#i', '/', $this->request_uri);
// If there are several languages, get language from uri
if ($this->use_routes && Language::isMultiLanguageActivated())
if (preg_match('#^/([a-z]{2})/#', $this->request_uri, $m))
{
$_GET['isolang'] = $m[1];
$this->request_uri = substr($this->request_uri, 3);
}
}
/**
* Load default routes
* Load default routes group by languages
*/
protected function loadRoutes()
{
$context = Context::getContext();
foreach ($this->default_routes as $id => $route)
$this->addRoute(
$id,
$route['rule'],
$route['controller'],
$route['keywords'],
isset($route['params']) ? $route['params'] : array()
);
// Set default routes
foreach (Language::getLanguages() as $lang)
foreach ($this->default_routes as $id => $route)
$this->addRoute(
$id,
$route['rule'],
$route['controller'],
$lang['id_lang'],
$route['keywords'],
isset($route['params']) ? $route['params'] : array()
);
if ($this->use_routes)
{
// Get iso lang
$iso_lang = Tools::getValue('isolang');
$id_lang = $context->language->id;
if (!empty($iso_lang))
$id_lang = Language::getIdByIso($iso_lang);
// Load routes from meta table
$sql = 'SELECT m.page, ml.url_rewrite
$sql = 'SELECT m.page, ml.url_rewrite, ml.id_lang
FROM `'._DB_PREFIX_.'meta` m
LEFT JOIN `'._DB_PREFIX_.'meta_lang` ml ON (m.id_meta = ml.id_meta'.Shop::addSqlRestrictionOnLang('ml').')
WHERE id_lang = '.(int)$context->language->id.'
ORDER BY LENGTH(ml.url_rewrite) DESC';
if ($results = Db::getInstance()->executeS($sql))
foreach ($results as $row)
{
if ($row['url_rewrite'])
$this->addRoute($row['page'], $row['url_rewrite'], $row['page']);
else
$this->empty_route = array(
'routeID' => $row['page'],
'rule' => '',
'controller' => $row['page'],
);
$this->addRoute($row['page'], $row['url_rewrite'], $row['page'], $row['id_lang']);
}
// Set default empty route if no empty route (that's weird I know)
@@ -405,24 +426,30 @@ class DispatcherCore
// Load custom routes
foreach ($this->default_routes as $route_id => $route_data)
if ($custom_route = Configuration::get('PS_ROUTE_'.$route_id))
$this->addRoute(
$route_id,
$custom_route,
$route_data['controller'],
$route_data['keywords'],
isset($route_data['params']) ? $route_data['params'] : array()
);
foreach (Language::getLanguages() as $lang)
$this->addRoute(
$route_id,
$custom_route,
$route_data['controller'],
$lang['id_lang'],
$route_data['keywords'],
isset($route_data['params']) ? $route_data['params'] : array()
);
}
}
/**
*
* @param string $id Name of the route (need to be uniq, a second route with same name will override the first)
* @param string $route_id Name of the route (need to be uniq, a second route with same name will override the first)
* @param string $rule Url rule
* @param string $controller Controller to call if request uri match the rule
* @param int $id_lang
*/
public function addRoute($route_id, $rule, $controller, array $keywords = array(), array $params = array())
public function addRoute($route_id, $rule, $controller, $id_lang = null, array $keywords = array(), array $params = array())
{
if (is_null($id_lang))
$id_lang = Context::getContext()->language->id;
$regexp = preg_quote($rule, '#');
if ($keywords)
{
@@ -456,7 +483,10 @@ class DispatcherCore
}
$regexp = '#^/'.$regexp.'(\?.*)?$#u';
$this->routes[$route_id] = array(
if (!isset($this->routes[$id_lang]))
$this->routes[$id_lang] = array();
$this->routes[$id_lang][$route_id] = array(
'rule' => $rule,
'regexp' => $regexp,
'controller' => $controller,
@@ -469,26 +499,31 @@ class DispatcherCore
* Check if a route exists
*
* @param string $route_id
* @param int $id_lang
* @return bool
*/
public function hasRoute($route_id)
public function hasRoute($route_id, $id_lang = null)
{
return isset($this->routes[$route_id]);
if (is_null($id_lang))
$id_lang = Context::getContext()->language->id;
return isset($this->routes[$id_lang]) && isset($this->routes[$id_lang][$route_id]);
}
/**
* Check if a keyword is written in a route rule
*
* @param string $route_id
* @param int $id_lang
* @param string $keyword
* @return bool
*/
public function hasKeyword($route_id, $keyword)
public function hasKeyword($route_id, $id_lang, $keyword)
{
if (!isset($this->routes[$route_id]))
if (!isset($this->routes[$id_lang]) && !isset($this->routes[$id_lang][$route_id]))
return false;
return preg_match('#\{([^{}]+:)?'.preg_quote($keyword, '#').'(:[^{}])?\}#', $this->routes[$route_id]['rule']);
return preg_match('#\{([^{}]+:)?'.preg_quote($keyword, '#').'(:[^{}])?\}#', $this->routes[$id_lang][$route_id]['rule']);
}
/**
@@ -515,18 +550,23 @@ class DispatcherCore
* Create an url from
*
* @param string $route_id Name the route
* @param int $id_lang
* @param array $params
* @param bool $use_routes If false, don't use to create this url
* @param string $anchor Optional anchor to add at the end of this url
*/
public function createUrl($route_id, array $params = array(), $force_routes = false, $anchor = '')
public function createUrl($route_id, $id_lang = null, array $params = array(), $force_routes = false, $anchor = '')
{
if (!isset($this->routes[$route_id]))
if (!$id_lang)
$id_lang = Context::getContext()->language->id;
if (!isset($this->routes[$id_lang][$route_id]))
{
$query = http_build_query($params, '', '&');
return ($route_id == 'index') ? 'index.php'.(($query) ? '?'.$query : '') : 'index.php?controller='.$route_id.(($query) ? '&'.$query : '').$anchor;
$index_link = $this->use_routes ? '' : 'index.php';
return ($route_id == 'index') ? $index_link.(($query) ? '?'.$query : '') : 'index.php?controller='.$route_id.(($query) ? '&'.$query : '').$anchor;
}
$route = $this->routes[$route_id];
$route = $this->routes[$id_lang][$route_id];
// Check required fields
$query_params = isset($route['params']) ? $route['params'] : array();
@@ -575,7 +615,11 @@ class DispatcherCore
if (!empty($route['controller']))
$query_params['controller'] = $route['controller'];
$url = 'index.php?'.http_build_query(array_merge($add_params, $query_params), '', '&');
$query = http_build_query(array_merge($add_params, $query_params), '', '&');
if ($this->multilang_activated)
$query .= (!empty($query) ? '&' : '').'id_lang='.(int)$id_lang;
$url = 'index.php?'.$query;
}
return $url.$anchor;
@@ -614,34 +658,35 @@ class DispatcherCore
// Add empty route as last route to prevent this greedy regexp to match request uri before right time
if ($this->empty_route)
$this->addRoute($this->empty_route['routeID'], $this->empty_route['rule'], $this->empty_route['controller']);
$this->addRoute($this->empty_route['routeID'], $this->empty_route['rule'], $this->empty_route['controller'], Context::getContext()->language->id);
foreach ($this->routes as $route)
if (preg_match($route['regexp'], $this->request_uri, $m))
{
// Route found ! Now fill $_GET with parameters of uri
foreach ($m as $k => $v)
if (!is_numeric($k))
$_GET[$k] = $v;
$controller = $route['controller'] ? $route['controller'] : $_GET['controller'];
if (!empty($route['params']))
foreach ($route['params'] as $k => $v)
$_GET[$k] = $v;
// A patch for module friendly urls
if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9]+)$#i', $controller, $m))
if (isset($this->routes[Context::getContext()->language->id]))
foreach ($this->routes[Context::getContext()->language->id] as $route)
if (preg_match($route['regexp'], $this->request_uri, $m))
{
$_GET['module'] = $m[1];
$_GET['fc'] = 'module';
$controller = $m[2];
// Route found ! Now fill $_GET with parameters of uri
foreach ($m as $k => $v)
if (!is_numeric($k))
$_GET[$k] = $v;
$controller = $route['controller'] ? $route['controller'] : $_GET['controller'];
if (!empty($route['params']))
foreach ($route['params'] as $k => $v)
$_GET[$k] = $v;
// A patch for module friendly urls
if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9]+)$#i', $controller, $m))
{
$_GET['module'] = $m[1];
$_GET['fc'] = 'module';
$controller = $m[2];
}
if (isset($_GET['fc']) && $_GET['fc'] == 'module')
$this->front_controller = self::FC_MODULE;
break;
}
if (isset($_GET['fc']) && $_GET['fc'] == 'module')
$this->front_controller = self::FC_MODULE;
break;
}
if ($controller == 'index' || $this->request_uri == '/index.php')
$controller = $this->default_controller;
$this->controller = $controller;
+3 -2
View File
@@ -84,6 +84,7 @@ class FeatureCore extends ObjectModel
return Db::getInstance()->executeS('
SELECT *
FROM `'._DB_PREFIX_.'feature` f
'.Shop::addSqlAssociation('feature', 'f').'
LEFT JOIN `'._DB_PREFIX_.'feature_lang` fl
ON (f.`id_feature` = fl.`id_feature` AND fl.`id_lang` = '.(int)$id_lang.')
ORDER BY f.`position` ASC
@@ -263,12 +264,12 @@ class FeatureCore extends ObjectModel
* @param integer $position
* @return boolean Update result
*/
public function updatePosition($way, $position, $id_feature)
public function updatePosition($way, $position, $id_feature = null)
{
if (!$res = Db::getInstance()->executeS('
SELECT `position`, `id_feature`
FROM `'._DB_PREFIX_.'feature`
WHERE `id_feature` = '.(int)($id_feature ? $id_feature : 1).'
WHERE `id_feature` = '.(int)($id_feature ? $id_feature : $this->id).'
ORDER BY `position` ASC'
))
return false;
+1 -1
View File
@@ -138,7 +138,7 @@ class FeatureValueCore extends ObjectModel
ON (fvl.`id_feature_value` = fv.`id_feature_value`)
WHERE `value` = \''.pSQL($name).'\'
AND fv.`id_feature` = '.(int)$id_feature.'
AND fv.`custom` = 0
AND fv.`custom` = 1
GROUP BY fv.`id_feature_value` LIMIT 1
');
+1 -1
View File
@@ -78,7 +78,7 @@ class GroupCore extends ObjectModel
$shop_criteria = Shop::addSqlAssociation('group', 'g');
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT g.`id_group`, g.`reduction`, g.`price_display_method`, gl.`name`
SELECT DISTINCT g.`id_group`, g.`reduction`, g.`price_display_method`, 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)$id_lang.')
'.$shop_criteria.'
+2 -2
View File
@@ -376,7 +376,7 @@ class HookCore extends ObjectModel
$exceptions = $moduleInstance->getExceptions($array['id_hook']);
if (in_array(Dispatcher::getInstance()->getController(), $exceptions))
continue;
if (isset($context->employee) && !$moduleInstance->getPermission('view', $context->employee))
if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee))
continue;
// Check which / if method is callable
@@ -392,7 +392,7 @@ class HookCore extends ObjectModel
else if ($hook_retro_callable)
$display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args);
// Live edit
if ($array['live_edit'] && ((Tools::isSubmit('live_edit') && Tools::getValue('ad') && (Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_)))))
if ($array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
{
$live_edit = true;
$output .= self::wrapLiveEdit($display, $moduleInstance, $array['id_hook']);
+1 -1
View File
@@ -385,7 +385,7 @@ class ImageCore extends ObjectModel
* Delete the product image from disk and remove the containing folder if empty
* Handles both legacy and new image filesystems
*/
public function deleteImage()
public function deleteImage($force_delete = false)
{
if (!$this->id)
return false;
+28 -4
View File
@@ -87,7 +87,7 @@ class ImageManagerCore
*/
public static function checkImageMemoryLimit($image)
{
$infos = getimagesize($image);
$infos = @getimagesize($image);
$memory_limit = Tools::getMemoryLimit();
// memory_limit == -1 => unlimited memory
@@ -114,7 +114,7 @@ class ImageManagerCore
* @param string $file_type
* @return boolean Operation result
*/
public static function resize($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = 'jpg')
public static function resize($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = 'jpg', $force_type = false)
{
if (!file_exists($src_file))
return false;
@@ -124,7 +124,7 @@ class ImageManagerCore
// This allow for higher quality and for transparency. JPG source files will also benefit from a higher quality
// because JPG reencoding by GD, even with max quality setting, degrades the image.
if (Configuration::get('PS_IMAGE_QUALITY') == 'png_all'
|| (Configuration::get('PS_IMAGE_QUALITY') == 'png' && $type == IMAGETYPE_PNG))
|| (Configuration::get('PS_IMAGE_QUALITY') == 'png' && $type == IMAGETYPE_PNG) && !$force_type)
$file_type = 'png';
if (!$src_width)
@@ -225,6 +225,30 @@ class ImageManagerCore
return false;
}
/**
* Check if image file extension is correct
*
* @static
* @param $filename real filename
* @return bool true if it's correct
*/
public static function isCorrectImageFileExt($filename)
{
// Filter on file extension
$authorized_extensions = array('gif', 'jpg', 'jpeg', 'jpe', 'png');
$name_explode = explode('.', $filename);
if (count($name_explode))
{
$current_extension = strtolower($name_explode[count($name_explode) - 1]);
if (!in_array($current_extension, $authorized_extensions))
return false;
}
else
return false;
return true;
}
/**
* Validate image upload (check image type and weight)
*
@@ -240,7 +264,7 @@ class ImageManagerCore
$file['size'] / 1000,
$max_file_size / 1000
);
if (!ImageManager::isRealImage($file['tmp_name'], $file['type']))
if (!ImageManager::isRealImage($file['tmp_name'], $file['type']) || !ImageManager::isCorrectImageFileExt($file['name']))
return Tools::displayError('Image format not recognized, allowed formats are: .gif, .jpg, .png');
if ($file['error'])
return sprintf(Tools::displayError('Error while uploading image; please change your server\'s settings. (Error code: %s)'), $file['error']);
+75 -55
View File
@@ -83,6 +83,7 @@ class LanguageCore extends ObjectModel
'errors' => '_ERRORS',
'admin' => '_LANGADM',
'pdf' => '_LANGPDF',
'tabs' => 'tabs',
);
public function __construct($id = null, $id_lang = null)
@@ -113,11 +114,23 @@ class LanguageCore extends ObjectModel
if (!file_exists(_PS_TRANSLATIONS_DIR_.$iso_code))
mkdir(_PS_TRANSLATIONS_DIR_.$iso_code);
foreach ($this->translationsFilesAndVars as $file => $var)
if (!file_exists(_PS_TRANSLATIONS_DIR_.$iso_code.'/'.$file.'.php'))
file_put_contents(_PS_TRANSLATIONS_DIR_.$iso_code.'/'.$file.'.php', '<?php
{
$path_file = _PS_TRANSLATIONS_DIR_.$iso_code.'/'.$file.'.php';
if (!file_exists($path_file))
if ($file != 'tabs')
file_put_contents($path_file, '<?php
global $'.$var.';
$'.$var.' = array();
?>');
else
file_put_contents($path_file, '<?php
$'.$var.' = array();
return $'.$var.';
?>');
@chmod($path_file, 0777);
}
}
/**
@@ -248,7 +261,7 @@ class LanguageCore extends ObjectModel
$mPath_to = _PS_MAIL_DIR_.(string)$iso_to.'/';
}
$lFiles = array('admin.php', 'errors.php', 'fields.php', 'pdf.php');
$lFiles = array('admin.php', 'errors.php', 'fields.php', 'pdf.php', 'tabs.php');
// Added natives mails files
$mFiles = array(
@@ -282,7 +295,8 @@ class LanguageCore extends ObjectModel
'shipped.html', 'shipped.txt',
'test.html', 'test.txt',
'voucher.html', 'voucher.txt',
'voucher_new.html', 'voucher_new.txt'
'voucher_new.html', 'voucher_new.txt',
'order_changed.html', 'order_changed.txt'
);
$number = -1;
@@ -451,64 +465,70 @@ class LanguageCore extends ObjectModel
public function delete()
{
if (empty($this->iso_code))
$this->iso_code = Language::getIsoById($this->id);
// Database translations deletion
$result = Db::getInstance()->executeS('SHOW TABLES FROM `'._DB_NAME_.'`');
foreach ($result as $row)
if (preg_match('/_lang/', $row['Tables_in_'._DB_NAME_]))
if (!Db::getInstance()->execute('DELETE FROM `'.$row['Tables_in_'._DB_NAME_].'` WHERE `id_lang` = '.(int)$this->id))
return false;
// Delete tags
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'tag WHERE id_lang = '.(int)$this->id);
// Delete search words
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'search_word WHERE id_lang = '.(int)$this->id);
// Files deletion
foreach (Language::getFilesList($this->iso_code, _THEME_NAME_, false, false, false, true, true) as $key => $file)
if (file_exists($key))
unlink($key);
$modList = scandir(_PS_MODULE_DIR_);
foreach ($modList as $mod)
if (!$this->hasMultishopEntries())
{
Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod.'/mails/'.$this->iso_code);
$files = @scandir(_PS_MODULE_DIR_.$mod.'/mails/');
if (count($files) <= 2)
Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod.'/mails/');
if (file_exists(_PS_MODULE_DIR_.$mod.'/'.$this->iso_code.'.php'))
if (empty($this->iso_code))
$this->iso_code = Language::getIsoById($this->id);
// Database translations deletion
$result = Db::getInstance()->executeS('SHOW TABLES FROM `'._DB_NAME_.'`');
foreach ($result as $row)
if (preg_match('/_lang/', $row['Tables_in_'._DB_NAME_]))
if (!Db::getInstance()->execute('DELETE FROM `'.$row['Tables_in_'._DB_NAME_].'` WHERE `id_lang` = '.(int)$this->id))
return false;
// Delete tags
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'tag WHERE id_lang = '.(int)$this->id);
// Delete search words
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'search_word WHERE id_lang = '.(int)$this->id);
// Files deletion
foreach (Language::getFilesList($this->iso_code, _THEME_NAME_, false, false, false, true, true) as $key => $file)
if (file_exists($key))
unlink($key);
$modList = scandir(_PS_MODULE_DIR_);
foreach ($modList as $mod)
{
unlink(_PS_MODULE_DIR_.$mod.'/'.$this->iso_code.'.php');
$files = @scandir(_PS_MODULE_DIR_.$mod);
Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod.'/mails/'.$this->iso_code);
$files = @scandir(_PS_MODULE_DIR_.$mod.'/mails/');
if (count($files) <= 2)
Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod);
Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod.'/mails/');
if (file_exists(_PS_MODULE_DIR_.$mod.'/'.$this->iso_code.'.php'))
{
unlink(_PS_MODULE_DIR_.$mod.'/'.$this->iso_code.'.php');
$files = @scandir(_PS_MODULE_DIR_.$mod);
if (count($files) <= 2)
Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod);
}
}
if (file_exists(_PS_MAIL_DIR_.$this->iso_code))
Language::recurseDeleteDir(_PS_MAIL_DIR_.$this->iso_code);
if (file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code))
Language::recurseDeleteDir(_PS_TRANSLATIONS_DIR_.$this->iso_code);
}
if (file_exists(_PS_MAIL_DIR_.$this->iso_code))
Language::recurseDeleteDir(_PS_MAIL_DIR_.$this->iso_code);
if (file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code))
Language::recurseDeleteDir(_PS_TRANSLATIONS_DIR_.$this->iso_code);
if (!parent::delete())
return false;
// delete images
$files_copy = array('/en.jpg', '/en-default-thickbox.jpg', '/en-default-home.jpg', '/en-default-large.jpg', '/en-default-medium.jpg', '/en-default-small.jpg', '/en-default-large_scene.jpg');
$tos = array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_);
foreach ($tos as $to)
foreach ($files_copy as $file)
{
$name = str_replace('/en', ''.$this->iso_code, $file);
if (file_exists($to.$name))
unlink($to.$name);
if (file_exists(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg'))
unlink(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg');
}
if (!$this->hasMultishopEntries())
{
// delete images
$files_copy = array('/en.jpg', '/en-default-thickbox.jpg', '/en-default-home.jpg', '/en-default-large.jpg', '/en-default-medium.jpg', '/en-default-small.jpg', '/en-default-large_scene.jpg');
$tos = array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_);
foreach ($tos as $to)
foreach ($files_copy as $file)
{
$name = str_replace('/en', ''.$this->iso_code, $file);
if (file_exists($to.$name))
unlink($to.$name);
if (file_exists(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg'))
unlink(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg');
}
}
return Tools::generateHtaccess();
}
+39 -40
View File
@@ -83,22 +83,23 @@ class LinkCore
public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false)
{
$dispatcher = Dispatcher::getInstance();
$url = _PS_BASE_URL_.__PS_BASE_URI__;
if (!$id_lang)
$id_lang = Context::getContext()->language->id;
// @todo use specific method ?
if ($id_shop && ($shop = Shop::getShop($id_shop)))
$url = 'http://'.$shop['domain'].$shop['uri'];
$url .= $this->getLangLink($id_lang);
if (!$id_shop)
$shop = Context::getContext()->shop;
else
$shop = new Shop($id_shop);
$url = 'http://'.$shop->domain.$shop->getBaseURI().$this->getLangLink($id_lang);
if (!is_object($product))
{
if (is_array($product) && isset($product['id_product']))
$product = new Product($product['id_product'], false, $id_lang);
else if (is_numeric($product) || !$product)
$product = new Product($product, false, $id_lang);
$product = new Product($product, false, $id_lang);
else
throw new PrestaShopException('Invalid product vars');
}
@@ -112,19 +113,19 @@ class LinkCore
$params['meta_keywords'] = Tools::str2url($product->getFieldByLang('meta_keywords'));
$params['meta_title'] = Tools::str2url($product->getFieldByLang('meta_title'));
if ($dispatcher->hasKeyword('product_rule', 'manufacturer'))
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'manufacturer'))
$params['manufacturer'] = Tools::str2url($product->isFullyLoaded ? $product->manufacturer_name : Manufacturer::getNameById($product->id_manufacturer));
if ($dispatcher->hasKeyword('product_rule', 'supplier'))
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'supplier'))
$params['supplier'] = Tools::str2url($product->isFullyLoaded ? $product->supplier_name : Supplier::getNameById($product->id_supplier));
if ($dispatcher->hasKeyword('product_rule', 'price'))
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'price'))
$params['price'] = $product->isFullyLoaded ? $product->price : Product::getPriceStatic($product->id, false, null, 6, null, false, true, 1, false, null, null, null, $product->specificPrice);
if ($dispatcher->hasKeyword('product_rule', 'tags'))
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'tags'))
$params['tags'] = Tools::str2url($product->getTags($id_lang));
if ($dispatcher->hasKeyword('product_rule', 'categories'))
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'categories'))
{
$cats = array();
foreach ($product->getParentCategories() as $cat)
@@ -133,7 +134,7 @@ class LinkCore
}
$anchor = $ipa ? $product->getAnchor($ipa) : '';
return $url.$dispatcher->createUrl('product_rule', $params, $force_routes, $anchor);
return $url.$dispatcher->createUrl('product_rule', $id_lang, $params, $force_routes, $anchor);
}
/**
@@ -172,7 +173,7 @@ class LinkCore
$params['selected_filters'] = $selected_filters;
}
return $url.Dispatcher::getInstance()->createUrl($rule, $params, $this->allow);
return $url.Dispatcher::getInstance()->createUrl($rule, $id_lang, $params, $this->allow);
}
/**
@@ -199,7 +200,7 @@ class LinkCore
$params['meta_keywords'] = Tools::str2url($category->meta_keywords);
$params['meta_title'] = Tools::str2url($category->meta_title);
return $url.Dispatcher::getInstance()->createUrl('cms_category_rule', $params, $this->allow);
return $url.Dispatcher::getInstance()->createUrl('cms_category_rule', $id_lang, $params, $this->allow);
}
/**
@@ -225,19 +226,19 @@ class LinkCore
// Set available keywords
$params = array();
$params['id'] = $cms->id;
$params['rewrite'] = (!$alias) ? $cms->link_rewrite : $alias;
$params['rewrite'] = (!$alias) ? (is_array($cms->link_rewrite) ? $cms->link_rewrite[(int)$id_lang] : $cms->link_rewrite) : $alias;
if (isset($cms->meta_keywords) && !empty($cms->meta_keywords))
$params['meta_keywords'] = Tools::str2url($cms->meta_keywords);
$params['meta_keywords'] = is_array($cms->meta_keywords) ? Tools::str2url($cms->meta_keywords[(int)$id_lang]) : Tools::str2url($cms->meta_keywords);
else
$params['meta_keywords'] = '';
if (isset($cms->meta_title) && !empty($cms->meta_title))
$params['meta_title'] = Tools::str2url($cms->meta_title);
$params['meta_title'] = is_array($cms->meta_title) ? Tools::str2url($cms->meta_title[(int)$id_lang]) : Tools::str2url($cms->meta_title);
else
$params['meta_title'] = '';
return $url.Dispatcher::getInstance()->createUrl('cms_rule', $params, $this->allow);
return $url.Dispatcher::getInstance()->createUrl('cms_rule', $id_lang, $params, $this->allow);
}
/**
@@ -264,7 +265,7 @@ class LinkCore
$params['meta_keywords'] = Tools::str2url($supplier->meta_keywords);
$params['meta_title'] = Tools::str2url($supplier->meta_title);
return $url.Dispatcher::getInstance()->createUrl('supplier_rule', $params, $this->allow);
return $url.Dispatcher::getInstance()->createUrl('supplier_rule', $id_lang, $params, $this->allow);
}
/**
@@ -291,7 +292,7 @@ class LinkCore
$params['meta_keywords'] = Tools::str2url($manufacturer->meta_keywords);
$params['meta_title'] = Tools::str2url($manufacturer->meta_title);
return $url.Dispatcher::getInstance()->createUrl('manufacturer_rule', $params, $this->allow);
return $url.Dispatcher::getInstance()->createUrl('manufacturer_rule', $id_lang, $params, $this->allow);
}
/**
@@ -316,10 +317,10 @@ class LinkCore
$params['controller'] = $controller ? $controller : 'default';
// If the module has its own route ... just use it !
if (Dispatcher::getInstance()->hasRoute('module-'.$module.'-'.$controller))
if (Dispatcher::getInstance()->hasRoute('module-'.$module.'-'.$controller, $id_lang))
return $this->getPageLink('module-'.$module.'-'.$controller, $params);
else
return $url.Dispatcher::getInstance()->createUrl('module', $params, $this->allow);
return $url.Dispatcher::getInstance()->createUrl('module', $id_lang, $params, $this->allow);
}
/**
@@ -331,8 +332,10 @@ class LinkCore
*/
public function getAdminLink($controller, $with_token = true)
{
$id_lang = Context::getContext()->language->id;
$params = $with_token ? array('token' => Tools::getAdminTokenLite($controller)) : array();
return Dispatcher::getInstance()->createUrl($controller, $params, false);
return Dispatcher::getInstance()->createUrl($controller, $id_lang, $params, false);
}
/**
@@ -404,7 +407,7 @@ class LinkCore
}
unset($request['controller']);
$uri_path = Dispatcher::getInstance()->createUrl($controller, $request);
$uri_path = Dispatcher::getInstance()->createUrl($controller, $id_lang, $request);
$url = ($ssl && $this->ssl_enable) ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true);
$url .= __PS_BASE_URI__.$this->getLangLink($id_lang).ltrim($uri_path, '/');
@@ -426,24 +429,20 @@ class LinkCore
{
if (!$context)
$context = Context::getContext();
$matches = array();
$request = $_SERVER['REQUEST_URI'];
preg_match('#^/([a-z]{2})/([^\?]*).*$#', $request, $matches);
if ($matches)
{
$current_iso = $matches[1];
$rewrite = $matches[2];
$url_rewrite = Meta::getEquivalentUrlRewrite($id_lang, Language::getIdByIso($current_iso), $rewrite);
$request = str_replace($rewrite, $url_rewrite, $request);
}
$params = $_GET;
unset($params['isolang'], $params['controller']);
if (!$this->allow)
$params['id_lang'] = $id_lang;
else
unset($params['id_lang']);
return $this->getPageLink(Dispatcher::getInstance()->getController(), false, $id_lang, $params);
$controller = Dispatcher::getInstance()->getController();
if (!empty(Context::getContext()->controller->php_self))
$controller = Context::getContext()->controller->php_self;
return $this->getPageLink($controller, false, $id_lang, $params);
}
public function goPage($url, $p)
@@ -470,7 +469,7 @@ class LinkCore
if (method_exists($this, $method_name) && isset($_GET['id_'.Dispatcher::getInstance()->getController()]))
{
$type = Dispatcher::getInstance()->getController();
$id_object = $_GET['id_'.Dispatcher::getInstance()->getController()];
$id_object = $_GET['id_'.$type];
}
}
@@ -505,7 +504,7 @@ class LinkCore
$vars[urlencode($k)] = $value;
else
{
foreach (explode('&', http_build_query(array($k => $value)), '', '&') as $key => $val)
foreach (explode('&', http_build_query(array($k => $value), '', '&')) as $key => $val)
{
$data = explode('=', $val);
$vars[urldecode($data[0])] = $data[1];
@@ -519,11 +518,11 @@ class LinkCore
return $url.(($this->allow == 1 || $url == $this->url) ? '?' : '&').http_build_query($vars, '', '&');
$vars['requestUrl'] = $url;
if (!$this->allow == 1)
$vars['controller'] = Dispatcher::getInstance()->getController();
if ($type && $id_object)
$vars['id_'.$type] = (is_object($id_object) ? (int)$id_object->id : (int)$id_object);
if (!$this->allow == 1)
$vars['controller'] = Dispatcher::getInstance()->getController();
return $vars;
}
+5 -1
View File
@@ -58,7 +58,11 @@ class LocalizationPackCore
$res &= $this->_installLanguages($xml, $install_mode);
if ($res && isset($this->iso_code_lang))
Configuration::updateValue('PS_LANG_DEFAULT', (int)Language::getIdByIso($this->iso_code_lang));
{
if (!$id_lang = (int)Language::getIdByIso($this->iso_code_lang))
$id_lang = 1;
Configuration::updateValue('PS_LANG_DEFAULT', $id_lang);
}
if ($install_mode && $res && isset($this->iso_currency))
{
+90 -77
View File
@@ -42,19 +42,31 @@ class MailCore
* @param int $id_lang Language of the email (to translate the template)
* @param string $template Template: the name of template not be a var but a string !
* @param string $subject
* @param string $templateVars
* @param string $template_vars
* @param string $to
* @param string $toName
* @param string $to_name
* @param string $from
* @param string $fromName
* @param array $fileAttachment Array with three parameters (content, mime and name). You can use an array of array to attach multiple files
* @param string $from_name
* @param array $file_attachment Array with three parameters (content, mime and name). You can use an array of array to attach multiple files
* @param bool $modeSMTP
* @param string $templatePath
* @param string $template_path
* @param bool $die
*/
public static function Send($id_lang, $template, $subject, $templateVars, $to,
$toName = null, $from = null, $fromName = null, $fileAttachment = null, $modeSMTP = null, $templatePath = _PS_MAIL_DIR_, $die = false)
public static function Send($id_lang, $template, $subject, $template_vars, $to,
$to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null)
{
$theme_path = _PS_THEME_DIR_;
// Get the path of theme by id_shop if exist
if (is_numeric($id_shop) && $id_shop)
{
$shop = new Shop((int)$id_shop);
$theme_name = $shop->getTheme();
if (_THEME_NAME_ != $theme_name)
$theme_path = _PS_ROOT_DIR_.'/themes/'.$theme_name.'/';
}
$configuration = Configuration::getMultiple(array(
'PS_SHOP_EMAIL',
'PS_MAIL_METHOD',
@@ -68,47 +80,43 @@ class MailCore
'PS_MAIL_TYPE'
));
if (!isset($configuration['PS_MAIL_SMTP_ENCRYPTION'])) $configuration['PS_MAIL_SMTP_ENCRYPTION'] = 'off';
if (!isset($configuration['PS_MAIL_SMTP_PORT'])) $configuration['PS_MAIL_SMTP_PORT'] = 'default';
if (!isset($configuration['PS_MAIL_SMTP_ENCRYPTION']))
$configuration['PS_MAIL_SMTP_ENCRYPTION'] = 'off';
if (!isset($configuration['PS_MAIL_SMTP_PORT']))
$configuration['PS_MAIL_SMTP_PORT'] = 'default';
if (!isset($from)) $from = $configuration['PS_SHOP_EMAIL'];
if (!isset($fromName)) $fromName = $configuration['PS_SHOP_NAME'];
// Sending an e-mail can be of vital importance for the merchant, when his password is lost for example, so we must not die but do our best to send the e-mail
if (!isset($from) || !Validate::isEmail($from))
$from = $configuration['PS_SHOP_EMAIL'];
if (!Validate::isEmail($from))
$from = null;
if (!empty($from) && !Validate::isEmail($from))
{
Tools::dieOrLog(Tools::displayError('Error: parameter "from" is corrupted'), $die);
return false;
}
if (!empty($fromName) && !Validate::isMailName($fromName))
{
Tools::dieOrLog(Tools::displayError('Error: parameter "fromName" is corrupted'), $die);
return false;
}
// $from_name is not that important, no need to die if it is not valid
if (!isset($from_name) || !Validate::isMailName($from_name))
$from_name = $configuration['PS_SHOP_NAME'];
if (!Validate::isMailName($from_name))
$from_name = null;
// It would be difficult to send an e-mail if the e-mail is not valid, so this time we can die if there is a problem
if (!is_array($to) && !Validate::isEmail($to))
{
Tools::dieOrLog(Tools::displayError('Error: parameter "to" is corrupted'), $die);
return false;
}
if (!is_array($templateVars))
{
Tools::dieOrLog(Tools::displayError('Error: parameter "templateVars" is not an array'), $die);
return false;
}
if (!is_array($template_vars))
$template_vars = array();
// Do not crash for this error, that may be a complicated customer name
if (is_string($toName))
{
if (!empty($toName) && !Validate::isMailName($toName))
$toName = null;
}
if (is_string($to_name) && !empty($to_name) && !Validate::isMailName($to_name))
$to_name = null;
if (!Validate::isTplName($template))
{
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail template'), $die);
return false;
}
if (!Validate::isMailSubject($subject))
{
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail subject'), $die);
@@ -128,10 +136,10 @@ class MailCore
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail address'), $die);
return false;
}
if (is_array($toName))
if (is_array($to_name))
{
if ($toName && is_array($toName) && Validate::isGenericName($toName[$key]))
$to_name = $toName[$key];
if ($to_name && is_array($to_name) && Validate::isGenericName($to_name[$key]))
$to_name = $to_name[$key];
}
if ($to_name == null)
$to_name = $addr;
@@ -143,9 +151,9 @@ class MailCore
} else {
/* Simple recipient, one address */
$to_plugin = $to;
if ($toName == null)
$toName = $to;
$to = new Swift_Address($to, '=?UTF-8?B?'.base64_encode($toName).'?=');
if ($to_name == null)
$to_name = $to;
$to = new Swift_Address($to, '=?UTF-8?B?'.base64_encode($to_name).'?=');
}
try {
/* Connect with the appropriate configuration */
@@ -174,7 +182,7 @@ class MailCore
return false;
$swift = new Swift($connection, Configuration::get('PS_MAIL_DOMAIN'));
/* Get templates content */
$iso = Language::getIsoById((int)($id_lang));
$iso = Language::getIsoById((int)$id_lang);
if (!$iso)
{
Tools::dieOrLog(Tools::displayError('Error - No ISO code for email'), $die);
@@ -182,66 +190,71 @@ class MailCore
}
$template = $iso.'/'.$template;
$moduleName = false;
$overrideMail = false;
$module_name = false;
$override_mail = false;
// get templatePath
if (preg_match('#'.__PS_BASE_URI__.'modules/#', $templatePath) && preg_match('#modules/([a-z0-9_-]+)/#ui', $templatePath, $res))
$moduleName = $res[1];
if (preg_match('#'.__PS_BASE_URI__.'modules/#', $template_path) && preg_match('#modules/([a-z0-9_-]+)/#ui', $template_path, $res))
$module_name = $res[1];
if ($moduleName !== false && (file_exists(_PS_THEME_DIR_.'modules/'.$moduleName.'/mails/'.$template.'.txt') ||
file_exists(_PS_THEME_DIR_.'modules/'.$moduleName.'/mails/'.$template.'.html')))
$templatePath = _PS_THEME_DIR_.'modules/'.$moduleName.'/mails/';
else if (file_exists(_PS_THEME_DIR_.'mails/'.$template.'.txt') || file_exists(_PS_THEME_DIR_.'mails/'.$template.'.html'))
if ($module_name !== false && (file_exists($theme_path.'modules/'.$module_name.'/mails/'.$template.'.txt') ||
file_exists($theme_path.'modules/'.$module_name.'/mails/'.$template.'.html')))
$template_path = $theme_path.'modules/'.$module_name.'/mails/';
else if (file_exists($theme_path.'mails/'.$template.'.txt') || file_exists($theme_path.'mails/'.$template.'.html'))
{
$templatePath = _PS_THEME_DIR_.'mails/';
$overrideMail = true;
$template_path = $theme_path.'mails/';
$override_mail = true;
}
else if (!file_exists($templatePath.$template.'.txt') || !file_exists($templatePath.$template.'.html'))
else if (!file_exists($template_path.$template.'.txt') || !file_exists($template_path.$template.'.html'))
{
Tools::dieOrLog(Tools::displayError('Error - The following e-mail template is missing:').' '.$templatePath.$template.'.txt', $die);
Tools::dieOrLog(Tools::displayError('Error - The following e-mail template is missing:').' '.$template_path.$template.'.txt', $die);
return false;
}
$templateHtml = file_get_contents($templatePath.$template.'.html');
$templateTxt = strip_tags(html_entity_decode(file_get_contents($templatePath.$template.'.txt'), null, 'utf-8'));
$template_html = file_get_contents($template_path.$template.'.html');
$template_txt = strip_tags(html_entity_decode(file_get_contents($template_path.$template.'.txt'), null, 'utf-8'));
if ($overrideMail && file_exists($templatePath.$iso.'/lang.php'))
include_once($templatePath.$iso.'/lang.php');
else if ($moduleName && file_exists($templatePath.$iso.'/lang.php'))
include_once(_PS_THEME_DIR_.'mails/'.$iso.'/lang.php');
if ($override_mail && file_exists($template_path.$iso.'/lang.php'))
include_once($template_path.$iso.'/lang.php');
else if ($module_name && file_exists($template_path.$iso.'/lang.php'))
include_once($theme_path.'mails/'.$iso.'/lang.php');
else
include_once(dirname(__FILE__).'/../mails/'.$iso.'/lang.php');
/* Create mail and attach differents parts */
$message = new Swift_Message('['.Configuration::get('PS_SHOP_NAME').'] '.$subject);
$message->headers->setEncoding('Q');
$templateVars['{shop_logo}'] = (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'))) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL')))) :
((file_exists(_PS_IMG_DIR_.'logo.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.Configuration::get('PS_LOGO')))) : '');
$templateVars['{shop_name}'] = Tools::safeOutput(Configuration::get('PS_SHOP_NAME'));
$templateVars['{shop_url}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__.'index.php';
$swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $templateVars)), 'decorator');
if (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL')))
$template_vars['{shop_logo}'] = $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'))));
else
if (file_exists(_PS_IMG_DIR_.'logo.jpg'))
$template_vars['{shop_logo}'] = $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.Configuration::get('PS_LOGO'))));
else
$template_vars['{shop_logo}'] = '';
$template_vars['{shop_name}'] = Tools::safeOutput(Configuration::get('PS_SHOP_NAME'));
$template_vars['{shop_url}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__.'index.php';
$swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $template_vars)), 'decorator');
if ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_TEXT)
$message->attach(new Swift_Message_Part($templateTxt, 'text/plain', '8bit', 'utf-8'));
$message->attach(new Swift_Message_Part($template_txt, 'text/plain', '8bit', 'utf-8'));
if ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_HTML)
$message->attach(new Swift_Message_Part($templateHtml, 'text/html', '8bit', 'utf-8'));
if ($fileAttachment && !empty($fileAttachment))
$message->attach(new Swift_Message_Part($template_html, 'text/html', '8bit', 'utf-8'));
if ($file_attachment && !empty($file_attachment))
{
// Multiple attachments?
if (!is_array(current($fileAttachment)))
$fileAttachment = array($fileAttachment);
foreach ($fileAttachment as $attachment)
if (!is_array(current($file_attachment)))
$file_attachment = array($file_attachment);
foreach ($file_attachment as $attachment)
if (isset($attachment['content']) && isset($attachment['name']) && isset($attachment['mime']))
$message->attach(new Swift_Message_Attachment($attachment['content'], $attachment['name'], $attachment['mime']));
}
/* Send mail */
$send = $swift->send($message, $to, new Swift_Address($from, $fromName));
$send = $swift->send($message, $to, new Swift_Address($from, $from_name));
$swift->disconnect();
return $send;
}
catch (Swift_ConnectionException $e)
{
catch (Swift_Exception $e) {
return false;
}
}
@@ -312,7 +325,7 @@ class MailCore
if (!is_array($_LANGMAIL))
return (str_replace('"', '&quot;', $string));
if (key_exists($key, $_LANGMAIL))
if (array_key_exists($key, $_LANGMAIL))
$str = $_LANGMAIL[$key];
else
$str = $string;
+9 -2
View File
@@ -117,7 +117,10 @@ class ManufacturerCore extends ObjectModel
return false;
if (parent::delete())
{
CartRule::cleanProductRuleIntegrity('manufacturers', $this->id);
return $this->deleteImage();
}
}
/**
@@ -323,7 +326,11 @@ class ManufacturerCore extends ObjectModel
$alias = '';
if ($order_by == 'price')
$alias = 'product_shop.';
elseif ($order_by == 'id_product')
elseif ($order_by == 'name')
$alias = 'pl.';
elseif ($order_by == 'quantity')
$alias = 'stock.';
else
$alias = 'p.';
$sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pa.`id_product_attribute`,
pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`,
@@ -472,4 +479,4 @@ class ManufacturerCore extends ObjectModel
return ($result1 && $result2);
}
}
}
+4 -4
View File
@@ -209,7 +209,7 @@ class MediaCore
*/
public static function getJSPath($js_uri)
{
if (is_array($js_uri) || is_null($js_uri) || empty($js_uri))
if (is_array($js_uri) || $js_uri === null || empty($js_uri))
return false;
$url_data = parse_url($js_uri);
if (!array_key_exists('host', $url_data))
@@ -258,14 +258,14 @@ class MediaCore
public static function getJqueryPath($version = null, $folder = null, $minifier = true)
{
$add_no_conflict = false;
if (is_null($version))
if ($version === null)
$version = _PS_JQUERY_VERSION_; //set default version
else if (preg_match('/^([0-9]+\.)+[0-9]$/Ui', $version))
$add_no_conflict = true;
else
return false;
if (is_null($folder))
if ($folder === null)
$folder = _PS_JS_DIR_.'jquery/'; //set default folder
//check if file exist
$file = $folder.'jquery-'.$version.($minifier ? '.min.js' : '.js');
@@ -345,7 +345,7 @@ class MediaCore
public static function getJqueryPluginPath($name, $folder)
{
$plugin_path = array('js' => array(), 'css' => array());
if (is_null($folder))
if ($folder === null)
$folder = _PS_JS_DIR_.'jquery/plugins/'; //set default folder
$file = 'jquery.'.$name.'.js';
+3 -1
View File
@@ -56,7 +56,7 @@ class MetaCore extends ObjectModel
public static function getPages($exclude_filled = false, $add_page = false)
{
$selected_pages = array();
if (!$files = scandir(_PS_ROOT_DIR_.'/controllers/front/'))
if (!$files = Tools::scandir(_PS_ROOT_DIR_.'/controllers/front/', 'php', '', true))
die(Tools::displayError('Cannot scan root directory'));
// Exclude pages forbidden
@@ -68,6 +68,8 @@ class MetaCore extends ObjectModel
foreach ($files as $file)
if ($file != 'index.php' && preg_match('/^[a-z0-9_.-]*\.php$/i', $file) && !in_array(strtolower(str_replace('Controller.php', '', $file)), $exlude_pages))
$selected_pages[strtolower(str_replace('Controller.php', '', $file))] = strtolower(str_replace('Controller.php', '', $file));
else if ($file != 'index.php' && preg_match('/^([a-z0-9_.-]*\/)?[a-z0-9_.-]*\.php$/i', $file) && !in_array(strtolower(str_replace('Controller.php', '', $file)), $exlude_pages))
$selected_pages[strtolower(sprintf(Tools::displayError('%1$s (in %2$s)'), dirname($file), str_replace('Controller.php', '', basename($file))))] = strtolower(str_replace('Controller.php', '', basename($file)));
// Add modules controllers to list (this function is cool !)
foreach (glob(_PS_MODULE_DIR_.'*/controllers/front/*.php') as $file)
+14 -17
View File
@@ -78,8 +78,9 @@ class NotificationCore
{
case 'order':
$sql = '
SELECT o.`id_order`, o.`id_customer`, o.`total_paid`
SELECT o.`id_order`, o.`id_customer`, o.`total_paid`, o.`id_currency`, c.`firstname`, c.`lastname`
FROM `'._DB_PREFIX_.'orders` as o
LEFT JOIN `'._DB_PREFIX_.'customer` as c ON (c.`id_customer` = o.`id_customer`)
WHERE `id_order` > '.(int)$id_last_element.
Shop::addSqlRestriction(false, 'o').'
ORDER BY `id_order` DESC
@@ -97,10 +98,9 @@ class NotificationCore
ORDER BY c.`id_customer_message` DESC
';
break;
default:
$sql = '
SELECT t.`id_'.bqSQL($type).'`
SELECT t.`id_'.bqSQL($type).'`, t.*
FROM `'._DB_PREFIX_.bqSQL($type).'` t
WHERE t.`deleted` = 0 AND t.`id_'.bqSQL($type).'` > '.(int)$id_last_element.
Shop::addSqlRestriction(false, 't').'
@@ -110,26 +110,23 @@ class NotificationCore
}
$json = array();
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql) as $value)
{
$customer = null;
$order = null;
$currency = null;
if (isset($value['id_order']))
{
$order = new Order(intval($value['id_order']));
$currency = new Currency(intval($order->id_currency));
}
if (!empty($value['id_customer']))
$customer = new Customer(intval($value['id_customer']));
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
foreach ($result as $value)
{
$customer_name = '';
if (isset($value['firstname']) && isset($value['lastname']))
$customer_name = Tools::safeOutput($value['firstname'].' '.$value['lastname']);
else if (isset($value['email']))
$customer_name = Tools::safeOutput($value['email']);
$json[] = array(
'id_order' => ((!empty($value['id_order'])) ? (int)$value['id_order'] : 0),
'id_customer' => ((!empty($value['id_customer'])) ? (int)$value['id_customer'] : 0),
'id_customer_message' => ((!empty($value['id_customer_message'])) ? (int)$value['id_customer_message'] : 0),
'id_customer_thread' => ((!empty($value['id_customer_thread'])) ? (int)$value['id_customer_thread'] : 0),
'total_paid' => ((!empty($value['total_paid']) && $currency != null) ? Tools::displayPrice((float)$value['total_paid'], $currency, false) : 0),
'customer_name' => (($customer != null) ? $customer->firstname.' '.$customer->lastname : (isset($value['email']) ? $value['email'] : ''))
'total_paid' => ((!empty($value['total_paid'])) ? Tools::displayPrice((float)$value['total_paid'], (int)$value['id_currency'], false) : 0),
'customer_name' => $customer_name
);
}
+87 -75
View File
@@ -134,6 +134,11 @@ abstract class ObjectModelCore
* @var array List of specific fields to update (all fields if null)
*/
protected $update_fields = null;
/**
* @var Db An instance of the db in order to avoid calling Db::getInstance() thousands of time
*/
protected static $db = false;
/**
* Returns object validation rules (fields validity)
@@ -163,10 +168,13 @@ abstract class ObjectModelCore
*/
public function __construct($id = null, $id_lang = null, $id_shop = null)
{
if (!ObjectModel::$db)
ObjectModel::$db = Db::getInstance();
$this->def = self::getDefinition($this);
$this->setDefinitionRetrocompatibility();
if (!is_null($id_lang))
if ($id_lang !== null)
$this->id_lang = (Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
if ($id_shop && $this->isMultishop())
@@ -200,10 +208,10 @@ abstract class ObjectModelCore
}
// Get shop informations
if (!empty($this->def['multishop']))
if (Shop::isTableAssociated($this->def['table']))
$sql->leftJoin($this->def['table'].'_shop', 'c', 'a.'.$this->def['primary'].' = c.'.$this->def['primary'].' AND c.id_shop = '.(int)$this->id_shop);
Cache::store($cache_id, Db::getInstance()->getRow($sql));
Cache::store($cache_id, ObjectModel::$db->getRow($sql));
}
$result = Cache::retrieve($cache_id);
@@ -219,7 +227,7 @@ abstract class ObjectModelCore
$sql = 'SELECT * FROM `'.pSQL(_DB_PREFIX_.$this->def['table']).'_lang`
WHERE `'.$this->def['primary'].'` = '.(int)$id
.(($this->id_shop && $this->isLangMultishop()) ? ' AND `id_shop` = '.$this->id_shop : '');
$result = Db::getInstance()->executeS($sql);
$result = ObjectModel::$db->executeS($sql);
if ($result)
foreach ($result as $row)
foreach ($row as $key => $value)
@@ -258,7 +266,7 @@ abstract class ObjectModelCore
$fields = $this->formatFields(self::FORMAT_COMMON);
// For retro compatibility
if (!empty($this->def['multishop']))
if (Shop::isTableAssociated($this->def['table']))
$fields = array_merge($fields, $this->getFieldsShop());
// Ensure that we get something to insert
@@ -299,7 +307,7 @@ abstract class ObjectModelCore
$is_lang_multishop = $this->isLangMultishop();
$fields = array();
if (is_null($this->id_lang))
if ($this->id_lang === null)
foreach (Language::getLanguages(false) as $language)
{
$fields[$language['id_lang']] = $this->formatFields(self::FORMAT_LANG, $language['id_lang']);
@@ -310,9 +318,9 @@ abstract class ObjectModelCore
else
{
$fields = array($this->id_lang => $this->formatFields(self::FORMAT_LANG, $this->id_lang));
$fields['id_lang'] = $this->id_lang;
$fields[$this->id_lang]['id_lang'] = $this->id_lang;
if ($this->id_shop && $is_lang_multishop)
$fields['id_shop'] = (int)$this->id_shop;
$fields[$this->id_lang]['id_shop'] = (int)$this->id_shop;
}
return $fields;
@@ -428,6 +436,9 @@ abstract class ObjectModelCore
*/
public function add($autodate = true, $null_values = false)
{
if (!ObjectModel::$db)
ObjectModel::$db = Db::getInstance();
// @hook actionObject*AddBefore
Hook::exec('actionObjectAddBefore', array('object' => $this));
Hook::exec('actionObject'.get_class($this).'AddBefore', array('object' => $this));
@@ -439,44 +450,40 @@ abstract class ObjectModelCore
$this->date_upd = date('Y-m-d H:i:s');
// Database insertion
if (!$result = Db::getInstance()->insert($this->def['table'], $this->getFields(), $null_values))
if (!$result = ObjectModel::$db->insert($this->def['table'], $this->getFields(), $null_values))
return false;
// Get object id in database
$this->id = Db::getInstance()->Insert_ID();
$this->id = ObjectModel::$db->Insert_ID();
// Database insertion for multishop fields related to the object
if (!empty($this->def['multishop']))
if (Shop::isTableAssociated($this->def['table']))
{
$fields = $this->getFieldsShop();
$fields[$this->def['primary']] = (int)$this->id;
$id_shop_list = Shop::getContextListShopID();
if (count($this->id_shop_list) > 0)
$id_shop_list = $this->id_shop_list;
$id_shop_list = $this->id_shop_list;
$fields = $this->getFieldsShop();
$fields[$this->def['primary']] = (int)$this->id;
foreach ($id_shop_list as $id_shop)
{
$fields['id_shop'] = (int)$id_shop;
$result &= Db::getInstance()->insert($this->def['table'].'_shop', $fields, $null_values);
$result &= ObjectModel::$db->insert($this->def['table'].'_shop', $fields, $null_values);
}
}
else if (!Shop::isFeatureActive() && Shop::isTableAssociated($this->def['table']))
$result &= $this->associateTo(Context::getContext()->shop->id);
if (!$result)
return false;
$assos = Shop::getAssoTables();
// Database insertion for multilingual fields related to the object
if (!empty($this->def['multilang']))
{
$fields = $this->getFieldsLang();
// @todo : try to do something better than this
$shops = Shop::getCompleteListOfShopsID();
if ($fields && is_array($fields))
{
$shops = Shop::getCompleteListOfShopsID();
$asso = Shop::getAssoTable($this->def['table'].'_lang');
foreach ($fields as $field)
{
foreach (array_keys($field) as $key)
@@ -484,17 +491,18 @@ abstract class ObjectModelCore
throw new PrestaShopException('key '.$key.' is not table or identifier, ');
$field[$this->def['primary']] = (int)$this->id;
if (isset($assos[$this->def['table'].'_lang']) && $assos[$this->def['table'].'_lang']['type'] == 'fk_shop')
if ($asso !== false && $asso['type'] == 'fk_shop')
{
foreach ($shops as $id_shop)
{
$field['id_shop'] = (int)$id_shop;
$result &= Db::getInstance()->insert($this->def['table'].'_lang', $field);
$result &= ObjectModel::$db->insert($this->def['table'].'_lang', $field);
}
}
else
$result &= Db::getInstance()->insert($this->def['table'].'_lang', $field);
$result &= ObjectModel::$db->insert($this->def['table'].'_lang', $field);
}
}
}
// @hook actionObject*AddAfter
@@ -512,6 +520,9 @@ abstract class ObjectModelCore
*/
public function update($null_values = false)
{
if (!ObjectModel::$db)
ObjectModel::$db = Db::getInstance();
// @hook actionObject*UpdateBefore
Hook::exec('actionObjectUpdateBefore', array('object' => $this));
Hook::exec('actionObject'.get_class($this).'UpdateBefore', array('object' => $this));
@@ -523,11 +534,11 @@ abstract class ObjectModelCore
$this->date_upd = date('Y-m-d H:i:s');
// Database update
if (!$result = Db::getInstance()->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values))
if (!$result = ObjectModel::$db->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values))
return false;
// Database insertion for multishop fields related to the object
if (!empty($this->def['multishop']))
if (Shop::isTableAssociated($this->def['table']))
{
$fields = $this->getFieldsShop();
$fields[$this->def['primary']] = (int)$this->id;
@@ -554,11 +565,11 @@ abstract class ObjectModelCore
// A little explanation of what we do here : we want to create multishop entry when update is called, but
// only if we are in a shop context (if we are in all context, we just want to update entries that alread exists)
$shop_exists = Db::getInstance()->getValue('SELECT '.$this->def['primary'].' FROM '._DB_PREFIX_.$this->def['table'].'_shop WHERE '.$where);
$shop_exists = ObjectModel::$db->getValue('SELECT '.$this->def['primary'].' FROM '._DB_PREFIX_.$this->def['table'].'_shop WHERE '.$where);
if ($shop_exists)
$result &= Db::getInstance()->update($this->def['table'].'_shop', $fields, $where, 0, $null_values);
$result &= ObjectModel::$db->update($this->def['table'].'_shop', $fields, $where, 0, $null_values);
else if (Shop::getContext() == Shop::CONTEXT_SHOP)
$result &= Db::getInstance()->insert($this->def['table'].'_shop', $all_fields, $null_values);
$result &= ObjectModel::$db->insert($this->def['table'].'_shop', $all_fields, $null_values);
}
}
@@ -580,18 +591,17 @@ abstract class ObjectModelCore
$id_shop_list = Shop::getContextListShopID();
if (count($this->id_shop_list) > 0)
$id_shop_list = $this->id_shop_list;
foreach ($id_shop_list as $id_shop)
{
$field['id_shop'] = (int)$id_shop;
$where = pSQL($this->def['primary']).' = '.(int)$this->id
.' AND id_lang = '.(int)$field['id_lang']
.' AND id_shop = '.$field['id_shop'];
.' AND id_shop = '.(int)$id_shop;
if (Db::getInstance()->getValue('SELECT COUNT(*) FROM '.pSQL(_DB_PREFIX_.$this->def['table']).'_lang WHERE '.$where))
$result &= Db::getInstance()->update($this->def['table'].'_lang', $field, $where);
if (ObjectModel::$db->getValue('SELECT COUNT(*) FROM '.pSQL(_DB_PREFIX_.$this->def['table']).'_lang WHERE '.$where))
$result &= ObjectModel::$db->update($this->def['table'].'_lang', $field, $where);
else
$result &= Db::getInstance()->insert($this->def['table'].'_lang', $field);
$result &= ObjectModel::$db->insert($this->def['table'].'_lang', $field);
}
}
// If this table is not linked to multishop system ...
@@ -600,9 +610,9 @@ abstract class ObjectModelCore
$where = pSQL($this->def['primary']).' = '.(int)$this->id
.' AND id_lang = '.(int)$field['id_lang'];
if (Db::getInstance()->getValue('SELECT COUNT(*) FROM '.pSQL(_DB_PREFIX_.$this->def['table']).'_lang WHERE '.$where))
$result &= Db::getInstance()->update($this->def['table'].'_lang', $field, $where);
$result &= ObjectModel::$db->update($this->def['table'].'_lang', $field, $where);
else
$result &= Db::getInstance()->insert($this->def['table'].'_lang', $field, 'INSERT');
$result &= ObjectModel::$db->insert($this->def['table'].'_lang', $field, 'INSERT');
}
}
}
@@ -622,36 +632,36 @@ abstract class ObjectModelCore
*/
public function delete()
{
if (!ObjectModel::$db)
ObjectModel::$db = Db::getInstance();
// @hook actionObject*DeleteBefore
Hook::exec('actionObjectDeleteBefore', array('object' => $this));
Hook::exec('actionObject'.get_class($this).'DeleteBefore', array('object' => $this));
$this->clearCache();
$result = true;
// Remove association to multishop table
if (!empty($this->def['multishop']))
if (Shop::isTableAssociated($this->def['table']))
{
$id_shop_list = Shop::getContextListShopID();
if (count($this->id_shop_list))
$id_shop_list = $this->id_shop_list;
$result &= Db::getInstance()->delete($this->def['table'].'_shop', '`'.$this->def['primary'].'`='.(int)$this->id.' AND id_shop IN ('.implode(', ', $id_shop_list).')');
$result &= ObjectModel::$db->delete($this->def['table'].'_shop', '`'.$this->def['primary'].'`='.(int)$this->id.' AND id_shop IN ('.implode(', ', $id_shop_list).')');
}
else if (Shop::isTableAssociated($this->def['table']))
$result &= Db::getInstance()->delete($this->def['table'].'_shop', '`'.$this->def['primary'].'`='.(int)$this->id);
// Database deletion
$has_multishop_entries = !empty($this->def['multishop']) ? $this->hasMultishopEntries() : false;
$has_multishop_entries = $this->hasMultishopEntries();
if ($result && !$has_multishop_entries)
$result &= Db::getInstance()->delete($this->def['table'], '`'.pSQL($this->def['primary']).'` = '.(int)$this->id);
$result &= ObjectModel::$db->delete($this->def['table'], '`'.pSQL($this->def['primary']).'` = '.(int)$this->id);
if (!$result)
return false;
// Database deletion for multilingual fields related to the object
if (!empty($this->def['multilang']) && !$has_multishop_entries)
$result &= Db::getInstance()->delete($this->def['table'].'_lang', '`'.pSQL($this->def['primary']).'` = '.(int)$this->id);
$result &= ObjectModel::$db->delete($this->def['table'].'_lang', '`'.pSQL($this->def['primary']).'` = '.(int)$this->id);
// @hook actionObject*DeleteAfter
Hook::exec('actionObjectDeleteAfter', array('object' => $this));
@@ -943,7 +953,7 @@ abstract class ObjectModelCore
),
);
if (is_null($ws_params_attribute_name))
if ($ws_params_attribute_name === null)
$ws_params_attribute_name = 'webserviceParameters';
if (!isset($this->{$ws_params_attribute_name}['objectNodeName']))
@@ -1004,11 +1014,10 @@ abstract class ObjectModelCore
public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
{
$assoc = Shop::getAssoTables();
if (array_key_exists($this->def['table'], $assoc))
$assoc = Shop::getAssoTable($this->def['table']);
if ($assoc !== false)
{
$multi_shop_join = ' LEFT JOIN `'._DB_PREFIX_.bqSQL($this->def['table']).'_'.bqSQL($assoc[$this->def['table']]['type']).'`
$multi_shop_join = ' LEFT JOIN `'._DB_PREFIX_.bqSQL($this->def['table']).'_'.bqSQL($assoc['type']).'`
AS multi_shop_'.bqSQL($this->def['table']).'
ON (main.'.bqSQL($this->def['primary']).' = multi_shop_'.bqSQL($this->def['table']).'.'.bqSQL($this->def['primary']).')';
$class_name = WebserviceRequest::$ws_current_classname;
@@ -1068,7 +1077,7 @@ abstract class ObjectModelCore
*/
public function isAssociatedToShop($id_shop = null)
{
if (is_null($id_shop))
if ($id_shop === null)
$id_shop = Context::getContext()->shop->id;
$sql = 'SELECT id_shop
@@ -1148,22 +1157,22 @@ abstract class ObjectModelCore
}
/**
* Check if there is entries in associated shop table for current entity
* Check if there is more than one entries in associated shop table for current entity
*
* @since 1.5.0
* @return bool
*/
public function hasMultishopEntries()
{
if (empty($this->def['multishop']))
if (!Shop::isTableAssociated($this->def['table']) || !Shop::isFeatureActive())
return false;
return (bool)Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id);
//check if there is more than one entries in associated shop table
return (bool)(Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id) > 1);
}
public function isMultishop()
{
return !empty($this->def['multishop']) || !empty($this->def['multilang_shop']);
return Shop::isTableAssociated($this->def['table']) || !empty($this->def['multilang_shop']);
}
public function isLangMultishop()
@@ -1211,30 +1220,33 @@ abstract class ObjectModelCore
*
* @return bool success
*/
public function deleteImage()
public function deleteImage($force_delete = false)
{
if (!$this->id)
return false;
/* Deleting object images and thumbnails (cache) */
if ($this->image_dir)
if ($force_delete || !$this->hasMultishopEntries())
{
if (file_exists($this->image_dir.$this->id.'.'.$this->image_format)
&& !unlink($this->image_dir.$this->id.'.'.$this->image_format))
/* Deleting object images and thumbnails (cache) */
if ($this->image_dir)
{
if (file_exists($this->image_dir.$this->id.'.'.$this->image_format)
&& !unlink($this->image_dir.$this->id.'.'.$this->image_format))
return false;
}
if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'.'.$this->image_format)
&& !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'.'.$this->image_format))
return false;
if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'.'.$this->image_format)
&& !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'.'.$this->image_format))
return false;
$types = ImageType::getImagesTypes();
foreach ($types as $image_type)
if (file_exists($this->image_dir.$this->id.'-'.stripslashes($image_type['name']).'.'.$this->image_format)
&& !unlink($this->image_dir.$this->id.'-'.stripslashes($image_type['name']).'.'.$this->image_format))
return false;
}
if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'.'.$this->image_format)
&& !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'.'.$this->image_format))
return false;
if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'.'.$this->image_format)
&& !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'.'.$this->image_format))
return false;
$types = ImageType::getImagesTypes();
foreach ($types as $image_type)
if (file_exists($this->image_dir.$this->id.'-'.stripslashes($image_type['name']).'.'.$this->image_format)
&& !unlink($this->image_dir.$this->id.'-'.stripslashes($image_type['name']).'.'.$this->image_format))
return false;
return true;
}
+121 -87
View File
@@ -140,25 +140,31 @@ abstract class PaymentModuleCore extends Module
$message = null, $extra_vars = array(), $currency_special = null, $dont_touch_amount = false,
$secure_key = false, Shop $shop = null)
{
$cart = new Cart($id_cart);
$this->context->cart = $cart;
$this->context->cart = new Cart($id_cart);
$this->context->customer = new Customer($this->context->cart->id_customer);
$this->context->language = new Language($this->context->cart->id_lang);
$this->context->shop = ($shop ? $shop : new Shop($this->context->cart->id_shop));
$id_currency = $currency_special ? (int)$currency_special : (int)$this->context->cart->id_currency;
$this->context->currency = new Currency($id_currency, null, $this->context->shop->id);
if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery')
$context_country = $this->context->country;
$order_status = new OrderState((int)$id_order_state, (int)$cart->id_lang);
$order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id);
if (!Validate::isLoadedObject($order_status))
throw new PrestaShopException('Can\'t load Order state status');
if (!$this->active)
die(Tools::displayError());
// Does order already exists ?
if (Validate::isLoadedObject($cart) && $cart->OrderExists() == false)
if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists() == false)
{
if ($secure_key !== false && $secure_key != $cart->secure_key)
if ($secure_key !== false && $secure_key != $this->context->cart->secure_key)
die(Tools::displayError());
// For each package, generate an order
$delivery_option_list = $cart->getDeliveryOptionList();
$package_list = $cart->getPackageList();
$cart_delivery_option = $cart->getDeliveryOption();
$delivery_option_list = $this->context->cart->getDeliveryOptionList();
$package_list = $this->context->cart->getPackageList();
$cart_delivery_option = $this->context->cart->getDeliveryOption();
// If some delivery options are not defined, or not valid, use the first valid option
foreach ($delivery_option_list as $id_address => $package)
@@ -174,16 +180,13 @@ abstract class PaymentModuleCore extends Module
$reference = Order::generateReference();
$this->currentOrderReference = $reference;
$id_currency = $currency_special ? (int)$currency_special : (int)$cart->id_currency;
$currency = new Currency($id_currency);
$order_creation_failed = false;
$cart_total_paid = (float)Tools::ps_round((float)$cart->getOrderTotal(true, Cart::BOTH), 2);
$cart_total_paid = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH), 2);
if ($cart->orderExists())
if ($this->context->cart->orderExists())
{
$error = Tools::displayError('An order has already been placed using this cart.');
Logger::addLog($error, 4, '0000001', 'Cart', intval($cart->id));
Logger::addLog($error, 4, '0000001', 'Cart', intval($this->context->cart->id));
die($error);
}
@@ -192,16 +195,25 @@ abstract class PaymentModuleCore extends Module
foreach ($data['package_list'] as $id_package)
$package_list[$id_address][$id_package]['id_carrier'] = $id_carrier;
// Make sure CarRule caches are empty
CartRule::cleanCache();
foreach ($package_list as $id_address => $packageByAddress)
foreach ($packageByAddress as $id_package => $package)
{
$order = new Order();
$order->product_list = $package['product_list'];
$carrier = null;
if (!$cart->isVirtualCart() && isset($package['id_carrier']))
if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery')
{
$carrier = new Carrier($package['id_carrier'], $cart->id_lang);
$address = new Address($id_address);
$this->context->country = new Country($address->id_country, $this->context->cart->id_lang);
}
$carrier = null;
if (!$this->context->cart->isVirtualCart() && isset($package['id_carrier']))
{
$carrier = new Carrier($package['id_carrier'], $this->context->cart->id_lang);
$order->id_carrier = (int)$carrier->id;
$id_carrier = (int)$carrier->id;
}
@@ -211,57 +223,47 @@ abstract class PaymentModuleCore extends Module
$id_carrier = 0;
}
$order->id_customer = (int)$cart->id_customer;
$order->id_address_invoice = (int)$cart->id_address_invoice;
$order->id_customer = (int)$this->context->cart->id_customer;
$order->id_address_invoice = (int)$this->context->cart->id_address_invoice;
$order->id_address_delivery = (int)$id_address;
$order->id_currency = $id_currency;
$order->id_lang = (int)$cart->id_lang;
$order->id_cart = (int)$cart->id;
$order->id_currency = $this->context->currency->id;
$order->id_lang = (int)$this->context->cart->id_lang;
$order->id_cart = (int)$this->context->cart->id;
$order->reference = $reference;
$order->id_shop = (int)$this->context->shop->id;
$order->id_shop_group = (int)$this->context->shop->id_shop_group;
if (($shop != null) && (Shop::getContext() == Shop::CONTEXT_SHOP))
{
$order->id_shop = (int)$shop->id;
$order->id_shop_group = (int)$shop->id_shop_group;
}
else
{
$order->id_shop = (int)$cart->id_shop;
$order->id_shop_group = (int)$cart->id_shop_group;
}
$customer = new Customer($order->id_customer);
$order->secure_key = ($secure_key ? pSQL($secure_key) : pSQL($customer->secure_key));
$order->secure_key = ($secure_key ? pSQL($secure_key) : pSQL($this->context->customer->secure_key));
$order->payment = $payment_method;
if (isset($this->name))
$order->module = $this->name;
$order->recyclable = $cart->recyclable;
$order->gift = (int)$cart->gift;
$order->gift_message = $cart->gift_message;
$order->conversion_rate = $currency->conversion_rate;
$order->recyclable = $this->context->cart->recyclable;
$order->gift = (int)$this->context->cart->gift;
$order->gift_message = $this->context->cart->gift_message;
$order->conversion_rate = $this->context->currency->conversion_rate;
$amount_paid = !$dont_touch_amount ? Tools::ps_round((float)$amount_paid, 2) : $amount_paid;
$order->total_paid_real = 0;
$order->total_products = (float)$cart->getOrderTotal(false, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier);
$order->total_products_wt = (float)$cart->getOrderTotal(true, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier);
$order->total_products = (float)$this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier);
$order->total_products_wt = (float)$this->context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier);
$order->total_discounts_tax_excl = (float)abs($cart->getOrderTotal(false, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier));
$order->total_discounts_tax_incl = (float)abs($cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier));
$order->total_discounts_tax_excl = (float)abs($this->context->cart->getOrderTotal(false, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier));
$order->total_discounts_tax_incl = (float)abs($this->context->cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier));
$order->total_discounts = $order->total_discounts_tax_incl;
$order->total_shipping_tax_excl = (float)$cart->getPackageShippingCost((int)$id_carrier, false, null, $order->product_list);
$order->total_shipping_tax_incl = (float)$cart->getPackageShippingCost((int)$id_carrier, true, null, $order->product_list);
$order->total_shipping_tax_excl = (float)$this->context->cart->getPackageShippingCost((int)$id_carrier, false, null, $order->product_list);
$order->total_shipping_tax_incl = (float)$this->context->cart->getPackageShippingCost((int)$id_carrier, true, null, $order->product_list);
$order->total_shipping = $order->total_shipping_tax_incl;
if (!is_null($carrier) && Validate::isLoadedObject($carrier))
$order->carrier_tax_rate = $carrier->getTaxesRate(new Address($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));
$order->carrier_tax_rate = $carrier->getTaxesRate(new Address($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));
$order->total_wrapping_tax_excl = (float)abs($cart->getOrderTotal(false, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier));
$order->total_wrapping_tax_incl = (float)abs($cart->getOrderTotal(true, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier));
$order->total_wrapping_tax_excl = (float)abs($this->context->cart->getOrderTotal(false, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier));
$order->total_wrapping_tax_incl = (float)abs($this->context->cart->getOrderTotal(true, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier));
$order->total_wrapping = $order->total_wrapping_tax_incl;
$order->total_paid_tax_excl = (float)Tools::ps_round((float)$cart->getOrderTotal(false, Cart::BOTH, $order->product_list, $id_carrier), 2);
$order->total_paid_tax_incl = (float)Tools::ps_round((float)$cart->getOrderTotal(true, Cart::BOTH, $order->product_list, $id_carrier), 2);
$order->total_paid_tax_excl = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(false, Cart::BOTH, $order->product_list, $id_carrier), 2);
$order->total_paid_tax_incl = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH, $order->product_list, $id_carrier), 2);
$order->total_paid = $order->total_paid_tax_incl;
$order->invoice_date = '0000-00-00 00:00:00';
@@ -284,7 +286,7 @@ abstract class PaymentModuleCore extends Module
// Insert new Order detail list using cart for the current order
$order_detail = new OrderDetail(null, null, $this->context);
$order_detail->createList($order, $cart, $id_order_state, $order->product_list, 0, true, $package_list[$id_address][$id_package]['id_warehouse']);
$order_detail->createList($order, $this->context->cart, $id_order_state, $order->product_list, 0, true, $package_list[$id_address][$id_package]['id_warehouse']);
$order_detail_list[] = $order_detail;
// Adding an entry in order_carrier table
@@ -299,6 +301,10 @@ abstract class PaymentModuleCore extends Module
$order_carrier->add();
}
}
// The country can only change if the address used for the calculation is the delivery address, and if multi-shipping is activated
if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery')
$this->context->country = $context_country;
// Register Payment only if the order status validate the order
if ($order_status->logable)
@@ -313,8 +319,12 @@ abstract class PaymentModuleCore extends Module
// Next !
$only_one_gift = false;
$cart_rule_used = array();
$products = $cart->getProducts();
$cart_rules = $cart->getCartRules();
$products = $this->context->cart->getProducts();
$cart_rules = $this->context->cart->getCartRules();
// Make sure CarRule caches are empty
CartRule::cleanCache();
foreach ($order_detail_list as $key => $order_detail)
{
$order = $order_list[$key];
@@ -338,7 +348,7 @@ abstract class PaymentModuleCore extends Module
// Insert new Order detail list using cart for the current order
//$orderDetail = new OrderDetail(null, null, $this->context);
//$orderDetail->createList($order, $cart, $id_order_state);
//$orderDetail->createList($order, $this->context->cart, $id_order_state);
// Construct order detail table for the email
$products_list = '';
@@ -371,9 +381,9 @@ abstract class PaymentModuleCore extends Module
'<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';">
<td style="padding: 0.6em 0.4em;">'.$product['reference'].'</td>
<td style="padding: 0.6em 0.4em;"><strong>'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').' - '.Tools::displayError('Customized').(!empty($customization_text) ? ' - '.$customization_text : '').'</strong></td>
<td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $currency, false).'</td>
<td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).'</td>
<td style="padding: 0.6em 0.4em; text-align: center;">'.$customization_quantity.'</td>
<td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice($customization_quantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $currency, false).'</td>
<td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice($customization_quantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).'</td>
</tr>';
}
@@ -382,9 +392,9 @@ abstract class PaymentModuleCore extends Module
'<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';">
<td style="padding: 0.6em 0.4em;">'.$product['reference'].'</td>
<td style="padding: 0.6em 0.4em;"><strong>'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').'</strong></td>
<td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $currency, false).'</td>
<td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).'</td>
<td style="padding: 0.6em 0.4em; text-align: center;">'.((int)$product['cart_quantity'] - $customization_quantity).'</td>
<td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(((int)$product['cart_quantity'] - $customization_quantity) * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $currency, false).'</td>
<td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(((int)$product['cart_quantity'] - $customization_quantity) * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).'</td>
</tr>';
// Check if is not a virutal product for the displaying of shipping
@@ -441,19 +451,21 @@ abstract class PaymentModuleCore extends Module
CartRule::copyConditions($cart_rule['obj']->id, $voucher->id);
$params = array(
'{voucher_amount}' => Tools::displayPrice($voucher->reduction_amount, $currency, false),
'{voucher_amount}' => Tools::displayPrice($voucher->reduction_amount, $this->context->currency, false),
'{voucher_num}' => $voucher->code,
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{id_order}' => $order->reference
'{firstname}' => $this->context->customer->firstname,
'{lastname}' => $this->context->customer->lastname,
'{id_order}' => $order->reference,
'{order_name}' => $order->getUniqReference()
);
Mail::Send(
(int)$order->id_lang,
'voucher',
sprintf(Mail::l('New voucher regarding your order %s', (int)$order->id_lang), $order->reference),
$params,
$customer->email,
$customer->firstname.' '.$customer->lastname
$this->context->customer->email,
$this->context->customer->firstname.' '.$this->context->customer->lastname,
null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop
);
}
}
@@ -471,29 +483,50 @@ abstract class PaymentModuleCore extends Module
$cart_rules_list .= '
<tr style="background-color:#EBECEE;">
<td colspan="4" style="padding:0.6em 0.4em;text-align:right">'.Tools::displayError('Voucher name:').' '.$cart_rule['obj']->name.'</td>
<td style="padding:0.6em 0.4em;text-align:right">'.($values['tax_incl'] != 0.00 ? '-' : '').Tools::displayPrice($values['tax_incl'], $currency, false).'</td>
<td style="padding:0.6em 0.4em;text-align:right">'.($values['tax_incl'] != 0.00 ? '-' : '').Tools::displayPrice($values['tax_incl'], $this->context->currency, false).'</td>
</tr>';
}
// Specify order id for message
$old_message = Message::getMessageByCartId((int)$cart->id);
$old_message = Message::getMessageByCartId((int)$this->context->cart->id);
if ($old_message)
{
$message = new Message((int)$old_message['id_message']);
$message->id_order = (int)$order->id;
$message->update();
// Add this message in the customer thread
$customer_thread = new CustomerThread();
$customer_thread->id_contact = 0;
$customer_thread->id_customer = (int)$order->id_customer;
$customer_thread->id_shop = (int)$this->context->shop->id;
$customer_thread->id_order = (int)$order->id;
$customer_thread->id_lang = (int)$this->context->language->id;
$customer_thread->email = $this->context->customer->email;
$customer_thread->status = 'open';
$customer_thread->token = Tools::passwdGen(12);
$customer_thread->add();
$customer_message = new CustomerMessage();
$customer_message->id_customer_thread = $customer_thread->id;
$customer_message->id_employee = 0;
$customer_message->message = htmlentities($message->message, ENT_COMPAT, 'UTF-8');
$customer_message->private = 0;
if (!$customer_message->add())
$this->errors[] = Tools::displayError('An error occurred while saving message');
}
// Hook validate order
Hook::exec('actionValidateOrder', array(
'cart' => $cart,
'cart' => $this->context->cart,
'order' => $order,
'customer' => $customer,
'currency' => $currency,
'customer' => $this->context->customer,
'currency' => $this->context->currency,
'orderStatus' => $order_status
));
foreach ($cart->getProducts() as $product)
foreach ($this->context->cart->getProducts() as $product)
if ($order_status->logable)
ProductSale::addProductSale((int)$product['id_product'], (int)$product['cart_quantity']);
@@ -509,7 +542,7 @@ abstract class PaymentModuleCore extends Module
// So you migth have two order states
$new_history = new OrderHistory();
$new_history->id_order = (int)$order->id;
$new_history->changeIdOrderState((int)$id_order_state, (int)$order->id);
$new_history->changeIdOrderState((int)$id_order_state, (int)$order->id, true);
$new_history->addWithemail(true, $extra_vars);
unset($order_detail);
@@ -518,7 +551,7 @@ abstract class PaymentModuleCore extends Module
$order = new Order($order->id);
// Send an e-mail to customer (one order = one email)
if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && $customer->id)
if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && $this->context->customer->id)
{
$invoice = new Address($order->id_address_invoice);
$delivery = new Address($order->id_address_delivery);
@@ -526,9 +559,9 @@ abstract class PaymentModuleCore extends Module
$invoice_state = $invoice->id_state ? new State($invoice->id_state) : false;
$data = array(
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{email}' => $customer->email,
'{firstname}' => $this->context->customer->firstname,
'{lastname}' => $this->context->customer->lastname,
'{email}' => $this->context->customer->email,
'{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"),
'{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"),
'{delivery_block_html}' => $this->_getFormatedAddress($delivery, '<br />', array(
@@ -562,17 +595,17 @@ abstract class PaymentModuleCore extends Module
'{invoice_state}' => $invoice->id_state ? $invoice_state->name : '',
'{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile,
'{invoice_other}' => $invoice->other,
'{order_name}' => sprintf('#%06d', (int)$order->id),
'{order_name}' => $order->getUniqReference(),
'{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)$order->id_lang, 1),
'{carrier}' => $virtual_product ? Tools::displayError('No carrier') : $carrier->name,
'{payment}' => Tools::substr($order->payment, 0, 32),
'{products}' => $this->formatProductAndVoucherForEmail($products_list),
'{discounts}' => $this->formatProductAndVoucherForEmail($cart_rules_list),
'{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false),
'{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false),
'{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false),
'{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false),
'{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false));
'{total_paid}' => Tools::displayPrice($order->total_paid, $this->context->currency, false),
'{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $this->context->currency, false),
'{total_discounts}' => Tools::displayPrice($order->total_discounts, $this->context->currency, false),
'{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false),
'{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $this->context->currency, false));
if (is_array($extra_vars))
$data = array_merge($data, $extra_vars);
@@ -588,17 +621,18 @@ abstract class PaymentModuleCore extends Module
else
$file_attachement = null;
if (Validate::isEmail($customer->email))
if (Validate::isEmail($this->context->customer->email))
Mail::Send(
(int)$order->id_lang,
'order_conf',
Mail::l('Order confirmation', (int)$order->id_lang),
$data,
$customer->email,
$customer->firstname.' '.$customer->lastname,
$this->context->customer->email,
$this->context->customer->firstname.' '.$this->context->customer->lastname,
null,
null,
$file_attachement
$file_attachement,
null, _PS_MAIL_DIR_, false, (int)$order->id_shop
);
}
@@ -612,7 +646,7 @@ abstract class PaymentModuleCore extends Module
if (StockAvailable::dependsOnStock($product['product_id']))
{
// synchronizes
StockAvailable::synchronize($product['product_id']);
StockAvailable::synchronize($product['product_id'], $order->id_shop);
}
}
}
@@ -631,7 +665,7 @@ abstract class PaymentModuleCore extends Module
else
{
$error = Tools::displayError('Cart cannot be loaded or an order has already been placed using this cart');
Logger::addLog($error, 4, '0000001', 'Cart', intval($cart->id));
Logger::addLog($error, 4, '0000001', 'Cart', intval($this->context->cart->id));
die($error);
}
}
+116 -98
View File
@@ -202,6 +202,8 @@ class ProductCore extends ObjectModel
* @var boolean Tells if the product uses the advanced stock management
*/
public $advanced_stock_management = 0;
public $out_of_stock;
public $depends_on_stock;
public $isFullyLoaded = false;
@@ -233,7 +235,6 @@ class ProductCore extends ObjectModel
'primary' => 'id_product',
'multilang' => true,
'multilang_shop' => true,
'multishop' => true,
'fields' => array(
// Classic fields
'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
@@ -246,7 +247,6 @@ class ProductCore extends ObjectModel
'depth' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
'quantity_discount' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'uploadable_files' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13),
'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc', 'size' => 12),
'cache_is_pack' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
@@ -267,6 +267,7 @@ class ProductCore extends ObjectModel
'additional_shipping_cost' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'),
'customizable' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
'text_fields' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
'uploadable_files' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'),
'active' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
'available_for_order' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'),
'available_date' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'),
@@ -670,7 +671,8 @@ class ProductCore extends ObjectModel
!$this->deleteAccessories() ||
!$this->deleteFromAccessories() ||
!$this->deleteFromSupplier() ||
!$this->deleteDownload())
!$this->deleteDownload() ||
!$this->deleteFromCartRules())
return false;
return true;
@@ -688,6 +690,12 @@ class ProductCore extends ObjectModel
return $return;
}
public function deleteFromCartRules()
{
CartRule::cleanProductRuleIntegrity('products', $this->id);
return true;
}
public function deleteFromSupplier()
{
return Db::getInstance()->delete('product_supplier', 'id_product = '.(int)$this->id);
@@ -754,24 +762,15 @@ class ProductCore extends ObjectModel
if (empty($categories))
return false;
// take the first selected category to get the category tree (nleft and nright)
$category = new Category($categories[0]);
// get max position in each categories
$and = '';
if (Shop::isFeatureActive())
$and = '
AND (c.`nleft` < '.(int)$category->nleft.'
AND c.`nright` > '.(int)$category->nright.'
AND c.`level_depth` = 1)';
$result = Db::getInstance()->executeS('
SELECT c.`id_category`
FROM `'._DB_PREFIX_.'category_product` cp
LEFT JOIN `'._DB_PREFIX_.'category` c
ON (c.`id_category` = cp.`id_category`)
WHERE cp.`id_category` NOT IN('.implode(',', array_map('intval', $categories)).')
'.$and.'
AND cp.id_product = '.$this->id
AND cp.id_product = '.$this->id
);
foreach ($result as $categ_to_delete)
$this->deleteCategory($categ_to_delete['id_category']);
// if none are found, it's an error
@@ -783,7 +782,7 @@ class ProductCore extends ObjectModel
if (!$this->setGroupReduction())
return false;
SpecificPriceRule::applyAllRules(array((int)$this->id));
return true;
}
@@ -807,6 +806,7 @@ class ProductCore extends ObjectModel
if ($clean_positions === true)
foreach ($result as $row)
$this->cleanPositions((int)$row['id_category']);
SpecificPriceRule::applyAllRules(array((int)$this->id));
return $return;
}
@@ -923,7 +923,6 @@ class ProductCore extends ObjectModel
$sql = 'SELECT p.*, product_shop.*, pl.* , t.`rate` AS tax_rate, m.`name` AS manufacturer_name, s.`name` AS supplier_name
FROM `'._DB_PREFIX_.'product` p
'.Shop::addSqlAssociation('product', 'p').'
INNER JOIN ps_product product_shop
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` '.Shop::addSqlRestrictionOnLang('pl').')
LEFT JOIN `'._DB_PREFIX_.'tax_rule` tr ON (product_shop.`id_tax_rules_group` = tr.`id_tax_rules_group`
AND tr.`id_country` = '.(int)Context::getContext()->country->id.'
@@ -981,15 +980,18 @@ class ProductCore extends ObjectModel
return count($result) > 0;
}
public function productAttributeExists($attributes_list, $current_product_attribute = false)
public function productAttributeExists($attributes_list, $current_product_attribute = false, Context $context = null)
{
if (!Combination::isFeatureActive())
return false;
if ($context === null)
$context = Context::getContext();
$result = Db::getInstance()->executeS(
'SELECT pac.`id_attribute`, pac.`id_product_attribute`
FROM `'._DB_PREFIX_.'product_attribute` pa
JOIN `'._DB_PREFIX_.'product_attribute_shop` pas ON (pas.id_product_attribute = pa.id_product_attribute)
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
WHERE pa.`id_product` = '.(int)$this->id
WHERE pas.id_shop ='.(int)$context->shop->id.' AND pa.`id_product` = '.(int)$this->id
);
/* If something's wrong */
@@ -1070,6 +1072,7 @@ class ProductCore extends ObjectModel
StockAvailable::setProductOutOfStock((int)$this->id, 1, null, $id_product_attribute);
else
StockAvailable::setProductOutOfStock((int)$this->id, StockAvailable::outOfStock($this->id), null, $id_product_attribute);
SpecificPriceRule::applyAllRules(array((int)$this->id));
return $id_product_attribute;
}
@@ -1123,7 +1126,7 @@ class ProductCore extends ObjectModel
$result &= ObjectModel::updateMultishopTable('product', array(
'cache_default_attribute' => (int)$id_product_attribute,
), '`a.id_product` = '.(int)$this->id);
), 'a.`id_product` = '.(int)$this->id);
return $result;
}
@@ -1161,12 +1164,16 @@ class ProductCore extends ObjectModel
*/
public function addSupplierReference($id_supplier, $id_product_attribute, $supplier_reference = null, $price = null, $id_currency = null)
{
//in some case we need to add price without supplier reference
if ($supplier_reference === null)
$supplier_reference = '';
//Try to set the default supplier reference
if ($id_supplier > 0 && $supplier_reference != null)
if ($id_supplier > 0)
{
$id_product_supplier = ProductSupplier::getIdByProductAndSupplier($this->id, $id_product_attribute, $id_supplier);
$id_product_supplier = (int)ProductSupplier::getIdByProductAndSupplier($this->id, $id_product_attribute, $id_supplier);
if (empty($id_product_supplier))
if (!$id_product_supplier)
{
//create new record
$product_supplier_entity = new ProductSupplier();
@@ -1349,7 +1356,7 @@ class ProductCore extends ObjectModel
$combinations->where('id_product', '=', $this->id);
foreach ($combinations as $combination)
$result &= $combination->delete();
SpecificPriceRule::applyAllRules(array((int)$this->id));
return $result;
}
@@ -1373,6 +1380,7 @@ class ProductCore extends ObjectModel
*/
public function deleteProductFeatures()
{
SpecificPriceRule::applyAllRules(array((int)$this->id));
return $this->deleteFeatures();
}
@@ -1528,7 +1536,9 @@ class ProductCore extends ObjectModel
);
$combination = new Combination($id_product_attribute);
return $combination->delete();
$res = $combination->delete();
SpecificPriceRule::applyAllRules(array((int)$this->id));
return $res;
}
/**
@@ -1558,6 +1568,8 @@ class ProductCore extends ObjectModel
$result = Db::getInstance()->execute('
DELETE FROM `'._DB_PREFIX_.'feature_product`
WHERE `id_product` = '.(int)$this->id);
SpecificPriceRule::applyAllRules(array((int)$this->id));
return ($result);
}
@@ -1573,7 +1585,7 @@ class ProductCore extends ObjectModel
return array();
$sql = 'SELECT pa.*, product_attribute_shop.*, GROUP_CONCAT(agl.`name`, \''.pSQL($attribute_value_separator).'\',
al.`name` SEPARATOR \''.pSQL($attribute_separator).'\') as attribute_designation
al.`name` ORDER BY agl.`id_attribute_group` SEPARATOR \''.pSQL($attribute_separator).'\') as attribute_designation
FROM `'._DB_PREFIX_.'product_attribute` pa
'.Shop::addSqlAssociation('product_attribute', 'pa').'
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON pac.`id_product_attribute` = pa.`id_product_attribute`
@@ -1624,6 +1636,7 @@ class ProductCore extends ObjectModel
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.')
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')
WHERE pa.`id_product` = '.(int)$this->id.'
GROUP BY pa.`id_product_attribute`, ag.`id_attribute_group`
ORDER BY pa.`id_product_attribute`';
$res = Db::getInstance()->executeS($sql);
@@ -1667,6 +1680,7 @@ class ProductCore extends ObjectModel
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')
WHERE pa.`id_product` = '.(int)$this->id.'
AND pa.`id_product_attribute` = '.(int)$id_product_attribute.'
GROUP BY pa.`id_product_attribute`, ag.`id_attribute_group`
ORDER BY pa.`id_product_attribute`';
$res = Db::getInstance()->executeS($sql);
@@ -2125,6 +2139,7 @@ class ProductCore extends ObjectModel
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT cp.`id_category`, cl.`name`, cl.`link_rewrite` FROM `'._DB_PREFIX_.'category_product` cp
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cp.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
'.Shop::addSqlAssociation('category', 'cp').'
WHERE cp.`id_product` = '.(int)$id_product.'
AND cl.`id_lang` = '.(int)$id_lang
);
@@ -2253,7 +2268,7 @@ class ProductCore extends ObjectModel
$cur_cart = $context->cart;
if (isset($divisor))
if ($divisor !== null)
Tools::displayParameterAsDeprecated('divisor');
if (!Validate::isBool($usetax) || !Validate::isUnsignedId($id_product))
@@ -2282,26 +2297,15 @@ class ProductCore extends ObjectModel
{
$condition = '';
$cache_name = (int)$id_cart.'_'.(int)$id_product;
if (Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION'))
{
$cache_name = (int)$id_cart.'_'.(int)$id_product.'_'.(int)$id_product_attribute;
$condition = ' AND `id_product_attribute` = '.(int)$id_product_attribute;
}
if (!isset(self::$_cart_quantity[$cache_name]) || self::$_cart_quantity[$cache_name] != (int)$quantity)
{
self::$_cart_quantity[$cache_name] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
SELECT SUM(`quantity`)
FROM `'._DB_PREFIX_.'cart_product`
WHERE `id_product` = '.(int)$id_product.'
AND `id_cart` = '.(int)$id_cart.' '.$condition
);
$cart_quantity = self::$_cart_quantity[$cache_name];
}
AND `id_cart` = '.(int)$id_cart);
$cart_quantity = self::$_cart_quantity[$cache_name];
}
$quantity = ($id_cart && $cart_quantity) ? $cart_quantity : $quantity;
$id_currency = (int)Validate::isLoadedObject($context->currency) ? $context->currency->id : Configuration::get('PS_CURRENCY_DEFAULT');
// retrieve address informations
@@ -2351,7 +2355,7 @@ class ProductCore extends ObjectModel
$zipcode,
$id_currency,
$id_group,
$quantity,
$cart_quantity,
$usetax,
$decimals,
$only_reduc,
@@ -2361,7 +2365,8 @@ class ProductCore extends ObjectModel
$use_group_reduction,
$id_customer,
$use_customer_price,
$id_cart
$id_cart,
$quantity
);
}
@@ -2387,7 +2392,7 @@ class ProductCore extends ObjectModel
**/
public static function priceCalculation($id_shop, $id_product, $id_product_attribute, $id_country, $id_state, $zipcode, $id_currency,
$id_group, $quantity, $use_tax, $decimals, $only_reduc, $use_reduc, $with_ecotax, &$specific_price, $use_group_reduction,
$id_customer = 0, $use_customer_price = true, $id_cart = 0)
$id_customer = 0, $use_customer_price = true, $id_cart = 0, $real_quantity = 0)
{
static $address = null;
@@ -2397,18 +2402,10 @@ class ProductCore extends ObjectModel
if (!$use_customer_price)
$id_customer = 0;
// Caching
if ($id_product_attribute === null)
$product_attribute_label = 'null';
else
$product_attribute_label = ($id_product_attribute === false ? 'false' : $id_product_attribute);
$cache_id = $id_product.'-'.$id_shop.'-'.$id_currency.'-'.$id_country.'-'.$id_state.'-'.$zipcode.'-'.$id_group.
'-'.$quantity.'-'.$product_attribute_label.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0').
'-'.$quantity.'-'.(int)$id_product_attribute.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0').
'-'.($use_reduc?'1':'0').'-'.$with_ecotax.'-'.$id_customer;
if (isset(self::$_prices[$cache_id]))
return self::$_prices[$cache_id];
// reference parameter is filled before any returns
$specific_price = SpecificPrice::getSpecificPrice(
(int)$id_product,
@@ -2419,47 +2416,57 @@ class ProductCore extends ObjectModel
$quantity,
$id_product_attribute,
$id_customer,
$id_cart
$id_cart,
$real_quantity
);
if (isset(self::$_prices[$cache_id]))
return self::$_prices[$cache_id];
// fetch price & attribute price
$cache_id_2 = $id_product.'-'.(int)$id_product_attribute;
$cache_id_2 = $id_product;
if (!isset(self::$_pricesLevel2[$cache_id_2]))
{
$sql = new DbQuery();
$sql->select('product_shop.`price`, product_shop.`ecotax`');
$sql->select('product_shop.`price`, product_shop.`ecotax`, NULL id_product_attribute');
$sql->from('product', 'p');
$sql->join(Shop::addSqlAssociation('product', 'p'));
$sql->where('p.`id_product` = '.(int)$id_product);
$default_on = false;
if (Combination::isFeatureActive())
{
if ($id_product_attribute)
{
$sql->select('product_attribute_shop.`price` AS attribute_price');
$sql->leftJoin('product_attribute', 'pa', 'pa.`id_product_attribute` = '.(int)$id_product_attribute);
$sql->join(Shop::addSqlAssociation('product_attribute', 'pa', false));
}
else
$sql->select(
'IFNULL(
(
SELECT product_attribute_shop.price
FROM `'._DB_PREFIX_.'product_attribute` pa
'.Shop::addSqlAssociation('product_attribute', 'pa').'
WHERE pa.id_product = '.(int)$id_product.'
AND product_attribute_shop.default_on = 1
GROUP BY pa.id_product_attribute
LIMIT 1
),
0
) AS attribute_price'
);
$default_on = true;
$sql->select('pa.id_product_attribute, product_attribute_shop.`price` AS attribute_price, (SELECT product_attribute_shop.price
FROM `'._DB_PREFIX_.'product_attribute` pa
'.Shop::addSqlAssociation('product_attribute', 'pa').'
WHERE pa.id_product = '.(int)$id_product.'
AND product_attribute_shop.default_on = 1
GROUP BY pa.id_product_attribute
LIMIT 1) as default_on');
$sql->leftJoin('product_attribute', 'pa', 'pa.`id_product` = '.(int)$id_product);
$sql->join(Shop::addSqlAssociation('product_attribute', 'pa', false));
}
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
if ($res)
{
foreach ($res as $row)
self::$_pricesLevel2[$cache_id_2][(int)$row['id_product_attribute']] = array(
'price' => $row['price'],
'ecotax' => $row['ecotax'],
'attribute_price' => (isset($row['attribute_price']) ? $row['attribute_price'] : null)
);
if ($default_on)
self::$_pricesLevel2[$cache_id_2][0] = array('price' => $row['price'],
'ecotax' => $row['ecotax'],
'attribute_price' => $row['attribute_price']);
}
self::$_pricesLevel2[$cache_id_2] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
}
$result = self::$_pricesLevel2[$cache_id_2];
if (!isset(self::$_pricesLevel2[$cache_id_2][(int)$id_product_attribute]))
return;
$result = self::$_pricesLevel2[$cache_id_2][(int)$id_product_attribute];
if (!$specific_price || $specific_price['price'] < 0)
$price = (float)$result['price'];
@@ -2471,10 +2478,10 @@ class ProductCore extends ObjectModel
$price = Tools::convertPrice($price, $id_currency);
// Attribute price
if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute']))
if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute'] || $specific_price['price'] < 0))
{
$attribute_price = Tools::convertPrice(array_key_exists('attribute_price', $result) ? (float)$result['attribute_price'] : 0, $id_currency);
if ($id_product_attribute !== false) // If you want the default combination, please use NULL value instead
$attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency);
if ($id_product_attribute !== false && !is_null($id_product_attribute)) // If you want the default combination, please use NULL value instead
$price += $attribute_price;
}
@@ -2696,9 +2703,7 @@ class ProductCore extends ObjectModel
*/
public static function sqlStock($product_alias, $product_attribute = 0, $inner_join = false, Shop $shop = null)
{
if (!$shop)
$shop = Context::getContext()->shop;
$id_shop = ($shop !== null ? (int)$shop->id : null);
$sql = (($inner_join) ? ' INNER ' : ' LEFT ').'
JOIN '._DB_PREFIX_.'stock_available stock
ON (stock.id_product = '.pSQL($product_alias).'.id_product';
@@ -2713,7 +2718,7 @@ class ProductCore extends ObjectModel
$sql .= ' AND stock.id_product_attribute = IFNULL('.pSQL($product_attribute).'.id_product_attribute, 0)';
}
$sql .= StockAvailable::addSqlShopRestriction(null, $shop->id, 'stock').' )';
$sql .= StockAvailable::addSqlShopRestriction(null, $id_shop, 'stock').' )';
return $sql;
}
@@ -2842,6 +2847,7 @@ class ProductCore extends ObjectModel
WHERE pa.`id_product` = '.(int)$this->id.'
AND al.`id_lang` = '.(int)$id_lang.'
AND agl.`id_lang` = '.(int)$id_lang.'
GROUP BY id_attribute_group, id_product_attribute
ORDER BY ag.`position` ASC, a.`position` ASC';
return Db::getInstance()->executeS($sql);
}
@@ -2977,6 +2983,7 @@ class ProductCore extends ObjectModel
}
$row = array('id_feature' => (int)$id_feature, 'id_product' => (int)$this->id, 'id_feature_value' => (int)$id_value);
Db::getInstance()->insert('feature_product', $row);
SpecificPriceRule::applyAllRules(array((int)$this->id));
if ($id_value)
return ($id_value);
}
@@ -3054,7 +3061,9 @@ class ProductCore extends ObjectModel
FROM '._DB_PREFIX_.'feature_product pf
LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.(int)$id_lang.')
LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.(int)$id_lang.')
WHERE `id_product` IN ('.implode($product_implode, ',').')');
LEFT JOIN '._DB_PREFIX_.'feature f ON (f.id_feature = pf.id_feature)
WHERE `id_product` IN ('.implode($product_implode, ',').')
ORDER BY f.position ASC');
foreach ($result as $row)
{
@@ -4709,7 +4718,7 @@ class ProductCore extends ObjectModel
public function addWs($autodate = true, $null_values = false)
{
$success = parent::add($autodate, $null_values);
if ($success)
if ($success && Configuration::get('PS_SEARCH_INDEXATION'))
Search::indexation(false, $this->id);
return $success;
}
@@ -4717,7 +4726,7 @@ class ProductCore extends ObjectModel
public function updateWs($null_values = false)
{
$success = parent::update($null_values);
if ($success)
if ($success && Configuration::get('PS_SEARCH_INDEXATION'))
Search::indexation(false, $this->id);
return $success;
}
@@ -4739,9 +4748,6 @@ class ProductCore extends ObjectModel
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && is_null($manager))
$manager = StockManagerFactory::getManager();
if (is_null($id_shop))
$id_shop = Context::getContext()->shop->id;
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && Product::usesAdvancedStockManagement($id_product) &&
StockAvailable::dependsOnStock($id_product, $id_shop))
return $manager->getProductRealQuantities($id_product, $id_product_attribute, $id_warehouse, true);
@@ -4805,10 +4811,17 @@ class ProductCore extends ObjectModel
*/
public function loadStockData()
{
// By default, the product quantity correspond to the available quantity to sell in the current shop
$this->quantity = StockAvailable::getQuantityAvailableByProduct($this->id, 0);
$this->out_of_stock = StockAvailable::outOfStock($this->id);
$this->depends_on_stock = StockAvailable::dependsOnStock($this->id);
if (Validate::isLoadedObject($this))
{
// By default, the product quantity correspond to the available quantity to sell in the current shop
$this->quantity = StockAvailable::getQuantityAvailableByProduct($this->id, 0);
$this->out_of_stock = StockAvailable::outOfStock($this->id);
$this->depends_on_stock = StockAvailable::dependsOnStock($this->id);
if (Context::getContext()->shop->getContext() == Shop::CONTEXT_GROUP && Context::getContext()->shop->getContextShopGroup()->share_stock == 1)
$this->advanced_stock_management = Db::getInstance()->getValue('SELECT `advanced_stock_management`
FROM '._DB_PREFIX_.'product_shop
WHERE id_product='.(int)$this->id.Shop::addSqlRestriction());
}
}
/**
@@ -4816,12 +4829,17 @@ class ProductCore extends ObjectModel
*/
public function getDefaultCategory()
{
return Db::getInstance()->getValue('
$default_category = Db::getInstance()->getValue('
SELECT product_shop.`id_category_default`
FROM `'._DB_PREFIX_.'product` p
'.Shop::addSqlAssociation('product', 'p').'
WHERE p.`id_product` = '.(int)$this->id);
if (!$default_category)
return array('id_category_default' => Context::getContext()->shop->id_category);
else
return $default_category;
}
public static function getShopsByProduct($id_product)
+2 -1
View File
@@ -221,6 +221,7 @@ class ProductSupplierCore extends ObjectModel
$query->where('id_product = '.(int)$id_product.' AND id_product_attribute = '.(int)$id_product_attribute);
$query->where('id_supplier = '.(int)$id_supplier);
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query);
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query);
return $row['price_te'];
}
}
+1 -1
View File
@@ -64,7 +64,7 @@ class ReferrerCore extends ObjectModel
'http_referer_like_not' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml'),
'request_uri_like_not' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml'),
'base_fee' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'percent_fee' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'percent_fee' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPercentage'),
'click_fee' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
),
+6 -10
View File
@@ -35,17 +35,15 @@ class RiskCore extends ObjectModel
public $color;
public $percent;
protected $fieldsRequired = array('percent');
protected $fieldsSize = array();
protected $fieldsValidate = array();
protected $fieldsRequiredLang = array('name');
protected $fieldsSizeLang = array('name' => 20);
protected $fieldsValidateLang = array('name' => 'isString');
public static $definition = array(
'table' => 'risk',
'primary' => 'id_risk',
'multilang' => true,
'fields' => array(
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'required' => true, 'size' => 20),
'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor', 'size' => 32),
'percent' => array('type' => self::TYPE_INT, 'validate' => 'isPercentage')
),
);
public function getFields()
@@ -65,9 +63,7 @@ class RiskCore extends ObjectModel
public function getTranslationsFieldsChild()
{
$this->validateFieldsLang();
return $this->getTranslationsFields(array(
'name',
));
return $this->getTranslationsFields(array('name'));
}
public static function getRisks($id_lang = null)
+1 -1
View File
@@ -116,7 +116,7 @@ class SceneCore extends ObjectModel
return false;
}
public function deleteImage()
public function deleteImage($force_delete = false)
{
// Hack to prevent the main scene image from being deleted in AdminController::uploadImage() when a thumb image is uploaded
if (isset($_FILES['thumb']) && (!isset($_FILES['image']) || empty($_FILES['image']['name'])))
+2 -2
View File
@@ -53,7 +53,7 @@ define('PREG_CLASS_SEARCH_EXCLUDE',
'\x{2ce5}-\x{2cff}\x{2d6f}\x{2e00}-\x{3005}\x{3007}-\x{303b}\x{303d}-\x{303f}'.
'\x{3099}-\x{309e}\x{30a0}\x{30fb}\x{30fd}\x{30fe}\x{3190}-\x{319f}\x{31c0}-'.
'\x{31cf}\x{3200}-\x{33ff}\x{4dc0}-\x{4dff}\x{a015}\x{a490}-\x{a716}\x{a802}'.
'\x{a806}\x{a80b}\x{a823}-\x{a82b}\x{d800}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}'.
'\x{E000}-\x{F8FF}\x{FB29}\x{FD3E}-\x{FD3F}\x{FDFC}-\x{FDFD}'.
'\x{fd3f}\x{fdfc}-\x{fe6b}\x{feff}-\x{ff0f}\x{ff1a}-\x{ff20}\x{ff3b}-\x{ff40}'.
'\x{ff5b}-\x{ff65}\x{ff70}\x{ff9e}\x{ff9f}\x{ffe0}-\x{fffd}');
@@ -384,7 +384,7 @@ class SearchCore
{
// Adjust the limit to get only "whole" products, in every languages (and at least one)
$max_possibilities = $total_languages * count(Shop::getShops(true));
$limit = max(1, round($limit / $max_possibilities, 0, PHP_ROUND_HALF_DOWN) * $max_possibilities);
$limit = max(1, floor($limit / $max_possibilities) * $max_possibilities);
return Db::getInstance()->executeS('
SELECT p.id_product, pl.id_lang, pl.id_shop, pl.name pname, p.reference, p.ean13, p.upc,
+11 -11
View File
@@ -199,7 +199,7 @@ class SpecificPriceCore extends ObjectModel
return preg_split('/;/', $priority);
}
public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0)
public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0)
{
if (!SpecificPrice::isFeatureActive())
return array();
@@ -208,7 +208,7 @@ class SpecificPriceCore extends ObjectModel
** The price must not change between the top and the bottom of the page
*/
$key = ((int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.(int)$id_group.'-'.(int)$quantity.'-'.(int)$id_product_attribute.'-'.(int)$id_cart);
$key = ((int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.(int)$id_group.'-'.(int)$quantity.'-'.(int)$id_product_attribute.'-'.(int)$id_cart.'-'.(int)$real_quantity);
if (!array_key_exists($key, self::$_specificPriceCache))
{
$now = date('Y-m-d H:i:s');
@@ -222,15 +222,15 @@ class SpecificPriceCore extends ObjectModel
AND `id_country` IN (0, '.(int)$id_country.')
AND `id_group` IN (0, '.(int)$id_group.')
AND `id_customer` IN (0, '.(int)$id_customer.')
AND `from_quantity` <= '.(int)$quantity.'
AND
(
(`from` = \'0000-00-00 00:00:00\' OR \''.$now.'\' >= `from`)
AND
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
)
AND id_cart IN (0, '.(int)$id_cart.')
ORDER BY `id_specific_price_rule` ASC, `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC');
AND id_cart IN (0, '.(int)$id_cart.')'.
(($real_quantity != 0 && !Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION')) ? ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= IF(id_product_attribute=0,'.(int)$quantity.' ,'.(int)$real_quantity.')' : 'AND `from_quantity` <= '.(int)$real_quantity).'
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC');
}
return self::$_specificPriceCache[$key];
}
@@ -291,20 +291,20 @@ class SpecificPriceCore extends ObjectModel
AND
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
)
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC
');
$targeted_prices = array();
$last_quantity = null;
$last_quantity = array();
foreach ($res as $specific_price)
{
if (!isset($last_quantity))
$last_quantity = $specific_price['from_quantity'];
else if ($last_quantity == $specific_price['from_quantity'])
if (!isset($last_quantity[(int)$specific_price['id_product_attribute']]))
$last_quantity[(int)$specific_price['id_product_attribute']] = $specific_price['from_quantity'];
elseif ($last_quantity[(int)$specific_price['id_product_attribute']] == $specific_price['from_quantity'])
break;
$last_quantity = $specific_price['from_quantity'];
$last_quantity[(int)$specific_price['id_product_attribute']] = $specific_price['from_quantity'];
if ($specific_price['from_quantity'] > 1)
$targeted_prices[] = $specific_price;
}
+50 -21
View File
@@ -119,15 +119,18 @@ class SpecificPriceRuleCore extends ObjectModel
public function apply($products = false)
{
$this->resetApplication();
$this->resetApplication($products);
$products = $this->getAffectedProducts($products);
foreach ($products as $product)
SpecificPriceRule::applyRuleToProduct((int)$this->id, (int)$product['id_product'], (int)$product['id_product_attribute']);
}
public function resetApplication()
public function resetApplication($products = false)
{
return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'specific_price WHERE id_specific_price_rule='.(int)$this->id);
$where = '';
if ($products && count($products))
$where .= ' AND id_product IN ('.implode(', ', array_map('intval', $products)).')';
return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'specific_price WHERE id_specific_price_rule='.(int)$this->id.$where);
}
public static function applyAllRules($products = false)
@@ -178,6 +181,7 @@ class SpecificPriceRuleCore extends ObjectModel
$attributes = false;
$categories = false;
$features = false;
$suppliers = false;
$where = false;
if ($conditions_group)
@@ -185,32 +189,53 @@ class SpecificPriceRuleCore extends ObjectModel
$where = '(';
foreach ($conditions_group as $id_condition_group => $condition_group)
{
$fields = array(
'category' => array(
'name' => 'cp.id_category',
'values' => array()
),
'manufacturer' => array(
'name' => 'p.id_manufacturer',
'values' => array(),
),
'supplier' => array(
'name' => 'pss.id_supplier',
'values' => array()
),
'feature' => array(
'name' => 'fp.id_feature_value',
'values' => array()
),
'attribute' => array(
'name'=> 'pac.id_attribute',
'values' => array()
)
);
foreach ($condition_group as $condition)
{
$field = false;
if ($condition['type'] == 'category')
{
$field = 'cp.id_category';
$categories = true;
}
elseif ($condition['type'] == 'manufacturer')
$field = 'p.id_manufacturer';
elseif ($condition['type'] == 'supplier')
$field = 'p.id_supplier';
elseif ($condition['type'] == 'feature')
{
$field = 'fp.id_feature_value';
$features = true;
}
elseif ($condition['type'] == 'attribute')
{
$field = 'pac.id_attribute';
$attributes = true;
}
if ($field)
$where .= $field.'='.(int)$condition['value'].' AND ';
elseif ($condition['type'] == 'supplier')
$suppliers = true;
$fields[$condition['type']]['values'][] = $condition['value'];
}
foreach ($fields as $field)
{
if (!$n_conditions = count($field['values']))
continue;
$where .= $field['name'].' IN ('.implode(',', array_map('intval', $field['values'])).') AND ';
if ($n_conditions > 1)
$query->having('COUNT('.bqSQL($field['name']).') >='.(int)$n_conditions);
}
$where = rtrim($where, ' AND ').') OR (';
}
$where = rtrim($where, 'OR (');
@@ -230,9 +255,13 @@ class SpecificPriceRuleCore extends ObjectModel
$query->select('NULL as id_product_attribute');
if ($features)
$query->leftJoin('feature_product', 'fp', 'p.id_product = fp.id_product');
$query->leftJoin('feature_product', 'fp', 'p.id_product = fp.id_product');
if ($categories)
$query->leftJoin('category_product', 'cp', 'p.id_product = cp.id_product');
if ($suppliers)
$query->leftJoin('product_supplier', 'pss', 'p.id_product = pss.id_product');
if ($where)
$query->where($where);
+3
View File
@@ -355,7 +355,10 @@ class SupplierCore extends ObjectModel
public function delete()
{
if (parent::delete())
{
CartRule::cleanProductRuleIntegrity('suppliers', $this->id);
return $this->deleteImage();
}
}
/**
+1 -1
View File
@@ -59,7 +59,7 @@ class TabCore extends ObjectModel
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
// Lang fields
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 32),
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'required' => true, 'validate' => 'isGenericName', 'size' => 32),
),
);
+4 -3
View File
@@ -92,13 +92,13 @@ class TagCore extends ObjectModel
* @param string|array $tag_list List of tags, as array or as a string with comas
* @return boolean Operation success
*/
public static function addTags($id_lang, $id_product, $tag_list)
public static function addTags($id_lang, $id_product, $tag_list, $separator = ',')
{
if (!Validate::isUnsignedId($id_lang))
return false;
if (!is_array($tag_list))
$tag_list = array_unique(array_map('trim', preg_split('/,/', $tag_list, null, PREG_SPLIT_NO_EMPTY)));
$tag_list = array_unique(array_map('trim', preg_split('#\\'.$separator.'#', $tag_list, null, PREG_SPLIT_NO_EMPTY)));
$list = array();
foreach ($tag_list as $tag)
@@ -200,7 +200,8 @@ class TagCore extends ObjectModel
if ($result)
{
$result &= Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'product_tag (id_product, id_tag) VALUES '.implode(',', $ids));
$result &= Search::indexation(false);
if (Configuration::get('PS_SEARCH_INDEXATION'))
$result &= Search::indexation(false);
}
}
return $result;

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