This research involves implementation of genetic network programming (GNP) and ant colony optimization (ACO) to solve the sequential rule mining problem for commercial recommendations in time-related transaction databases. Excellent recommender systems should be capable of detecting the customers’ preference in a proactive and efficient manner, which requires exploring customers’ potential needs with an accurate and timely approach. Due to the changing nature of customers’ preferences and the differences with the traditional find-all-then-prune approach, the interesting temporal association rules are extracted by the metaheuristics, genetic algorithms-based method of GNP. Additionally, a useful model is constructed using the obtained rules to forecast future customer needs and an ACO approach to evolve the online recommender system continuously. The methodology is experimentally evaluated in a real-world application by analysing the customer database of an online supermarket.