Predict frequently purchased items under certain conditions with customer purchasing history data
Let start by the concrete question, and follow talking about the general problem.

a) 

The concrete question "find items that are particularly frequently purchased through online stores by paying shipping fee" needs few or none usage of applied AI, just a few of statistics.

The question talks about "item purchased" and "buy method", thus, we have an information database with entries like:


  sale(online,item1).
  
  sale(shop,item2). 
  
  sale(online,item2). 
  
  sale(online,item2). 
  
  ...


(note records can be repeated)

the percentage of online sales of item "X" is defined as the fraction of sales online of this item, sale(online,X), over the total sales of this item, sale(_,X):



In the previous data examples, p(item1)=1/1, p(item2)=2/3.

High p(X) means items that are preferred for online shopping.

Other probabilities can be defined for similar cases.

b)

About the general case, we are talking about data mining. The are very good packages (open source, ...) for them: weka, IBM DWE, ... . By example, using Weka J48 over a database defined as:


  sale( purchase_identifier, buy method, item )


where "purchase_identifier" must group item that has been purchased in a single buyout (cash ticket). J48 will then provide as answer rules as: item "foo" is usually purchased in online shop when also item "bar" is purchased.