PurposeFew marketing studies have studied consumer mindsets about sustainable products in developing countries. This paper examines the influence of fixed and growth mindsets on buying sustainable foods in Iran.Design/methodology/approachTo reach this goal, the authors designed a conceptual model and specified hypotheses. A non-probability survey of 622 people was conducted through a multistage cluster random sampling from two provinces in north Iran: Gilan and Mazandaran. Data were collected through a face-to-face questionnaire. A chi-square test, confirmatory factor analysis, structural equation modelling, the bootstrapping method and the PLS product-indicator approach were used for analyses.FindingsResults show that fixed and growth mindsets have a positive impact on buying sustainable foods. In addition, these two mindsets have a significant effect on consumers' health concerns and warm glow. The study demonstrates that health concerns, environmental values and convenience orientation mediate the relationship between growth mindset and sustainable shopping. However, for a fixed mindset, environmental values are not a mediator. Further, peer influence significantly moderates the effect of both mindsets and motivational variables—environmental values, convenience orientation and warm glow—on purchasing sustainable foods. This study emphasises the critical role of peer influence and motivation factors, including health concern, convenience and warm glow, on purchasing sustainable foods.Originality/valueThis research introduces a new framework concerning consumer behaviour, in particular, consumer psychology towards buying sustainable foods.