Archive for July, 2010

jQuery slideToggle and ie7

Monday, July 26th, 2010

I had an interesting issue where in ie7, the element that I was displaying using the jQuery slideToggle function, would seem to jump out of place once the animation had finished.

As I was displaying a list, I first assumed that in ie7 the element was adding in the default list margins and ignoring my css. However no amount of fiddling with adding css margins in the slideToggle callback function seemed to sort the problem.

Googling allowed me to find a solution here that worked, although I have no idea why it works.

Basically I needed to add a min-height of 0px on the parent element, and set the height of the ul that I was trying to display to 100%.

Problem sorted!

Share

Magento Products Inc Tax Issue

Friday, July 2nd, 2010

I’ve recently been working on quite a complex magento setup, that involves a number of different stores based in different countries.

A problem was reported where some stores appeared to be adding the tax twice in the shopping cart. The product prices had been setup including tax but the tax was then being added again in the cart, despite the tax settings in the admin clearly stating that the product prices already included tax and the cart subtotal should display excluding tax.

So for a moment I panicked thinking that this was going to be some overly complicated bug that I’d need to fix (not what I needed on a Friday).

So in a desperate effort to avoid that I looked around and fiddled with as many settings as I could think of, hoping that one of these would solve the problem, meaning that there was no horrible bug but just some obscure settings conflict. This was a good plan!

Although the tax calculation settings seemed to be correct, the ‘Default tax destination calculation’ was still set to the default country ‘USA’ so I changed this to the correct country for that particular store. I also changed the shipping origin under ‘Delivery settings’ to be the country rather than the default of ‘USA’ and this is what actually solved the problem.

I know this seems like a really simple thing, but hopefully it’ll save someone else a lot of searching around. I also thought I’d better post this incase I come across this problem again and can’t remember what I did to fix it last time! A blog can be a very useful memory tool!

Share