Product types are really all about data concerns - so if the data you're storing for your canines/equines (hereafter known as dogs and horses to save some typing ;) ) - is the same, then you're right you don't need more than one product type. So let's say you make one type of product Animal
.
The most obvious tool for grouping that Craft provides is categories. You might make a category group of Animal Categories
, and then two categories in that Dogs
and Horses
. You then add a categories field to your product type and select that category group as the source.
Then, when entering each product, you just choose the appropriate category at that time (i.e. you don't so much assign product to a category from the category itself, rather the product is related to the category using the field on the product entry).
In terms of then listing those on a listing (rather than individual) page, in the category settings, set your categories to resolve to e.g. animals/{slug}
(i.e. an actual url might be animals/dogs
and define a template for Craft to use.
When someone hits that url, your chosen template will be loaded, and this template will have an auto-populated variable of category
you can then use that to filter your products display
{% set products = craft.commerce.product.relatedTo(category) %}
{% for product in products %}
etc.
That's the basics of doing a listing
To sort orders, you can do it in any normal Craft way, such as by the title in alphabetic order:
{% set products = craft.commerce.product.relatedTo(category).order('title asc') %}
If you want an explicit order, you can do it at the template level by id
s and used fixedOrder('true
) and so on. There is currently no GUI method of sorting products in Commerce.
(It is fair to say though that it would be nice to have a native ability to create a default sort order for products in the back end, by e.g. drag and drop, which does not exist currently. You can achieve this by using a Commerce Products field (which is really a relations field, just to products) - and simply manually sort all your product in that, and use that field to build your listings, but this is kind of frustrating to be honest - as where you then store that field? We use a global set for this currently but it's not ideal).