I am selling digital art ebooks with WooCommerce. I would like to provide a list of supplies with affiliate links for each one of these products.
Here is how I am organizing my CPT's:
Custom Post Type: product | - - > Product 1 | - - > Product 2 | - - > Product ... Custom Post Type: supply | - - > Pen 1 | - - > Pen 2 | - - > Paper 1 | - - > Paper 2 | - - > ...
Each supply is part of a custom category:
Custom Taxonomy: supply_category | - - > Pens | | | - - > Pen 1 | | | - - > Pen 2 | | | - - > Pen ... | - - > Paper | | | - - > Paper 1 | | | - - > Paper 2 | | | - - > Paper ... | - - > ...
There are several supplies per category to provide our customers with options (price, availability, etc.).
Now, I want to associate my products with the supplies they need. To do so, I associated the
supply_category taxonomy with the
product CPT. That is, this taxonomy is shared by both the
supply and the
product CPT. Here is how the
product CPT interacts with the taxonomy:
Product 1 | - - belongs to - - > Pens | - - belongs to - - > Paper | - - belongs to - - > Any other supply type it may need
My goal is to display the list of supplies that the product requires upon checkout. That is, let's assume the customer purchased
Product 1. I will then get all
supply_category taxonomies associated with it, and then all supplies under each taxonomy. Add some rearranging and some CSS, and the user will just see a list of recommended supplies to purchase.
My question has to do with the permalinks. I have the following:
http://mysite/supply_category/*Shows all supplies and products under the taxonomy. I can remove the products and show only the supplies via the
How could I get something like
http://mysite/supply_category/pens/product-1? My goal would be to provide a link to the supplies in the product description. Would it be a page template? Can the Rewrite API do this?
Is my data organization the best way to achieve what I want?
Any feedback is appreciated! Thanks!