Skip to content

Instantly share code, notes, and snippets.

@stephenwithav
Last active December 1, 2015 10:00
Show Gist options
  • Save stephenwithav/09d99853b17cbd83f374 to your computer and use it in GitHub Desktop.
Save stephenwithav/09d99853b17cbd83f374 to your computer and use it in GitHub Desktop.
cac test
var items=$("a[onclick^='cart.apply']").map(function(i,el){return $(el).attr('onclick')});
var itemids = new Array(items.length)
for (var i=0;i<items.length;i++){ var s=new String(items[i]); itemids[i]=s.substring(18,31); }
for (var i=0;i<itemids.length;i++){ var url="https://members.cloudatcost.com/index.php?fuse=admin&controller=signup&action=validatecoupon&couponCode="+coupon+"&itemID="+itemids[i]; $.get(url) }
for (var i=0;i<numProducts;i++) { $.get("https://members.cloudatcost.com/order.php?step=2&product="+productid) }
var productid = '54';
var coupon = '';
var numProducts = 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment