hacking the shopping cart text
winnjewett
Registered Users Posts: 329 Major grins
I have a little bit of news for those interested in changing the text of their shopping cart. I have developed a small bit of javascript that allows you to manipulate the text in any way you wish. Here is an example: http://photography.brilliantphoton.com/gallery/449917/1/18131235
javascript:
Body code:
<body onload="changeCart(); return true;">
Enjoy!
-w
javascript:
function changeCart(){ if (is_ie == true){ num1 = 1; num2 = 3; num3 = 5; } else{ num1 = 3; num2 = 7; num3 = 11; } document.getElementById('cartadd').parentNode.parentNode.childNodes[num1].childNodes[0].innerHTML='Order A Print'; document.getElementById('cartadd').parentNode.parentNode.childNodes[num2].childNodes[0].innerHTML='Order A Few<br>Different Prints'; document.getElementById('cartadd').parentNode.parentNode.childNodes[num3].childNodes[0].innerHTML='View Orders'; document.getElementById('cartadd').parentNode.parentNode.childNodes[num1].style.textAlign='left'; document.getElementById('cartadd').parentNode.parentNode.childNodes[num2].style.textAlign='left'; document.getElementById('cartadd').parentNode.parentNode.childNodes[num3].style.textAlign='left'; }*note: there shouldn't be a space between 'pare' and 'ntNode'. I'm not sure why it's displaying this way.
Body code:
<body onload="changeCart(); return true;">
Enjoy!
-w
0
Comments
-w
*again, if there is a space put in the middle of 'parentNode', it doesn't belong.