3 replies [Last post]
Danny_Joris's picture
Offline
Joined: 05/09/2009
Juice: 199
Was this information Helpful?

Hi all,

I have a little problem with my checkout. When I calculate my shipping costs, all the calculations are done correct, but the addition that is being shown to the customer is not correct. It shows the shipping costs, but not the product costs. It adds the shipping costs to 0 and the total sum shows the shipping cost. However in the Review Order it makes this calculation correct..

I made another fresh install of Ubercart and there it works correct.

I hope someone can help me with this.

Cheers,
Danny

--EDIT: This is getting weird: when i switch from my custom zen theme back to the Garland theme, it still shows the wrong calculation but reversed. First it showed the shipping cost added to nothing and now in Garland it shows the total product cost added to nothing.

I also just update Ubercart to the latest 6.x-2.0-rc3 version. I deleted the entire Ubercart map and replaced it with the new one. I added the screenshot of the Garland theme checkout.

PreviewAttachmentSize
wrong outputwrong output50.36 KB
correct output - same ordercorrect output - same order64.06 KB
other wrong output but in Garland theme. Weird.other wrong output but in Garland theme. Weird.25.19 KB
Danny_Joris's picture
Offline
Joined: 05/09/2009
Juice: 199
_

Anyone? I know it is a tough one.

Danny_Joris's picture
Offline
Joined: 05/09/2009
Juice: 199
_

Ok, I just found out that it has to be something with my custom theme. I made a fresh new install with the same modules and Ubercart. It showed the calculation perfect, but when I imported my custom theme and used that one, the calculation was messed up again. I have no idea what I've done to get this result. I never tweaked the checkout. Only for the borders of < fieldset >. And css is about how it looks, so its funny that it calculates a wrong result. Its not that I actually deleted the product price with css, however, it sure looks like that. I'm using a Zen subtheme.

I really hope someone knows what this can be.

Any help is highly appreciated.

Cheers,
Danny

Ps: I have another problem here.

Danny_Joris's picture
Offline
Joined: 05/09/2009
Juice: 199
_

The original 'Zen' theme and the 'Zen Classic' theme output the calculation correct. This can't be a css thing, right?

--EDIT: Even the 'Zen Starterkit' theme without any modifications outputs it correct. So it must have something to do with my own built theme. Does anyone have tips to isolate this problem better? It would be much appreciated!!!

--EDIT2: I just isolated the problem. It is a certain piece of javascript that caused the problem. I'll post it in a sec.

It gives the following Error at the checkout-page: "productArray is not defined". It refers to the 3th line: var productCount = productArray.length;

SOLVED: The problem was that "productArray" was not defined. It is suppost to work with js data on another page. So I just added the following code around my javascript function:

if (typeof(productArray) != "undefined") {

//function here.

}

My monologue ends here... Smiling