Optimisation strategy webstores with shipping costs I am scraping the prices of several products on different websites for the past couple of weeks. These prices are stored, plotted and e-mailed to me every day with an update about the price changes. Now I want to take it to the next level, and make a store selection based on several products.

What I want, is pick a number of products, and calculate the most optimal shops where to buy these products, including shipping costs. 

For example, I want to buy products A, B and C, at stores X and Y, with the following prices (so product A costs 2 at store X, and 3 at store Y):

   X Y
A  2 3
B  3 4
C  3 2


Not taking into account shipping costs, I would buy A and B at store X, and C at store Y. However, if the shipping costs are too large for store Y, it might be better to buy everything at store X. Making things more complicated, if stores X and Y have shipping costs of 5, but Y is free when buying more then a specific amount, it might be more profitable to buy everything at Y.  

Can anyone point me in the right direction how to solve this? The idea for now is to include ~10 products at three stores. I though about linear optimisation, but I do not know how to include the shipping costs.
I have done the opposite of your problem - I have written code to implement shipping costs for e-commerce sites which runs on their sites.

Shipping cost rules can be almost completely arbitrary logic. In the general case, you have no good choice but to implement them as logic that is assessed per order. That means your optimiser will have to run that logic for every combination of purchases it considers. Which makes this a planning/combinatorics problem.

This may not be so bad - e.g. for purchasing 10 items across 5 stores you have $5^{10}$ combinations which is 9765625. That is possible by brute force.

For larger orders, or more choices of store, you may want to look at dynamic solutions to optimise cost, such as simulated annealing, genetic algorithms. Reinforcement learning run per order may also work.