This paper considers simultaneously two areas of facility location and assortment planning in a competitive environment. In fact, a chain store that has competitors in the market locates a new facility. As there are different products in the market that can substitute with each other, it is intended to determine the best product assortment as well. An integer nonlinear programming problem is proposed to model the mentioned subject. For solving the model, the problem is reformulated as a mixed integer linear programming one. Therefore, a MIP solver software can be used for solving the small- and medium-size problems. For large-scale problems, a firefly algorithm is designed for obtaining a satisfactory solution. By using the proposed model, it is numerically shown that, in addition to the optimal location, it is also necessary to determine simultaneously the best product assortment for the new store. Actually, comparison results reveal that the location significantly affects the assortment scenarios for the new store. In other words, the selection of new store locations may lead to loss of large profit if the assortment planning is neglected.