Quote:
Originally Posted by r035198x
Are you sure you want to use Java or did you mean Javascript? You will have to suppy more info and show the codes you have and where you want to put these prices.
Yes, sorry, I want a javascript to allow for multi level prices. If a customer orders 4 sets it is one price if its > 6 another price etc.
Ok, I do not know javascript but I can learn it, I think.
As an example I will have lots of products with different price variations but here is one, http://www.yourgiftspersonalized.com/Sailboat-Tealight-Holders-Set-of-4-p-76.html
Now here is what I think I need to add:
<script language=”javascript”>
Var data = {
<product productid=”76”>
<quantity> <6 </quantity>
<price>17.85</price>
<quantity> <12 </quantity>
<price> 14.85</price>
<quanity> <24 </quantity>
<price> 13.85</price>
<quantity> =>24</quantity>
<price>11.85</price>
</product>
};
</script>
My coding is probably incorrect but hopefully someone will understand.
The pricing for this particular product is: 1-5 = 17.85; 6-11= 14.85; 12-23= 13.85; 24+ = 11.85. I don't know how to do the if quantity is greater than or equal to so any help with this would be appreciated. I just did if greater than.
With xcart there is a place for me to add price modifiers and input javascript for each product I enter but since I don't know javascript I was hoping for help understanding if I am way off or on the right track or just plain help.
Another question with the code I have, do I need to find the productid # for each product or is there a better way to do that?
Thanks for your help!
Berri