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
1fed62e2
Commit
1fed62e2
authored
Aug 31, 2017
by
Nahla Shiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction prix
parent
3fce8b5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
nap.js
wp-content/themes/nap/assets/js/nap.js
+14
-9
variable.php
...s/nap/woocommerce/single-product/add-to-cart/variable.php
+3
-1
No files found.
wp-content/themes/nap/assets/js/nap.js
View file @
1fed62e2
...
...
@@ -13,6 +13,7 @@ jQuery(document).ready(function() {
var
download_link
=
jQuery
(
'.download_file_link'
).
attr
(
'href'
);
var
current_var
=
jQuery
(
'.download_file_link'
).
attr
(
'id'
);
var
variation_id
=
jQuery
(
'input[name="variation_id"]'
).
val
();
// alert(variation_id);
if
(
variation_id
==
0
)
id
=
current_var
;
else
...
...
@@ -24,20 +25,24 @@ jQuery(document).ready(function() {
});
jQuery
(
'li.format-list:first-child input'
).
attr
(
'checked'
,
true
);
jQuery
(
document
).
on
(
'change'
,
'.color-list input,.format-list input '
,
function
()
{
jQuery
(
document
).
bind
(
'change'
,
'input[name="variation_id"]'
,
function
()
{
var
varID
=
jQuery
(
'input[name="variation_id"]'
).
val
();
// alert(varID);
if
(
varID
!=
0
)
{
var
price
=
jQuery
(
'.woocommerce-Price-amount'
).
text
();
// alert(price);
var
price
=
jQuery
(
'.woocommerce-variation-price .woocommerce-Price-amount'
).
text
();
if
(
price
==
""
)
{
price
=
jQuery
(
'.summary .woocommerce-Price-amount'
).
text
();
}
var
pq
=
jQuery
(
'.woocommerce-variation-description'
).
text
();
jQuery
(
'.price .crete'
).
text
(
price
+
" ht"
);
jQuery
(
'.price .crete'
).
text
(
price
+
" ht"
);
jQuery
(
'.pq'
).
text
(
pq
);
}
});
jQuery
(
'li.format-list:first-child input'
).
attr
(
'checked'
,
true
);
jQuery
(
document
).
on
(
'change'
,
'.color-list input,.format-list input '
,
function
()
{
var
name
=
jQuery
(
this
).
attr
(
'name'
);
if
(
jQuery
(
this
).
is
(
':checked'
)
&&
name
==
'attribute_pa_couleur'
)
{
...
...
wp-content/themes/nap/woocommerce/single-product/add-to-cart/variable.php
View file @
1fed62e2
...
...
@@ -273,6 +273,8 @@ do_action('woocommerce_before_add_to_cart_form');
<div
class=
"inner-product-info"
>
<div
class=
"info-content"
>
<?php
$format
=
get_post_meta
(
$current_variationID
,
'attribute_pa_format'
,
true
);
$format_info
=
get_term_by
(
'slug'
,
$format
,
'pa_format'
);
$format
=
$format_info
->
name
;
?>
...
...
@@ -283,7 +285,7 @@ do_action('woocommerce_before_add_to_cart_form');
<p
class=
"pq"
>
<?php
echo
nap_variable_meta
(
$current_variationID
,
'variation_description'
);
?>
</p>
</div>
<div
class=
"price"
>
<span
class=
"crete"
>
<?php
echo
nap_variable_meta
(
$current_variationID
,
'price'
);
?>
€ ht
</span>
<div
class=
"notice"
>
( prix public conseillé )
</div>
<div
class=
"font-small"
>
...
...
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