Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
Is there a way to automatically fill a cart of an external ecommerce?

I'm trying to understand if it's feasable to open, for a user, an external ecommerce website and fill the cart instead of him with specific products (that the user selected on my website).

Up to now the following possible solutions came to my mind:

  1. Extension: the user download an extension, when he click on a button on the extension a new tab with the external ecommerce is opened, then a injected javascript script autocompile the cart (automating the clicks that lead to the "add to cart button")
  2. iFrame: it is the same of the above solution, but I was wondering if with an iFrame I could achieve the same thing I can achieve with an extension

Of the two solutions I'd prefer the second one, mostly because an extension could not be used in a mobile browser. However I'm wondering if there is some other faster solution client side (for example could an application make the automation process simpler?). Right now I implemented a very basic script for the extension solution:

Keep in mind that the wait will be sobstituted with a check of the loading status of the page or something like that

productList.forEach(product => {
        chrome.scripting.executeScript(
            {
            target: {tabId: tabs[0].id},
            func: loadProductPage,
            args: [product]
            }
        );

        wait(2000);

        chrome.scripting.executeScript(
            {
            target: {tabId: tabs[0].id},
            func: addToCart
            }
        );

        wait(1000);
    })

    wait(1000);

    chrome.scripting.executeScript(
        {
        target: {tabId: tabs[0].id},
        func: openCart
        }
    );

})

function loadProductPage(productUri){
    window.location.assign(productUri);
}

function addToCart() {
    document.getElementById("button-cart-add").click();
}

function openCart() {
    document.getElementsByClassName("icon-cart")[0].click();
    document.getElementsByClassName("cart-footer")[0].children[0].click();
}

I realize that is kind of a strange request, I'm a bit lost even on what to search online. It's like a web automation task but I only found things related to web testing or web crawling but not something in order to automate the actions of a user

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!