Page 7 of 8

how to calculate label values in an array

Posted: Tue Dec 10, 2013 2:26 pm
by Michael4771079

Hi lllya,
I dont know how ton fix the error or to add a condition.


how to calculate label values in an array

Posted: Tue Dec 10, 2013 8:03 pm
by Michael4771079

Hi Maryna,
can you help here, i'm getting nowhere,
the error lllya mentions I dont know how to fix

thx


how to calculate label values in an array

Posted: Tue Dec 10, 2013 8:09 pm
by Maryna Brodina

Hi Michael! Sure, we're working on your request. I'll update when have more information.


how to calculate label values in an array

Posted: Wed Dec 11, 2013 1:26 pm
by Kateryna Grynko

Hi Michael,

Please try the following construction:preif($this.attr("idx").slice(1))){
...
var index = parseInt($this.attr("idx").slice(1));
....
}/pre


how to calculate label values in an array

Posted: Wed Dec 11, 2013 1:48 pm
by Michael4771079

Hi Katya,
unsure if this is the code I need to alter, if it is do I add to the code or replace some of it with your code

codevar mainorderArray;
try {
mainorderArray = JSON.parse(localStorage.getItem("mainorderArray"));
if ({}.toString.call(mainorderArray) !== "[object Array]") {
mainorderArray = [];

Code: Select all

 } 

} catch ( e ) {
mainorderArray = [];
}
var $this = $(this);
var index = parseInt($this.attr("_idx").slice(1));
if (index >=0 && index < mainorderArray&#46;length) {
mainorderArray&#46;splice(index, 1);
}
localStorage&#46;setItem("mainorderArray", JSON&#46;stringify(mainorderArray));
/code


how to calculate label values in an array

Posted: Wed Dec 11, 2013 2:33 pm
by Kateryna Grynko

Hi Michael,

There is an extra brace in 'checkout.js', line 271.


how to calculate label values in an array

Posted: Wed Dec 11, 2013 2:51 pm
by Michael4771079

II dont see a brace on line 271

Image


how to calculate label values in an array

Posted: Wed Dec 11, 2013 2:51 pm
by Michael4771079

What about the code you suggested I try?


how to calculate label values in an array

Posted: Wed Dec 11, 2013 9:16 pm
by Michael4771079

Hi Maryna,
can you explain what Katya meant

"extra brace in 'checkout.js', line 271"
I dont see a brace on line 271

and the question above about the code above that

thx


how to calculate label values in an array

Posted: Wed Dec 11, 2013 10:13 pm
by Maryna Brodina

Hello! On checkout page there are 2 errors:
1) STARRUSERREAD - Success - 3. Run JavaScript in line 39 there is a bracket ")", check before this line prelocalStorage&#46;setItem("totalprice", totalprice);/pre so there shouldn't be this bracket.

2) STARRUSERREAD-Complete- 2.Run JavaScript - there is a code preMath&#46;round(totalprice)&#46;toFixed(2)/pre it's not correct code because variable totalprice is not defined in this function. Furthermore this code doesn't make sense because you don't use value you get. You can delete this code.