Prompt User for Donation Amount
-
Store URL: https://www.sportslifephotos.com/high5/donate/
WP version: 3.7.1
WP e-Commerce version: 3.8.12.1
Theme – based on HTML5BlankCurrently when a user clicks on one of the donation amounts, the item is “submitted” and the user is redirected to the checkout page. Code snippet below.
I need to collect (prompt) for the amount when a user clicks on the “other amount” button.
All advice or suggestions are appreciated.
Thanks,
Jim
//Swapping out our donate buttons var inputs = document.getElementsByClassName('custom_wpsc_buy_button'); var newUrlBase = window.location.protocol + "//" + window.location.host; //Remember to remove "/high5" when published var newUrlTarget = newUrlBase + "/high5/products-page/checkout"; for (var i = 0, len = inputs.length; i < len; i++) { input = inputs[i]; input.onmouseover = function(){ this.setAttribute('data-orig-image',this.getAttribute('src')); this.src = this.getAttribute('data-alt-image'); }; input.onmouseout = function(){ this.src = this.getAttribute('data-orig-image'); } ; input.onclick = function(){ //need special instructions for "other amount button" setTimeout(function(){ location.href = newUrlTarget; },1500); }; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Prompt User for Donation Amount’ is closed to new replies.