to get this error, open app, click clear, login use "a" as both, click menu, click pizza, click vegetarian pizza, choose 2 pizzas and click order, click checkout,
click delete on any pizza and you will see the service is not firing
to get this error, open app, click clear, login use "a" as both, click menu, click pizza, click vegetarian pizza, choose 2 pizzas and click order, click checkout,
click delete on any pizza and you will see the service is not firing
The problem is that in service mapping you do prereturn {"array": JSON.parse(value)};/pre Try instead this code prevar arr;
try {
arr = JSON.parse(value);
if ({}.toString.call(arr) !== "[object Array]") {
arr = [];
}
} catch ( e ) {
arr = [];
}
return {"array": arr};/pre
Thanks Maryna,
that worked, error gone.
so the app is running as intended in the tester, but on device after deleting an item from checkout and the page refreshes its not reading the arrays,
the service STARUSERREAD is called when page loads, but it doesnt update.
if I go back through the app and click checkout again, it then reads the arrays in STARUSERREAD
is there another way to ensure the service is called after this code is run
$.mobile.changePage("checkout.html", { allowSamePageTransition: true,
transition: "flip", reloadPage: true });
Hi Michael,
Try replacing:pre$.mobile.changePage("checkout.html", { allowSamePageTransition: true,
transition: "flip", reloadPage: true });/pre
With the following:preAppery.navigateTo('checkout', {
transition: 'pop'
});/pre
No Katya,
that code deletes nothing, you click the delete button, spinner does its thing, but nothing happens, In apperyio tester and on device.
(With previous)
This is strange because I can see the total cost for the order when checkout opens, so the arrays are available to read, but the items dont show up on the screen.
Could you clarify is the problem still exists? Looks like it was solved here https://getsatisfaction.com/apperyio/....
Cheers Maryna,
This didnt solve the issue,
so I started a new topic with better explanation which is what you have just solved on the previous topic earlier
many thanks
Hi Maryna,
when the code above returns the total of the labels in the arrays the number sometimes reads like this 7.9999994349, which is strange, it should read 8.
I am wondering how to round the number to the nearest 1c,
also the number displayed is like this 8,
is it possible to get the number to display 2 decimal places so read like this 8.00
thx
Hello! Try preMath.round(totalprice).toFixed(2)/pre