Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
NAP-wordpress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marwa Sfari
NAP-wordpress
Commits
0f9655fd
Commit
0f9655fd
authored
Aug 03, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix]Fiche technique
parent
6d84938d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
fiche-technique.php
wp-content/themes/nap/fiche-technique.php
+8
-6
No files found.
wp-content/themes/nap/fiche-technique.php
View file @
0f9655fd
...
@@ -18,8 +18,10 @@ $fiche_num = str_pad($nb_fiche, 6, "0", STR_PAD_LEFT);
...
@@ -18,8 +18,10 @@ $fiche_num = str_pad($nb_fiche, 6, "0", STR_PAD_LEFT);
$product_id
=
$_GET
[
'product_id'
];
$product_id
=
$_GET
[
'product_id'
];
$variation_id
=
$_GET
[
'variation_id'
];
$variation_id
=
$_GET
[
'variation_id'
];
$file_title
=
""
;
$file_title
=
""
;
$product_cats
=
wp_get_post_terms
(
$product_id
,
'product_cat'
);
$parent_cat
=
wp_get_post_terms
(
$product_id
,
'product_cat'
,
array
(
'parent'
=>
0
,
'fields'
=>
'ids'
));
$file_title
.=
$product_cats
[
1
]
->
name
;
$sub_cat
=
wp_get_post_terms
(
$product_id
,
'product_cat'
,
array
(
'parent'
=>
$parent_cat
[
0
],
'fields'
=>
'names'
));
$file_title
.=
$sub_cat
[
0
];
//fiche variable
//fiche variable
if
(
$variation_id
!=
'undefined'
){
if
(
$variation_id
!=
'undefined'
){
...
@@ -284,8 +286,8 @@ $file_content = "<html>
...
@@ -284,8 +286,8 @@ $file_content = "<html>
<th>l (cm)</th>
<th>l (cm)</th>
<th>H (cm)</th>
<th>H (cm)</th>
<th>Volume (cm3)</th>
<th>Volume (cm3)</th>
<th>Poids net (g)</th>
<th>Poids net (
K
g)</th>
<th>Poids brut (g)</th>
<th>Poids brut (
K
g)</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -319,7 +321,7 @@ $file_content = "<html>
...
@@ -319,7 +321,7 @@ $file_content = "<html>
<th>l (cm)</th>
<th>l (cm)</th>
<th>H (cm)</th>
<th>H (cm)</th>
<th>Volume (cm3)</th>
<th>Volume (cm3)</th>
<th>Poids brut (g)</th>
<th>Poids brut (
K
g)</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -363,6 +365,6 @@ $mpdf=new mPDF('utf-8', 'Letter', 0, '', 0, 0, 20, 20, 0, 0);
...
@@ -363,6 +365,6 @@ $mpdf=new mPDF('utf-8', 'Letter', 0, '', 0, 0, 20, 20, 0, 0);
$mpdf
->
WriteHTML
(
$file_content
);
$mpdf
->
WriteHTML
(
$file_content
);
$mpdf
->
Output
(
'fiches-techniques/fiche-'
.
$fiche_num
.
'.pdf'
);
$mpdf
->
Output
(
'fiches-techniques/fiche-'
.
$fiche_num
.
'.pdf'
);
$pdf
=
'/
nap/
fiches-techniques/fiche-'
.
$fiche_num
.
'.pdf'
;
$pdf
=
'/fiches-techniques/fiche-'
.
$fiche_num
.
'.pdf'
;
header
(
'Location:'
.
$pdf
);
header
(
'Location:'
.
$pdf
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment