Online product pricing is an important factor that affects the purchase of customers and the earnings of e‐commerce platform enterprises. It has an increasingly prominent influence on consumers’ purchasing decisions. To study the influence of customers’ anchoring psychology and product pricing on customers’ purchasing behaviors, this paper proposes a pricing model that considers online consumers to be anchored by the product price and sales. The cognitive bias of online consumers is described by a utility function based on an anchoring‐adjustment heuristic, and consumer choice behavior and an online product pricing strategy are studied with a multinomial logit model. Then, it studies the influence of the anchoring point and anchoring degree on optimal pricing, sales and profit. In particular, when consumers are anchored only by sales of goods, the optimal solution is monotonic with respect to the anchoring degree. However, when consumers are anchored by both price and sales, both factors affect consumer behaviors and produce more complex results. This paper provides a flexible pricing mechanism for platform enterprises, and it can provide a theoretical basis and decision support for dynamic pricing of platform enterprises based on historical consumption data.