0

I'm trying to run a script that clicks on two seperate buttons/Ids on the same website.

I want to run first

document.getElementById("add-to-cart").click()

which will redirect me to the cart/basket page of an online store
once I'm there, i want to run

document.getElementById("checkout").click()

which will take me to paypal.

How do I incorporate these two together?
Please help when you can, Thanks

3
Contributors
4
Replies
22
Views
2 Years
Discussion Span
Last Post by Tuan_2
1

1 What if the USER wants to buy two: can't be done if you click programmatically

2 Paypal terms of service: Paypal get upset at a site that bypasses required user confirmation

ANY dispute, you lose

Edited by almostbob

0

I just want to click on the "add-to-cart" button because the page only has ONE product available. Once it gets added it directs to the CART/Basket page. which has the option to Checkout (Which will LATER take me to paypal but not right after I click it) How do I do this?

0

I'm wondering the reason for even have a "cart" when you only have one product. Wouldn't it make it a lot simpler to just have a "buy now" button that takes them off to Paypal to pay for it? I wouldn't use a cart at the grocery store for one loaf of bread.

0

I know, but this is for a site that sell shoes ever week and these shoes are sold by people bringing in their shoes. Just like a flightclub if you have heard about them. I'm just a novice and learning how to use javascript. Any help is apreciated. I am confused on how I can run/have both of those scripts on the same site. I am using a chrome extension that runs whatever script i give to it. It does not allow a script to run on a certain specific page.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.