Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
soko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
soko
Commits
6afe19d1
Commit
6afe19d1
authored
Dec 03, 2018
by
gaseema.n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
promo.js bug fix
parent
42fbfd7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
promo.js
js/promo.js
+13
-10
No files found.
js/promo.js
View file @
6afe19d1
...
@@ -11,7 +11,7 @@ function refreshPromotions() {
...
@@ -11,7 +11,7 @@ function refreshPromotions() {
var
allPromo
=
promoSubsId
[
i
].
promoSubs
;
var
allPromo
=
promoSubsId
[
i
].
promoSubs
;
for
(
var
s
=
0
;
s
<
allPromo
.
length
;
s
++
)
{
for
(
var
s
=
0
;
s
<
allPromo
.
length
;
s
++
)
{
console
.
log
(
'[++++++++++++++]'
+
promoSubsId
[
i
].
id
+
allPromo
[
s
].
id
)
//
console.log('[++++++++++++++]' + promoSubsId[i].id + allPromo[s].id)
}
}
}
}
if
(
e
.
status
==
'ok'
)
{
if
(
e
.
status
==
'ok'
)
{
...
@@ -270,17 +270,20 @@ function promoCreator(proId) {
...
@@ -270,17 +270,20 @@ function promoCreator(proId) {
// $(".promo-add-new-promotion-" + proId).html('');
// $(".promo-add-new-promotion-" + proId).html('');
for
(
var
i
=
0
,
proId
=
proId
;
i
<
e
.
length
;
++
i
)
{
for
(
var
i
=
0
,
proId
=
proId
;
i
<
e
.
length
;
++
i
)
{
try
{
var
itemsInPromo
=
JSON
.
parse
(
promoSubsId
[
i
].
promoItems
)
var
itemsInPromo
=
JSON
.
parse
(
promoSubsId
[
i
].
promoItems
)
$
(
'.promoItems-'
+
promoSubsId
[
i
].
id
).
html
(
''
)
$
(
'.promoItems-'
+
promoSubsId
[
i
].
id
).
html
(
''
)
for
(
items
in
itemsInPromo
)
{
for
(
items
in
itemsInPromo
)
{
for
(
var
ii
=
0
;
ii
<
getAllProducts
.
length
;
ii
++
)
{
for
(
var
ii
=
0
;
ii
<
getAllProducts
.
length
;
ii
++
)
{
var
prdId
=
getAllProducts
[
ii
].
id
var
prdId
=
getAllProducts
[
ii
].
id
var
prodName
=
getAllProducts
[
ii
].
name
var
prodName
=
getAllProducts
[
ii
].
name
if
(
prdId
==
itemsInPromo
[
items
])
{
if
(
prdId
==
itemsInPromo
[
items
])
{
$
(
'.promoItems-'
+
promoSubsId
[
i
].
id
).
append
(
'<li style="display: inline-block;"><div class="chip">'
+
prodName
+
'</div></li>'
)
$
(
'.promoItems-'
+
promoSubsId
[
i
].
id
).
append
(
'<li style="display: inline-block;"><div class="chip">'
+
prodName
+
'</div></li>'
)
}
}
}
}
}
}
catch
(
err
)
{
console
.
log
(
err
)
}
}
$
(
"#prodEdit_"
+
e
[
i
].
id
).
change
(
function
()
{
$
(
"#prodEdit_"
+
e
[
i
].
id
).
change
(
function
()
{
...
...
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