Jump to content

Package Adding Script


Recommended Posts

This is a JavaScript you can customise for your own use if you're adding a few similar packages like domains. Run it by pasting in the dev tools console or make it into a bookmarklet.

//Set module

//Set group
$("#available option[value=2]").appendTo("#assigned");

//Get domain name
var domain = prompt("Enter the domain:", ".com");

//Set package name

//Get price
var price = prompt("Enter the price:", "99.99");
price = parseFloat(price) * 10 + 10;

//Set price

//Add extra terms
for(x = 2; x <= 10; x++) {
	$(".price_row").last().find("input[name='pricing[price][]']").val((price * x).toFixed(2));

//Set tax
$("#taxable").prop('checked', true);

//Wait for 500ms as module options loaded via ajax
	//Set domain
	$("input[value='" + domain + "']").prop('checked', true);

	//Set nameservers

}, 500);
Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...