View Single Post
Old 02-14-2013, 10:34 AM   PM User | #18
thredder
New Coder

 
Join Date: Mar 2011
Posts: 24
Thanks: 4
Thanked 0 Times in 0 Posts
thredder is an unknown quantity at this point
Thanks for taking a look at it, I really appreciate your help.

That works ok if you're just outputting it once on the page. Any more than once and it doesn't work, and I need it to be under each product on the page, so up to 30 times.

If you imagine an online shop, and you're looking at a page of products, say 30 on one page, and each one has a price underneath it. I need the script to take the price of that product (from a div with a class of "price"), do the loyalty points calculation (one point per whole pound), and then put the points total in the div with a class of "points". I need that on each and every product. I don't really need the value part anymore, or for the points to be added to each other. Just the part I described.

So presumably the div with an id of "calcs" is causing a problem, as it would be reproduced about 30 times on the page and therefore creates a clash.

The funny thing is, I actually thought this would be such a simple script! Haha! But it's taking forever to work out. I appreciate the help. If you could try again I'd be grateful. Thanks.
thredder is offline   Reply With Quote