Effective sales prediction for e-commerce would assist retailers in developing accurate production and inventory control plans, which would further help them to reduce inventory costs and overdue losses. This paper develops a systematic method for e-commerce sales prediction, with a particular focus on predicting the sales of products with short shelf lives. The short-shelf-life product sales prediction problem is poorly addressed in the existing literature. Unlike products with long shelf lives, short-shelf-life products such as fresh milk exhibit significant fluctuations in sales volume and incur high inventory costs. Therefore, accurate prediction is crucial for short-shelf-life products. To solve these issues, a stacking method for prediction is developed based on the integration of GRU and LightGBM. The proposed method not only inherits the ability of the GRU model to capture timing features accurately but also acquires the ability of LightGBM to solve multivariable problems. A case study is applied to examine the accuracy and efficiency of the GRU-LightGBM model. Comparisons among other sales prediction methods such as ARIMA and SVR are also presented. The comparative results show that the GRU-LightGBM model is able to predict the sales of short-shelf-life products with higher accuracy and efficiency. The selected features of the GRU-LightGBM model are also useful due to their interpretability while developing sales strategies.