What preposition should I use when using two verbs

We use the preposition 'to' with the verb add, and 'from' with the verb remove, example:

  1. You need to add a product to your shopping cart.
  2. You need to remove a product from your shopping cart.

Now if I combined add and remove, what preposition should I use for them, example:

  1. To add or remove a product to your shopping cart, hover the mouse over the product.
  2. Add/remove a product from your shopping cart before payment.

Update

There is a Persian saying that translate to :

The easiest way to solve a problem is to eliminate the definition of the problem.

I am not asking for a different way to phrase this sentence, what I am asking is if there is a rule to pick a proposition, something like:

  1. Use to, the preposition associated with the first verb
  2. User from, the preposition associated with the second verb
  3. User to and from

Solution 1:

This is an excellent question! Unfortunately the English language provides no good solution, as you can see from the other responses. And I would not be surprised if this was a problem in many other languages.

Personally I would go with your option 2: "To add or remove a product from your shopping cart". I wouldn't be happy about it, but options 1 and 3 are worse. More imperfect suggestions:

  • To add a product to your shopping cart, or remove an already chosen item,...

  • Hover the mouse over a product to add or remove it.

Solution 2:

The coordination of the verbs fails whatever preposition is used. Consider picking a different verb like move.

To move a product into or out of your shopping cart...

If you're sticking with add and remove, consider rephrasing:

To add a product to or remove one from...

Solution 3:

Now is the time to reimagine your noun shopping cart as a noun adjunct—functioning as an adjective to modify your noun product:

*To add or remove a shopping cart product . . . *

No prepositions necesssary.