Thanks for your great add-on
Is there a way for the Dynamic price updater to include the quantity discounts? I can't seem to be able to do this.
Thanks.
Thanks for your great add-on
Is there a way for the Dynamic price updater to include the quantity discounts? I can't seem to be able to do this.
Thanks.
Hi Jason
The discounts are still being worked on when I can find time
I'll update the thread as soon as I have some news
Sorry this is taking so long
Dan
Hi Dan Thanks for the response.
For now I'm going to try and add the discount amount to the end of the price with the javascript below.
-------------------------------------------------
function makeChange() {
var addDiscountHere = document.getElementById("addDiscountHere"); //get place to add discount amount
var quantity02 = quantity;
if (quantity02 > 9) {
var discountAdded = "-10%";
} else {
var discountAdded = "no quantity discount";
}
addDiscountHere.firstChild.nodeValue = discountAdded;
}
-----------------------------------------------------
I've used your quantity variable which works fine. I'm not sure how you get the change to update as well as it does after quantity amount is altered. Is there any chance that you could tell me so I could use that on my baby function.
Thanks Jason
I'm now updating it with setTimeout function to get it to update.
setTimeout("makeChange()", 500);
function makeChange() {
var addDiscountHere = document.getElementById("addDiscountHere"); //get place to add discount amount
var quantity02 = quantity;
if (quantity02 > 9) {
var discountAdded = "-10%";
} else {
var discountAdded = "no quantity discount";
}
addDiscountHere.firstChild.nodeValue = discountAdded;
setTimeout("makeChange()", 500);
}
When I remove the code in attributes.php to take off the prices after attributes, the dynamic price updater stops working. Is there a way around this. I'm currently trying to get tags to wrap the prices and then change the colour to white so the text is not visible.
Hi
Any chance you can provide a link to non-working code? I might be able to figure out what's going wrong
Dan
Hi exoticcorpse
I spent ages trying to add a tag around the price. I finally did (i used an em tag), but then realised that css has no affect on tags inside the option tag.
The below css has no affect
#productinfoBody #productAttributes select option em {
display: none;
background-color: white;
}
I didn't know that before :-(
Where did you assign "addDiscountHere"? I would like to get this to work with quantity discounts, too. I see that your function has hardcoded values so I would have to clone the function using a different element ID and set different discount values for the different quantity discounts we offer.
Thanks!
Matt