Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

how to calculate label values in an array

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

how to calculate label values in an array

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

thx

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how to calculate label values in an array

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to calculate label values in an array

Hi Michael,

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

how to calculate label values in an array

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to calculate label values in an array

Hi Michael,

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

how to calculate label values in an array

II dont see a brace on line 271

Image

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

how to calculate label values in an array

What about the code you suggested I try?

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

how to calculate label values in an array

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how to calculate label values in an array

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.

Return to “Issues”