Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webProject
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ignacio Hernández de la Fuente
webProject
Commits
04707c5f
Commit
04707c5f
authored
1 year ago
by
totoW
Browse files
Options
Downloads
Patches
Plain Diff
shopping cart changes
parent
14fe090e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
startbootstrap-agency-gh-pages/index.php
+7
-21
7 additions, 21 deletions
startbootstrap-agency-gh-pages/index.php
with
7 additions
and
21 deletions
startbootstrap-agency-gh-pages/index.php
+
7
−
21
View file @
04707c5f
...
@@ -342,9 +342,13 @@ include("../html/data_treatment/connect_database.php");
...
@@ -342,9 +342,13 @@ include("../html/data_treatment/connect_database.php");
<input
type=
"text"
value=
"1"
<?php
echo
'id="quantity"'
.
$i
;
?>
>
<input
type=
"text"
value=
"1"
<?php
echo
'id="quantity"'
.
$i
;
?>
>
<button
onclick=
"incrementQuantity(this)"
>
+
</button>
<button
onclick=
"incrementQuantity(this)"
>
+
</button>
</div>
</div>
<button
class=
"btn btn-primary btn-xl text-uppercase"
type=
"button"
<?php
echo
'id = "buttonShoppingCart'
.
$i
.
'"'
;
?>
>
<button
class=
"btn btn-primary btn-xl text-uppercase"
type=
"button"
Add to shopping cart
data-item-id=
"
<?php
echo
$i
;
?>
"
</button>
data-item-name=
"
<?php
echo
$articles
[
$i
][
"itemName"
];
?>
"
data-item-price=
"
<?php
echo
$articles
[
$i
][
"price"
];
?>
"
onclick=
"addToCart(this)"
>
Add to shopping cart
</button>
<script>
<script>
function
incrementQuantity
(
button
)
{
function
incrementQuantity
(
button
)
{
...
@@ -418,24 +422,6 @@ include("../html/data_treatment/connect_database.php");
...
@@ -418,24 +422,6 @@ include("../html/data_treatment/connect_database.php");
<script
src=
"https://cdn.startbootstrap.com/sb-forms-latest.js"
></script>
<script
src=
"https://cdn.startbootstrap.com/sb-forms-latest.js"
></script>
<script
src=
"js/slideBox.js"
></script>
<script
src=
"js/slideBox.js"
></script>
<script>
<script>
function
incrementQuantity
(
button
)
{
var
input
=
button
.
parentNode
.
querySelector
(
'
input
'
);
var
value
=
parseInt
(
input
.
value
,
10
);
input
.
value
=
value
+
1
;
}
function
decrementQuantity
(
button
)
{
var
input
=
button
.
parentNode
.
querySelector
(
'
input
'
);
var
value
=
parseInt
(
input
.
value
,
10
);
if
(
value
>
0
)
{
input
.
value
=
value
-
1
;
}
}
function
removeProduct
(
button
)
{
var
product
=
button
.
parentNode
.
parentNode
;
product
.
parentNode
.
removeChild
(
product
);
}
function
updateOnlineUsers
()
{
function
updateOnlineUsers
()
{
$
.
ajax
({
$
.
ajax
({
url
:
'
../html/data_treatment/AJAX/online_Users.php
'
,
url
:
'
../html/data_treatment/AJAX/online_Users.php
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment