概述
1,路径:trunkcontrollersadminAdminOrdersController.php
2, $this->_select = ‘a.id_order AS bb
3,
t
h
i
s
−
>
f
i
e
l
d
s
l
i
s
t
=
a
r
r
a
y
m
e
r
g
e
(
this->fields_list = array_merge(
this−>fieldslist=arraymerge(this->fields_list, array(
‘bb’ => array(
‘title’ =>
t
h
i
s
−
>
t
r
a
n
s
(
′
b
l
a
c
k
l
i
s
t
′
,
a
r
r
a
y
(
)
,
′
A
d
m
i
n
.
G
l
o
b
a
l
′
)
,
′
a
l
i
g
n
′
=
>
′
t
e
x
t
−
c
e
n
t
e
r
′
,
′
c
a
l
l
b
a
c
k
′
=
>
′
p
r
i
n
t
P
D
F
I
c
o
n
s
1
′
,
)
4
,
获
取
相
应
的
数
据
/
/
i
d
o
r
d
e
r
是
s
e
l
e
c
t
查
询
到
传
递
过
来
的
p
u
b
l
i
c
f
u
n
c
t
i
o
n
p
r
i
n
t
P
D
F
I
c
o
n
s
1
(
this->trans('blacklist', array(), 'Admin.Global'), 'align' => 'text-center', 'callback' => 'printPDFIcons1', ) 4, 获取相应的数据 //id_order是select 查询到传递过来的 public function printPDFIcons1(
this−>trans(′blacklist′,array(),′Admin.Global′),′align′=>′text−center′,′callback′=>′printPDFIcons1′,)4,获取相应的数据//idorder是select查询到传递过来的publicfunctionprintPDFIcons1(id_order)
{
if($id_order)
{
//获取邮箱,地址,手机号,姓名
r
e
s
u
l
t
=
D
b
:
:
g
e
t
I
n
s
t
a
n
c
e
(
)
−
>
g
e
t
R
o
w
(
′
S
E
L
E
C
T
∗
F
R
O
M
′
.
D
B
P
R
E
F
I
X
.
′
o
r
d
e
r
s
o
L
E
F
T
J
O
I
N
‘
′
.
D
B
P
R
E
F
I
X
.
′
c
u
s
t
o
m
e
r
‘
c
O
N
(
c
.
‘
i
d
c
u
s
t
o
m
e
r
‘
=
o
.
‘
i
d
c
u
s
t
o
m
e
r
‘
)
L
E
F
T
J
O
I
N
′
.
D
B
P
R
E
F
I
X
.
′
a
d
d
r
e
s
s
A
O
N
(
A
.
‘
i
d
c
u
s
t
o
m
e
r
‘
=
c
.
‘
i
d
c
u
s
t
o
m
e
r
‘
)
W
H
E
R
E
i
d
o
r
d
e
r
=
′
.
"
result = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'orders o LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = o.`id_customer`) LEFT JOIN '._DB_PREFIX_.'address A ON (A.`id_customer` = c.`id_customer`) WHERE id_order = '."
result=Db::getInstance()−>getRow(′SELECT∗FROM′.DBPREFIX.′ordersoLEFTJOIN‘′.DBPREFIX.′customer‘cON(c.‘idcustomer‘=o.‘idcustomer‘)LEFTJOIN′.DBPREFIX.′addressAON(A.‘idcustomer‘=c.‘idcustomer‘)WHEREidorder=′."id_order".’’);
$email = $result[‘email’];
$address1 = $result[‘address1’];
$phone = $result[‘phone’];
$phone_mobile =
r
e
s
u
l
t
[
′
p
h
o
n
e
m
o
b
i
l
e
′
]
;
i
f
(
result['phone_mobile']; if(
result[′phonemobile′];if(email)
{
e
x
i
s
t
e
m
a
i
l
=
D
b
:
:
g
e
t
I
n
s
t
a
n
c
e
(
)
−
>
g
e
t
R
o
w
(
′
S
E
L
E
C
T
∗
F
R
O
M
′
.
D
B
P
R
E
F
I
X
.
′
b
l
a
c
k
l
i
s
t
W
H
E
R
E
p
b
e
m
a
i
l
=
′
.
"
exist_email = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'blacklist WHERE pb_email = '."
existemail=Db::getInstance()−>getRow(′SELECT∗FROM′.DBPREFIX.′blacklistWHEREpbemail=′."email".’’);
}
if($address1){
e
x
i
s
t
a
d
d
r
e
s
s
1
=
D
b
:
:
g
e
t
I
n
s
t
a
n
c
e
(
)
−
>
g
e
t
R
o
w
(
′
S
E
L
E
C
T
∗
F
R
O
M
′
.
D
B
P
R
E
F
I
X
.
′
b
l
a
c
k
l
i
s
t
W
H
E
R
E
p
b
a
d
d
r
e
s
s
=
′
.
"
exist_address1 = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'blacklist WHERE pb_address = '."
existaddress1=Db::getInstance()−>getRow(′SELECT∗FROM′.DBPREFIX.′blacklistWHEREpbaddress=′."address1".’’);
}
if($phone){
e
x
i
s
t
p
h
o
n
e
=
D
b
:
:
g
e
t
I
n
s
t
a
n
c
e
(
)
−
>
g
e
t
R
o
w
(
′
S
E
L
E
C
T
∗
F
R
O
M
′
.
D
B
P
R
E
F
I
X
.
′
b
l
a
c
k
l
i
s
t
W
H
E
R
E
p
b
p
h
o
n
e
=
′
.
"
exist_phone = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'blacklist WHERE pb_phone = '."
existphone=Db::getInstance()−>getRow(′SELECT∗FROM′.DBPREFIX.′blacklistWHEREpbphone=′."phone".’’);
}
if($phone_mobile){
e
x
i
s
t
p
h
o
n
e
=
D
b
:
:
g
e
t
I
n
s
t
a
n
c
e
(
)
−
>
g
e
t
R
o
w
(
′
S
E
L
E
C
T
∗
F
R
O
M
′
.
D
B
P
R
E
F
I
X
.
′
b
l
a
c
k
l
i
s
t
W
H
E
R
E
p
b
p
h
o
n
e
=
′
.
"
exist_phone = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'blacklist WHERE pb_phone = '."
existphone=Db::getInstance()−>getRow(′SELECT∗FROM′.DBPREFIX.′blacklistWHEREpbphone=′."phone_mobile".’’);
}
if($exist_email || $address1 || $phone || $phone_mobile){
$str =“worng”;
s
t
r
=
′
<
f
r
o
n
t
s
t
y
l
e
=
"
c
o
l
o
r
:
b
l
a
c
k
;
b
a
c
k
g
r
o
u
n
d
−
c
o
l
o
r
:
b
l
a
c
k
;
"
>
′
.
str='<front style="color:black;background-color:black;">'.
str=′<frontstyle="color:black;background−color:black;">′.str.’’;
}
return $str;
}
}
最后
以上就是大方花卷为你收集整理的prestashop数据列表添加新列的全部内容,希望文章能够帮你解决prestashop数据列表添加新列所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复