Reworked 'add to bag' shopping bag dropdown JS function.

Signed-off-by: Dom Pascal <dom@dompascal.com>