0

Is it possible to get variants ordered by product (not variant) field?

I have tried following without success:

craft.variants().orderBy('productField asc').all();
craft.variants().orderBy('product.productField asc').all();
craft.variants().orderBy('commerce_products.productField asc').all();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.