Skip to content

Instantly share code, notes, and snippets.

@schmengler
Last active June 27, 2019 11:47
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save schmengler/6244d14a03cbee0cf820 to your computer and use it in GitHub Desktop.
Bookmarklets: Fill Magento forms with data powered by Faker.js

These bookmarklets allow you to use the scripts of SSE_FormFiller in any Magento installation without having to install the extension.

  1. Load FormFiller:

     javascript:(function%20(){document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).src='https://cdnjs.cloudflare.com/ajax/libs/Faker/0.7.2/MinFaker.js';document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).src='https://rawgit.com/schmengler/FormFiller/master/js/sse/formfiller.js';}());
    
  2. Fill billing form:

     javascript:formFiller.fill(billingForm.form)
    
  3. Fill shippingform:

     javascript:formFiller.fill(shippingForm.form)
    
  4. Fill customer address edit form OR customer registration form:

     javascript:formFiller.fill(dataForm.form)
    
@sprankhub
Copy link

Awesome, thanks!

It would be even more useful it the "load form filler" step would not be necessary. Should be possible to extend the scripts 2-4 so that they first check if the scripts are already added and if not, add them before doing the actual work, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment