Compare commits
229 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4c4068e41 | ||
|
|
fd1050b0db | ||
|
|
5b809ec536 | ||
|
|
02fd940124 | ||
|
|
134914dc1a | ||
|
|
d8a1dca660 | ||
|
|
10fa987832 | ||
|
|
58da52b808 | ||
|
|
0585b8d723 | ||
|
|
ccc388fab9 | ||
|
|
dbd5f9d32f | ||
|
|
27397ab839 | ||
|
|
11f530b54f | ||
|
|
6c271e037c | ||
|
|
964a0a4601 | ||
|
|
9737709ee6 | ||
|
|
70144c7cef | ||
|
|
0442da817c | ||
|
|
9d63514220 | ||
|
|
13061bdc04 | ||
|
|
5150a3fc4c | ||
|
|
4ab4e19d20 | ||
|
|
023be78690 | ||
|
|
55c329c16e | ||
|
|
b951c2809c | ||
|
|
2b37db629e | ||
|
|
d064be1587 | ||
|
|
2a1c991612 | ||
|
|
fa059751fc | ||
|
|
6284c55e2a | ||
|
|
81f05b9db3 | ||
|
|
09b5d3a0b8 | ||
|
|
754ba06a39 | ||
|
|
2129aebac0 | ||
|
|
04760c91e5 | ||
|
|
2eb620267c | ||
|
|
a932ba512a | ||
|
|
d14fcf169a | ||
|
|
d6e52bdecb | ||
|
|
3ab28374e6 | ||
|
|
5f47526ed2 | ||
|
|
033bf745cd | ||
|
|
6d0de6e29e | ||
|
|
0ff7163cba | ||
|
|
914f613e7b | ||
|
|
5ef392aaeb | ||
|
|
0410378bd3 | ||
|
|
1508a8a5d7 | ||
|
|
33b8703d24 | ||
|
|
e02b5d5c11 | ||
|
|
6be883217e | ||
|
|
10e0205cb8 | ||
|
|
4cba2623e5 | ||
|
|
618aa24f74 | ||
|
|
0889ab4eec | ||
|
|
6633efd27d | ||
|
|
8d627aa522 | ||
|
|
bcc851c98c | ||
|
|
dbc08d779c | ||
|
|
22a9548f83 | ||
|
|
4771746959 | ||
|
|
bd241a9c48 | ||
|
|
8166bb662c | ||
|
|
113f8d4efb | ||
|
|
11296fe464 | ||
|
|
017ef4860e | ||
|
|
21319ca32c | ||
|
|
cef406aef2 | ||
|
|
7e841c4448 | ||
|
|
1cbc765a8f | ||
| 692643d7d6 | |||
|
|
cd58c0968b | ||
|
|
e5f0bcb916 | ||
|
|
7f02c8ca58 | ||
|
|
bfed3532bf | ||
|
|
2962141d51 | ||
|
|
73bf2a7db1 | ||
|
|
9aa656c9d7 | ||
|
|
1140b5e8b5 | ||
|
|
6a690b255b | ||
|
|
152960639f | ||
|
|
448a4c9994 | ||
|
|
7526fe4766 | ||
|
|
50eee795ed | ||
|
|
97be96ede8 | ||
|
|
0b47ef1b3b | ||
|
|
ba15d975bc | ||
|
|
47d58ff930 | ||
|
|
d06bf10bbb | ||
|
|
d0d234f555 | ||
|
|
19d975a0b4 | ||
|
|
6393746f04 | ||
|
|
db99f188a2 | ||
|
|
fe8e349931 | ||
|
|
3f8b76f78c | ||
|
|
947f9bb21c | ||
|
|
83400c691c | ||
|
|
f4601d9680 | ||
|
|
28e1a94bb6 | ||
|
|
ad6367f2bf | ||
|
|
5a8c335d78 | ||
|
|
4479db88a0 | ||
|
|
339c954cb3 | ||
|
|
c4837e65ec | ||
|
|
2117c89352 | ||
|
|
9f10a851e5 | ||
|
|
66a9ee03fc | ||
|
|
c69688cc11 | ||
|
|
26d1ad0668 | ||
|
|
6a99b84452 | ||
|
|
6ddf220aee | ||
|
|
9328a3c473 | ||
|
|
c8dfe1c174 | ||
|
|
75df12dd94 | ||
|
|
6d7e2055ce | ||
|
|
4d327a537f | ||
|
|
747926039a | ||
|
|
5e4382eb08 | ||
|
|
036e2362c9 | ||
|
|
fc193d5c8b | ||
|
|
75e6a03591 | ||
|
|
dd05692400 | ||
|
|
b5eb7c5c28 | ||
|
|
f0f3679cbd | ||
|
|
175da3ecf6 | ||
|
|
743c4f4607 | ||
|
|
40abef8aac | ||
|
|
8be339463d | ||
|
|
f0f630fb50 | ||
|
|
3f42a381a4 | ||
|
|
0e1898be09 | ||
|
|
c1969028f2 | ||
|
|
cd83ec93c7 | ||
|
|
ab730dc3da | ||
|
|
7523828a7a | ||
|
|
e2d8a33a81 | ||
|
|
a7869a1f06 | ||
|
|
de404706d9 | ||
|
|
3f9338e13d | ||
|
|
38da826671 | ||
|
|
fee461fdf1 | ||
|
|
8dd951c2df | ||
|
|
7e93b2cffd | ||
|
|
19da345531 | ||
|
|
bd8eebdc33 | ||
|
|
4312d241f3 | ||
|
|
7eb70486e0 | ||
|
|
ebc3dfee62 | ||
|
|
ee487fde59 | ||
|
|
c7f1fcb49a | ||
|
|
530b6dc501 | ||
|
|
5364be686e | ||
|
|
aaaf8588c1 | ||
|
|
6ee2852fa5 | ||
|
|
02acd47c9e | ||
|
|
32e92762f5 | ||
|
|
3b7387ffe8 | ||
|
|
472dc8c27d | ||
|
|
99ad6481e6 | ||
|
|
92cf31e5c3 | ||
|
|
fa7d44d67f | ||
|
|
b9c4b5d2a7 | ||
|
|
fbd28f3e49 | ||
|
|
8c8340db4e | ||
|
|
7cc351e83d | ||
|
|
91cde1ab3a | ||
|
|
e6f9f806bf | ||
|
|
fc4a660f76 | ||
|
|
f3147b4e57 | ||
|
|
514c087962 | ||
|
|
00887942d3 | ||
|
|
afe6c9bc6f | ||
|
|
fc6041fa33 | ||
|
|
76b03856e2 | ||
|
|
ef5779f63f | ||
|
|
d0522417eb | ||
|
|
50c95f568c | ||
|
|
d321b9a5bc | ||
|
|
d95885caae | ||
|
|
71139df65f | ||
|
|
1fb8ef823d | ||
|
|
29001b3392 | ||
|
|
eac7fbb694 | ||
|
|
fa4b5e0b7d | ||
|
|
d30830f6fe | ||
|
|
b2e5c6090d | ||
|
|
2556a7bb68 | ||
|
|
7226f33f90 | ||
|
|
3f3dc0feb9 | ||
|
|
d4253b9849 | ||
|
|
4b0b5cf4da | ||
|
|
2b8d069cf9 | ||
|
|
9817ef6840 | ||
|
|
581645ce6d | ||
|
|
87be153e42 | ||
|
|
f85c6b59c8 | ||
|
|
99e98a5164 | ||
|
|
4c1ad83b18 | ||
|
|
26a43260c5 | ||
|
|
c69429c126 | ||
|
|
02c04a9884 | ||
|
|
cf65877f3f | ||
|
|
f0abdca08f | ||
|
|
0e54bf0f76 | ||
|
|
12276f41fb | ||
|
|
be13f82b30 | ||
|
|
f5cc6862cb | ||
|
|
0a65de5e5f | ||
|
|
f4740088c1 | ||
|
|
c44b1d617c | ||
|
|
c452444620 | ||
|
|
3f817e8729 | ||
|
|
66f314bbb2 | ||
|
|
bf8cd29868 | ||
|
|
b8b7fbaf71 | ||
|
|
9ea79f8cb5 | ||
|
|
b3c54a59dd | ||
|
|
06d73554be | ||
|
|
ad555f1d30 | ||
|
|
4b6ee72072 | ||
|
|
e000f8c627 | ||
|
|
6ef7f258ea | ||
|
|
2be72f50d1 | ||
|
|
0bc1d21432 | ||
|
|
8053604005 | ||
|
|
5abd93e619 | ||
|
|
eff3f6f713 | ||
|
|
18ab409eeb | ||
|
|
dbc5c4301f |
@@ -1,7 +1,7 @@
|
||||
Contributing
|
||||
------------
|
||||
|
||||
PrestaShop is an open-source e-commerce solution - To contribute to our project, you can make pull requests on the development branch.
|
||||
PrestaShop is an open-source e-commerce solution - To contribute to our project, you can make pull requests on the bootstrap branch.
|
||||
If you need some help to make a [pull-request][1]
|
||||
All contributions must respect [the coding norm][2] and [the commit norm][3] in your pull-request.
|
||||
All core files you commit in your pull request must have Open Software License (OSL 3.0)
|
||||
|
||||
345
CONTRIBUTORS.md
345
CONTRIBUTORS.md
@@ -1,161 +1,186 @@
|
||||
- adonis karavokyros
|
||||
- aFolletete
|
||||
- Agence CINS
|
||||
- aKorczak
|
||||
- Alexander Otchenashev
|
||||
- anat
|
||||
- Andrew
|
||||
- aNiassy
|
||||
- antoniofr
|
||||
- AntonLejon
|
||||
- Arnaud Lemercier
|
||||
- Axome
|
||||
- Benjamin PONGY
|
||||
- BigZ
|
||||
- bLeveque
|
||||
- bMancone
|
||||
- bumbu
|
||||
- Burhan
|
||||
- Caleydon Media
|
||||
- cam.lafit
|
||||
- Captain FLAM
|
||||
- Captain-FLAM
|
||||
- ccauw
|
||||
- Cédric Mouleyre
|
||||
- ChristopheBoucaut
|
||||
- CINS
|
||||
- cippest
|
||||
- cmouleyre
|
||||
- Corentin Delcourt
|
||||
- Cosmin Hutanu
|
||||
- Damien Metzger
|
||||
- DamienMetzger
|
||||
- Damon Skelhorn
|
||||
- Daniel
|
||||
- David Gasperoni
|
||||
- Davy Rolink
|
||||
- djfm
|
||||
- dlage
|
||||
- dMetzger
|
||||
- (d)oekia
|
||||
- Dragan Skrbic
|
||||
- dreammeup
|
||||
- DrySs
|
||||
- DrÿSs
|
||||
- DrÿSs'
|
||||
- dSevere
|
||||
- Edouard Gaulué
|
||||
- emily-d
|
||||
- Fabio Chelly
|
||||
- fBrignoli
|
||||
- fram
|
||||
- Francois Gaillard
|
||||
- François Gaillard
|
||||
- Fran?s Gaillard
|
||||
- fSerny
|
||||
- Gabriel Schwardy
|
||||
- gBrunier
|
||||
- gCharmes
|
||||
- gPoulain
|
||||
- gr4devel
|
||||
- Grégoire Bélorgey
|
||||
- Gregory Roussac
|
||||
- gRoussac
|
||||
- Guillaume DELOINCE
|
||||
- ha99y
|
||||
- hAitmansour
|
||||
- Ha!*!*y
|
||||
- indesign47
|
||||
- inem0o
|
||||
- ivancasasempere
|
||||
- jBreux
|
||||
- jeckyl
|
||||
- jeromenadaud
|
||||
- Jerome Nadaud
|
||||
- Jérôme Nadaud
|
||||
- jessylenne
|
||||
- jmCollin
|
||||
- jObregon
|
||||
- Jonathan Danse
|
||||
- joseantgv
|
||||
- Julien
|
||||
- Kevin Granger
|
||||
- kpodemski
|
||||
- Krystian Podemski
|
||||
- lBrieu
|
||||
- lCherifi
|
||||
- ldecoker
|
||||
- lLefevre
|
||||
- LOIC ROSSET ltd
|
||||
- makk1ntosh
|
||||
- marcinsz101
|
||||
- Marco Cervellin
|
||||
- matiasiglesias
|
||||
- Mats Rynge
|
||||
- MatthieuB
|
||||
- Maxence
|
||||
- mBertholino
|
||||
- mDeflotte
|
||||
- Michel Courtade
|
||||
- Milow
|
||||
- minic studio
|
||||
- misthero
|
||||
- mMarinetti
|
||||
- montes
|
||||
- nezenmoins
|
||||
- Nicolas Sorosac
|
||||
- Nils-Helge Garli Hegvik
|
||||
- nPellicari
|
||||
- nturato
|
||||
- oleacorner
|
||||
- Otto Nascarella
|
||||
- Patanock
|
||||
- PhpMadman
|
||||
- Pierre
|
||||
- Piotr Kaczor
|
||||
- Piotr Mocko
|
||||
- PrestaEdit
|
||||
- prestarocket
|
||||
- Prestaspirit
|
||||
- pxls
|
||||
- Raphaël Malié
|
||||
- raulgundin
|
||||
- Rémi Gaillard
|
||||
- rGaillard
|
||||
- Rimas Kudelis
|
||||
- rMalie
|
||||
- rMontagne
|
||||
- romainberger
|
||||
- root
|
||||
- runningz
|
||||
- sagaradonis
|
||||
- Samy Rabih
|
||||
- Sarah Lorenzini
|
||||
- Seb
|
||||
- Sébastien
|
||||
- Sébastien Bocahu
|
||||
- Seynaeve
|
||||
- Shagshag
|
||||
- sjousse
|
||||
- sLorenzini
|
||||
- smartdatasoft
|
||||
- soufyan
|
||||
- soware
|
||||
- Staging
|
||||
- sThiebaut
|
||||
- Sylvain WITMEYER
|
||||
- tDidierjean
|
||||
- unknown
|
||||
- vAugagneur
|
||||
- vChabot
|
||||
- Vincent Augagneur
|
||||
- Vincent Schoener
|
||||
- Vincent Terenti
|
||||
- vinvin27
|
||||
- vKham
|
||||
- vSchoener
|
||||
- Xavier
|
||||
- Xavier POITAU
|
||||
- Yoozio
|
||||
- zimmi1
|
||||
- adonis karavokyros
|
||||
- aFolletete
|
||||
- Agence CINS
|
||||
- aKorczak
|
||||
- Aleksander Palyan
|
||||
- Alexander Otchenashev
|
||||
- anat
|
||||
- Andrew
|
||||
- aNiassy
|
||||
- antoniofr
|
||||
- AntonLejon
|
||||
- Arnaud Lemercier
|
||||
- Axome
|
||||
- Benjamin PONGY
|
||||
- BigZ
|
||||
- bLeveque
|
||||
- bMancone
|
||||
- bumbu
|
||||
- Burhan
|
||||
- Caleydon Media
|
||||
- cam.lafit
|
||||
- Captain FLAM
|
||||
- Captain-FLAM
|
||||
- ccauw
|
||||
- cedricfontaine
|
||||
- Cédric Mouleyre
|
||||
- Chris
|
||||
- ChristopheBoucaut
|
||||
- CINS
|
||||
- cippest
|
||||
- cmouleyre
|
||||
- Corentin Delcourt
|
||||
- Cosmin Hutanu
|
||||
- Damien Metzger
|
||||
- DamienMetzger
|
||||
- Damon Skelhorn
|
||||
- Daniel
|
||||
- Daniele Giachino
|
||||
- David Gasperoni
|
||||
- Davy Rolink
|
||||
- Dinis Lage
|
||||
- djfm
|
||||
- dlage
|
||||
- dMetzger
|
||||
- (d)oekia
|
||||
- Dragan Skrbic
|
||||
- dreammeup
|
||||
- DrySs
|
||||
- DrÿSs
|
||||
- DrÿSs'
|
||||
- dSevere
|
||||
- Edouard Gaulué
|
||||
- emily-d
|
||||
- Eric Le Lay
|
||||
- Fabio Chelly
|
||||
- fBrignoli
|
||||
- fchellypresta
|
||||
- fram
|
||||
- Francois Gaillard
|
||||
- François Gaillard
|
||||
- Fran<EFBFBD>ois Gaillard
|
||||
- fSerny
|
||||
- Gabriel Schwardy
|
||||
- Gaelle ITZKOVITZ
|
||||
- gBrunier
|
||||
- gCharmes
|
||||
- gPoulain
|
||||
- gr4devel
|
||||
- Grégoire Bélorgey
|
||||
- Gregory Roussac
|
||||
- gRoussac
|
||||
- Guillaume DELOINCE
|
||||
- ha99y
|
||||
- hAitmansour
|
||||
- Ha!*!*y
|
||||
- indesign47
|
||||
- inem0o
|
||||
- ivancasasempere
|
||||
- Jáchym Toušek
|
||||
- Javsmile
|
||||
- jBreux
|
||||
- jeckyl
|
||||
- jeromenadaud
|
||||
- Jerome Nadaud
|
||||
- Jérôme Nadaud
|
||||
- jessylenne
|
||||
- jmCollin
|
||||
- jObregon
|
||||
- Jonathan Danse
|
||||
- joseantgv
|
||||
- Julien
|
||||
- Kevin Granger
|
||||
- kiropowered
|
||||
- kpodemski
|
||||
- Krystian Podemski
|
||||
- lBrieu
|
||||
- lCherifi
|
||||
- ldecoker
|
||||
- lLefevre
|
||||
- LOIC ROSSET ltd
|
||||
- Madef
|
||||
- Mainmich
|
||||
- makk1ntosh
|
||||
- marcinsz101
|
||||
- Marco Cervellin
|
||||
- matiasiglesias
|
||||
- Mats Rynge
|
||||
- MatthieuB
|
||||
- Maxence
|
||||
- mBertholino
|
||||
- mDeflotte
|
||||
- Michel Courtade
|
||||
- Mickael Desgranges
|
||||
- Mikael Blotin
|
||||
- Milow
|
||||
- minic studio
|
||||
- misthero
|
||||
- mMarinetti
|
||||
- montes
|
||||
- MustangZhong
|
||||
- nezenmoins
|
||||
- Nicolas Sorosac
|
||||
- Nils-Helge Garli Hegvik
|
||||
- Nino Uzelac
|
||||
- nPellicari
|
||||
- nturato
|
||||
- oleacorner
|
||||
- Otto Nascarella
|
||||
- Patanock
|
||||
- PhpMadman
|
||||
- Pierre
|
||||
- Piotr Kaczor
|
||||
- Piotr Moćko
|
||||
- PrestaEdit
|
||||
- PrestaLab
|
||||
- PrestanceDesign
|
||||
- prestarocket
|
||||
- Prestaspirit
|
||||
- pxls
|
||||
- Raphaël Malié
|
||||
- raulgundin
|
||||
- Rémi Gaillard
|
||||
- rGaillard
|
||||
- Rimas Kudelis
|
||||
- rMalie
|
||||
- rMontagne
|
||||
- romainberger
|
||||
- root
|
||||
- runningz
|
||||
- sagaradonis
|
||||
- Samy Rabih
|
||||
- Sarah Lorenzini
|
||||
- Seb
|
||||
- Sébastien
|
||||
- Sébastien Bocahu
|
||||
- Seynaeve
|
||||
- Shagshag
|
||||
- sjousse
|
||||
- sLorenzini
|
||||
- smartdatasoft
|
||||
- soufyan
|
||||
- soware
|
||||
- Staging
|
||||
- sThiebaut
|
||||
- Sylvain Gougouzian
|
||||
- Sylvain WITMEYER
|
||||
- tDidierjean
|
||||
- thoma202
|
||||
- Tomasz Slominski
|
||||
- Tom Panier
|
||||
- tucoinfo
|
||||
- unknown
|
||||
- vAugagneur
|
||||
- vChabot
|
||||
- Vincent Augagneur
|
||||
- Vincent Schoener
|
||||
- Vincent Terenti
|
||||
- vinvin27
|
||||
- vKham
|
||||
- vSchoener
|
||||
- Xavier
|
||||
- Xavier POITAU
|
||||
- Yoozio
|
||||
- zimmi1
|
||||
- Zollner Robert
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
.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:11}
|
||||
|
||||
|
||||
/*FILTER MODULE*/
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<h2><img src="../img/admin/cart.gif" /> {l s='Order information'}</h2>
|
||||
<span>
|
||||
{if $order->id}
|
||||
<a href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&id_order={$order->id}&vieworder"> {l s='Order #%d' sprintf=$order->id|string_format:"%06d"}</a></span>
|
||||
<a href="{$link->getAdminLink('AdminOrders')|escape:'htmlall':'UTF-8'}&id_order={$order->id}&vieworder"> {l s='Order #%s' sprintf=$order->reference}</a></span>
|
||||
<br /><br />
|
||||
{l s='Made on:'} {dateFormat date=$order->date_add}<br /><br /><br /><br />
|
||||
{else}
|
||||
@@ -187,4 +187,4 @@
|
||||
<div class="clear" style="height:20px;"> </div>
|
||||
{/block}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#group_discount_category_table').append('<tr class="alt_row" id="'+jsonData.id_category+'"><td>'+jsonData.catPath+'</td><td>{l s='Discount:'}'+jsonData.discount+'{l s='%'}</td><td><a href="#" onclick="deleteCategoryReduction('+jsonData.id_category+');"><img src="../img/admin/delete.gif"></a></td></tr>');
|
||||
$('#group_discount_category_table').append('<tr class="alt_row" id="'+jsonData.id_category+'"><td>'+jsonData.catPath+'</td><td>{l s='Discount:'}' + ' ' + jsonData.discount+'{l s='%'}</td><td><a href="#" onclick="deleteCategoryReduction('+jsonData.id_category+');"><img src="../img/admin/delete.gif"></a></td></tr>');
|
||||
|
||||
var input_hidden = document.createElement("input");
|
||||
input_hidden.setAttribute('type', 'hidden');
|
||||
@@ -168,7 +168,7 @@
|
||||
{foreach $input['values'] key=key item=category }
|
||||
<tr class="alt_row" id="{$category.id_category}">
|
||||
<td>{$category.path}</td>
|
||||
<td>{l s='Discount: %d%%' sprintf=$category.reduction}</td>
|
||||
<td>{l s='Discount: %.2f%%' sprintf=$category.reduction}</td>
|
||||
<td>
|
||||
<a href="#" onclick="deleteCategoryReduction({$category.id_category});"><img src="../img/admin/delete.gif"></a>
|
||||
<input type="hidden" class="category_reduction" name="category_reduction[{$category.id_category}]" value="{$category.reduction}">
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<fieldset>
|
||||
<ul>
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Name:'}</span> {$group->name[$language->id]}</li>
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Discount: %d%%' sprintf=$group->reduction}</span></li>
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Discount: %.2f%%' sprintf=$group->reduction}</span></li>
|
||||
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Current category discount:'}</span>
|
||||
{if !$categorieReductions}
|
||||
{l s='None'}
|
||||
@@ -39,7 +39,7 @@
|
||||
{foreach $categorieReductions key=key item=category }
|
||||
<tr class="alt_row">
|
||||
<td>{$category.path}</td>
|
||||
<td>{l s='Discount: %d%%' sprintf=$category.reduction}</td>
|
||||
<td>{l s='Discount: %.2f%%' sprintf=$category.reduction}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="width4">
|
||||
{if isset($localization_form)}{$localization_form}{/if}
|
||||
</div>
|
||||
{if isset($localization_form)}{$localization_form}{/if}
|
||||
<br />
|
||||
<div class="width4">
|
||||
{if isset($localization_options)}{$localization_options}{/if}
|
||||
</div>
|
||||
{if isset($localization_options)}{$localization_options}{/if}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
});
|
||||
|
||||
// Method to check / uncheck all modules checkbox
|
||||
$('#checkme').click(function()
|
||||
$('#moduleContainer').on("click", "#checkme", function()
|
||||
{
|
||||
if ($(this).attr("rel") == 'false')
|
||||
{
|
||||
@@ -321,8 +321,8 @@
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.toggle_favorite').live('click', function(event)
|
||||
|
||||
$('#moduleContainer').on("click", ".toggle_favorite", function()
|
||||
{
|
||||
var el = $(this);
|
||||
var value_pref = el.data('value');
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#product-tab-content-wait').show();
|
||||
//product_type = $("input[name=type_product]:checked").val();
|
||||
if (product_type == product_type_pack)
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<tr id="image_id">
|
||||
<td style="padding: 4px;">
|
||||
<a href="{$smarty.const._THEME_PROD_DIR_}image_path.jpg" class="fancybox">
|
||||
<img src="{$smarty.const._THEME_PROD_DIR_}{$iso_lang}-default-{$imageType}.jpg" alt="image_id" title="image_id" />
|
||||
<img src="{$smarty.const._THEME_PROD_DIR_}{$iso_lang}-default-{$imageType}.jpg" alt="legend" title="legend" />
|
||||
</a>
|
||||
</td>
|
||||
<td>legend</td>
|
||||
@@ -332,7 +332,7 @@
|
||||
function imageLine(id, path, position, cover, shops, legend)
|
||||
{
|
||||
line = $("#lineType").html();
|
||||
line = line.replace(/image_id/g, legend);
|
||||
line = line.replace(/image_id/g, id);
|
||||
line = line.replace(/[a-z]{0,2}-default/g, path);
|
||||
line = line.replace(/image_path/g, path);
|
||||
line = line.replace(/image_position/g, position);
|
||||
|
||||
@@ -223,7 +223,7 @@ $(document).ready(function () {
|
||||
<tr>
|
||||
<td class="col-left"><label><b>{l s='Final retail price:'}</b></label></td>
|
||||
<td>
|
||||
<span {if !$country_display_tax_label}style="display:none"{/if} >
|
||||
<span>
|
||||
{$currency->prefix}<span id="finalPrice" style="font-weight: bold;">0.00</span>{$currency->suffix}<span {if $ps_tax}style="display:none;"{/if}> ({l s='tax incl.'})</span>
|
||||
</span>
|
||||
<span {if $ps_tax}style="display:none;"{/if} >
|
||||
@@ -249,7 +249,7 @@ $(document).ready(function () {
|
||||
<script type="text/javascript">
|
||||
var product_prices = new Array();
|
||||
{foreach from=$combinations item='combination'}
|
||||
product_prices['{$combination.id_product_attribute}'] = '{$combination.price}';
|
||||
product_prices['{$combination.id_product_attribute}'] = '{$combination.price|@addcslashes:'\''}';
|
||||
{/foreach}
|
||||
</script>
|
||||
<div id="add_specific_price" style="display: none;">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display:none;{/if}float: left;">
|
||||
<textarea cols="100" rows="10" id="{$input_name}_{$language.id_lang}"
|
||||
name="{$input_name}_{$language.id_lang}"
|
||||
class="autoload_rte" >{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8}{/if}</textarea>
|
||||
class="autoload_rte" >{if isset($input_value[$language.id_lang])}{$input_value[$language.id_lang]|htmlentitiesUTF8|replace:'\r\n':''|replace:'\"':'"'}{/if}</textarea>
|
||||
<span class="counter" max="{if isset($max)}{$max}{else}none{/if}"></span>
|
||||
<span class="hint">{$hint|default:''}<span class="hint-pointer"> </span></span>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
$('#file_missing').hide();
|
||||
$('#virtual_product_name').attr('value', fileName);
|
||||
$("#upload-confirmation .error").remove();
|
||||
$('#upload-confirmation div').find('span').remove()
|
||||
$('#upload-confirmation div').find('span').remove();
|
||||
$('#upload-confirmation div').prepend('<span>{l s='The file'} "<a class="link" href="get-file-admin.php?file='+msg+'&filename='+fileName+'">'+fileName+'</a>" {l s='has successfully been uploaded'}' +
|
||||
'<input type="hidden" id="virtual_product_filename" name="virtual_product_filename" value="' + msg + '" /></span>');
|
||||
$("#upload-confirmation").show();
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
{if isset($fields_value[$input.name].image) && $fields_value[$input.name].image}
|
||||
<div id="image">
|
||||
{$fields_value[$input.name].image}
|
||||
<p align="center">{l s='File size'} {$fields_value[$input.name].size}kb</p>
|
||||
<p align="center">{l s='File size'} {$fields_value[$input.name].size}{l s='kb'}</p>
|
||||
<a href="{$current}&{$identifier}={$form_id}&token={$token}&deleteImage=1">
|
||||
<img src="../img/admin/delete.gif" alt="{l s='Delete'}" /> {l s='Delete'}
|
||||
</a>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
{/if}
|
||||
class="{if !$no_link}pointer{/if}
|
||||
{if isset($params.position) && $order_by == 'position' && $order_way != 'DESC'} dragHandle{/if}
|
||||
{if isset($params.class)} {$params.class}{/if}
|
||||
{if isset($params.align)} {$params.align}{/if}"
|
||||
{if (!isset($params.position) && !$no_link && !isset($params.remove_onclick))}
|
||||
onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<select name="{$list_id}_pagination" onchange="submit()">
|
||||
{* Choose number of results per page *}
|
||||
{foreach $pagination AS $value}
|
||||
<option value="{$value|intval}"{if $selected_pagination == $value} selected="selected" {elseif $selected_pagination == NULL && $value == $pagination[1]} selected="selected2"{/if}>{$value|intval}</option>
|
||||
<option value="{$value|intval}"{if $selected_pagination == $value && $selected_pagination != NULL} selected="selected"{elseif $selected_pagination == NULL && $value == $pagination[1]} selected="selected2"{/if}>{$value|intval}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
/ {$list_total} {l s='result(s)'}
|
||||
@@ -188,8 +188,8 @@
|
||||
{if $params.type == 'bool'}
|
||||
<select onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}Filter_{$key}">
|
||||
<option value="">-</option>
|
||||
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
|
||||
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
||||
<option value="1"{if $params.value == 1} selected="selected"{/if}>{l s='Yes'}</option>
|
||||
<option value="0"{if $params.value == 0 && $params.value != ''} selected="selected"{/if}>{l s='No'}</option>
|
||||
</select>
|
||||
{elseif $params.type == 'date' || $params.type == 'datetime'}
|
||||
{l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"{if isset($params.width)} style="width:70px"{/if}/><br />
|
||||
@@ -197,10 +197,10 @@
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.filter_key)}
|
||||
<select onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<option value="" {if $params.value == ''} selected="selected" {/if}>-</option>
|
||||
<option value=""{if $params.value == ''} selected="selected"{/if}>-</option>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if $option_display == $params.value || $option_value == $params.value} selected="selected"{/if}>{$option_display}</option>
|
||||
<option value="{$option_value}" {if $params.value != '' && ($option_display == $params.value || $option_value == $params.value)} selected="selected"{/if}>{$option_display}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="toolbar-placeholder">
|
||||
<div id="{$table}_toolbar" class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{block name=toolbarBox}
|
||||
<ul class="cc_button">
|
||||
@@ -52,7 +52,7 @@
|
||||
var modules_list_loaded = false;
|
||||
$(function() {
|
||||
//get reference on save link
|
||||
btn_save = $('span[class~="process-icon-save"]').parent();
|
||||
btn_save = $('#{$table}_toolbar span[class~="process-icon-save"]').parent();
|
||||
|
||||
//get reference on form submit button
|
||||
btn_submit = $('#{$table}_form_submit_btn');
|
||||
@@ -93,6 +93,9 @@
|
||||
//submit the form
|
||||
{block name=formSubmit}
|
||||
btn_save.click(function() {
|
||||
// Vars
|
||||
var btn_submit = $('#{$table}_form_submit_btn');
|
||||
|
||||
// Avoid double click
|
||||
if (submited)
|
||||
return false;
|
||||
|
||||
@@ -264,13 +264,17 @@ class AddressCore extends ObjectModel
|
||||
if(!isset($id_address) || empty($id_address))
|
||||
return false;
|
||||
|
||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT c.`active`
|
||||
FROM `'._DB_PREFIX_.'address` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = a.`id_country`
|
||||
WHERE a.`id_address` = '.(int)$id_address))
|
||||
return false;
|
||||
return ($result['active']);
|
||||
$cache_id = 'Address::isCountryActiveById_'.(int)$id_address;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getvalue('
|
||||
SELECT c.`active`
|
||||
FROM `'._DB_PREFIX_.'address` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = a.`id_country`
|
||||
WHERE a.`id_address` = '.(int)$id_address);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -324,12 +328,17 @@ class AddressCore extends ObjectModel
|
||||
{
|
||||
if (!$id_customer)
|
||||
return false;
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT `id_address`
|
||||
FROM `'._DB_PREFIX_.'address`
|
||||
WHERE `id_customer` = '.(int)$id_customer.' AND `deleted` = 0'.($active ? ' AND `active` = 1' : '')
|
||||
);
|
||||
$cache_id = 'Address::getFirstCustomerAddressId_'.(int)$id_customer.'-'.(bool)$active;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT `id_address`
|
||||
FROM `'._DB_PREFIX_.'address`
|
||||
WHERE `id_customer` = '.(int)$id_customer.' AND `deleted` = 0'.($active ? ' AND `active` = 1' : '')
|
||||
);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -379,5 +388,4 @@ class AddressCore extends ObjectModel
|
||||
$query->where('id_warehouse = 0');
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -99,6 +99,7 @@ class AddressFormatCore extends ObjectModel
|
||||
'outstanding_allow_amount',
|
||||
'call_prefix',
|
||||
'definition',
|
||||
'debug_list'
|
||||
);
|
||||
|
||||
public static $forbiddenClassList = array(
|
||||
|
||||
@@ -137,24 +137,18 @@ class Autoload
|
||||
|
||||
// Write classes index on disc to cache it
|
||||
$filename = $this->root_dir.Autoload::INDEX_FILE;
|
||||
if ((file_exists($filename) && !is_writable($filename)) || !is_writable(dirname($filename)))
|
||||
$filename_tmp = tempnam(dirname($filename), basename($filename.'.'));
|
||||
if ($filename_tmp !== false && file_put_contents($filename_tmp, $content, LOCK_EX) !== false)
|
||||
{
|
||||
header('HTTP/1.1 503 temporarily overloaded');
|
||||
// Cannot use PrestaShopException in this context
|
||||
die('/cache/class_index.php is not writable, please give write permissions (chmod 666) on this file.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$filename_tmp = tempnam(dirname($filename), basename($filename.'.'));
|
||||
if($filename_tmp !== FALSE and file_put_contents($filename_tmp, $content, LOCK_EX) !== FALSE)
|
||||
{
|
||||
@rename($filename_tmp, $filename);
|
||||
@chmod($filename, 0666);
|
||||
}
|
||||
if (!rename($filename_tmp, $filename))
|
||||
unlink($filename_tmp);
|
||||
else
|
||||
// $filename_tmp couldn't be written. $filename should be there anyway (even if outdated), no need to die.
|
||||
error_log('Cannot write temporary file '.$filename_tmp);
|
||||
@chmod($filename, 0666);
|
||||
}
|
||||
// $filename_tmp couldn't be written. $filename should be there anyway (even if outdated), no need to die.
|
||||
else
|
||||
error_log('Cannot write temporary file '.$filename_tmp);
|
||||
|
||||
$this->index = $classes;
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ class CMSCore extends ObjectModel
|
||||
return (Db::getInstance()->getValue($sql));
|
||||
}
|
||||
|
||||
public static function getCMSPages($id_lang = null, $id_cms_category = null, $active = true)
|
||||
public static function getCMSPages($id_lang = null, $id_cms_category = null, $active = true, $id_shop = null)
|
||||
{
|
||||
$sql = new DbQuery();
|
||||
$sql->select('*');
|
||||
@@ -198,6 +198,9 @@ class CMSCore extends ObjectModel
|
||||
if ($id_lang)
|
||||
$sql->innerJoin('cms_lang', 'l', 'c.id_cms = l.id_cms AND l.id_lang = '.(int)$id_lang);
|
||||
|
||||
if ($id_shop)
|
||||
$sql->innerJoin('cms_shop', 'cs', 'c.id_cms = cs.id_cms AND cs.id_shop = '.(int)$id_shop);
|
||||
|
||||
if ($active)
|
||||
$sql->where('c.active = 1');
|
||||
|
||||
|
||||
@@ -277,17 +277,20 @@ class CarrierCore extends ObjectModel
|
||||
|
||||
public function getMaxDeliveryPriceByWeight($id_zone)
|
||||
{
|
||||
$sql = 'SELECT d.`price`
|
||||
FROM `'._DB_PREFIX_.'delivery` d
|
||||
INNER JOIN `'._DB_PREFIX_.'range_weight` w ON d.`id_range_weight` = w.`id_range_weight`
|
||||
WHERE d.`id_zone` = '.(int)$id_zone.'
|
||||
AND d.`id_carrier` = '.(int)$this->id.'
|
||||
'.Carrier::sqlDeliveryRangeShop('range_weight').'
|
||||
ORDER BY w.`delimiter2` DESC LIMIT 1';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
if (!isset($result[0]['price']))
|
||||
return false;
|
||||
return $result[0]['price'];
|
||||
$cache_id = 'Carrier::getMaxDeliveryPriceByWeight_'.(int)$this->id.'-'.(int)$id_zone;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = 'SELECT d.`price`
|
||||
FROM `'._DB_PREFIX_.'delivery` d
|
||||
INNER JOIN `'._DB_PREFIX_.'range_weight` w ON d.`id_range_weight` = w.`id_range_weight`
|
||||
WHERE d.`id_zone` = '.(int)$id_zone.'
|
||||
AND d.`id_carrier` = '.(int)$this->id.'
|
||||
'.Carrier::sqlDeliveryRangeShop('range_weight').'
|
||||
ORDER BY w.`delimiter2` DESC';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -357,17 +360,20 @@ class CarrierCore extends ObjectModel
|
||||
|
||||
public function getMaxDeliveryPriceByPrice($id_zone)
|
||||
{
|
||||
$sql = 'SELECT d.`price`
|
||||
FROM `'._DB_PREFIX_.'delivery` d
|
||||
INNER JOIN `'._DB_PREFIX_.'range_price` r ON d.`id_range_price` = r.`id_range_price`
|
||||
WHERE d.`id_zone` = '.(int)$id_zone.'
|
||||
AND d.`id_carrier` = '.(int)$this->id.'
|
||||
'.Carrier::sqlDeliveryRangeShop('range_price').'
|
||||
ORDER BY r.`delimiter2` DESC LIMIT 1';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
if (!isset($result[0]['price']))
|
||||
return false;
|
||||
return $result[0]['price'];
|
||||
$cache_id = 'Carrier::getMaxDeliveryPriceByPrice_'.(int)$this->id.'-'.(int)$id_zone;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = 'SELECT d.`price`
|
||||
FROM `'._DB_PREFIX_.'delivery` d
|
||||
INNER JOIN `'._DB_PREFIX_.'range_price` r ON d.`id_range_price` = r.`id_range_price`
|
||||
WHERE d.`id_zone` = '.(int)$id_zone.'
|
||||
AND d.`id_carrier` = '.(int)$this->id.'
|
||||
'.Carrier::sqlDeliveryRangeShop('range_price').'
|
||||
ORDER BY r.`delimiter2` DESC';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -449,7 +455,13 @@ class CarrierCore extends ObjectModel
|
||||
GROUP BY c.`id_carrier`
|
||||
ORDER BY c.`position` ASC';
|
||||
|
||||
$carriers = Db::getInstance()->executeS($sql);
|
||||
$cache_id = 'Carrier::getCarriers_'.md5($sql);
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$carriers = Db::getInstance()->executeS($sql);
|
||||
Cache::store($cache_id, $carriers);
|
||||
}
|
||||
$carriers = Cache::retrieve($cache_id);
|
||||
|
||||
if (is_array($carriers) && count($carriers))
|
||||
{
|
||||
@@ -1199,7 +1211,14 @@ class CarrierCore extends ObjectModel
|
||||
$query->where('pc.id_product = '.(int)$product->id);
|
||||
$query->where('pc.id_shop = '.(int)$id_shop);
|
||||
|
||||
$carriers_for_product = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||
$cache_id = 'Carrier::getAvailableCarrierList_'.(int)$product->id.'-'.(int)$id_shop;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$carriers_for_product = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||
Cache::store($cache_id, $carriers_for_product);
|
||||
}
|
||||
$carriers_for_product = Cache::retrieve($cache_id);
|
||||
|
||||
$carrier_list = array();
|
||||
if (!empty($carriers_for_product))
|
||||
{
|
||||
|
||||
@@ -325,7 +325,7 @@ class CartCore extends ObjectModel
|
||||
if (!CartRule::isFeatureActive() || !$this->id)
|
||||
return array();
|
||||
|
||||
$cache_key = 'Cart::getCartRules'.$this->id.'-'.$filter;
|
||||
$cache_key = 'Cart::getCartRules_'.$this->id.'-'.$filter;
|
||||
if (!Cache::isStored($cache_key))
|
||||
{
|
||||
$result = Db::getInstance()->executeS('
|
||||
@@ -368,12 +368,16 @@ class CartCore extends ObjectModel
|
||||
{
|
||||
if (!CartRule::isFeatureActive())
|
||||
return 0;
|
||||
|
||||
return Db::getInstance()->getValue('
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'cart_cart_rule`
|
||||
WHERE `id_cart_rule` = '.(int)$id_cart_rule.' AND `id_cart` = '.(int)$this->id
|
||||
);
|
||||
$cache_id = 'Cart::getDiscountsCustomer_'.(int)$this->id.'-'.(int)$id_cart_rule;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (int)Db::getInstance()->getValue('
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'cart_cart_rule`
|
||||
WHERE `id_cart_rule` = '.(int)$id_cart_rule.' AND `id_cart` = '.(int)$this->id);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
public function getLastProduct()
|
||||
@@ -632,14 +636,19 @@ class CartCore extends ObjectModel
|
||||
|
||||
if (!isset($row['pai_id_image']) || $row['pai_id_image'] == 0)
|
||||
{
|
||||
$row2 = Db::getInstance()->getRow('
|
||||
SELECT image_shop.`id_image` id_image, il.`legend`
|
||||
FROM `'._DB_PREFIX_.'image` i
|
||||
JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (i.id_image = image_shop.id_image AND image_shop.cover=1 AND image_shop.id_shop='.(int)$row['id_shop'].')
|
||||
LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$this->id_lang.')
|
||||
WHERE i.`id_product` = '.(int)$row['id_product'].' AND image_shop.`cover` = 1'
|
||||
);
|
||||
|
||||
$cache_id = 'Cart::getProducts_'.'-pai_id_image-'.(int)$row['id_product'].'-'.(int)$this->id_lang.'-'.(int)$row['id_shop'];
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$row2 = Db::getInstance()->getRow('
|
||||
SELECT image_shop.`id_image` id_image, il.`legend`
|
||||
FROM `'._DB_PREFIX_.'image` i
|
||||
JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (i.id_image = image_shop.id_image AND image_shop.cover=1 AND image_shop.id_shop='.(int)$row['id_shop'].')
|
||||
LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$this->id_lang.')
|
||||
WHERE i.`id_product` = '.(int)$row['id_product'].' AND image_shop.`cover` = 1'
|
||||
);
|
||||
Cache::store($cache_id, $row2);
|
||||
}
|
||||
$row2 = Cache::retrieve($cache_id);
|
||||
if (!$row2)
|
||||
$row2 = array('id_image' => false, 'legend' => false);
|
||||
else
|
||||
@@ -727,7 +736,7 @@ class CartCore extends ObjectModel
|
||||
*
|
||||
* @result integer Products quantity
|
||||
*/
|
||||
public function nbProducts()
|
||||
public function nbProducts()
|
||||
{
|
||||
if (!$this->id)
|
||||
return 0;
|
||||
@@ -1078,9 +1087,9 @@ class CartCore extends ObjectModel
|
||||
);
|
||||
$id_customization = Db::getInstance()->Insert_ID();
|
||||
}
|
||||
|
||||
|
||||
$query = 'INSERT INTO `'._DB_PREFIX_.'customized_data` (`id_customization`, `type`, `index`, `value`)
|
||||
VALUES ('.(int)$id_customization.', '.(int)$type.', '.(int)$index.', \''.pSql($field).'\')';
|
||||
VALUES ('.(int)$id_customization.', '.(int)$type.', '.(int)$index.', \''.pSQL($field).'\')';
|
||||
|
||||
if (!Db::getInstance()->execute($query))
|
||||
return false;
|
||||
@@ -1094,7 +1103,13 @@ class CartCore extends ObjectModel
|
||||
*/
|
||||
public function orderExists()
|
||||
{
|
||||
return (bool)Db::getInstance()->getValue('SELECT count(*) FROM `'._DB_PREFIX_.'orders` WHERE `id_cart` = '.(int)$this->id);
|
||||
$cache_id = 'Cart::orderExists_'.(int)$this->id;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (bool)Db::getInstance()->getValue('SELECT count(*) FROM `'._DB_PREFIX_.'orders` WHERE `id_cart` = '.(int)$this->id);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2277,18 +2292,23 @@ class CartCore extends ObjectModel
|
||||
public function getAddressCollection()
|
||||
{
|
||||
$collection = array();
|
||||
$result = Db::getInstance()->executeS(
|
||||
'SELECT DISTINCT `id_address_delivery`
|
||||
FROM `'._DB_PREFIX_.'cart_product`
|
||||
WHERE id_cart = '.(int)$this->id
|
||||
);
|
||||
$cache_id = 'Cart::getAddressCollection'.(int)$this->id;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance()->executeS(
|
||||
'SELECT DISTINCT `id_address_delivery`
|
||||
FROM `'._DB_PREFIX_.'cart_product`
|
||||
WHERE id_cart = '.(int)$this->id
|
||||
);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
$result = Cache::retrieve($cache_id);
|
||||
|
||||
$result[] = array('id_address_delivery' => (int)$this->id_address_delivery);
|
||||
|
||||
foreach ($result as $row)
|
||||
if ((int)$row['id_address_delivery'] != 0)
|
||||
$collection[(int)$row['id_address_delivery']] = new Address((int)$row['id_address_delivery']);
|
||||
|
||||
return $collection;
|
||||
}
|
||||
|
||||
@@ -3038,7 +3058,6 @@ class CartCore extends ObjectModel
|
||||
*/
|
||||
public function addTextFieldToProduct($id_product, $index, $type, $text_value)
|
||||
{
|
||||
$text_value = str_replace(array("\n", "\r"), '', nl2br($text_value));
|
||||
if (!_PS_MAGIC_QUOTES_GPC_){
|
||||
$text_value = str_replace('\\', '\\\\', $text_value);
|
||||
$text_value = str_replace('\'', '\\\'', $text_value);
|
||||
@@ -3466,10 +3485,14 @@ class CartCore extends ObjectModel
|
||||
)
|
||||
WHERE `id_cart` = '.(int)$this->id.'
|
||||
'.(Configuration::get('PS_ALLOW_MULTISHIPPING') ? ' AND `id_shop` = '.(int)$this->id_shop : '');
|
||||
|
||||
$result = Db::getInstance()->execute($sql);
|
||||
if ($result)
|
||||
$emptyCache = true;
|
||||
|
||||
$cache_id = 'Cart::setNoMultishipping'.(int)$this->id.'-'.(int)$this->id_shop;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
if ($result = (bool)Db::getInstance()->execute($sql))
|
||||
$emptyCache = true;
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
|
||||
if (Customization::isFeatureActive())
|
||||
Db::getInstance()->execute('
|
||||
|
||||
@@ -132,7 +132,12 @@ class CartRuleCore extends ObjectModel
|
||||
public function update($null_values = false)
|
||||
{
|
||||
Cache::clean('getContextualValue_'.$this->id.'_*');
|
||||
return parent::update($null_values);
|
||||
if (!parent::update($null_values))
|
||||
return false;
|
||||
|
||||
Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', CartRule::isCurrentlyUsed($this->def['table'], true));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,7 +259,8 @@ class CartRuleCore extends ObjectModel
|
||||
}
|
||||
else
|
||||
$cart_rule['quantity_for_user'] = 0;
|
||||
|
||||
unset($cart_rule);
|
||||
|
||||
foreach ($result as $cart_rule)
|
||||
if ($cart_rule['shop_restriction'])
|
||||
{
|
||||
|
||||
@@ -666,9 +666,9 @@ class CategoryCore extends ObjectModel
|
||||
* @param boolean $active return only active categories
|
||||
* @return array categories
|
||||
*/
|
||||
public static function getHomeCategories($id_lang, $active = true)
|
||||
public static function getHomeCategories($id_lang, $active = true, $id_shop = false)
|
||||
{
|
||||
return self::getChildren(Configuration::get('PS_HOME_CATEGORY'), $id_lang, $active);
|
||||
return self::getChildren(Configuration::get('PS_HOME_CATEGORY'), $id_lang, $active, $id_shop);
|
||||
}
|
||||
|
||||
public static function getRootCategory($id_lang = null, Shop $shop = null)
|
||||
@@ -704,16 +704,22 @@ class CategoryCore extends ObjectModel
|
||||
if (!Validate::isBool($active))
|
||||
die(Tools::displayError());
|
||||
|
||||
$query = 'SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, category_shop.`id_shop`
|
||||
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 `id_lang` = '.(int)$id_lang.'
|
||||
AND c.`id_parent` = '.(int)$id_parent.'
|
||||
'.($active ? 'AND `active` = 1' : '').'
|
||||
GROUP BY c.`id_category`
|
||||
ORDER BY category_shop.`position` ASC';
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||
$cache_id = 'Category::getChildren_'.(int)$id_parent.'-'.(int)$id_lang.'-'.(bool)$active.'-'.(int)$id_shop;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$query = 'SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, category_shop.`id_shop`
|
||||
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 `id_lang` = '.(int)$id_lang.'
|
||||
AND c.`id_parent` = '.(int)$id_parent.'
|
||||
'.($active ? 'AND `active` = 1' : '').'
|
||||
GROUP BY c.`id_category`
|
||||
ORDER BY category_shop.`position` ASC';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1008,14 +1014,20 @@ class CategoryCore extends ObjectModel
|
||||
public function getGroups()
|
||||
{
|
||||
$groups = array();
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT cg.`id_group`
|
||||
FROM '._DB_PREFIX_.'category_group cg
|
||||
WHERE cg.`id_category` = '.(int)$this->id
|
||||
);
|
||||
foreach ($result as $group)
|
||||
$groups[] = $group['id_group'];
|
||||
return $groups;
|
||||
$cache_id = 'Category::getGroups_'.(int)$this->id;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT cg.`id_group`
|
||||
FROM '._DB_PREFIX_.'category_group cg
|
||||
WHERE cg.`id_category` = '.(int)$this->id
|
||||
);
|
||||
$groups = array();
|
||||
foreach ($result as $group)
|
||||
$groups[] = $group['id_group'];
|
||||
Cache::store($cache_id, $groups);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
public function addGroupsIfNoExist($id_group)
|
||||
@@ -1036,24 +1048,23 @@ class CategoryCore extends ObjectModel
|
||||
*/
|
||||
public function checkAccess($id_customer)
|
||||
{
|
||||
if (!$id_customer)
|
||||
$cache_id = 'Category::checkAccess_'.(int)$this->id.'-'.$id_customer.(!$id_customer ? '-'.(int)Group::getCurrent()->id : '');
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
if (!$id_customer)
|
||||
$result = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT ctg.`id_group`
|
||||
FROM '._DB_PREFIX_.'category_group ctg
|
||||
WHERE ctg.`id_category` = '.(int)$this->id.' AND ctg.`id_group` = '.(int)Group::getCurrent()->id.'
|
||||
');
|
||||
} else {
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
WHERE ctg.`id_category` = '.(int)$this->id.' AND ctg.`id_group` = '.(int)Group::getCurrent()->id);
|
||||
else
|
||||
$result = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT ctg.`id_group`
|
||||
FROM '._DB_PREFIX_.'category_group ctg
|
||||
INNER JOIN '._DB_PREFIX_.'customer_group cg on (cg.`id_group` = ctg.`id_group` AND cg.`id_customer` = '.(int)$id_customer.')
|
||||
WHERE ctg.`id_category` = '.(int)$this->id
|
||||
);
|
||||
WHERE ctg.`id_category` = '.(int)$this->id);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
if ($result && isset($result['id_group']) && $result['id_group'])
|
||||
return true;
|
||||
return false;
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1199,12 +1210,16 @@ class CategoryCore extends ObjectModel
|
||||
*/
|
||||
public static function getInterval($id)
|
||||
{
|
||||
$sql = 'SELECT nleft, nright, level_depth
|
||||
FROM '._DB_PREFIX_.'category
|
||||
WHERE id_category = '.(int)$id;
|
||||
if (!$result = Db::getInstance()->getRow($sql))
|
||||
return false;
|
||||
return $result;
|
||||
$cache_id = 'Category::getInterval_'.(int)$id;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = 'SELECT nleft, nright, level_depth
|
||||
FROM '._DB_PREFIX_.'category
|
||||
WHERE id_category = '.(int)$id;
|
||||
$result = Db::getInstance()->getRow($sql);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1386,11 +1401,17 @@ class CategoryCore extends ObjectModel
|
||||
|
||||
public static function getCategoriesWithoutParent()
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT DISTINCT c.*
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
WHERE `level_depth` = 1');
|
||||
$cache_id = 'Category::getCategoriesWithoutParent_'.(int)Context::getContext()->language->id;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT DISTINCT c.*
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
WHERE `level_depth` = 1');
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
public function isRootCategoryForAShop()
|
||||
@@ -1409,12 +1430,17 @@ class CategoryCore extends ObjectModel
|
||||
public static function getTopCategory($id_lang = null)
|
||||
{
|
||||
if (is_null($id_lang))
|
||||
$id_lang = Context::getContext()->language->id;
|
||||
$id_category = Db::getInstance()->getValue('
|
||||
SELECT `id_category`
|
||||
FROM `'._DB_PREFIX_.'category`
|
||||
WHERE `id_parent` = 0');
|
||||
return new Category($id_category, $id_lang);
|
||||
$id_lang = (int)Context::getContext()->language->id;
|
||||
$cache_id = 'Category::getTopCategory_'.(int)$id_lang;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$id_category = (int)Db::getInstance()->getValue('
|
||||
SELECT `id_category`
|
||||
FROM `'._DB_PREFIX_.'category`
|
||||
WHERE `id_parent` = 0');
|
||||
Cache::store($cache_id, new Category($id_category, $id_lang));
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
public function addPosition($position, $id_shop = null)
|
||||
|
||||
@@ -296,10 +296,16 @@ class CurrencyCore extends ObjectModel
|
||||
*/
|
||||
public static function getIdByIsoCode($iso_code, $id_shop = 0)
|
||||
{
|
||||
$query = Currency::getIdByQuery($id_shop);
|
||||
$query->where('iso_code = \''.pSQL($iso_code).'\'');
|
||||
|
||||
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build());
|
||||
$cache_id = 'Currency::getIdByIsoCode_'.pSQL($iso_code).'-'.(int)$id_shop;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$query = Currency::getIdByQuery($id_shop);
|
||||
$query->where('iso_code = \''.pSQL($iso_code).'\'');
|
||||
|
||||
$result = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build());
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -362,15 +362,18 @@ class CustomerCore extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_customer))
|
||||
return true;
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT `id_customer`
|
||||
FROM `'._DB_PREFIX_.'customer`
|
||||
WHERE `id_customer` = \''.(int)$id_customer.'\'
|
||||
AND active = 1
|
||||
AND `deleted` = 0');
|
||||
if (isset($result['id_customer']))
|
||||
return false;
|
||||
return true;
|
||||
$cache_id = 'Customer::isBanned_'.(int)$id_customer;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (bool)!Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT `id_customer`
|
||||
FROM `'._DB_PREFIX_.'customer`
|
||||
WHERE `id_customer` = \''.(int)$id_customer.'\'
|
||||
AND active = 1
|
||||
AND `deleted` = 0');
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -413,7 +416,7 @@ class CustomerCore extends ObjectModel
|
||||
public static function customerHasAddress($id_customer, $id_address)
|
||||
{
|
||||
$key = (int)$id_customer.'-'.(int)$id_address;
|
||||
if (!array_key_exists($id_address, self::$_customerHasAddress))
|
||||
if (!array_key_exists($key, self::$_customerHasAddress))
|
||||
{
|
||||
self::$_customerHasAddress[$key] = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT `id_address`
|
||||
@@ -439,15 +442,22 @@ class CustomerCore extends ObjectModel
|
||||
*/
|
||||
public function getAddresses($id_lang)
|
||||
{
|
||||
$sql = 'SELECT DISTINCT a.*, cl.`name` AS country, s.name AS state, s.iso_code AS state_iso
|
||||
FROM `'._DB_PREFIX_.'address` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON (a.`id_country` = c.`id_country`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = a.`id_state`)
|
||||
'.(Context::getContext()->shop->getGroup()->share_order ? '' : Shop::addSqlAssociation('country', 'c')).'
|
||||
WHERE `id_lang` = '.(int)$id_lang.' AND `id_customer` = '.(int)$this->id.' AND a.`deleted` = 0';
|
||||
$share_order = (bool)Context::getContext()->shop->getGroup()->share_order;
|
||||
$cache_id = 'Customer::getAddresses'.(int)$this->id.'-'.(int)$id_lang.'-'.$share_order;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = 'SELECT DISTINCT a.*, cl.`name` AS country, s.name AS state, s.iso_code AS state_iso
|
||||
FROM `'._DB_PREFIX_.'address` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON (a.`id_country` = c.`id_country`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = a.`id_state`)
|
||||
'.($share_order ? '' : Shop::addSqlAssociation('country', 'c')).'
|
||||
WHERE `id_lang` = '.(int)$id_lang.' AND `id_customer` = '.(int)$this->id.' AND a.`deleted` = 0';
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -476,12 +486,17 @@ class CustomerCore extends ObjectModel
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_customer) || !Validate::isMd5($passwd))
|
||||
die (Tools::displayError());
|
||||
|
||||
$sql = 'SELECT `id_customer`
|
||||
FROM `'._DB_PREFIX_.'customer`
|
||||
WHERE `id_customer` = '.$id_customer.'
|
||||
$cache_id = 'Customer::checkPassword'.(int)$id_customer.'-'.$passwd;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = 'SELECT `id_customer`
|
||||
FROM `'._DB_PREFIX_.'customer`
|
||||
WHERE `id_customer` = '.$id_customer.'
|
||||
AND `passwd` = \''.$passwd.'\'';
|
||||
return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
||||
$result = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -574,12 +589,16 @@ class CustomerCore extends ObjectModel
|
||||
|
||||
public static function customerIdExistsStatic($id_customer)
|
||||
{
|
||||
$row = Db::getInstance()->getRow('
|
||||
SELECT `id_customer`
|
||||
FROM '._DB_PREFIX_.'customer c
|
||||
WHERE c.`id_customer` = '.(int)$id_customer);
|
||||
|
||||
return isset($row['id_customer']);
|
||||
$cache_id = 'Customer::customerIdExistsStatic'.(int)$id_customer;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (int)Db::getInstance()->getValue('
|
||||
SELECT `id_customer`
|
||||
FROM '._DB_PREFIX_.'customer c
|
||||
WHERE c.`id_customer` = '.(int)$id_customer);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -105,8 +105,10 @@ class QqUploadedFileForm
|
||||
$legends = Tools::getValue('legend');
|
||||
if (is_array($legends))
|
||||
foreach ($legends as $key => $legend)
|
||||
if (!empty($legend))
|
||||
if (!empty($legend) && Validate::isGenericName($legend))
|
||||
$image->legend[(int)$key] = $legend;
|
||||
else
|
||||
return array('error' => sprintf(Tools::displayError('Error on image legend "%1s." is not a valid legend.'), Tools::safeOutput($legend)));
|
||||
if (!Image::getCover($image->id_product))
|
||||
$image->cover = 1;
|
||||
else
|
||||
@@ -192,8 +194,10 @@ class QqUploadedFileXhr
|
||||
$legends = Tools::getValue('legend');
|
||||
if (is_array($legends))
|
||||
foreach ($legends as $key => $legend)
|
||||
if (!empty($legend))
|
||||
if (!empty($legend) && Validate::isGenericName($legend))
|
||||
$image->legend[(int)$key] = $legend;
|
||||
else
|
||||
return array('error' => sprintf(Tools::displayError('Error on image legend "%1s." is not a valid legend.'), Tools::safeOutput($legend)));
|
||||
if (!Image::getCover($image->id_product))
|
||||
$image->cover = 1;
|
||||
else
|
||||
|
||||
@@ -305,12 +305,21 @@ class GroupCore extends ObjectModel
|
||||
public static function getCurrent()
|
||||
{
|
||||
static $groups = array();
|
||||
|
||||
$customer = Context::getContext()->customer;
|
||||
if (Validate::isLoadedObject($customer))
|
||||
{
|
||||
$id_group = (int)$customer->id_default_group;
|
||||
$group = new Group((int)$id_group);
|
||||
if (!$group->isAssociatedToShop(Context::getContext()->shop->id))
|
||||
$group = new Group((int)Configuration::get('PS_CUSTOMER_GROUP'));
|
||||
}
|
||||
else
|
||||
$id_group = (int)Configuration::get('PS_UNIDENTIFIED_GROUP');
|
||||
|
||||
|
||||
if (!isset($groups[$id_group]) && isset($group))
|
||||
$groups[$id_group] = $group;
|
||||
|
||||
if (!isset($groups[$id_group]))
|
||||
$groups[$id_group] = new Group($id_group);
|
||||
|
||||
|
||||
@@ -326,7 +326,10 @@ class HookCore extends ObjectModel
|
||||
if ($frontend)
|
||||
{
|
||||
$sql->leftJoin('module_group', 'mg', 'mg.`id_module` = m.`id_module`');
|
||||
$sql->where('mg.`id_group` IN ('.implode(', ', $groups).')');
|
||||
if (Validate::isLoadedObject($context->shop))
|
||||
$sql->where('mg.id_shop = '.((int)$context->shop->id).' AND mg.`id_group` IN ('.implode(', ', $groups).')');
|
||||
else
|
||||
$sql->where('mg.`id_group` IN ('.implode(', ', $groups).')');
|
||||
$sql->groupBy('hm.id_hook, hm.id_module');
|
||||
}
|
||||
|
||||
@@ -390,6 +393,10 @@ class HookCore extends ObjectModel
|
||||
*/
|
||||
public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true)
|
||||
{
|
||||
static $disable_non_native_modules = null;
|
||||
if ($disable_non_native_modules === null)
|
||||
$disable_non_native_modules = (bool)Configuration::get('PS_DISABLE_NON_NATIVE_MODULE');
|
||||
|
||||
// Check arguments validity
|
||||
if (($id_module && !is_numeric($id_module)) || !Validate::isHookName($hook_name))
|
||||
throw new PrestaShopException('Invalid id_module or hook_name');
|
||||
@@ -419,7 +426,7 @@ class HookCore extends ObjectModel
|
||||
$altern = 0;
|
||||
$output = '';
|
||||
|
||||
if (!isset(Hook::$native_module))
|
||||
if ($disable_non_native_modules && !isset(Hook::$native_module))
|
||||
Hook::$native_module = Module::getNativeModuleList();
|
||||
|
||||
foreach ($module_list as $array)
|
||||
@@ -428,7 +435,7 @@ class HookCore extends ObjectModel
|
||||
if ($id_module && $id_module != $array['id_module'])
|
||||
continue;
|
||||
|
||||
if ((bool)Configuration::get('PS_DISABLE_NON_NATIVE_MODULE') && !in_array($array['module'], self::$native_module))
|
||||
if ((bool)$disable_non_native_modules && Hook::$native_module && count(Hook::$native_module) && !in_array($array['module'], self::$native_module))
|
||||
continue;
|
||||
|
||||
if (!($moduleInstance = Module::getInstanceByName($array['module'])))
|
||||
|
||||
@@ -619,6 +619,35 @@ class LanguageCore extends ObjectModel
|
||||
return Db::getInstance()->getValue('SELECT `language_code` FROM `'._DB_PREFIX_.'lang` WHERE `iso_code` = \''.pSQL(strtolower($iso_code)).'\'');
|
||||
}
|
||||
|
||||
public static function getLanguageByIETFCode($code)
|
||||
{
|
||||
if (!Validate::isLanguageCode($code))
|
||||
die(sprintf(Tools::displayError('Fatal error: IETF code %s is not correct'), $code));
|
||||
|
||||
// $code is in the form of 'xx-YY' where xx is the language code
|
||||
// and 'YY' a country code identifying a variant of the language.
|
||||
$lang_country = explode('-', $code);
|
||||
// Get the language component of the code
|
||||
$lang = $lang_country[0];
|
||||
|
||||
// Find the id_lang of the language.
|
||||
// We look for anything with the correct language code
|
||||
// and sort on equality with the exact IETF code wanted.
|
||||
// That way using only one query we get either the exact wanted language
|
||||
// or a close match.
|
||||
$id_lang = Db::getInstance()->getValue(
|
||||
'SELECT `id_lang` FROM '
|
||||
.'`'._DB_PREFIX_.'lang` WHERE LEFT(`language_code`,2) = \''.pSQL($lang).'\' '
|
||||
.'ORDER BY language_code = \''.pSQL($code).'\' DESC'
|
||||
);
|
||||
|
||||
// Instantiate the Language object if we found it.
|
||||
if ($id_lang)
|
||||
return new Language($id_lang);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return array (id_lang, iso_code)
|
||||
*
|
||||
|
||||
@@ -423,6 +423,15 @@ class LinkCore
|
||||
*/
|
||||
public function getPageLink($controller, $ssl = null, $id_lang = null, $request = null, $request_url_encode = false, $id_shop = null)
|
||||
{
|
||||
|
||||
//If $controller contains '&' char, it means that $controller contains request data and must be parsed first
|
||||
$p = strpos($controller, '&');
|
||||
if ($p !== false) {
|
||||
$request = substr($controller, $p + 1);
|
||||
$request_url_encode = false;
|
||||
$controller = substr($controller, 0, $p);
|
||||
}
|
||||
|
||||
$controller = Tools::strReplaceFirst('.php', '', $controller);
|
||||
if (!$id_lang)
|
||||
$id_lang = (int)Context::getContext()->language->id;
|
||||
@@ -501,6 +510,7 @@ class LinkCore
|
||||
|
||||
public function goPage($url, $p)
|
||||
{
|
||||
$url = rtrim(str_replace('?&', '?', $url), '?');
|
||||
return $url.($p == 1 ? '' : (!strstr($url, '?') ? '?' : '&').'p='.(int)$p);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ class LocalizationPackCore
|
||||
|
||||
if ($install_mode && $res && isset($this->iso_currency))
|
||||
{
|
||||
Cache::clean('Currency::getIdByIsoCode_*');
|
||||
$res &= Configuration::updateValue('PS_CURRENCY_DEFAULT', (int)Currency::getIdByIsoCode($this->iso_currency));
|
||||
Currency::refreshCurrencies();
|
||||
}
|
||||
|
||||
@@ -372,11 +372,11 @@ class MailCore
|
||||
|
||||
$file_core = _PS_ROOT_DIR_.'/mails/'.$iso_code.'/lang.php';
|
||||
if (Tools::file_exists_cache($file_core) && empty($_LANGMAIL))
|
||||
include_once($file_core);
|
||||
include($file_core);
|
||||
|
||||
$file_theme = _PS_THEME_DIR_.'mails/'.$iso_code.'/lang.php';
|
||||
if (Tools::file_exists_cache($file_theme))
|
||||
include_once($file_theme);
|
||||
include($file_theme);
|
||||
|
||||
if (!is_array($_LANGMAIL))
|
||||
return (str_replace('"', '"', $string));
|
||||
|
||||
@@ -37,9 +37,10 @@ class MediaCore
|
||||
'ui.selectable' => array('fileName' => 'jquery.ui.selectable.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
||||
'ui.sortable' => array('fileName' => 'jquery.ui.sortable.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
||||
'ui.accordion' => array('fileName' => 'jquery.ui.accordion.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true),
|
||||
'ui.autocomplete' => array('fileName' => 'jquery.ui.autocomplete.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.position'), 'theme' => true),
|
||||
'ui.autocomplete' => array('fileName' => 'jquery.ui.autocomplete.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.position', 'ui.menu'), 'theme' => true),
|
||||
'ui.button' => array('fileName' => 'jquery.ui.button.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true),
|
||||
'ui.dialog' => array('fileName' => 'jquery.ui.dialog.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.position','ui.button'), 'theme' => true),
|
||||
'ui.menu' => array('fileName' => 'jquery.ui.menu.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.position'), 'theme' => true),
|
||||
'ui.slider' => array('fileName' => 'jquery.ui.slider.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
||||
'ui.tabs' => array('fileName' => 'jquery.ui.tabs.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true),
|
||||
'ui.datepicker' => array('fileName' => 'jquery.ui.datepicker.min.js', 'dependencies' => array('ui.core'), 'theme' => true),
|
||||
@@ -109,7 +110,7 @@ class MediaCore
|
||||
|
||||
// If the string is too big preg_replace return an error
|
||||
// In this case, we don't compress the content
|
||||
if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR)
|
||||
if (function_exists('preg_last_error') && preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR)
|
||||
{
|
||||
if (_PS_MODE_DEV_)
|
||||
error_log('ERROR: PREG_BACKTRACK_LIMIT_ERROR in function packJSinHTML');
|
||||
|
||||
@@ -277,24 +277,31 @@ class MetaCore extends ObjectModel
|
||||
FROM `'._DB_PREFIX_.'category_lang` cl
|
||||
WHERE cl.`id_lang` = '.(int)$id_lang.'
|
||||
AND cl.`id_category` = '.(int)$id_category.Shop::addSqlRestrictionOnLang('cl');
|
||||
if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql))
|
||||
|
||||
$cache_id = 'Meta::getCategoryMetas'.(int)$id_category.'-'.(int)$id_lang;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
if (empty($row['meta_description']))
|
||||
$row['meta_description'] = strip_tags($row['description']);
|
||||
|
||||
// Paginate title
|
||||
if (!empty($row['meta_title']))
|
||||
$row['meta_title'] = $title.$row['meta_title'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
|
||||
if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql))
|
||||
{
|
||||
if (empty($row['meta_description']))
|
||||
$row['meta_description'] = strip_tags($row['description']);
|
||||
|
||||
// Paginate title
|
||||
if (!empty($row['meta_title']))
|
||||
$row['meta_title'] = $title.$row['meta_title'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
|
||||
else
|
||||
$row['meta_title'] = $row['name'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
|
||||
|
||||
if (!empty($title))
|
||||
$row['meta_title'] = $title.(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
|
||||
|
||||
$result = Meta::completeMetaTags($row, $row['name']);
|
||||
}
|
||||
else
|
||||
$row['meta_title'] = $row['name'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
|
||||
|
||||
if (!empty($title))
|
||||
$row['meta_title'] = $title.(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
|
||||
|
||||
return Meta::completeMetaTags($row, $row['name']);
|
||||
$result = Meta::getHomeMetas($id_lang, $page_name);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
|
||||
return Meta::getHomeMetas($id_lang, $page_name);
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -191,7 +191,7 @@ abstract class ObjectModelCore
|
||||
if ($id)
|
||||
{
|
||||
// Load object from database if object id is present
|
||||
$cache_id = 'objectmodel_'.$this->def['classname'].'_'.(int)$id.'_'.(int)$id_shop.'_'.(int)$id_lang;
|
||||
$cache_id = 'objectmodel_'.$this->def['classname'].'_'.(int)$id.'_'.(int)$this->id_shop.'_'.(int)$id_lang;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = new DbQuery();
|
||||
@@ -1234,11 +1234,16 @@ abstract class ObjectModelCore
|
||||
if ($id_shop === null)
|
||||
$id_shop = Context::getContext()->shop->id;
|
||||
|
||||
$sql = 'SELECT id_shop
|
||||
FROM `'.pSQL(_DB_PREFIX_.$this->def['table']).'_shop`
|
||||
WHERE `'.$this->def['primary'].'` = '.(int)$this->id.'
|
||||
AND id_shop = '.(int)$id_shop;
|
||||
return (bool)Db::getInstance()->getValue($sql);
|
||||
$cache_id = 'objectmodel_shop_'.$this->def['classname'].'_'.(int)$this->id.'-'.(int)$id_shop;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = 'SELECT id_shop
|
||||
FROM `'.pSQL(_DB_PREFIX_.$this->def['table']).'_shop`
|
||||
WHERE `'.$this->def['primary'].'` = '.(int)$this->id.'
|
||||
AND id_shop = '.(int)$id_shop;
|
||||
Cache::store($cache_id, (bool)Db::getInstance()->getValue($sql));
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -369,7 +369,8 @@ abstract class PaymentModuleCore extends Module
|
||||
$customization_text .= sprintf(Tools::displayError('%d image(s)'), count($customization['datas'][Product::CUSTOMIZE_FILE])).'<br />';
|
||||
$customization_text .= '---<br />';
|
||||
}
|
||||
$customization_text = rtrim($customization_text, '---<br />');
|
||||
|
||||
$customization_text = Tools::rtrimString($customization_text, '---<br />');
|
||||
|
||||
$customization_quantity = (int)$product['customization_quantity'];
|
||||
$products_list .=
|
||||
|
||||
@@ -229,7 +229,13 @@ class ProductCore extends ObjectModel
|
||||
protected static $_prices = array();
|
||||
protected static $_pricesLevel2 = array();
|
||||
protected static $_incat = array();
|
||||
|
||||
/**
|
||||
* @since 1.5.6.1
|
||||
* @var array $_cart_quantity is deprecated since 1.5.6.1
|
||||
*/
|
||||
protected static $_cart_quantity = array();
|
||||
|
||||
protected static $_tax_rules_group = array();
|
||||
protected static $_cacheFeatures = array();
|
||||
protected static $_frontFeaturesCache = array();
|
||||
@@ -2434,13 +2440,18 @@ class ProductCore extends ObjectModel
|
||||
{
|
||||
if (!$context)
|
||||
$context = Context::getContext();
|
||||
|
||||
$sql = 'SELECT image_shop.`id_image`
|
||||
FROM `'._DB_PREFIX_.'image` i
|
||||
'.Shop::addSqlAssociation('image', 'i').'
|
||||
WHERE i.`id_product` = '.(int)$id_product.'
|
||||
AND image_shop.`cover` = 1';
|
||||
return Db::getInstance()->getRow($sql);
|
||||
$cache_id = 'Product::getOrderStates_'.(int)$id_product.'-'.(int)$context->shop->id;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = 'SELECT image_shop.`id_image`
|
||||
FROM `'._DB_PREFIX_.'image` i
|
||||
'.Shop::addSqlAssociation('image', 'i').'
|
||||
WHERE i.`id_product` = '.(int)$id_product.'
|
||||
AND image_shop.`cover` = 1';
|
||||
$result = Db::getInstance()->getRow($sql);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2502,15 +2513,17 @@ class ProductCore extends ObjectModel
|
||||
$cart_quantity = 0;
|
||||
if ((int)$id_cart)
|
||||
{
|
||||
$condition = '';
|
||||
$cache_name = (int)$id_cart.'_'.(int)$id_product;
|
||||
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`)
|
||||
$cache_id = 'Product::getPriceStatic_'.(int)$id_product.'-'.(int)$id_cart;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$sql = 'SELECT SUM(`quantity`)
|
||||
FROM `'._DB_PREFIX_.'cart_product`
|
||||
WHERE `id_product` = '.(int)$id_product.'
|
||||
AND `id_cart` = '.(int)$id_cart);
|
||||
$cart_quantity = self::$_cart_quantity[$cache_name];
|
||||
AND `id_cart` = '.(int)$id_cart;
|
||||
$cart_quantity = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
||||
Cache::store($cache_id, $cart_quantity);
|
||||
}
|
||||
$cart_quantity = Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
$id_currency = (int)Validate::isLoadedObject($context->currency) ? $context->currency->id : Configuration::get('PS_CURRENCY_DEFAULT');
|
||||
@@ -4300,19 +4313,25 @@ class ProductCore extends ObjectModel
|
||||
|
||||
public function checkAccess($id_customer)
|
||||
{
|
||||
if (!$id_customer)
|
||||
return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT ctg.`id_group`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`)
|
||||
WHERE cp.`id_product` = '.(int)$this->id.' AND ctg.`id_group` ='.(int)Group::getCurrent()->id);
|
||||
else
|
||||
return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT cg.`id_group`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`)
|
||||
INNER JOIN `'._DB_PREFIX_.'customer_group` cg ON (cg.`id_group` = ctg.`id_group`)
|
||||
WHERE cp.`id_product` = '.(int)$this->id.' AND cg.`id_customer` = '.(int)$id_customer);
|
||||
$cache_id = 'Product::checkAccess_'.(int)$this->id.'-'.(int)$id_customer.(!$id_customer ? '-'.(int)Group::getCurrent()->id : '');
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
if (!$id_customer)
|
||||
$result = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT ctg.`id_group`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`)
|
||||
WHERE cp.`id_product` = '.(int)$this->id.' AND ctg.`id_group` = '.(int)Group::getCurrent()->id);
|
||||
else
|
||||
$result = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT cg.`id_group`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`)
|
||||
INNER JOIN `'._DB_PREFIX_.'customer_group` cg ON (cg.`id_group` = ctg.`id_group`)
|
||||
WHERE cp.`id_product` = '.(int)$this->id.' AND cg.`id_customer` = '.(int)$id_customer);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -4872,8 +4891,12 @@ class ProductCore extends ObjectModel
|
||||
*/
|
||||
public static function getAttributesParams($id_product, $id_product_attribute)
|
||||
{
|
||||
$id_lang = (int)Context::getContext()->language->id;
|
||||
$id_shop = (int)Context::getContext()->shop->id;
|
||||
$cache_id = 'Product::getAttributesParams_'.(int)$id_product.'-'.(int)$id_product_attribute.'-'.(int)$id_lang.'-'.(int)$id_shop;
|
||||
|
||||
// if blocklayered module is installed we check if user has set custom attribute name
|
||||
if (Module::isInstalled('blocklayered'))
|
||||
if (Module::isInstalled('blocklayered') && Module::isEnabled('blocklayered'))
|
||||
{
|
||||
$nb_custom_values = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT la.`id_attribute`, la.`url_name` as `name`
|
||||
@@ -4884,7 +4907,7 @@ class ProductCore extends ObjectModel
|
||||
ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'layered_indexable_attribute_lang_value` la
|
||||
ON (la.`id_attribute` = a.`id_attribute` AND la.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
ON (la.`id_attribute` = a.`id_attribute` AND la.`id_lang` = '.(int)$id_lang.')
|
||||
WHERE la.`url_name` IS NOT NULL AND la.`url_name` != \'\'
|
||||
AND pa.`id_product` = '.(int)$id_product.'
|
||||
AND pac.`id_product_attribute` = '.(int)$id_product_attribute);
|
||||
@@ -4902,7 +4925,7 @@ class ProductCore extends ObjectModel
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a
|
||||
ON (a.`id_attribute_group` = g.`id_attribute_group`)
|
||||
WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].'
|
||||
AND g.`id_lang` = '.(int)Context::getContext()->language->id.'
|
||||
AND g.`id_lang` = '.(int)$id_lang.'
|
||||
AND g.`url_name` IS NOT NULL AND g.`url_name` != \'\'');
|
||||
if (empty($group))
|
||||
{
|
||||
@@ -4912,7 +4935,7 @@ class ProductCore extends ObjectModel
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a
|
||||
ON (a.`id_attribute_group` = g.`id_attribute_group`)
|
||||
WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].'
|
||||
AND g.`id_lang` = '.(int)Context::getContext()->language->id.'
|
||||
AND g.`id_lang` = '.(int)$id_lang.'
|
||||
AND g.`name` IS NOT NULL');
|
||||
}
|
||||
$result[] = array_merge($attribute, $group[0]);
|
||||
@@ -4921,9 +4944,9 @@ class ProductCore extends ObjectModel
|
||||
SELECT DISTINCT a.`id_attribute_group`, al.`name`, agl.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (a.`id_attribute` = pac.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
@@ -4932,45 +4955,30 @@ class ProductCore extends ObjectModel
|
||||
WHERE pa.`id_product` = '.(int)$id_product.'
|
||||
AND pac.id_product_attribute = '.(int)$id_product_attribute.'
|
||||
AND a.`id_attribute` NOT IN('.implode(', ', $tab_id_attribute).')');
|
||||
$result = array_merge($values_not_custom, $result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT al.`name`, agl.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (al.`id_attribute` = a.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (pac.`id_attribute` = a.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pa.`id_product_attribute` = pac.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
WHERE pa.`id_product` = '.(int)$id_product.'
|
||||
AND pac.`id_product_attribute` = '.(int)$id_product_attribute.'
|
||||
AND agl.`id_lang` = '.(int)Context::getContext()->language->id);
|
||||
return array_merge($values_not_custom, $result);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT al.`name`, agl.`name` as `group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (al.`id_attribute` = a.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
ON (al.`id_attribute` = a.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (pac.`id_attribute` = a.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pa.`id_product_attribute` = pac.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')
|
||||
WHERE pa.`id_product` = '.(int)$id_product.'
|
||||
AND pac.`id_product_attribute` = '.(int)$id_product_attribute.'
|
||||
AND agl.`id_lang` = '.(int)Context::getContext()->language->id);
|
||||
AND agl.`id_lang` = '.(int)$id_lang);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
$result = Cache::retrieve($cache_id);
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -5270,7 +5278,10 @@ class ProductCore extends ObjectModel
|
||||
WHERE id_product='.(int)$this->id.Shop::addSqlRestriction()
|
||||
);
|
||||
else
|
||||
{
|
||||
$this->setFieldsToUpdate(array('advanced_stock_management' => true));
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -85,11 +85,11 @@ class ProductSaleCore
|
||||
foreach ($products as $product)
|
||||
$ids[$product['id_product']] = 1;
|
||||
$ids = array_keys($ids);
|
||||
$ids = array_filter($ids);
|
||||
sort($ids);
|
||||
$ids = count($ids) > 0 ? implode(',', $ids) : 'NULL';
|
||||
|
||||
//Main query
|
||||
if ($order_by == 'date_add')
|
||||
$sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity,
|
||||
pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`,
|
||||
pl.`meta_keywords`, pl.`meta_title`, pl.`name`,
|
||||
@@ -158,6 +158,7 @@ class ProductSaleCore
|
||||
$ids[$product['id_product']] = 1;
|
||||
$ids = array_keys($ids);
|
||||
sort($ids);
|
||||
$ids = array_filter($ids);
|
||||
$ids = count($ids) > 0 ? implode(',', $ids) : 'NULL';
|
||||
|
||||
//Main query
|
||||
|
||||
@@ -245,9 +245,10 @@ class RequestSqlCore extends ObjectModel
|
||||
*/
|
||||
public function cutAttribute($attr, $from)
|
||||
{
|
||||
if (preg_match('#^((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))\.((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$#i', $attr))
|
||||
$matches = array();
|
||||
if (preg_match('/((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))\.((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$/i', $attr, $matches, PREG_OFFSET_CAPTURE))
|
||||
{
|
||||
$tab = explode('.', str_replace(array('`', '(', ')'), '', $attr));
|
||||
$tab = explode('.', str_replace(array('`', '(', ')'), '', $matches[0][0]));
|
||||
if (!$table = $this->returnNameTable($tab[0], $from))
|
||||
return false;
|
||||
else
|
||||
@@ -256,9 +257,9 @@ class RequestSqlCore extends ObjectModel
|
||||
'attribut' => $tab[1],
|
||||
'string' => $attr);
|
||||
}
|
||||
elseif (preg_match('#^((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$#i', $attr))
|
||||
elseif (preg_match('/((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$/i', $attr, $matches, PREG_OFFSET_CAPTURE))
|
||||
{
|
||||
$attribut = str_replace(array('`', '(', ')'), '', $attr);
|
||||
$attribut = str_replace(array('`', '(', ')'), '', $matches[0][0]);
|
||||
if (!$table = $this->returnNameTable(false, $from))
|
||||
return false;
|
||||
else
|
||||
|
||||
@@ -80,13 +80,19 @@ class StateCore extends ObjectModel
|
||||
*/
|
||||
public static function getNameById($id_state)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT `name`
|
||||
FROM `'._DB_PREFIX_.'state`
|
||||
WHERE `id_state` = '.(int)$id_state
|
||||
);
|
||||
|
||||
return $result['name'];
|
||||
if (!$id_state)
|
||||
return false;
|
||||
$cache_id = 'State::getNameById_'.(int)$id_state;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT `name`
|
||||
FROM `'._DB_PREFIX_.'state`
|
||||
WHERE `id_state` = '.(int)$id_state
|
||||
);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,13 +103,19 @@ class StateCore extends ObjectModel
|
||||
*/
|
||||
public static function getIdByName($state)
|
||||
{
|
||||
$result = Db::getInstance()->getValue('
|
||||
SELECT `id_state`
|
||||
FROM `'._DB_PREFIX_.'state`
|
||||
WHERE `name` LIKE \''.pSQL($state).'\'
|
||||
');
|
||||
|
||||
return (int)$result;
|
||||
if (empty($state))
|
||||
return false;
|
||||
$cache_id = 'State::getNameById_'.pSQL($state);
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (int)Db::getInstance()->getValue('
|
||||
SELECT `id_state`
|
||||
FROM `'._DB_PREFIX_.'state`
|
||||
WHERE `name` LIKE \''.pSQL($state).'\'
|
||||
');
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -190,14 +190,20 @@ class TabCore extends ObjectModel
|
||||
*/
|
||||
public static function getTab($id_lang, $id_tab)
|
||||
{
|
||||
/* Tabs selection */
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'tab` t
|
||||
LEFT JOIN `'._DB_PREFIX_.'tab_lang` tl
|
||||
ON (t.`id_tab` = tl.`id_tab` AND tl.`id_lang` = '.(int)$id_lang.')
|
||||
WHERE t.`id_tab` = '.(int)$id_tab
|
||||
);
|
||||
$cache_id = 'Tab::getTab_'.(int)$id_lang.'-'.(int)$id_tab;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
/* Tabs selection */
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'tab` t
|
||||
LEFT JOIN `'._DB_PREFIX_.'tab_lang` tl
|
||||
ON (t.`id_tab` = tl.`id_tab` AND tl.`id_lang` = '.(int)$id_lang.')
|
||||
WHERE t.`id_tab` = '.(int)$id_tab
|
||||
);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -105,7 +105,7 @@ class TagCore extends ObjectModel
|
||||
{
|
||||
if (!Validate::isGenericName($tag))
|
||||
return false;
|
||||
$tag = trim(substr($tag, 0, self::$definition['fields']['name']['size']));
|
||||
$tag = trim(Tools::substr($tag, 0, self::$definition['fields']['name']['size']));
|
||||
$tag_obj = new Tag(null, $tag, (int)$id_lang);
|
||||
|
||||
/* Tag does not exist in database */
|
||||
|
||||
@@ -344,19 +344,14 @@ class ToolsCore
|
||||
}
|
||||
|
||||
/* Automatically detect language if not already defined, detect_language is set in Cookie::update */
|
||||
if ((!$cookie->id_lang || isset($cookie->detect_language)) && isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
|
||||
if ((!$cookie->id_lang && (isset($cookie->detect_language)) && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])))
|
||||
{
|
||||
$array = explode(',', Tools::strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
|
||||
if (Tools::strlen($array[0]) > 2)
|
||||
$array = explode(',', Tools::strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
|
||||
$string = $array[0];
|
||||
|
||||
if (Validate::isLanguageCode($string))
|
||||
{
|
||||
$tab = explode('-', $array[0]);
|
||||
$string = $tab[0];
|
||||
}
|
||||
else
|
||||
$string = $array[0];
|
||||
if (Validate::isLanguageIsoCode($string))
|
||||
{
|
||||
$lang = new Language(Language::getIdByIso($string));
|
||||
$lang = Language::getLanguageByIETFCode($string);
|
||||
if (Validate::isLoadedObject($lang) && $lang->active && $lang->isAssociatedToShop())
|
||||
{
|
||||
Context::getContext()->language = $lang;
|
||||
@@ -364,7 +359,7 @@ class ToolsCore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($cookie->detect_language))
|
||||
unset($cookie->detect_language);
|
||||
|
||||
@@ -374,7 +369,7 @@ class ToolsCore
|
||||
|
||||
$iso = Language::getIsoById((int)$cookie->id_lang);
|
||||
@include_once(_PS_THEME_DIR_.'lang/'.$iso.'.php');
|
||||
|
||||
|
||||
return $iso;
|
||||
}
|
||||
|
||||
@@ -402,6 +397,7 @@ class ToolsCore
|
||||
|| (($id_lang == $configuration_id_lang) && Validate::isUnsignedId($id_lang) && $id_lang != $cookie_id_lang))
|
||||
{
|
||||
$context->cookie->id_lang = $id_lang;
|
||||
|
||||
$language = new Language($id_lang);
|
||||
if (Validate::isLoadedObject($language) && $language->active)
|
||||
$context->language = $language;
|
||||
@@ -672,28 +668,25 @@ class ToolsCore
|
||||
public static function htmlentitiesUTF8($string, $type = ENT_QUOTES)
|
||||
{
|
||||
if (is_array($string))
|
||||
{
|
||||
$string = array_map(array('Tools', 'htmlentitiesUTF8'), $string);
|
||||
return (string)array_shift($string);
|
||||
}
|
||||
return array_map(array('Tools', 'htmlentitiesUTF8'), $string);
|
||||
|
||||
return htmlentities((string)$string, $type, 'utf-8');
|
||||
}
|
||||
|
||||
public static function htmlentitiesDecodeUTF8($string)
|
||||
{
|
||||
if (is_array($string))
|
||||
{
|
||||
$string = array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $string);
|
||||
return (string)array_shift($string);
|
||||
}
|
||||
return array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $string);
|
||||
|
||||
return html_entity_decode((string)$string, ENT_QUOTES, 'utf-8');
|
||||
}
|
||||
|
||||
public static function safePostVars()
|
||||
{
|
||||
if (!is_array($_POST))
|
||||
return array();
|
||||
$_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST);
|
||||
if (!isset($_POST) || !is_array($_POST))
|
||||
$_POST = array();
|
||||
else
|
||||
$_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1221,6 +1214,129 @@ class ToolsCore
|
||||
return (utf8_encode(substr($str, 0, $max_length - Tools::strlen($suffix)).$suffix));
|
||||
}
|
||||
|
||||
/*Copied from CakePHP String utility file*/
|
||||
public static function truncateString($text, $length = 120, $options = array())
|
||||
{
|
||||
$default = array(
|
||||
'ellipsis' => '...', 'exact' => true, 'html' => true
|
||||
);
|
||||
|
||||
$options = array_merge($default, $options);
|
||||
extract($options);
|
||||
|
||||
if ($html)
|
||||
{
|
||||
if (Tools::strlen(preg_replace('/<.*?>/', '', $text)) <= $length)
|
||||
return $text;
|
||||
|
||||
$totalLength = Tools::strlen(strip_tags($ellipsis));
|
||||
$openTags = array();
|
||||
$truncate = '';
|
||||
preg_match_all('/(<\/?([\w+]+)[^>]*>)?([^<>]*)/', $text, $tags, PREG_SET_ORDER);
|
||||
|
||||
foreach ($tags as $tag)
|
||||
{
|
||||
if (!preg_match('/img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param/s', $tag[2]))
|
||||
{
|
||||
if (preg_match('/<[\w]+[^>]*>/s', $tag[0]))
|
||||
array_unshift($openTags, $tag[2]);
|
||||
elseif (preg_match('/<\/([\w]+)[^>]*>/s', $tag[0], $closeTag))
|
||||
{
|
||||
$pos = array_search($closeTag[1], $openTags);
|
||||
if ($pos !== false)
|
||||
array_splice($openTags, $pos, 1);
|
||||
}
|
||||
}
|
||||
$truncate .= $tag[1];
|
||||
$contentLength = Tools::strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $tag[3]));
|
||||
|
||||
if ($contentLength + $totalLength > $length)
|
||||
{
|
||||
$left = $length - $totalLength;
|
||||
$entitiesLength = 0;
|
||||
|
||||
if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', $tag[3], $entities, PREG_OFFSET_CAPTURE))
|
||||
{
|
||||
foreach ($entities[0] as $entity)
|
||||
{
|
||||
if ($entity[1] + 1 - $entitiesLength <= $left)
|
||||
{
|
||||
$left--;
|
||||
$entitiesLength += Tools::strlen($entity[0]);
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$truncate .= Tools::substr($tag[3], 0, $left + $entitiesLength);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$truncate .= $tag[3];
|
||||
$totalLength += $contentLength;
|
||||
}
|
||||
|
||||
if ($totalLength >= $length)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Tools::strlen($text) <= $length)
|
||||
return $text;
|
||||
|
||||
$truncate = Tools::substr($text, 0, $length - Tools::strlen($ellipsis));
|
||||
}
|
||||
|
||||
if (!$exact)
|
||||
{
|
||||
$spacepos = mb_strrpos($truncate, ' ');
|
||||
if ($html)
|
||||
{
|
||||
$truncateCheck = Tools::substr($truncate, 0, $spacepos);
|
||||
$lastOpenTag = Tools::strrpos($truncateCheck, '<');
|
||||
$lastCloseTag = Tools::strrpos($truncateCheck, '>');
|
||||
|
||||
if ($lastOpenTag > $lastCloseTag)
|
||||
{
|
||||
preg_match_all('/<[\w]+[^>]*>/s', $truncate, $lastTagMatches);
|
||||
$lastTag = array_pop($lastTagMatches[0]);
|
||||
$spacepos = Tools::strrpos($truncate, $lastTag) + Tools::strlen($lastTag);
|
||||
}
|
||||
|
||||
$bits = Tools::substr($truncate, $spacepos);
|
||||
preg_match_all('/<\/([a-z]+)>/', $bits, $droppedTags, PREG_SET_ORDER);
|
||||
|
||||
if (!empty($droppedTags))
|
||||
{
|
||||
if (!empty($openTags))
|
||||
{
|
||||
foreach ($droppedTags as $closingTag)
|
||||
if (!in_array($closingTag[1], $openTags))
|
||||
array_unshift($openTags, $closingTag[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($droppedTags as $closingTag)
|
||||
$openTags[] = $closingTag[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$truncate = Tools::substr($truncate, 0, $spacepos);
|
||||
}
|
||||
|
||||
$truncate .= $ellipsis;
|
||||
|
||||
if ($html)
|
||||
foreach ($openTags as $tag)
|
||||
$truncate .= '</' . $tag . '>';
|
||||
|
||||
return $truncate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate date form
|
||||
*
|
||||
@@ -1319,6 +1435,13 @@ class ToolsCore
|
||||
return substr($str, $start, ($length === false ? Tools::strlen($str) : (int)$length));
|
||||
}
|
||||
|
||||
public static function strrpos($str, $find, $offset = 0, $encoding = 'utf-8')
|
||||
{
|
||||
if (function_exists('mb_strrpos'))
|
||||
return mb_strrpos($str, $find, $offset, $encoding);
|
||||
return strrpos($str, $find, $offset);
|
||||
}
|
||||
|
||||
public static function ucfirst($str)
|
||||
{
|
||||
return Tools::strtoupper(Tools::substr($str, 0, 1)).Tools::substr($str, 1);
|
||||
@@ -2615,6 +2738,20 @@ exit;
|
||||
}
|
||||
return $fileAttachment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a substring from another one starting from the right
|
||||
* @param string $str
|
||||
* @param string $str_search
|
||||
* @return string
|
||||
*/
|
||||
public static function rtrimString($str, $str_search)
|
||||
{
|
||||
$length_str = strlen($str_search);
|
||||
if (strlen($str) >= $length_str && substr($str, -$length_str) == $str_search)
|
||||
$str = substr($str, 0, -$length_str);
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2641,4 +2778,4 @@ function cmpPriceDesc($a, $b)
|
||||
elseif ((float)$a['price_tmp'] > (float)$b['price_tmp'])
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class ValidateCore
|
||||
*/
|
||||
public static function isEmail($email)
|
||||
{
|
||||
return !empty($email) && preg_match(Tools::cleanNonUnicodeSupport('/^[a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z0-9]+$/ui'), $email);
|
||||
return !empty($email) && preg_match(Tools::cleanNonUnicodeSupport('/^[a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z\p{L}0-9]+$/ui'), $email);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1067,4 +1067,4 @@ class ValidateCore
|
||||
{
|
||||
return (preg_match('/^[0-1]\.[0-9]{1,2}(\.[0-9]{1,2}){0,2}$/', $version) && ip2long($version));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,12 +54,18 @@ class ZoneCore extends ObjectModel
|
||||
*/
|
||||
public static function getZones($active = false)
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'zone`
|
||||
'.($active ? 'WHERE active = 1' : '').'
|
||||
ORDER BY `name` ASC
|
||||
');
|
||||
$cache_id = 'Zone::getZones_'.(bool)$active;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'zone`
|
||||
'.($active ? 'WHERE active = 1' : '').'
|
||||
ORDER BY `name` ASC
|
||||
');
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
classes/cache/CacheMemcache.php
vendored
2
classes/cache/CacheMemcache.php
vendored
@@ -153,6 +153,8 @@ class CacheMemcacheCore extends Cache
|
||||
*/
|
||||
protected function _writeKeys()
|
||||
{
|
||||
if (!$this->is_connected)
|
||||
return false;
|
||||
$this->memcache->set(_COOKIE_IV_, $this->keys);
|
||||
}
|
||||
|
||||
|
||||
@@ -1542,12 +1542,14 @@ class AdminControllerCore extends Controller
|
||||
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400))
|
||||
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));
|
||||
|
||||
libxml_use_internal_errors(true);
|
||||
$country_module_list = file_get_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST);
|
||||
if (!empty($country_module_list) && $country_module_list_xml = simplexml_load_string($country_module_list))
|
||||
if (!empty($country_module_list) && is_string($country_module_list) && $country_module_list_xml = simplexml_load_string($country_module_list))
|
||||
{
|
||||
$country_module_list_array = array();
|
||||
foreach ($country_module_list_xml->module as $k => $m)
|
||||
$country_module_list_array[] = (string)$m->name;
|
||||
if (isset($country_module_list_xml->module))
|
||||
foreach ($country_module_list_xml->module as $k => $m)
|
||||
$country_module_list_array[] = (string)$m->name;
|
||||
$this->tab_modules_list['slider_list'] = array_intersect($this->tab_modules_list['slider_list'], $country_module_list_array);
|
||||
}
|
||||
|
||||
@@ -2343,7 +2345,7 @@ class AdminControllerCore extends Controller
|
||||
$cookie = $this->context->cookie;
|
||||
$this->allow_employee_form_lang = (int)Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG');
|
||||
if ($this->allow_employee_form_lang && !$cookie->employee_form_lang)
|
||||
$cookie->employee_form_lang = (int)$this->context->language->id;
|
||||
$cookie->employee_form_lang = (int)Configuration::get('PS_LANG_DEFAULT');
|
||||
|
||||
$lang_exists = false;
|
||||
$this->_languages = Language::getLanguages(false);
|
||||
@@ -2351,7 +2353,7 @@ class AdminControllerCore extends Controller
|
||||
if (isset($cookie->employee_form_lang) && $cookie->employee_form_lang == $lang['id_lang'])
|
||||
$lang_exists = true;
|
||||
|
||||
$this->default_form_language = $lang_exists ? (int)$cookie->employee_form_lang : (int)$this->context->language->id;
|
||||
$this->default_form_language = $lang_exists ? (int)$cookie->employee_form_lang : (int)Configuration::get('PS_LANG_DEFAULT');
|
||||
|
||||
foreach ($this->_languages as $k => $language)
|
||||
$this->_languages[$k]['is_default'] = ((int)($language['id_lang'] == $this->default_form_language));
|
||||
|
||||
@@ -175,8 +175,8 @@ abstract class ControllerCore
|
||||
// then using displayAjax[action]
|
||||
if ($this->ajax)
|
||||
{
|
||||
$action = Tools::getValue('action');
|
||||
if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true)))
|
||||
$action = Tools::toCamelCase(Tools::getValue('action'), true);
|
||||
if (!empty($action) && method_exists($this, 'displayAjax'.$action))
|
||||
$this->{'displayAjax'.$action}();
|
||||
elseif (method_exists($this, 'displayAjax'))
|
||||
$this->displayAjax();
|
||||
|
||||
@@ -850,7 +850,7 @@ class FrontControllerCore extends Controller
|
||||
if (!is_numeric(Tools::getValue('p', 1)) || Tools::getValue('p', 1) < 0)
|
||||
Tools::redirect(self::$link->getPaginationLink(false, false, $this->n, false, 1, false));
|
||||
|
||||
$current_url = tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']);
|
||||
$current_url = Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']);
|
||||
//delete parameter page
|
||||
$current_url = preg_replace('/(\?)?(&)?p=\d+/', '$1', $current_url);
|
||||
|
||||
@@ -919,7 +919,7 @@ class FrontControllerCore extends Controller
|
||||
$ips = array_map('trim', $ips);
|
||||
if (is_array($ips) && count($ips))
|
||||
foreach ($ips as $ip)
|
||||
if (!empty($ip) && strpos($user_ip, $ip) === 0)
|
||||
if (!empty($ip) && preg_match('/^'.$ip.'.*/', $user_ip))
|
||||
$allowed = true;
|
||||
return $allowed;
|
||||
}
|
||||
|
||||
@@ -523,13 +523,13 @@ abstract class DbCore
|
||||
$this->last_cached = true;
|
||||
return $result;
|
||||
}
|
||||
|
||||
$this->result = $this->query($sql);
|
||||
if (!$this->result)
|
||||
return false;
|
||||
|
||||
$this->last_cached = false;
|
||||
$result = $this->nextRow($this->result);
|
||||
if (is_null($result))
|
||||
$result = false;
|
||||
if ($use_cache && $this->is_cache_enabled)
|
||||
Cache::getInstance()->setQuery($sql, $result);
|
||||
return $result;
|
||||
|
||||
@@ -86,9 +86,9 @@ class HelperCore
|
||||
$override_tpl_path = _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/_configure/'.$this->override_folder.$this->base_folder.$tpl_name;
|
||||
else
|
||||
{
|
||||
if (file_exists($this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name))
|
||||
$override_tpl_path = $this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name;
|
||||
else if (file_exists($this->context->smarty->getTemplateDir(0).DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name))
|
||||
if (file_exists($this->context->smarty->getTemplateDir(1).$this->override_folder.$this->base_folder.$tpl_name))
|
||||
$override_tpl_path = $this->context->smarty->getTemplateDir(1).$this->override_folder.$this->base_folder.$tpl_name;
|
||||
else if (file_exists($this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name))
|
||||
$override_tpl_path = $this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name;
|
||||
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ abstract class ModuleCore
|
||||
}
|
||||
|
||||
// Check PS version compliancy
|
||||
if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min']) < 0 || version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max']) >= 0)
|
||||
if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min']) < 0 || version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max']) > 0)
|
||||
{
|
||||
$this->_errors[] = $this->l('The version of your module is not compliant with your PrestaShop version.');
|
||||
return false;
|
||||
@@ -1258,7 +1258,9 @@ abstract class ModuleCore
|
||||
$modules = scandir(_PS_MODULE_DIR_);
|
||||
foreach ($modules as $name)
|
||||
{
|
||||
if (is_dir(_PS_MODULE_DIR_.$name) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php'))
|
||||
if (is_file(_PS_MODULE_DIR_.$name))
|
||||
continue;
|
||||
elseif (is_dir(_PS_MODULE_DIR_.$name.DIRECTORY_SEPARATOR) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php'))
|
||||
{
|
||||
if (!Validate::isModuleName($name))
|
||||
throw new PrestaShopException(sprintf('Module %s is not a valid module name', $name));
|
||||
@@ -1296,6 +1298,9 @@ abstract class ModuleCore
|
||||
public static function getNativeModuleList()
|
||||
{
|
||||
$module_list_xml = _PS_ROOT_DIR_.self::CACHE_FILE_MODULES_LIST;
|
||||
if (!file_exists($module_list_xml))
|
||||
return false;
|
||||
|
||||
$native_modules = simplexml_load_file($module_list_xml);
|
||||
$native_modules = $native_modules->modules;
|
||||
$modules = array();
|
||||
@@ -1861,7 +1866,13 @@ abstract class ModuleCore
|
||||
*/
|
||||
public static function getModuleIdByName($name)
|
||||
{
|
||||
return Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = "'.pSQL($name).'"');
|
||||
$cache_id = 'Module::getModuleIdByName_'.pSQL($name);
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (int)Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = "'.pSQL($name).'"');
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -721,11 +721,17 @@ class OrderCore extends ObjectModel
|
||||
|
||||
public static function getDiscountsCustomer($id_customer, $id_cart_rule)
|
||||
{
|
||||
return Db::getInstance()->getValue('
|
||||
SELECT COUNT(*) FROM `'._DB_PREFIX_.'orders` o
|
||||
LEFT JOIN '._DB_PREFIX_.'order_cart_rule ocr ON (ocr.id_order = o.id_order)
|
||||
WHERE o.id_customer = '.(int)$id_customer.'
|
||||
AND ocr.id_cart_rule = '.(int)$id_cart_rule);
|
||||
$cache_id = 'Order::getDiscountsCustomer_'.(int)$id_customer.'-'.(int)$id_cart_rule;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (int)Db::getInstance()->getValue('
|
||||
SELECT COUNT(*) FROM `'._DB_PREFIX_.'orders` o
|
||||
LEFT JOIN '._DB_PREFIX_.'order_cart_rule ocr ON (ocr.id_order = o.id_order)
|
||||
WHERE o.id_customer = '.(int)$id_customer.'
|
||||
AND ocr.id_cart_rule = '.(int)$id_cart_rule);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -112,12 +112,18 @@ class OrderStateCore extends ObjectModel
|
||||
*/
|
||||
public static function getOrderStates($id_lang)
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'order_state` os
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$id_lang.')
|
||||
WHERE deleted = 0
|
||||
ORDER BY `name` ASC');
|
||||
$cache_id = 'OrderState::getOrderStates_'.(int)$id_lang;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'order_state` os
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$id_lang.')
|
||||
WHERE deleted = 0
|
||||
ORDER BY `name` ASC');
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -187,14 +187,19 @@ class ShopCore extends ObjectModel
|
||||
|
||||
public function setUrl()
|
||||
{
|
||||
$row = Db::getInstance()->getRow('
|
||||
SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
|
||||
FROM '._DB_PREFIX_.'shop s
|
||||
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
|
||||
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
|
||||
WHERE s.id_shop = '.(int)$this->id.'
|
||||
AND s.active = 1 AND s.deleted = 0 AND su.main = 1');
|
||||
|
||||
$cache_id = 'Shop::setUrl_'.(int)$this->id;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$row = Db::getInstance()->getRow('
|
||||
SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
|
||||
FROM '._DB_PREFIX_.'shop s
|
||||
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
|
||||
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
|
||||
WHERE s.id_shop = '.(int)$this->id.'
|
||||
AND s.active = 1 AND s.deleted = 0 AND su.main = 1');
|
||||
Cache::store($cache_id, $row);
|
||||
}
|
||||
$row = Cache::retrieve($cache_id);
|
||||
if (!$row)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ class StockAvailableCore extends ObjectModel
|
||||
/** @var bool determine if a product is out of stock - it was previously in Product class */
|
||||
public $out_of_stock = false;
|
||||
|
||||
protected static $cache_quantity_available;
|
||||
|
||||
/**
|
||||
* @see ObjectModel::$definition
|
||||
*/
|
||||
@@ -343,18 +345,23 @@ class StockAvailableCore extends ObjectModel
|
||||
if ($id_product_attribute === null)
|
||||
$id_product_attribute = 0;
|
||||
|
||||
$query = new DbQuery();
|
||||
$query->select('SUM(quantity)');
|
||||
$query->from('stock_available');
|
||||
$key = (int)$id_product.'-'.(int)$id_product_attribute.'-'.(int)$id_shop;
|
||||
if (!isset(self::$cache_quantity_available[$key]))
|
||||
{
|
||||
$query = new DbQuery();
|
||||
$query->select('SUM(quantity)');
|
||||
$query->from('stock_available');
|
||||
|
||||
// if null, it's a product without attributes
|
||||
if ($id_product !== null)
|
||||
$query->where('id_product = '.(int)$id_product);
|
||||
|
||||
$query->where('id_product_attribute = '.(int)$id_product_attribute);
|
||||
$query = StockAvailable::addSqlShopRestriction($query, $id_shop);
|
||||
|
||||
// if null, it's a product without attributes
|
||||
if ($id_product !== null)
|
||||
$query->where('id_product = '.(int)$id_product);
|
||||
|
||||
$query->where('id_product_attribute = '.(int)$id_product_attribute);
|
||||
$query = StockAvailable::addSqlShopRestriction($query, $id_shop);
|
||||
|
||||
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
||||
self::$cache_quantity_available[$key] = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
||||
}
|
||||
return self::$cache_quantity_available[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -124,9 +124,13 @@ class TaxRuleCore extends ObjectModel
|
||||
*/
|
||||
public static function isTaxInUse($id_tax)
|
||||
{
|
||||
return Db::getInstance()->getValue('
|
||||
SELECT COUNT(*) FROM `'._DB_PREFIX_.'tax_rule` WHERE `id_tax` = '.(int)$id_tax
|
||||
);
|
||||
$cache_id = 'TaxRule::isTaxInUse_'.(int)$id_tax;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = (int)Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'tax_rule` WHERE `id_tax` = '.(int)$id_tax);
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,9 +33,6 @@ class TaxRulesTaxManagerCore implements TaxManagerInterface
|
||||
public $type;
|
||||
public $tax_calculator;
|
||||
|
||||
protected static $cache_tax_calculator;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Address $address
|
||||
@@ -80,7 +77,8 @@ class TaxRulesTaxManagerCore implements TaxManagerInterface
|
||||
if (!empty($this->address->postcode))
|
||||
$postcode = $this->address->postcode;
|
||||
|
||||
if (!isset(self::$cache_tax_calculator[(int)$this->address->id_country.'-'.$postcode.'-'.$this->type]))
|
||||
$cache_id = (int)$this->address->id_country.'-'.(int)$this->address->id_state.'-'.$postcode.'-'.(int)$this->type;
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$rows = Db::getInstance()->executeS('
|
||||
SELECT *
|
||||
@@ -110,11 +108,8 @@ class TaxRulesTaxManagerCore implements TaxManagerInterface
|
||||
if ($row['behavior'] == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
self::$cache_tax_calculator[$postcode.'-'.$this->type] = new TaxCalculator($taxes, $behavior);
|
||||
Cache::store($cache_id, new TaxCalculator($taxes, $behavior));
|
||||
}
|
||||
|
||||
return self::$cache_tax_calculator[$postcode.'-'.$this->type];
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -845,11 +845,13 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
|
||||
$imaged = imagegif($destImage, $newPath);
|
||||
break;
|
||||
case 'png':
|
||||
$imaged = imagepng($destImage, $newPath, 7);
|
||||
$quality = (Configuration::get('PS_PNG_QUALITY') === false ? 7 : Configuration::get('PS_PNG_QUALITY'));
|
||||
$imaged = imagepng($destImage, $newPath, (int)$quality);
|
||||
break;
|
||||
case 'jpeg':
|
||||
default:
|
||||
$imaged = imagejpeg($destImage, $newPath, 90);
|
||||
$quality = (Configuration::get('PS_JPEG_QUALITY') === false ? 90 : Configuration::get('PS_JPEG_QUALITY'));
|
||||
$imaged = imagejpeg($destImage, $newPath, (int)$quality);
|
||||
break;
|
||||
}
|
||||
imagedestroy($destImage);
|
||||
|
||||
@@ -38,13 +38,14 @@ if (file_exists(_PS_THEME_DIR_.'mobile/'))
|
||||
{
|
||||
define('_PS_THEME_MOBILE_DIR_', _PS_THEME_DIR_.'mobile/');
|
||||
define('_THEME_MOBILE_DIR_', _THEMES_DIR_._THEME_NAME_.'/mobile/');
|
||||
define('_PS_THEME_MOBILE_OVERRIDE_DIR_', _PS_THEME_MOBILE_DIR_.'override/');
|
||||
}
|
||||
else
|
||||
{
|
||||
define('_PS_THEME_MOBILE_DIR_', _PS_ROOT_DIR_.'/themes/default/mobile/');
|
||||
define('_THEME_MOBILE_DIR_', __PS_BASE_URI__.'themes/default/mobile/');
|
||||
}
|
||||
define('_PS_THEME_MOBILE_OVERRIDE_DIR_', _PS_THEME_MOBILE_DIR_.'override/');
|
||||
|
||||
define('_THEME_MOBILE_IMG_DIR_', _THEME_MOBILE_DIR_.'img/');
|
||||
define('_THEME_MOBILE_CSS_DIR_', _THEME_MOBILE_DIR_.'css/');
|
||||
define('_THEME_MOBILE_JS_DIR_', _THEME_MOBILE_DIR_.'js/');
|
||||
|
||||
@@ -128,6 +128,8 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('Reduction amount cannot be lower than zero.');
|
||||
if (Tools::getValue('code') && ($same_code = (int)CartRule::getIdByCode(Tools::getValue('code'))) && $same_code != Tools::getValue('id_cart_rule'))
|
||||
$this->errors[] = sprintf(Tools::displayError('This cart rule code is already used (conflict with cart rule %d)'), $same_code);
|
||||
if (Tools::getValue('apply_discount') == 'off' && !Tools::getValue('free_shipping') && !Tools::getValue('free_gift'))
|
||||
$this->errors[] = Tools::displayError('An action is required for this cart rule.');
|
||||
}
|
||||
|
||||
return parent::postProcess();
|
||||
|
||||
@@ -105,7 +105,7 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
$this->_category = new Category($id_category);
|
||||
else
|
||||
{
|
||||
if (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP)
|
||||
if (Shop::getContext() == Shop::CONTEXT_SHOP)
|
||||
$this->_category = new Category($this->context->shop->id_category);
|
||||
elseif (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1)
|
||||
$this->_category = Category::getTopCategory();
|
||||
|
||||
@@ -71,6 +71,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
|
||||
{
|
||||
$this->initToolbar();
|
||||
$this->toolbar_btn['new']['href'] .= '&id_parent='.(int)Tools::getValue('id_cms_category');
|
||||
$this->initTabModuleList();
|
||||
return parent::renderList();
|
||||
}
|
||||
|
||||
|
||||
@@ -320,12 +320,15 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$cm = new CustomerMessage();
|
||||
$cm->id_employee = (int)$this->context->employee->id;
|
||||
$cm->id_customer_thread = (int)Tools::getValue('id_customer_thread');
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
$cm->ip_address = ip2long(Tools::getRemoteAddr());
|
||||
$current_employee = $this->context->employee;
|
||||
$id_employee = (int)Tools::getValue('id_employee_forward');
|
||||
$employee = new Employee($id_employee);
|
||||
$email = Tools::getValue('email');
|
||||
if ($id_employee && $employee && Validate::isLoadedObject($employee))
|
||||
$message = Tools::getValue('message_forward');
|
||||
if (($error = $cm->validateField('message', $message, null, array(), true)) !== true)
|
||||
$this->errors[] = $error;
|
||||
elseif ($id_employee && $employee && Validate::isLoadedObject($employee))
|
||||
{
|
||||
$params = array(
|
||||
'{messages}' => Tools::nl2br(stripslashes($output)),
|
||||
@@ -344,7 +347,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
null, null, _PS_MAIL_DIR_, true))
|
||||
{
|
||||
$cm->private = 1;
|
||||
$cm->message = $this->l('Message forwarded to').' '.$employee->firstname.' '.$employee->lastname."\n".$this->l('Comment:').' '.$_POST['message_forward'];
|
||||
$cm->message = $this->l('Message forwarded to').' '.$employee->firstname.' '.$employee->lastname."\n".$this->l('Comment:').' '.$message;
|
||||
$cm->add();
|
||||
}
|
||||
}
|
||||
@@ -363,7 +366,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$current_employee->email, $current_employee->firstname.' '.$current_employee->lastname,
|
||||
null, null, _PS_MAIL_DIR_, true))
|
||||
{
|
||||
$cm->message = $this->l('Message forwarded to').' '.$email."\n".$this->l('Comment:').' '.$_POST['message_forward'];
|
||||
$cm->message = $this->l('Message forwarded to').' '.$email."\n".$this->l('Comment:').' '.$message;
|
||||
$cm->add();
|
||||
}
|
||||
}
|
||||
@@ -379,10 +382,11 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$cm = new CustomerMessage();
|
||||
$cm->id_employee = (int)$this->context->employee->id;
|
||||
$cm->id_customer_thread = $ct->id;
|
||||
|
||||
$cm->ip_address = ip2long(Tools::getRemoteAddr());
|
||||
$cm->message = Tools::getValue('reply_message');
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
if (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0)
|
||||
if (($error = $cm->validateField('message', $cm->message, null, array(), true)) !== true)
|
||||
$this->errors[] = $error;
|
||||
elseif (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0)
|
||||
$this->errors[] = Tools::displayError('An error occurred during the file upload process.');
|
||||
elseif ($cm->add())
|
||||
{
|
||||
|
||||
@@ -120,6 +120,7 @@ class AdminDeliverySlipControllerCore extends AdminController
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->initTabModuleList();
|
||||
$this->content .= $this->renderForm().'<br />';
|
||||
$this->show_toolbar = false;
|
||||
$this->content .= $this->renderOptions();
|
||||
|
||||
@@ -347,15 +347,15 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
if (Tools::isSubmit('deleteemployee') || Tools::isSubmit('status') || Tools::isSubmit('statusemployee'))
|
||||
/* PrestaShop demo mode */
|
||||
if ((Tools::isSubmit('deleteemployee') || Tools::isSubmit('status') || Tools::isSubmit('statusemployee') || Tools::isSubmit('submitAddemployee')) && _PS_MODE_DEMO_)
|
||||
{
|
||||
/* PrestaShop demo mode */
|
||||
if (_PS_MODE_DEMO_ && $id_employee = Tools::getValue('id_employee') && (int)$id_employee == _PS_DEMO_MAIN_BO_ACCOUNT_)
|
||||
{
|
||||
$this->errors[] = Tools::displayError('This functionality has been disabled.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Tools::isSubmit('deleteemployee') || Tools::isSubmit('status') || Tools::isSubmit('statusemployee'))
|
||||
{
|
||||
if ($this->context->employee->id == Tools::getValue('id_employee'))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('You cannot disable or delete your own account.');
|
||||
|
||||
@@ -195,6 +195,22 @@ class AdminGendersControllerCore extends AdminController
|
||||
}
|
||||
return !count($this->errors) ? true : false;
|
||||
}
|
||||
|
||||
protected function afterImageUpload()
|
||||
{
|
||||
parent::afterImageUpload();
|
||||
|
||||
if (($id_gender = (int)Tools::getValue('id_gender')) &&
|
||||
isset($_FILES) && count($_FILES) && file_exists(_PS_GENDERS_DIR_.$id_gender.'.jpg'))
|
||||
{
|
||||
$current_file = _PS_TMP_IMG_DIR_.'gender_mini_'.$id_gender.'_'.$this->context->shop->id.'.jpg';
|
||||
|
||||
if (file_exists($current_file))
|
||||
unlink($current_file);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2015,7 +2015,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$myGroup = new Group();
|
||||
$myGroup->name = Array($id_lang => $group);
|
||||
if ($id_lang != $default_language_id)
|
||||
$myGroup->name = array_merge($myGroup->name, array($default_language_id => $group));
|
||||
$myGroup->name = $myGroup->name + array($default_language_id => $group);
|
||||
$myGroup->price_display_method = 1;
|
||||
$myGroup->add();
|
||||
if (Validate::isLoadedObject($myGroup))
|
||||
|
||||
@@ -145,8 +145,10 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
|
||||
if (Validate::isFileName(Tools::getValue('iso_localization_pack')))
|
||||
{
|
||||
|
||||
$pack = @Tools::file_get_contents('http://api.prestashop.com/localization/'.$version.'/'.Tools::getValue('iso_localization_pack').'.xml');
|
||||
if (Tools::getValue('download_updated_pack') == '1')
|
||||
$pack = @Tools::file_get_contents('http://api.prestashop.com/localization/'.$version.'/'.Tools::getValue('iso_localization_pack').'.xml');
|
||||
else
|
||||
$pack = false;
|
||||
|
||||
if (!$pack && !($pack = @Tools::file_get_contents(dirname(__FILE__).'/../../localization/'.Tools::getValue('iso_localization_pack').'.xml')))
|
||||
$this->errors[] = Tools::displayError('Cannot load the localization pack.');
|
||||
@@ -264,6 +266,26 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Download pack data'),
|
||||
'desc' => $this->l('If set to yes then the localization pack will be downloaded from prestashop.com. Otherwise the local xml file found in the localization folder of your PrestaShop installation will be used.'),
|
||||
'name' => 'download_updated_pack',
|
||||
'class' => 't',
|
||||
'is_bool'=> true,
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'download_updated_pack_yes',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Yes')
|
||||
),
|
||||
array(
|
||||
'id' => 'download_updated_pack_no',
|
||||
'value' => 0,
|
||||
'label' => $this->l('No')
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
@@ -278,10 +300,11 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
'selection[]_taxes' => true,
|
||||
'selection[]_currencies' => true,
|
||||
'selection[]_languages' => true,
|
||||
'selection[]_units' => true
|
||||
'selection[]_units' => true,
|
||||
'download_updated_pack' => 1
|
||||
);
|
||||
|
||||
$this->show_toolbar = false;
|
||||
$this->show_toolbar = true;
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
@@ -292,7 +315,6 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'localization_form' => $this->renderForm(),
|
||||
'localization_options' => $this->renderOptions(),
|
||||
@@ -300,9 +322,15 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
));
|
||||
}
|
||||
|
||||
public function initToolbar()
|
||||
{
|
||||
$this->toolbar_btn = array();
|
||||
$this->initTabModuleList();
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
$this->initContent();
|
||||
$this->initContent();
|
||||
parent::display();
|
||||
}
|
||||
|
||||
|
||||
@@ -638,6 +638,7 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initTabModuleList();
|
||||
if ($this->display == 'editaddresses' || $this->display == 'addaddress')
|
||||
$this->content .= $this->renderFormAddress();
|
||||
else if ($this->display == 'edit' || $this->display == 'add')
|
||||
@@ -718,6 +719,11 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
(int)$image_type['height']
|
||||
);
|
||||
}
|
||||
|
||||
$current_logo_file = _PS_TMP_IMG_DIR_.'manufacturer_mini_'.$id_manufacturer.'_'.$this->context->shop->id.'.jpg';
|
||||
|
||||
if ($res && file_exists($current_logo_file))
|
||||
unlink($current_logo_file);
|
||||
}
|
||||
|
||||
if (!$res)
|
||||
@@ -725,7 +731,7 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
protected function beforeDelete($object)
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -886,7 +886,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayErrror('This address can\'t be loaded');
|
||||
$this->errors[] = Tools::displayError('This address can\'t be loaded');
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
|
||||
@@ -180,7 +180,15 @@ class AdminPPreferencesControllerCore extends AdminController
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
)
|
||||
),
|
||||
'PS_DISPLAY_DISCOUNT_PRICE' => array(
|
||||
'title' => $this->l('Display discounted price'),
|
||||
'desc' => $this->l('Instead of showing the discount (-5%) it will instead show the new price with the discount applied'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'required' => false,
|
||||
'type' => 'bool'
|
||||
),
|
||||
)
|
||||
),
|
||||
'stock' => array(
|
||||
|
||||
@@ -567,19 +567,22 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
$php_lang = in_array($this->context->language->iso_code, $php_dot_net_supported_langs) ?
|
||||
$this->context->language->iso_code : 'en';
|
||||
|
||||
if (!extension_loaded('memcache'))
|
||||
if (_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'CacheMemcache' && !CacheMemcache::getMemcachedServers())
|
||||
$this->warnings[] = $this->l('To use Memcached, you must configure memcached servers.');
|
||||
|
||||
if (_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'CacheMemcache' && !extension_loaded('memcache'))
|
||||
$this->warnings[] = $this->l('To use Memcached, you must install the Memcache PECL extension on your server.').'
|
||||
<a href="http://www.php.net/manual/'.substr($php_lang, 0, 2).'/memcache.installation.php" target="_blank">
|
||||
http://www.php.net/manual/'.substr($php_lang, 0, 2).'/memcache.installation.php
|
||||
</a>';
|
||||
if (!extension_loaded('apc'))
|
||||
if (_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'apc' && !extension_loaded('apc'))
|
||||
{
|
||||
$this->warnings[] = $this->l('To use APC, you must install the APC PECL extension on your server.').'
|
||||
<a href="http://php.net/manual/'.substr($php_lang, 0, 2).'/apc.installation.php" target="_blank">
|
||||
http://php.net/manual/'.substr($php_lang, 0, 2).'/apc.installation.php
|
||||
</a>';
|
||||
}
|
||||
if (!extension_loaded('xcache'))
|
||||
if (_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'xcache' && !extension_loaded('xcache'))
|
||||
$this->warnings[] = $this->l('To use Xcache, you must install the Xcache extension on your server.').'
|
||||
<a href="http://xcache.lighttpd.net" target="_blank">http://xcache.lighttpd.net</a>';
|
||||
|
||||
@@ -808,7 +811,7 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
'define(\'_PS_CACHING_SYSTEM_\', \''.$caching_system.'\');',
|
||||
$new_settings
|
||||
);
|
||||
|
||||
|
||||
if ($cache_active && $caching_system == 'CacheMemcache' && !extension_loaded('memcache'))
|
||||
$this->errors[] = Tools::displayError('To use Memcached, you must install the Memcache PECL extension on your server.').'
|
||||
<a href="http://www.php.net/manual/en/memcache.installation.php">http://www.php.net/manual/en/memcache.installation.php</a>';
|
||||
|
||||
@@ -2660,6 +2660,10 @@ class AdminProductsControllerCore extends AdminController
|
||||
$product_supplier->id_product = $product->id;
|
||||
$product_supplier->id_product_attribute = 0;
|
||||
$product_supplier->id_supplier = $id;
|
||||
if ($this->context->currency->id)
|
||||
$product_supplier->id_currency = (int)$this->context->currency->id;
|
||||
else
|
||||
$product_supplier->id_currency = (int)Configuration::get('PS_CURRENCY_DEFAULT');
|
||||
$product_supplier->save();
|
||||
|
||||
$associated_suppliers[] = $product_supplier;
|
||||
|
||||
@@ -148,7 +148,7 @@ class AdminShopControllerCore extends AdminController
|
||||
$this->list_simple_header = true;
|
||||
parent::initContent();
|
||||
|
||||
$this->addJqueryPlugin('cookie-plugin');
|
||||
$this->addJqueryPlugin('cooki-plugin');
|
||||
$this->addJqueryPlugin('jstree');
|
||||
$this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css');
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ class AdminShopGroupControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
|
||||
$this->addJqueryPlugin('cookie-plugin');
|
||||
$this->addJqueryPlugin('cooki-plugin');
|
||||
$this->addJqueryPlugin('jstree');
|
||||
$this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css');
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ class AdminShopUrlControllerCore extends AdminController
|
||||
$this->list_simple_header = true;
|
||||
parent::initContent();
|
||||
|
||||
$this->addJqueryPlugin('cookie-plugin');
|
||||
$this->addJqueryPlugin('cooki-plugin');
|
||||
$this->addJqueryPlugin('jstree');
|
||||
$this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css');
|
||||
|
||||
|
||||
@@ -539,4 +539,20 @@ class AdminStatusesControllerCore extends AdminController
|
||||
$this->initOrdersReturnsList();
|
||||
return parent::filterToField($key, $filter);
|
||||
}
|
||||
|
||||
protected function afterImageUpload()
|
||||
{
|
||||
parent::afterImageUpload();
|
||||
|
||||
if (($id_order_state = (int)Tools::getValue('id_order_state')) &&
|
||||
isset($_FILES) && count($_FILES) && file_exists(_PS_ORDER_STATE_IMG_DIR_.$id_order_state.'.gif'))
|
||||
{
|
||||
$current_file = _PS_TMP_IMG_DIR_.'order_state_mini_'.$id_order_state.'_'.$this->context->shop->id.'.gif';
|
||||
|
||||
if (file_exists($current_file))
|
||||
unlink($current_file);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,6 +354,11 @@ class AdminSuppliersControllerCore extends AdminController
|
||||
if (!ImageManager::resize($file, _PS_SUPP_IMG_DIR_.$id_supplier.'-'.stripslashes($image_type['name']).'.jpg', (int)$image_type['width'], (int)$image_type['height']))
|
||||
$return = false;
|
||||
}
|
||||
|
||||
$current_logo_file = _PS_TMP_IMG_DIR_.'supplier_mini_'.$id_supplier.'_'.$this->context->shop->id.'.jpg';
|
||||
|
||||
if (file_exists($current_logo_file))
|
||||
unlink($current_logo_file);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -87,12 +87,15 @@ class AuthControllerCore extends FrontController
|
||||
|
||||
$this->context->smarty->assign('newsletter', 1);
|
||||
|
||||
$back = Tools::getValue('back');
|
||||
$key = Tools::safeOutput(Tools::getValue('key'));
|
||||
if (!empty($key))
|
||||
$back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key;
|
||||
if (!empty($back))
|
||||
$this->context->smarty->assign('back', Tools::safeOutput(Tools::secureReferrer($back)));
|
||||
if ($back = Tools::safeOutput(Tools::getValue('back')))
|
||||
{
|
||||
$key = Tools::safeOutput(Tools::getValue('key'));
|
||||
if (!empty($key))
|
||||
$back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key;
|
||||
if ($back == Tools::secureReferrer(Tools::getValue('back')))
|
||||
$this->context->smarty->assign('back', html_entity_decode($back));
|
||||
$this->context->smarty->assign('back', $back);
|
||||
}
|
||||
|
||||
if (Tools::getValue('display_guest_checkout'))
|
||||
{
|
||||
|
||||
@@ -116,6 +116,7 @@ class CategoryControllerCore extends FrontController
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'category' => $this->category,
|
||||
'description_short' => Tools::truncateString($this->category->description),
|
||||
'products' => (isset($this->cat_products) && $this->cat_products) ? $this->cat_products : null,
|
||||
'id_category' => (int)$this->category->id,
|
||||
'id_category_parent' => (int)$this->category->id_parent,
|
||||
|
||||
@@ -30,12 +30,13 @@ class CmsControllerCore extends FrontController
|
||||
public $assignCase;
|
||||
public $cms;
|
||||
public $cms_category;
|
||||
public $ssl = false;
|
||||
|
||||
public function canonicalRedirection($canonicalURL = '')
|
||||
{
|
||||
if (Tools::getValue('live_edit'))
|
||||
return ;
|
||||
if (Validate::isLoadedObject($this->cms) && ($canonicalURL = $this->context->link->getCMSLink($this->cms)))
|
||||
if (Validate::isLoadedObject($this->cms) && ($canonicalURL = $this->context->link->getCMSLink($this->cms, $this->cms->link_rewrite, $this->ssl)))
|
||||
parent::canonicalRedirection($canonicalURL);
|
||||
else if (Validate::isLoadedObject($this->cms_category) && ($canonicalURL = $this->context->link->getCMSCategoryLink($this->cms_category)))
|
||||
parent::canonicalRedirection($canonicalURL);
|
||||
@@ -47,13 +48,16 @@ class CmsControllerCore extends FrontController
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
if ($id_cms = (int)Tools::getValue('id_cms'))
|
||||
$this->cms = new CMS($id_cms, $this->context->language->id);
|
||||
else if ($id_cms_category = (int)Tools::getValue('id_cms_category'))
|
||||
$this->cms_category = new CMSCategory($id_cms_category, $this->context->language->id);
|
||||
|
||||
if (Configuration::get('PS_SSL_ENABLED') && Tools::getValue('content_only') && Tools::getValue('id_cms') == (int)Configuration::get('PS_CONDITIONS_CMS_ID') && Validate::isLoadedObject($this->cms))
|
||||
$this->ssl = true;
|
||||
|
||||
parent::init();
|
||||
|
||||
$this->canonicalRedirection();
|
||||
|
||||
// assignCase (1 = CMS page, 2 = CMS category)
|
||||
@@ -120,7 +124,7 @@ class CmsControllerCore extends FrontController
|
||||
'category' => $this->cms_category, //for backward compatibility
|
||||
'cms_category' => $this->cms_category,
|
||||
'sub_category' => $this->cms_category->getSubCategories($this->context->language->id),
|
||||
'cms_pages' => CMS::getCMSPages($this->context->language->id, (int)($this->cms_category->id) ),
|
||||
'cms_pages' => CMS::getCMSPages($this->context->language->id, (int)($this->cms_category->id), true, (int)$this->context->shop->id),
|
||||
'path' => ($this->cms_category->id !== 1) ? Tools::getPath($this->cms_category->id, $this->cms_category->name, false, 'CMS') : '',
|
||||
));
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ class ContactControllerCore extends FrontController
|
||||
$cm->message = $message;
|
||||
if (isset($fileAttachment['rename']) && !empty($fileAttachment['rename']) && rename($fileAttachment['tmp_name'], _PS_MODULE_DIR_.'../upload/'.basename($fileAttachment['rename'])))
|
||||
$cm->file_name = $fileAttachment['rename'];
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
$cm->ip_address = ip2long(Tools::getRemoteAddr());
|
||||
$cm->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (!$cm->add())
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending the message.');
|
||||
|
||||
@@ -276,7 +276,7 @@ class GetFileControllerCore extends FrontController
|
||||
/* Set headers for download */
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Type: '.$mimeType);
|
||||
header('Content-Length: '.filesize($file));
|
||||
header('Content-Length: '.sprintf('%u', filesize($file)));
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
$fp = fopen($file, 'rb');
|
||||
while (!feof($fp))
|
||||
|
||||
@@ -58,7 +58,7 @@ class GuestTrackingControllerCore extends FrontController
|
||||
{
|
||||
$order = new Order((int)$id_order);
|
||||
if (Validate::isLoadedObject($order))
|
||||
$order_collection[] = $order;
|
||||
$order_collection = Order::getByReference($order->reference);
|
||||
}
|
||||
else
|
||||
$order_collection = Order::getByReference($id_order);
|
||||
|
||||
@@ -529,8 +529,8 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency);
|
||||
if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimalPurchase)
|
||||
return '<p class="warning">'.sprintf(
|
||||
Tools::displayError('A minimum purchase total of %s is required in order to validate your order.'),
|
||||
Tools::displayPrice($minimalPurchase, $currency)
|
||||
Tools::displayError('A minimum purchase total of %1s (tax excl.) is required in order to validate your order, current purchase total is %2s (tax excl.).'),
|
||||
Tools::displayPrice($minimal_purchase, $currency), Tools::displayPrice($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS), $currency)
|
||||
).'</p>';
|
||||
|
||||
/* Bypass payment step if total is 0 */
|
||||
|
||||
@@ -415,6 +415,17 @@ class ParentOrderControllerCore extends FrontController
|
||||
if (key($customerAddresses) != 0)
|
||||
$customerAddresses = array_values($customerAddresses);
|
||||
|
||||
if (!count($customerAddresses))
|
||||
{
|
||||
$bad_delivery = false;
|
||||
if (($bad_delivery = (bool)!Address::isCountryActiveById((int)$this->context->cart->id_address_delivery)) || (!Address::isCountryActiveById((int)$this->context->cart->id_address_invoice)))
|
||||
{
|
||||
$back_url = $this->context->link->getPageLink('order', true, (int)$this->context->language->id, array('step' => Tools::getValue('step'), 'multi-shipping' => (int)Tools::getValue('multi-shipping')));
|
||||
$params = array('multi-shipping' => (int)Tools::getValue('multi-shipping'), 'id_address' => ($bad_delivery ? (int)$this->context->cart->id_address_delivery : (int)$this->context->cart->id_address_invoice), 'back' => $back_url);
|
||||
Tools::redirect($this->context->link->getPageLink('address', true, (int)$this->context->language->id, $params));
|
||||
}
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'addresses' => $customerAddresses,
|
||||
'formatedAddressFieldsValuesList' => $formatedAddressFieldsValuesList));
|
||||
@@ -465,16 +476,6 @@ class ParentOrderControllerCore extends FrontController
|
||||
$address = new Address($this->context->cart->id_address_delivery);
|
||||
$id_zone = Address::getZoneById($address->id);
|
||||
$bad_delivery = false;
|
||||
if (($bad_delivery = (bool)!Address::isCountryActiveById((int)$this->context->cart->id_address_delivery)) || (!Address::isCountryActiveById((int)$this->context->cart->id_address_invoice)))
|
||||
{
|
||||
if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 && Dispatcher::getInstance()->getController() != 'order-opc')
|
||||
{
|
||||
$back_url = $this->context->link->getPageLink('order', true, (int)$this->context->language->id, array('step' => Tools::getValue('step'), 'multi-shipping' => (int)Tools::getValue('multi-shipping')));
|
||||
$params = array('multi-shipping' => (int)Tools::getValue('multi-shipping'), 'id_address' => ($bad_delivery ? (int)$this->context->cart->id_address_delivery : (int)$this->context->cart->id_address_invoice), 'back' => $back_url);
|
||||
Tools::redirect($this->context->link->getPageLink('address', true, (int)$this->context->language->id, $params));
|
||||
}
|
||||
Tools::redirect('index.php?controller=order&step=1');
|
||||
}
|
||||
$carriers = $this->context->cart->simulateCarriersOutput();
|
||||
$checked = $this->context->cart->simulateCarrierSelectedOutput();
|
||||
$delivery_option_list = $this->context->cart->getDeliveryOptionList();
|
||||
@@ -510,7 +511,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
|
||||
// TOS
|
||||
$cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id);
|
||||
$this->link_conditions = $this->context->link->getCMSLink($cms, $cms->link_rewrite);
|
||||
$this->link_conditions = $this->context->link->getCMSLink($cms, $cms->link_rewrite, (bool)Configuration::get('PS_SSL_ENABLED'));
|
||||
if (!strpos($this->link_conditions, '?'))
|
||||
$this->link_conditions .= '?content_only=1';
|
||||
else
|
||||
|
||||
@@ -548,7 +548,7 @@ class ProductControllerCore extends FrontController
|
||||
$path = Tools::getPath((int)$this->context->shop->id_category, $this->product->name);
|
||||
$this->context->smarty->assign('path', $path);
|
||||
|
||||
$this->context->smarty->assign('categories', Category::getHomeCategories($this->context->language->id));
|
||||
$this->context->smarty->assign('categories', Category::getHomeCategories($this->context->language->id, true, (int)$this->context->shop->id));
|
||||
$this->context->smarty->assign(array('HOOK_PRODUCT_FOOTER' => Hook::exec('displayFooterProduct', array('product' => $this->product, 'category' => $this->category))));
|
||||
}
|
||||
|
||||
|
||||
@@ -279,6 +279,6 @@ class StoresControllerCore extends FrontController
|
||||
if (!Configuration::get('PS_STORES_SIMPLIFIED'))
|
||||
$this->addJS(_THEME_JS_DIR_.'stores.js');
|
||||
$default_country = new Country((int)Configuration::get('PS_COUNTRY_DEFAULT'));
|
||||
$this->addJS('http://maps.google.com/maps/api/js?sensor=true&region='.substr($default_country->iso_code, 0, 2));
|
||||
$this->addJS('http'.((Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 's' : '').'://maps.google.com/maps/api/js?sensor=true&region='.substr($default_country->iso_code, 0, 2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,225 @@ International Registred Trademark & Property of PrestaShop SA
|
||||
|
||||
Release Notes for PrestaShop 1.5
|
||||
--------------------------------
|
||||
####################################
|
||||
# v1.5.6.1 - (2013-11-18) #
|
||||
####################################
|
||||
|
||||
Fixed bugs:
|
||||
|
||||
[-] Project : missing ui.menu in jquery_ui_dependencies.
|
||||
|
||||
[-] FO : Fix bug #PSCFV-11043, bad cache id from module template
|
||||
[-] FO : Missing sup for DNI field
|
||||
[-] FO : Fix bug #PSCFV-10911, doubles in cart rules highlight
|
||||
[-] FO : Bad value for back when controller name is sent
|
||||
[-] FO : FixBug #PSCFV-9291 - Ecotax increment display price in product combination
|
||||
[-] FO : fix contact-form id_order input when customer is not logged
|
||||
[-] Fo : Call Gmaps on https if required
|
||||
[-] FO : Wordwrap on prices in history
|
||||
[-] FO : Fixed errors when calculating most selled products from footer link
|
||||
[-] FO : #PSCFV-10978 firstname displayed instead of lastname in invoice address
|
||||
[-] FO : Customized meesage with carriage return follow up #962
|
||||
[-] FO : getTaxCalculator bad cache key again // sorry about that
|
||||
[-] FO : getTaxCalculator bad cache key
|
||||
[-] FO : Prevents warning in safePostVars when $_POST has been unset
|
||||
[-] FO : in multistore payment module restrictions by customer group was not applied to specific shop
|
||||
[-] FO : Fix bug #PSCFV-10892, getCMSPages by id_shop thnaks @jd440
|
||||
[-] FO : FixBug Categories description
|
||||
[-] FO : Fix bug #PSCFV-10889 wrong color when oos product
|
||||
[-] FO : CustomerMessage ip_address to string
|
||||
[-] FO : Fix bug #PSCFV-10851, no shop restriction in vouchers display in cart
|
||||
[-] FO: fixed bug #PSCFV-10654 - TinyMCE editor: List of products by manufacturer, products by supplier - Long description is not hidden.
|
||||
[-] FO: Fix bug #PSCFV-10623 blocknewproducts shows products when PS_NB_DAYS_NEW_PRODUCT == 0
|
||||
[-] FO: Fix bug #PSCFV-10230, Blockspecials still caching when files cache limit is 0
|
||||
[-] FO: Fix bug #PSCFV-10625 Js error on carriers step if AjaxCart disabled
|
||||
[-] FO : Follow up https://github.com/PrestaShop/PrestaShop/pull/879
|
||||
[-] FO: removed width on message product select Limiting select could make the user think the select is not working if they click to much to the left on bigger screens
|
||||
[-] FO : Prevent fatal error on getUniqReference when order not loaded
|
||||
[-] FO: Don't auto detect language if it not associated to the shop #PSCFV-10273
|
||||
[-] FO : Could not redirect back to url in adress.php
|
||||
[-] FO : $back value twice escaped
|
||||
[-] FO : #PSCFV-10640 again, bad assignement
|
||||
[-] Fo : Fix bug #PSCFV-10640, redirect loop when country address is not among active countries in OPC
|
||||
[-] FO : Fix bug #PSCFV-10688, bad priceDisplay in order-carrier
|
||||
[-] FO : Fix #PSCFV-10690 again, change just on directories
|
||||
[-] FO : Fix bug #PSCFV-10690 could not index a category beacause of robot.txt
|
||||
[-] FO : Copuld not load datepicker in trackingfront stats.php
|
||||
[-] FO : Fix bug #PSCFV-10497 cart_block hooked on column disappearing
|
||||
[-] FO : Fix bug #PSCFV-10606 could not have correct taxCalculationMethod when vat number in customer address
|
||||
|
||||
[-] BO : Fix bug #PNM-1594, selected value error in helper list
|
||||
[-] BO: product price was changed on changing to advanced stock management #PSCFV-10996
|
||||
[-] BO : Fix warning when no memcached servers
|
||||
[-] BO : Fix #PSCFV-11016 typo
|
||||
[-] BO : Model return html error messagae instead of json while image uploading
|
||||
[-] BO : Product final price can not be hidden on loading tab, report of https://github.com/PrestaShop/PrestaShop/commit/6c6c3b240ee2249b7f99be1a112905cd0edbee46
|
||||
[-] BO : test on xml string follow up https://github.com/PrestaShop/PrestaShop/pull/690#issuecomment-28542506
|
||||
[-] BO : 406 when mod_security follow up https://github.com/PrestaShop/PrestaShop/commit/034e6a7e7f391e3a8861248db45a4a376b19633c
|
||||
[-] BO : AdminImport, execption when creating groups
|
||||
[-] BO : Fix bug #PSCFV-10990 bad version comparison for ps_versions_compliancy
|
||||
[-] BO : Fix bug #PSCFV-10982 reduction group truncated
|
||||
[-] BO : Could not check all modules after ajax call
|
||||
[-] BO : Fix css bug #PSCFV-10899, fixed fix-toolbar z-index
|
||||
[-] BO : Fix bug #PSCFV-10932, ranges input disabled on load
|
||||
[-] BO : getCMSPages to associated shop in cmscontroller
|
||||
[-] BO : Fix bug #PSCFV-10666 product_supllier currency set to 0
|
||||
[-] BO : Fix bug #PSCFV-10937, bad escaping for var product_prices in prices.tpl
|
||||
[-] BO : Cart was not using order reference, corrected syntax
|
||||
[-] BO : Cart was not using order reference
|
||||
[-] BO : Could not change image position
|
||||
[-] BO: Fix from name when replying to customer threads
|
||||
[-] BO : Do not enable rewrite url for index
|
||||
[-] BO: Fix empty group list on changing opt or newsletter on customers listing
|
||||
[-] BO : AdminImport withdraw separator changed in js
|
||||
[-] BO : AdminImport wrong group by default
|
||||
[-] BO : FixBug #PSCFV-10882 - Add json encode and decode smarty modifier via tools class
|
||||
[-] Bo : AdminImport customer group default
|
||||
[-] BO : Fix bug #PSCFV-10872 AdminImport could not import supllier orders
|
||||
[-] BO: fix the checkbox of shop activation on modules configuration
|
||||
[-] BO : Adminimport default customers group
|
||||
[-] BO : tagify call twice if field is not translatable
|
||||
[-] BO : Stats are empty when no conversion rate
|
||||
[-] BO : Order-follow displayed order id instead of order reference
|
||||
[-] BO : hide stmp options when selecting never send emails
|
||||
[-] BO : FixBug #PSCFV-10866 - Tagify system not working
|
||||
[-] BO : FixBug #PSCFV-9319 - display only valid order id
|
||||
[-] BO : Do not delete other default jpg when _deleteOldImages and type defined
|
||||
[-] BO : AdminImport, fix bug from https://github.com/indesign47/PrestaShop/commit/84454bbc1c7a315e232245c5e43b300b8f153473#commitcomment-4418502
|
||||
[-] BO : Fix bug #10689, could not set image legend in back office
|
||||
[-] BO : Fixed bug PSCFV-9910 using basic queries to prevent locking errors
|
||||
[-] BO : Fix bug #PSCFV-10718 AdminAttachments old file not deleted on update
|
||||
[-] BO : FixBug #PSCFV-10600 - Unmatched Boundary with mod_security
|
||||
[-] BO : fix #PSCFV-10728, prices incorrectly formatted when creating new order from BO
|
||||
[-] BO : FIx bug #PSCFV-10736 again, fixing query when product is not in base
|
||||
[-] BO : FIx bug #PSCFV-10736, could not load a product given from getBoughtProducts
|
||||
[-] BO : Fix bug #PSCFV-10790, Customer group names not exploded
|
||||
[-] BO: product listing should call Product::getPriceStatic() with the product default shop in the context when it is not a shop context
|
||||
[-] BO: Synchronize stock available after receipt supply order items #PSCFV-10724
|
||||
[-] BO : Fix bug #PSCFV-10638, Admin Import by reference moves products to home category
|
||||
[-] BO : Fix bug #PSCFV-7907 AdminImport, add custom field to features
|
||||
[-] BO : Fix bug #PSCFV-10767, could not retrieve feature value when product IDs not forced
|
||||
[-] BO : Fix bug #PSCFV-10607 one upload name
|
||||
[-] BO : wrong csv files name
|
||||
[-] BO : Report of https://github.com/PrestaShop/PrestaShop/commit/fd86a29c5c369ec5da0f91bbe97c584a00d02d0d
|
||||
[-] BO: Default country should be overriden in the context in multishop
|
||||
[-] BO : Fix bug #PSCFV-10709 rename root category with slashes in it
|
||||
[-] BO : Could not order by reserved words like 'key'
|
||||
[-] BO : AdminImport, wrong default separators
|
||||
[-] BO : Fix bug #PSCFV-10692, AdminImport bad utf8 cars for subst
|
||||
[-] BO : Fix #PSCFV-10678 warning in chrome
|
||||
[-] BO : FixBug #PSCFV-10671 - remove htmlentities on customer message
|
||||
[-] BO : Could not insert referrer id_connections_source can not be null
|
||||
[-] Bo : Could not update mailalert 2.5 with id_lang missing
|
||||
[-] Bo : Could not update mailarler 2.5 with id_mlang
|
||||
[-] BO: Fixbug #PSCFV-10671 - Double htmlentities.
|
||||
[-] BO : AdminImport, fix Group searchByName
|
||||
[-] BO : Adminimport, id_specific key_price not defined
|
||||
[-] BO : FixBug - Remove second email in recipient
|
||||
[-] BO : Fix bug #PSCFV-10660, could not delete csv file on NT
|
||||
[-] BO : FixBug #PSCFV-9957 - Duplicate order invoice number
|
||||
[-] BO : fixed bug #PSCFV-10637 PS_CARRIER_DEFAULT is not updated after edit default carrier
|
||||
[-] BO : AdminImport no default value for separators
|
||||
[-] BO : pass correct typed parameter to setCurrency
|
||||
|
||||
[-] Classes : Hook - Installer & context shop id
|
||||
[-] Classes : Modules listing and case insensitive
|
||||
|
||||
[-] Core: Group::getCurrent() return the default customer group of the shop if default customer group is not associated to shop
|
||||
[-] CORE : invalid method name in displayAjax method of Controller action
|
||||
[-] CORE : Fix bug #PSCFV-10901 warnings on htmlentities
|
||||
[-] CORE : Currency conversion rate can not be 0
|
||||
[-] CORE : SetEnv in if statement
|
||||
[-] CORE : SetEnv not available on all config // @todo curl request on dummy .htacces
|
||||
[-] CORE : Fix bug #PSCFV-10687 again, #PSCFV-10752 replaceAccentedChars() // sorry for that
|
||||
[-] CORE : error_get_last > PHP 5.1
|
||||
[-] Core: Out of stock status should be setted after the first order history
|
||||
[-] Core: Product::getPriceStatic called with 1 quantity return the specific price for 1 qty if called with id_cart = 0
|
||||
[-] CORE : Fix bug #PSCFV-10687 bad conversion for accentuated Y and W, thanks @mike15
|
||||
[-] CORE : $smarty->compile_check is not set to false, thanks @prestamodule
|
||||
|
||||
[-] MO : Referralprogram Prevent Exception when badly configured
|
||||
[-] MO : Missinag closing href
|
||||
[-] MO :Fixed #PNM-1654 (Loyalty module) by using most expensive attribute instead of default one
|
||||
[-] MO : Mailalert was not using order reference
|
||||
[-] MO : Blocklayered follow up https://github.com/PrestaShop/PrestaShop/commit/a6e67b078e067445eef358e907649e843a1dc26a#commitcomment-4538556
|
||||
[-] MO : Fixed #PNM-1600 by modifying getPageLink()
|
||||
[-] MO : Blockcategories last_visited_category must not be cached
|
||||
[-] MO : Could not translate in transit mail, revert from https://github.com/viger-creator/PrestaShop/commit/3213b5dffb266ddb0639b94f72babd892328ffa2
|
||||
[-] MO : mailalert - Fix deprecated warning on displayDate
|
||||
[-] MO : Blockwishlist no product image when id_product_attribute is defined, thanks @Broceliande
|
||||
[-] MO : Fix NetworkError 404 Not Found on admin in blocklayered.php These files not exists : - /js/jquery/jquery-ui-1.8.10.custom.min.js - /css/jquery-ui-1.8.10.custom.css
|
||||
[-] MO : Fix bug #PSCFV-10841, blockcart hides on product page when last product is removed from cart
|
||||
[-] MO : Fixbug #PSCFV-10679 dateofdelivery PDF invoice array and array
|
||||
[-] MO : Fixed bug PNM-1431 - referralprogram Lack the % sign
|
||||
[-] MO : Fix bug #PSCFV-10787, cms associated to all shops
|
||||
[-] MO : if customer is logged we do not recreate it
|
||||
[-] MO : Fix bug #PSCFV-10775, could not upload .jpeg in TinyMCE
|
||||
[-] MO : ScrollTo not loaded
|
||||
[-] MO : Trackingfront, could not load employee stats date
|
||||
|
||||
[-] WS: Fix bug #PSCFV-10970 use configuration for uploaded images quality
|
||||
[-] WS: Fix stockavailables list when stock is shared between shops #PSCFV-10793
|
||||
[-] WS: Fix #PSCFV-10672 order by ID for non multishop entities
|
||||
|
||||
Improved/changed features:
|
||||
|
||||
[*] FO : DNI can be not required
|
||||
[*] FO : Fix #PSCFV-8715 add product.attributes in carrier tpl
|
||||
[*] FO : set at least a class to body
|
||||
[*] FO : addTextFieldToProduct without Line feed, follow up https://github.com/PrestaShop/PrestaShop/pull/962#issuecomment-28294571
|
||||
[*] FO : https on TOS in fancybox, follow up https://github.com/PrestaShop/PrestaShop/pull/956
|
||||
[*] FO : Redirect to address.tpl when !Address::isCountryActiveById
|
||||
[*] FO : Cache on getDiscountsCustomer, follow up https://github.com/PrestaShop/PrestaShop/pull/960
|
||||
[*] FO : Set cache for StockAvailable::getQuantityAvailableByProduct
|
||||
[*] FO : Added posibilty to display new price instead of quantity discount
|
||||
[*] FO: Follow up https://github.com/PrestaShop/PrestaShop/commit/e86c56172dad2892d5c7e7dbb0908b0f4ffbaae0
|
||||
[*] FO: Can not establish purchase total when tax incl.
|
||||
[*] FO : Fix bug #PSCFV-10689 handle image legend
|
||||
[*] FO: Removed missplaced </li> on mobile theme
|
||||
|
||||
[*] BO : AdminPerformances Hide warnings message when not necessary
|
||||
[*] BO : add class on TD in standard List Back office : Add a class on TD in list created by getList() In fields_list array of AdminController, we can add a new parameter('class') example : 'name' => array( 'title' => $this->l('Name'), 'width' => 150, 'class' => 'ma_classe', 'filter_key' => 'b!name' ), This parameter can be used for javascript effect, ... Thanks.
|
||||
[*] BO : New import csv files
|
||||
[*] BO : Manual merge of https://github.com/PrestaShop/PrestaShop/pull/891 1/2
|
||||
[*] BO : AdminProducts find smallest images
|
||||
[*] BO : improved unicode characters replacement in URLs (Russian and Ukrainian characters added)
|
||||
[*] BO : AdminImport add img manufacturers-suppliers
|
||||
[*] BO : AdminImport add img suppliers
|
||||
[*] BO : AdminImport add img manufacturers
|
||||
[*] BO : chmod 664 to config.xml file
|
||||
[*] BO : Adding a title tag to display the module name on hover like PS 1.4
|
||||
|
||||
[*] CORE : Remove duplicate SQL queries
|
||||
[*] CORE : Profiling hide non doubles
|
||||
[*] CORE : Cache store for isAssociatedToShop::isAssociatedToShop
|
||||
[*] CORE : Manual merge of https://github.com/PrestaShop/PrestaShop/ thanks @kpodemski
|
||||
[*] CORE: Add phone_mobile to address format I honestly do not know why you decided by default to show only the first field of the phone :) Users often ask me why they don't see their mobile phone on orders in BO.
|
||||
|
||||
[*] MO : Remove calls to isRegisteredInHook in crossselling and productscategory
|
||||
[*] MO : New modules version since 1.5.6.0
|
||||
[*] MO: blocksharefb optimization
|
||||
[*] MO: productcomments optimization
|
||||
|
||||
[*] LO : Fix PSCFV-10876: use IETF code to set language of shop, not 'iso' code, allows to distinguish between chinese variants etc.
|
||||
[*] LO : Added states to Spanish localization pack
|
||||
[*] LO : Fixed a few bugs with currency formats in Back-Office orders
|
||||
[*] LO : set correct currency format for CHF
|
||||
|
||||
Added Features:
|
||||
|
||||
[+] BO : Add debug mode system
|
||||
[+] BO : AdminImport add entity Alias
|
||||
|
||||
[+] CORE : Fixed cache_id
|
||||
|
||||
[+] MO : Blockcart - Add error handler on ajax function
|
||||
|
||||
Deprecated methods:
|
||||
|
||||
[~] BO : Export DeliverySlip The dates range wasn't using the correct sql fields.
|
||||
|
||||
|
||||
####################################
|
||||
# v1.5.6.0 - (2013-10-07) #
|
||||
####################################
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
"id";"Alias*";"Active (0/1)";"Customer e-mail*";"Customer ID";"Manufacturer";"Supplier";"Company";"Lastname*";"Firstname*";"Address 1*";"Address 2";"Postcode* / Zipcode*";"City*";"Country*";"State";"Other";"Phone";"Mobile Phone";"VAT number"
|
||||
1;"My Adress";1;"pub@prestashop.com";1;;;;"Doe";"John";"16, Main street";"2nd floor";75000;"PARIS ";"France";;;140138844;;
|
||||
2;"My work";1;"pub@prestashop.com";1;;;"My Company";"Doe";"John";"535, Baker street";;13000;"Marseile";"France";;;235445588;;
|
||||
3;"My work";0;;;"Apple Computer, Inc";;;"Jobs";"Steve";"1 Infinite Loop";;95014;"CUPERTINO";"United States";"California";;"(800) 275-2273";;
|
||||
id;Alias*;Active (0/1);Customer e-mail*;Customer ID;Manufacturer;Supplier;Company;Lastname*;Firstname*;Address 1*;Address 2;Zipcode*;City*;Country*;State;Other;Phone;Mobile Phone;VAT number
|
||||
1;Peter.Pan / New York;1;Peter.Pan@prestashop.com;;;;;Pan;Peter;360W, 42nd Street;;12001;New York;United States;New York;;01 02 03 04 05;06 02 03 04 05;
|
||||
2;Wendy.Moira.Darling / New York;1;Wendy.Moira.Darling@prestashop.com;;;;;Darling;Wendy Moira;360W, 42nd Street;;12001;New York;United States;New York;;01 02 03 04 05;06 02 03 04 05;
|
||||
3;Wendy.Moira.Darling / London;1;Wendy.Moira.Darling@prestashop.com;;;;;Darling;Wendy Moira;Lansdowne road 50 London;Kensington;W11;London;United Kingdom;;;01 02 03 04 05;06 02 03 04 05;
|
||||
4;Tiger.Lily / Arizona;1;Tiger.Lily@prestashop.com;;;;;Lily;Tiger;Brackin Ranch Road;;86001;Flagstaff;United States;Arizona;;01 02 03 04 05;06 02 03 04 05;
|
||||
5;Tiger.Lily / Le Chesnay;1;Tiger.Lily@prestashop.com;;;;;Lily;Tiger;53 passage des pas sages;;78150;Le Chesnay;France;;;01 02 03 04 05;06 02 03 04 05;
|
||||
6;James.Hook / Home;1;James.Hook@prestashop.com;;;;;Hook;James;Mass Gravesite;P.O. Box 007;2101;Cayman Brac;Cayman Islands;;;01 02 03 04 05;06 02 03 04 05;
|
||||
7;James Hook / Pro;1;James.Hook@prestashop.com;;;;Räuber Schätze GmBH;Hook;James;12 Leipziger Platz;;13505;Berlin;Germany;;;01 02 03 04 05;06 02 03 04 05;
|
||||
8;Tinker.Bell / Napaiiri;1;Tinker.Bell@prestashop.com;;;;Santa Clauss Inc.;Bell;Tinker;Tähtikuja 1;;96930;Napapiiri;Finland;;;01 02 03 04 05;06 02 03 04 05;
|
||||
9;Smee / Fiji;1;Bob.Smee@prestashop.com;;;;;Smee;Bob;Cross Island rd 321;Vanua Levu;;Savusavu;Fiji;;;01 02 03 04 05;06 02 03 04 05;
|
||||
10;Smee / Portland;1;Bob.Smee@prestashop.com;;;;Lattice Semiconductor;Smee;Bob;5555 NE Moore Ct;;97124;Hillsboro;United States;Oregon;;01 02 03 04 05;06 02 03 04 05;
|
||||
11;Tictac Crocodile / Home;1;Tictac.Crocodile@prestashop.com;;;;;Crocodile;Tictac;Old State Rd 4A;Saddlebunch keys;33040;Bay Point;United States;Florida;Beware the Shark :);01 02 03 04 05;06 02 03 04 05;
|
||||
12;Apple / address1;1;;;Apple;;;Doe;John;1–6 Infinite Loop;;95014;Cupertino;United States;California;;01 02 03 04 05;06 02 03 04 05;
|
||||
13;Shure / address1;1;;;Shure;;;Non-Doe;John;5800W Touhy Avenue;;60714;Niles;United States;Illinois;;01 02 03 04 05;06 02 03 04 05;
|
||||
14;Shure / address2;1;;;Shure;;;Schuss-mayer;Kurt;Jakob-Dieffenbacher-Str. 12;;75031;Eppingen;Germany;;;01 02 03 04 05;06 02 03 04 05;
|
||||
15;UPS / address1;1;;;;U.P.S;;Austin;Steve;55NE Glenlake Parkway;;30328;Atlanta;United States;Georgia;;01 02 03 04 05;06 02 03 04 05;
|
||||
16;FedEX / address1;1;;;;FedEX;;Noland;Chuck;3640 Hacks Cross Rd;;32125;Memphis;United States;Tennessee;;01 02 03 04 05;06 02 03 04 05;
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
id;Alias *;Search *;Active (0/1)
|
||||
3;microsft,micro;microsoft;1
|
||||
4;adbe,adaub;adobe;1
|
||||
id;Alias *;Search *;Active (0/1)
|
||||
1;ano, anno, nona;nano;1
|
||||
2;ipdo, idop, podi;ipod;1
|
||||
3;McBook, Mbcook;MacBook;1
|
||||
4;Blekin;Belkin;1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
id;Active (0/1);Name*;Parent Category;Root category (0/1);Description;Meta-title;Meta-keywords;Meta-description;URL rewritten;Image URL;ID ou nom de la boutique
|
||||
10;1;iPods;Home;0;Now that you can buy movies from the iTunes Store and sync them to your iPod, the whole world is your theater.;;;;music-ipods;http://yourlinktotheimage.com/img1000.jpg;1
|
||||
11;1;Accessories;Home;0;Wonderful accessories for your iPod;;;;accessories-ipod;http://yourlinktotheimage.com/img1001.jpg;1
|
||||
12;1;Laptops;Home;0;The latest Intel processor, a bigger hard drive, plenty of memory, and even more new features all fit inside just one liberating inch. The new Mac laptops have the performance, power, and connectivity of a desktop computer. Without the desk part.;Apple laptops;Apple laptops MacBook Air;Powerful and chic Apple laptops;laptops;http://yourlinktotheimage.com/img1002.jpg;1
|
||||
ID;Active (0/1);Name *;Parent category;Root category (0/1) ;Description;Meta title;Meta keywords;Meta description;URL rewritten;Image URL
|
||||
10;1;iPods;Home;0;Now that you can buy movies from the iTunes Store and sync them to your iPod, the whole world is your theater.;Meta title-iPods;Meta keywords-iPods;Meta description-iPods;music-ipods;http://yourlinktotheimage.com/img1000.jpg
|
||||
11;1;Accessories;Home;0;Wonderful accessories for your iPod;Meta title-Accessories;Meta keywords-Accessories;Meta description-Accessories;accessories-ipod;http://yourlinktotheimage.com/img1001.jpg
|
||||
12;1;Laptops;Home;0;The latest Intel processor, a bigger hard drive, plenty of memory, and even more new features all fit inside just one liberating inch. The new Mac laptops have the performance, power, and connectivity of a desktop computer. Without the desk part.;Meta title-Laptops;Meta keywords-Laptops;Meta description-Laptops;laptops;http://yourlinktotheimage.com/img1002.jpg
|
||||
|
||||
|
@@ -1,4 +1,28 @@
|
||||
Id_product*;Group*;Attribute*;Supplier_reference;Reference;Ean13;Upc;Wholesale price;Impact on price;Ecotax;Quantity;Minimal quantity;Impact on weight;Default (0 = No, 1 = Yes);Image position;Image URL;Delete existing images (0 = No, 1 = Yes);ID / Name of shop
|
||||
1;Capacity:select:0, Color:color:1;16Go:0, Bleu:1;Ref suppplier 1;Ref 1;1234567891234;123456789123;0;None;0.000000;10;1;None;0;1;http://youdomain.com/img.jpg;0;1
|
||||
1;Capacity:select:0, Color:color:1;16Go:0, Red:1;Ref suppplier 2;Ref 2;1234567891235;123456789124;0;None;0.000000;10;1;None;0;2;http://youdomain.com/img.jpg;0;1
|
||||
|
||||
Product ID*;Attribute (Name:Type:Position)*;Value (Value:Position)*;Supplier reference;Reference;EAN13;UPC;Wholesale price;Impact on price;Ecotax;Quantity;Minimal quantity;Impact on weight;Default (0 = No, 1 = Yes);Image position;Image URL;Delete existing images (0 = No, 1 = Yes);ID / Name of shop
|
||||
1;Color:color:0, Disk space:select:1;Blue:0, 16GB:1;RF-Nano-Blue-16GB;RP-Nano-Blue-16GB;0000080446392;;100;40;;10;1;0;0;1;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Blue:0, 8GB:1;RF-Nano-Blue-8GB;RP-Nano-Blue-8GB;0000080446393;;80;0;;10;1;0;0;2;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Yellow:0, 16GB:1;RF-Nano-Yellow-16GB;RP-Nano-Yellow-16GB;0000080446394;;100;40;;10;1;0;0;3;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Yellow:0, 8GB:1;RF-Nano-Yellow-8GB;RP-Nano-Yellow-8GB;0000080446395;;80;0;;10;1;0;1;4;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Metal:0, 16GB:1;RF-Nano-Metal-16GB;RP-Nano-Metal-16GB;0000080446396;;100;40;;10;1;0;0;5;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Metal:0, 8GB:1;RF-Nano-Metal-8GB;RP-Nano-Metal-8GB;0000080446397;;80;0;;10;1;0;0;6;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Black:0, 16GB:1;RF-Nano-Black-16GB;RP-Nano-Black-16GB;0000080446398;;100;40;;10;1;0;0;7;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Black:0, 8GB:1;RF-Nano-Black-8GB;RP-Nano-Black-8GB;0000080446399;;80;0;;10;1;0;0;8;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Orange:0, 16GB:1;RF-Nano-Orange-16GB;RP-Nano-Orange-16GB;0000080446400;;100;40;;10;1;0;0;9;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Orange:0, 8GB:1;RF-Nano-Orange-8GB;RP-Nano-Orange-8GB;0000080446401;;80;0;;10;1;0;0;10;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Pink:0, 16GB:1;RF-Nano-Pink-16GB;RP-Nano-Pink-16GB;0000080446402;;100;40;;10;1;0;0;11;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Pink:0, 8GB:1;RF-Nano-Pink-8GB;RP-Nano-Pink-8GB;0000080446403;;80;0;;10;1;0;0;12;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Green:0, 16GB:1;RF-Nano-Green-16GB;RP-Nano-Green-16GB;0000080446404;;100;40;;10;1;0;0;13;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Green:0, 8GB:1;RF-Nano-Green-8GB;RP-Nano-Green-8GB;0000080446405;;80;0;;10;1;0;0;14;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Purple:0, 16GB:1;RF-Nano-Purple-16GB;RP-Nano-Purple-16GB;0000080446406;;100;40;;10;1;0;0;15;http://youdomain.com/img.jpg;1;
|
||||
1;Color:color:0, Disk space:select:1;Purple:0, 8GB:1;RF-Nano-Purple-8GB;RP-Nano-Purple-8GB;0000080446407;;80;0;;10;1;0;0;16;http://youdomain.com/img.jpg;1;
|
||||
2;Color:color:0;Metal:0;RF-Shuffle-Metal;RP-Shuffle-Metal;0685387080038;;40;0;;12;1;0;1;1;http://youdomain.com/img.jpg;1;
|
||||
2;Color:color:0;Blue:0;RF-Shuffle-Blue;RP-Shuffle-Blue;0685387080039;;40;0;;12;1;0;0;2;http://youdomain.com/img.jpg;1;
|
||||
2;Color:color:0;Pink:0;RF-Shuffle-Pink;RP-Shuffle-Pink;0685387080040;;40;0;;12;1;0;0;3;http://youdomain.com/img.jpg;1;
|
||||
2;Color:color:0;Green:0;RF-Shuffle-Green;RP-Shuffle-Green;0685387080041;;40;0;;12;1;0;0;4;http://youdomain.com/img.jpg;1;
|
||||
3;Color:color:0, Disk space:select:1, ICU:select:2;Metal:0, 80GB Parallel ATA Drive @ 4200 rpm:1, 1.60GHz Intel Core 2 Duo:2;RF-MacBookAir80GB-1.6MHz;RP-MacBookAir80GB-1.6MHz;0123456791230;;0;750;;10;1;0;0;1;http://youdomain.com/img.jpg;1;
|
||||
3;Color:color:0, Disk space:select:1, ICU:select:2;Metal:0, 80GB Parallel ATA Drive @ 4200 rpm:1, 1.80GHz Intel Core 2 Duo:2;RF-MacBookAir80GB-1.6MHz;RP-MacBookAir80GB-1.6MHz;0123456791230;;0;0;;10;1;0;1;2;http://youdomain.com/img.jpg;1;
|
||||
3;Color:color:0, Disk space:select:1, ICU:select:2;Metal:0, Optional 64GB solid-state drive:1, 1.60GHz Intel Core 2 Duo:2;RF-MacBookAir64GB-1.8MHz;RP-MacBookAir64GB-1.8MHz;0123456791230;;0;225;;10;1;0;0;3;http://youdomain.com/img.jpg;1;
|
||||
3;Color:color:0, Disk space:select:1, ICU:select:2;Metal:0, Optional 64GB solid-state drive:1, 1.60GHz Intel Core 2 Duo:2;RF-MacBookAir64GB-1.8MHz;RP-MacBookAir64GB-1.8MHz;0123456791230;;0;975;;10;1;0;0;4;http://youdomain.com/img.jpg;1;
|
||||
5;Disk space:select:1;8GB:0;RF-IpodTouch8GB;RP-IpodTouch8GB;8456123645123;;200;0;;10;1;0;1;1;http://youdomain.com/img.jpg;1;
|
||||
5;Disk space:select:1;16GB:0;RF-IpodTouch16GB;RP-IpodTouch16GB;8456123645124;;250;75;;10;1;0;0;2;http://youdomain.com/img.jpg;1;
|
||||
5;Disk space:select:1;32GB:0;RF-IpodTouch32GB;RP-IpodTouch32GB;8456123645125;;300;150;;10;1;0;0;3;http://youdomain.com/img.jpg;1;
|
||||
|
||||
|
@@ -1,3 +1,10 @@
|
||||
id;Active (0/1);Gender ID (Mr=1, Ms=2, else 9);E-mail*;Password*;Birthday;Lastname*;Firstname*;Newletter (0/1);Opt-in (0/1);Groups (x,y,z...);Default group ID;ID / Name of shop
|
||||
1;1;1;johndoe@prestashop.com;#res152EDRF;1987-09-21;Doe;John;1;1;1,2;1;1
|
||||
2;1;2;mariedoe@prestashop.com;58@ret26#;1986-10-14;Doe;Marie;0;1;1,3;3;1
|
||||
ID;Active (0/1);Titles ID (Mr = 1, Ms = 2, else 0);Email *;Password *;Birthday (yyyy-mm-dd);Last Name *;First Name *;Newsletter (0/1);Opt-in (0/1);Groups (x,y,z...);Default group ID
|
||||
1;1;1;Peter.Pan@prestashop.com;123456789;1987-04-02;Pan;Peter;1;0;Customer;Customer
|
||||
2;1;2;Wendy.Moira.Darling@prestashop.com;123456789;1989-11-12;Darling;Wendy Moira;1;0;Customer;Customer
|
||||
3;1;2;Tiger.Lily@prestashop.com;123456789;1982-02-28;Lily;Tiger;1;0;Customer;Customer
|
||||
4;1;1;James.Hook@prestashop.com;123456789;1952-12-04;Hook;James;0;1;Customer, Carribean;Carribean
|
||||
5;1;2;Tinker.Bell@prestashop.com;123456789;1900-01-01;Bell;Tinker;1;1;Customer;Customer
|
||||
6;1;1;Bob.Smee@prestashop.com;123456789;1971-10-21;Smee;Bob;1;1;Customer;Customer
|
||||
7;1;1;Tictac.Crocodile@prestashop.com;123456789;1991-09-27;Crocodile;Tictac;0;0;Customer, Carribean;Carribean
|
||||
8;1;1;Jack.Banning@prestashop.com;123456789;2003-07-05;Banning;Jack;0;0;Kids;Kids
|
||||
9;0;2;Maggie.Banning@prestashop.com;123456789;2006-02-27;Banning;Maggie;0;0;Kids;Kids
|
||||
|
||||
|
@@ -1,3 +1,63 @@
|
||||
id;Active (0/1);Name*;Description;Short description;Meta-title;Meta-keywords;Meta-description;Image URL
|
||||
1;1;Apple Computer, Inc;;;;;http://youdomain.com/img.jpg
|
||||
2;1;Shure Incorporated;;;;;http://youdomain.com/img.jpg
|
||||
ID;Active (0/1);Name *;Description;Short description;Meta title;Meta keywords;Meta description
|
||||
1;1;Apple;"<p style=""text-align: justify;"">The company was founded on April 1, 1976, and incorporated as Apple Computer, Inc. on January 3, 1977.The word ""Computer"" was removed from its name on January 9, 2007, the same day Steve Jobs introduced the iPhone, reflecting its shifted focus towards consumer electronics.<br /><br />Apple is the world's second-largest information technology company by revenue after Samsung Electronics, and the world's third-largest mobile phone maker after Samsung and Nokia.Fortune magazine named Apple the most admired company in the United States in 2008, and in the world from 2008 to 2012. However, the company has received criticism for its contractors' labor practices, and for Apple's own environmental and business practices.<br /><br />As of May 2013, Apple maintains 408 retail stores in fourteen countries as well as the online Apple Store and iTunes Store, the latter of which is the world's largest music retailer. Apple is the largest publicly traded corporation in the world by market capitalization, with an estimated value of US$415 billion as of March 2013. As of Sept 29 2012, the company had 72,800 permanent full-time employees and 3,300 temporary full-time employees worldwide. Its worldwide annual revenue in 2012 totalled $156 billion. In May 2013, Apple entered the top ten of the Fortune 500 list of companies for the first time, rising 11 places above its 2012 ranking to take the sixth position.</p>
|
||||
<p> </p>
|
||||
<p style=""text-align: right;""><a href=""http://en.wikipedia.org/wiki/Apple_Inc."" target=""_blank""><span style=""color: #008080;""><em><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps atn"">(</span><span>For more,</span> <span class=""hps"">go to the</span> </span></span><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps"">original article</span></span></span><span style=""color: #008080;""><span id=""result_box"" lang=""en""> <span class=""hps"">on</span> </span></span><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps"">Wikipedia)</span></span></span></em></span></a></p>";"<p> </p>
|
||||
<div class=""floatnone""><strong><span class=""image""><img style=""display: block; margin-left: auto; margin-right: auto;"" src=""http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Apple_logo_black.svg/101px-Apple_logo_black.svg.png"" alt=""1998-present"" width=""101"" height=""121"" /></span></strong></div>
|
||||
<div class=""floatnone""> </div>
|
||||
<p style=""text-align: justify;""> </p>
|
||||
<p style=""text-align: justify;""><strong>Apple Inc.,</strong> formerly Apple Computer, Inc., is an American multinational corporation headquartered in Cupertino, California that designs, develops, and sells consumer electronics, computer software and personal computers.</p>";MetaTitle-Apple;MetaKeywords-Apple;Meta description-Apple
|
||||
2;1;Shure;"<h2 style=""text-align: justify;""><span class=""mw-headline""><br /></span></h2>
|
||||
<h2 style=""text-align: justify;""><span id=""Company_history"" class=""mw-headline"">Company history</span></h2>
|
||||
<p style=""text-align: justify;"">Shure was founded by Sidney N. Shure in 1925 as ""The Shure Radio Company"", selling radio parts kits in the days before complete manufactured radios were available. The company's office was located at 19 South Wells Street in downtown Chicago, Illinois. The following year, Shure published its first direct mail catalog, which was one of only six radio parts catalogs in the United States at the time. By 1928, the company had grown to over 75 employees, and Sidney's brother, Samuel J. Shure, joined the company, which was renamed Shure Brothers Company. The company moved into new offices at 335 West Madison Street in Chicago. In 1929, with the advent of the Great Depression and the increased availability of factory-built radios, Shure Brothers Company was forced to greatly reduce their staff and became the exclusive US distributor of a small microphone manufacturer. In 1930, Samuel J. Shure left the company.</p>
|
||||
<p style=""text-align: justify;"">In 1931, Shure and engineer Ralph Glover began development of the first Shure microphone, and the following year, the Model 33N Two-Button Carbon Microphone was introduced, making Shure one of only four microphone manufacturers in the U.S.. Shure's first condenser microphone, crystal microphone, and microphone suspension support system (for which they received their first patent) were all introduced that same decade. In 1939, Shure introduced the Model 55 Unidyne Microphone, which went on to become one of the world's most recognized microphones.</p>
|
||||
<p style=""text-align: justify;"">In 1941, Shure was contracted by the United States armed forces to supply microphones during World War II, and by the following year, the T-17B was the microphone most widely used by the U.S. Army and Navy. Shure also manufactured throat, headset, and oxygen mask microphones, and adopted the United States Military Standard for all Shure microphones.</p>
|
||||
<p style=""text-align: justify;"">By the mid-1940s, Shure was also manufacturing and supplying phonograph cartridges to major phonograph manufacturers including Philco, RCA, Emerson, Magnavox, Admiral, and Motorola, and was the largest producer of phonograph cartridges in the U.S. at that time. Among Shure's innovations in phonograph cartridge design was Ralph Glover and Ben Bauer's ""needle-tilt"" principle for minimizing record wear while improving sound reproduction, and Jim Kogen's engineering concept of ""trackability."" Shure produced the first phonograph cartridge capable of playing both long-playing and 78 rpm records, the first cartridge with tracking force of only one gram, and the first cartridge meeting the requirements of stereo recording. At the peak of Shure's phonograph cartridge production, the company was producing approximately 28,000 cartridges per day, with 25,000 of those coming from a Shure phonograph cartridge plant in Phoenix, Arizona. After the introduction of compact discs in the 1980s reduced the demand for phonograph cartridges, Shure closed the Phoenix facility but continued manufacturing phonograph cartridges, and continues to manufacture them today.</p>
|
||||
<p style=""text-align: justify;"">Shure also developed and produced products for medical applications. In 1937, their 66A piezoelectric stethophone was designed to accurately reproduce chest sounds, and in the early 1960s, the SP-5, SP-5S and SP-6 stethoscope pickups were produced. Shure also produced hearing aid cartridges used in hearing aid products from manufacturers like Maico, Telex, Dictograph, Otarian, Vocalite, and Trimm.</p>
|
||||
<p style=""text-align: justify;"">In 1956, Shure moved its corporate headquarters to Hartrey Avenue in Evanston, Illinois, where it remained for 47 years. Beginning in the 1956, Shure manufactured magnetic tape recording heads and two years later, the company announced it was ready to mass-produce 4-ch recording heads. By 1964, however, Shure announced it would no longer produce tape recording heads due to increased competition.</p>
|
||||
<p style=""text-align: justify;"">In 1953, Shure introduced their first wireless microphone system for performers, and in 1959, they introduced the Unidyne III Microphone, which was the predecessor to the SM57, which would be introduced, along with the SM58, six years later. Shure also produced portable equipment for broadcast field recording like Vocal Master, the M67 Portable Mixer, and the FP31 Portable Mixer. In 1990, Shure entered the wireless microphone market with the L-Series.</p>
|
||||
<p style=""text-align: justify;"">In 1981, James Kogen, Executive Vice President, Operations, was promoted to President and General Manager of Shure. In 1995, Sidney N. Shure died at the age of 93, and Rose L. Shure was elected Chairman of the Board of Directors. In 1996, James Kogen retired; Santo (Sandy) LaMantia, Vice President of Engineering, was named President and CEO. Shure Brothers Incorporated was officially renamed Shure Incorporated in 1999.</p>
|
||||
<p>In 2001, Shure acquired the Popper Stopper brand of studio pop filters from Middle Atlantic Products Inc. The following year, Shure adopted hearing conservation as the company’s corporate cause and established the Shure Bid for Hearing program. In 2003, Shure moved into new corporate headquarters in Niles, Illinois, into a building designed by architect Helmut Jahn which was originally the headquarters of <span class=""new"">HA•LO Industries</span>. The 65,000-square-foot (6,000 m<sup>2</sup>) Technology Annex designed by Krueck and Sexton Architects, opened in 2005, houses Shure's Performance Listening Center. In 2008, Shure celebrated the opening of The S.N. Shure Theater and Interactive Display at their corporate headquarters.</p>
|
||||
<h3 style=""text-align: justify;""><span id=""International_offices"" class=""mw-headline"">International offices</span></h3>
|
||||
<ul style=""text-align: justify;"">
|
||||
<li>1991: Shure Europe GmbH opened in Heilbronn, Germany to provide sales, service and support to Shure distribution centers in 34 European countries.</li>
|
||||
<li>1999: Shure Asia Limited is opened in Hong Kong to serve Distribution Centers and distributors throughout Asia and the Pacific Rim.</li>
|
||||
<li>2002: Shure Distribution GmbH established as a subsidiary of Shure Europe GmbH, to handle direct sales with Shure dealers in Germany.</li>
|
||||
<li>2003: HW International, Shure's United Kingdom Distribution Center, acquired and renamed Shure Distribution UK.</li>
|
||||
<li>2005: Sales and marketing office opened in Shanghai, China.</li>
|
||||
<li>2006: Sales and marketing office opened in Tokyo, Japan.</li>
|
||||
<li>2010: New subsidiary formed in the Netherlands</li>
|
||||
</ul>
|
||||
<h3 style=""text-align: justify;""><span id=""Production_facility_expansion"" class=""mw-headline"">Production facility expansion</span></h3>
|
||||
<ul style=""text-align: justify;"">
|
||||
<li>1982: Manufacturing facility opened in Wheeling, Illinois</li>
|
||||
<li>1983: Phonograph cartridge manufacturing facility opened in Agua Prieta, Mexico</li>
|
||||
<li>1984: Wired microphone manufacturing facility opened in Juarez, Mexico</li>
|
||||
<li>1989: Juarez, Mexico facility expanded</li>
|
||||
<li>1994: Agua Prieta facility expanded in 1994</li>
|
||||
<li>2005: Manufacturing facility opened in Suzhou, China</li>
|
||||
</ul>
|
||||
<p><sup id=""cite_ref-The_History_of_Shure_Incorporated_7-1"" class=""reference""><span><a href=""http://en.wikipedia.org/wiki/Samsung"" target=""_blank""><span style=""color: #008080;""><em><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps""><br class=""hps atn"" /></span></span></span></em></span></a></span></sup></p>
|
||||
<p style=""text-align: right;""><a href=""http://en.wikipedia.org/wiki/Shure"" target=""_blank""><span><span style=""color: #008080;""><em><span style=""color: #008080;""><span lang=""en""><span class=""hps""><span style=""color: #008080;""><em><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps atn"">(</span><span>For more,</span> <span class=""hps"">go to the</span> <span class=""hps"">original article</span> <span class=""hps"">on</span> <span class=""hps"">Wikipedia)</span></span></span></em></span></span></span></span></em></span></span></a></p>";"<p> </p>
|
||||
<p style=""text-align: center;""><span class=""image""><img class=""thumbimage"" src=""http://upload.wikimedia.org/wikipedia/en/thumb/f/f7/Shure_us_pro_circle_s_logo.gif/220px-Shure_us_pro_circle_s_logo.gif"" alt="""" width=""131"" height=""131"" /></span></p>
|
||||
<p> </p>
|
||||
<p style=""text-align: justify;""><strong>Shure Incorporated</strong> is an American corporation originally founded by Sidney N. Shure in Chicago, Illinois in 1925 as a supplier of radio parts kits. The company became a consumer and professional audio-electronics manufacturer of microphones, wireless microphone systems, phonograph cartridges, discussion systems, mixers, and digital signal processing.</p>
|
||||
<p style=""text-align: justify;"">The company also produces listening products, including headphones, high-end earbuds and personal monitor systems.</p>";MetaTitle-Shure;MetaKeywords-Shure;Meta description-Shure
|
||||
3;1;Sony;"<h2><span class=""mw-headline""><br /></span></h2>
|
||||
<h2><span id=""History"" class=""mw-headline"">History</span></h2>
|
||||
<p>Sony found its beginning in the wake of World War II. In 1946, Masaru Ibuka started an electronics shop in a bomb-damaged department store building in Tokyo. The company had $530 in capital and a total of eight employees. The next year, he was joined by his colleague, Akio Morita, and they founded a company called <strong>Tokyo Tsushin Kogyo</strong> (Tokyo Telecommunications Engineering Corporation). The company built Japan's first tape recorder, called the Type-G. In 1958 the company name was changed to Sony.</p>
|
||||
<p style=""text-align: justify;"">In the early 1950s, Ibuka traveled in the United States and heard about Bell Labs' invention of the...</p>
|
||||
<p style=""text-align: right;""><span style=""color: #008080;""><em><a href=""http://en.wikipedia.org/wiki/Sony"" target=""_blank""><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps atn"">(</span><span>For more,</span> <span class=""hps"">go to the</span> <span class=""hps"">original article</span> <span class=""hps"">on</span> <span class=""hps"">Wikipedia)</span></span><br /></span></a></em></span></p>";"<p style=""text-align: justify;""> </p>
|
||||
<p><span class=""image""><img style=""display: block; margin-left: auto; margin-right: auto;"" src=""http://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Sony_logo.svg/220px-Sony_logo.svg.png"" alt=""Sony logo.svg"" width=""220"" height=""37"" /></span></p>
|
||||
<p> </p>
|
||||
<p><strong><br /></strong></p>
|
||||
<p style=""text-align: justify;""><strong>Sony Corporation</strong>, commonly referred to as Sony, is a Japanese multinational conglomerate corporation headquartered in Konan Minato, Tokyo, Japan. Its diversified business is primarily focused on the electronics, game, entertainment and financial services sectors. The company is one of the leading manufacturers of electronic products for the consumer and professional markets. Sony is ranked 87th on the 2012 list of Fortune Global 500.</p>";MetaTitle-Sony;MetaKeywords-Sony;Meta description-Sony
|
||||
4;1;Samsung;"<p style=""text-align: justify;"">Samsung was founded by Lee Byung-chul in 1938 as a trading company. Over the next three decades the group diversified into areas including food processing, textiles, insurance, securities and retail. Samsung entered the electronics industry in the late 1960s and the construction and shipbuilding industries in the mid-1970s; these areas would drive its subsequent growth. Following Lee's death in 1987, Samsung was separated into four business groups – Samsung Group, Shinsegae Group, CJ Group and Hansol Group. Since the 1990s Samsung has increasingly globalized its activities, and electronics, particularly mobile phones and semiconductors, have become its most important source of income.</p>
|
||||
<p>Notable Samsung industrial subsidiaries include Samsung Electronics (the <span class=""mw-redirect"">world's largest information technology company</span> measured by 2012 revenues, and 4th in market value), Samsung Heavy Industries (the world's 2nd-largest <span class=""mw-redirect"">shipbuilder</span> measured by 2010 revenues), and Samsung Engineering and <span class=""mw-redirect"">Samsung C&T</span> (respectively the world's 13th and 36th-largest construction companies). Other notable subsidiaries include Samsung Life Insurance (the world's 14th-largest life insurance company), Samsung Everland (operator of Everland Resort, the oldest <span class=""mw-redirect"">theme park</span> in South Korea), Samsung Techwin (an aerospace, surveillance and defense company) and <span class=""new"">Cheil Worldwide</span> (the world's 16th-largest advertising agency measured by 2011 revenues).</p>
|
||||
<p>Samsung has a powerful influence on South Korea's economic development, politics, media and culture, and has been a major driving force behind the ""Miracle on the Han River"". Its affiliate companies produce around a fifth of South Korea's total exports. Samsung's revenue was equal to 17% of the South Korea's $1,082 billion GDP.</p>
|
||||
<p style=""text-align: justify;"">In 2013, Samsung began construction on building the world's largest ...</p>
|
||||
<p style=""text-align: right;""><a href=""http://en.wikipedia.org/wiki/Samsung"" target=""_blank""><span style=""color: #008080;""><em><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps atn"">(</span><span>For more,</span> <span class=""hps"">go to the</span> <span class=""hps"">original article</span> <span class=""hps"">on</span> <span class=""hps"">Wikipedia)</span></span></span></em></span></a></p>";"<p><strong><br /></strong></p>
|
||||
<div class=""center"">
|
||||
<div class=""floatnone"" style=""text-align: center;""><span class=""image""><img src=""http://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Samsung_Logo.svg/200px-Samsung_Logo.svg.png"" alt=""Samsung Logo.svg"" width=""200"" height=""68"" /></span></div>
|
||||
</div>
|
||||
<p><strong><br /></strong></p>
|
||||
<p style=""text-align: justify;""><strong>Samsung Group</strong> is a South Korean multinational conglomerate company headquartered in Samsung Town, Seoul. It comprises numerous subsidiaries and affiliated businesses, most of them united under the <em>Samsung</em> brand, and is the largest South Korean <em>chaebol</em> (business conglomerate).</p>";MetaTitle-Samsung;MetaKeywords-Samsung;Meta description-Samsung
|
||||
|
||||
|
@@ -1,3 +1,8 @@
|
||||
ID;Active (0/1);Name*;Categories (x,y,z,…);Price tax excl. Or Price tax excl;Tax rules id;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyy-mm-dd);Discount to (yyy-mm-dd);Reference #;Supplier reference #;Supplier;Manufacturer;EAN13;UPC;Ecotax;Width;Height;Depth;Weight;Quantity;Minimum quantity;Visibility;Additional shipping cost;Unity;Unity price ratio;Short description;Description;Tags (x,y,z,...);Meta-title;Meta-keywords;Meta-description;URL rewritten;Text when in-stock;Text if back-order allowed;Available for order (0 = No, 1 = Yes);Product available date;Product creation date;Show price (0 = No, 1 = Yes);Image URLs (x,y,z,...);Delete existing images (0 = No, 1 = Yes);Feature (Name:Value:Position);Available online only (0 = No, 1 = Yes);Condition (new,used,refurbished);Customizable;File fields;Text fields;Out of stock;Advanced stock management;ID / Name of shop
|
||||
1;1;iPod Nano;Home, iPods;49;1;40;0;;;;;92458844;54778855;AppleStore;Apple Computer, Inc;5605055055056;560505505555;0;1;2;3;0.5;800;1;both;0.00;;0.00;New design. New features. Now i….;Curved ahead of the curve. For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass de...;apple, ipod, nano;Meta title;Meta keywords;Meta description;ipod-nano;In stock;Out stock;1;;;1;http://youdomain.com/img.jpg, http://yourdomain.com/img1.jpg;0;Music:Rock:1;0;new;0;0;0;2;0;1
|
||||
2;1;iPod shuffle;Home, iPods;66.05;1;50;0;;;;;92458845;54778855;AppleStore;Apple Computer, Inc;5605055055057;560505505556;0;1;2;3;0.5;800;1;both;0.00;;0.00;iPod shuffle, the world’s most wearabl….;You want listen to music;ipod, shuffle;Meta title;Meta keywords;Meta description;ipod-shuffle;In stock;Out stock;1;;;1;http://youdomain.com/img25.jpg, http://yourdomain.com/img30.jpg;0;Music:Blues:2;0;new;0;0;0;2;0;1
|
||||
ID;Active (0/1);Name *;Categories (x,y,z...);Price tax excluded or Price tax included;Tax rules ID;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyyy-mm-dd);Discount to (yyyy-mm-dd);Reference #;Supplier reference #;Supplier;Manufacturer;EAN13;UPC;Ecotax;;;;Weight;Quantity;;;;;;Short description;Description;Tags (x,y,z...);Meta title;Meta keywords;Meta description;URL rewritten;Text when in stock;Text when backorder allowed;Available for order (0 = No, 1 = Yes);Product available date;Product creation date;Show price (0 = No, 1 = Yes);Image URLs (x,y,z...);Delete existing images (0 = No, 1 = Yes);Feature(Name:Value:Position);Available online only (0 = No, 1 = Yes);Condition;Customizable (0 = No, 1 = Yes);Uploadable files (0 = No, 1 = Yes);Text fields (0 = No, 1 = Yes);Out_of_stock;Advanced stock management;ID / Name of shop
|
||||
1;1;iPod Nano;iPods;100;1;80;1;;5.5;2013-06-01;2018-12-31;RP-demo_1;RF-demo_1;Applestore;Apple;1234567890123;;1;0.6;0.2;0.4;0.068357;160;1;;;;;<p>New design.</p>;<p>New design.</p>;apple, ipod, nano;Meta title-Nano;Meta keywords-Nano;Meta description-Nano;iPod-Nano;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-01;1;http://localhost/prestashop_1.5.6.0/img/p/1/5/15.jpg;0;;0;new;0;0;0;0;0;
|
||||
2;1;iPod shuffle;iPods;60;1;40;1;;;2013-06-01;2018-12-31;RP-demo_2;RF-demo_2;Applestore;Apple;1234567890123;;1;0.1;0.1;0.1;0.027563;120;1;both;;;;<p>New design.</p>;<p>New design.</p>;ipod, shuffle;Meta title-Shuffle;Meta keywords-Shuffle;Meta description-Shuffle;iPod-shuffle;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-02;1;http://localhost/prestashop_1.5.6.0/img/p/2/3/23.jpg;0;;0;new;0;0;0;0;0;
|
||||
3;1;MacBook Air;Laptops;1500;1;1000;1;100;;2013-06-01;2018-12-31;RP-demo_3;RF-demo_3;Applestore;Apple;1234567890123;;2;1.31;0.3;1;2.976846;400;1;catalog;;;;<p>New design.</p>;<p>New design.</p>;MacBook, Air;Meta title-McBookAir;Meta keywords-McBookAir;Meta description-McBookAir;MacBook-Air;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-03;1;http://localhost/prestashop_1.5.6.0/img/p/1/1.jpg;1;;0;new;0;0;0;0;0;
|
||||
4;1;MacBook;Laptops;1150;1;750;1;;;2013-06-01;2018-12-31;RP-demo_4;RF-demo_4;Applestore;Apple;1234567890123;;2;1.31;0.3;1;4.454244;75;1;search;;;;<p>New design.</p>;<p>New design.</p>;MacBook, Pro;Meta title-McBookPro;Meta keywords-McBookPro;Meta description-McBookPro;MacBook;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-04;1;http://localhost/prestashop_1.5.6.0/img/p/6/6.jpg;1;;0;new;0;0;0;0;0;
|
||||
5;1;iPod touch;iPods;240;1;150;1;;;2013-06-01;2018-12-31;RP-demo_5;RF-demo_5;Applestore;Apple;1234567890123;;1;0.6;0.2;0.4;0.194046;120;1;none;;;;<p>New design.</p>;<p>New design.</p>;Ipod touch;Meta title-IpodTouch;Meta keywords-IpodTouch;Meta description-IpodTouch;iPod-touch;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-05;1;http://localhost/prestashop_1.5.6.0/img/p/7/7.jpg;0;;1;used;0;0;0;0;0;
|
||||
6;1;Belkin Leather Folio for iPod nano - Black / Chocolate;Accessories;25;1;150;1;;;2013-06-01;2018-12-31;RP-demo_6;RF-demo_6;Nippon Electronic Import;Belkin;1234567890123;;0;0.6;0.2;0.4;0.038588;25;1;;20;;;<p>New design.</p>;<p>New design.</p>;Folio, leather;Meta title-BelkinLeatherFolio;Meta keywords-BelkinLeatherFolio;Meta description-BelkinLeatherFolio;Belkin-Leather-Folio-for-iPod-nano---Black-Chocolate;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-06;1;http://localhost/prestashop_1.5.6.0/img/p/1/3/13.jpg;0;;1;refurbished;0;0;0;0;0;
|
||||
7;1;Shure SE210 Sound-Isolating Earphones for iPod and iPhone;Accessories;125;2;80;1;;;2013-06-01;2018-12-31;RP-demo_7;RF-demo_7;Shure Online Store;Shure;1234567890123;;0;0.1;0.1;0.1;0.040793;15;1;;;;;<p>New design.</p>;<p>New design.</p>;Headphones;Meta title-ShureEarphones;Meta keywords-ShureEarphones;Meta description-ShureEarphones;Shure-SE210-Sound-Isolating-Earphones-for-iPod-and-iPhone;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-07;1;http://localhost/prestashop_1.5.6.0/img/p/1/4/14.jpg;0;;1;new;0;0;0;0;0;
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
id;Active (0/1);Name*;Description;Short description;Meta-title;Meta-keywords;Meta-description;Image URL
|
||||
1;1;Applestore;;;;;http://youdomain.com/img.jpg
|
||||
2;1;Shure Online Store;;;;;http://youdomain.com/img.jpg
|
||||
ID;Active (0/1);Name *;Description;Short description;Meta title;Meta keywords;Meta description
|
||||
1;1;Applestore;<p>The Apple Store is a chain of retail stores owned and operated by Apple Inc., dealing in computers and consumer electronics. The stores sell Macintosh personal computers, software, iPods, iPads, iPhones, third-party accessories, and other consumer electronics such as Apple TV. Some high profile stores feature a Theatre for presentations and workshops and a Studio for training with Apple products; all stores offer a Genius Bar for technical support and repairs, as well as free workshops available to the public. Under the leadership of Ron Johnson, the former Senior Vice President of Retail Operations, the Apple Stores have, according to an article in the New York Times, been responsible for "[turning] the boring computer sales floor into a sleek playroom filled with gadgets".</p>;;Meta title-Applestore;Meta keywords-Applestore;Meta description-Applestore
|
||||
2;1;Shure Online Store;<p><em>- No description -</em></p>;;Meta title-Shure Online Store;Meta keywords-Shure Online Store;Meta description-Shure Online Store
|
||||
3;1;Nippon Electronic Import;<p><em>- No description -</em></p>;;Meta title-Nippon Electronic Import;Meta keywords-Nippon Electronic Import;Meta description-Nippon Electronic Import
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 718.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user