Fixing shopping cart js issue