1

Not every item in my store is available to buy online.

What would be the best way to classify these items in Craft Commerce? (So that the 'Buy' button can be swapped for 'Enquire')

There are multiple product categories this applies to.

  • We've solved this in the past by adding a boolean to the product and just checking that in template. Does the job but curious to see what people come up with here. – Jan Henckens Feb 1 '18 at 15:56
1

We use either booleans (i.e. switches) or dropdowns for this.

So we have, e.g. an availableForSale boolean we check in our template logic. We have a sort of 'main' tab for these critical product fields (and note you can also add such a field to your variants so that for variant products you can selectively enable/disable on a per variant basis). In your case you might choose to have 3 options - Available For Sale, Enquiries Only, Not available. Booleans make for nice simple looking template logic, but probably use values is a better way to go if you anticipate anything beyond basic available/not available complexity.

(We use a similar but more complex field for shipping, which can be set to: Free Shipping, Can't Be Shipped, Post Shipping, Courier Only Shipping etc. Although Commerce's now has it's own shipping category system you can and probably should use for that too, depending on how you implement your shipping).

|improve this answer|||||

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.