I’m having difficulty implementing a basic product logic using ACF and CPT UI. I’d really prefer not to go back to Woocommerce if something like this is possible. As we have already gone this far with the way things are setup and front-end is looking 🙂
Here is the sitemap with colored boxes to indicate the logic (I hope this link goes through fine):
I’ve used CPT to create post types for:
1) Product Group Outer (simply a Page using template-products.php)
2) Category Outers
3) Category Inners
Some may have end-level products in them, others may just have another cat layer, some have both.
Is this possible with ACF and CPT UI? Throw me some keywords and concept names.
How do I use these two tools to complete this back-end, up to practice standards? I was close to just making a total of 18 templates copied from each other and editing.
I just can’t wrap my head around it. The only thing I have set up is loop through the entire range of Products
post_type => 'products'. But do not have the correct Taxonomy system that will allow them to only show up on particular pages of 1), 2), or 3). Not that helpful here.
I cannot figure out how to have each of these post_types hold another layer of pages that also have another post_type, which can be either Products or another Category.
I also don’t fully understand how to structure these Taxonomies and use
terms correctly once that’s done.
Already bookmarked tonnes of references both from these forums, templates questions, hierarchy questions, WP Template Hierarchy Handbook but please send me what you think can help me the most!
Let me know what I need to share to help the process.
Thanks for your fast response and apologies for this late reply!
These examples will be following the ‘EFTPOS’ route. I hope people can still follow the scope with the sitemap in my first post.
1) the current state. This is what the Products page is populated with right now. These are the ‘Product Group Outer’ custom post types. Purely from looping the custom post type of ‘product-group-outer’.
The following are the goals:
2) This is meant to be an instance of ‘Category Outer’. As you can see “EFTPOS Paper, Wetcovers, stands and EFTPOS consumables” is meant to list an end-level Product. But the rest are another step in category for ‘Category Inner’ (shown next).
3) This is the last category for EFTPOS -> Integrated, and the deepest that the product logic can actually go. “EFTPOS Short Term Hire” also reaches this depth, but Mobile/Wifi and Dialup/Broadband do not, they list end-level products.
4) And this is the end-level product for EFTPOS -> Integrated -> Direct USB/cable. Imagine the breadcrumbs are there too. Other end-level product pages will look like this too – showing actual products.
My problem is getting a grasp on how to continue with 2), 3) and 4)
And not knowing if it’s even possible with this particular use of CPT and ACF.
If I get it correctly, I believe you should be able to do it with only CPT UI. For the product category, you need to set the Hierarchical option to “True”. With this option enabled, you can set the parents of the taxonomies and modify the template to show only the child taxonomies if it has any. If it doesn’t have child taxonomy, then you can show the products that are assigned to that taxonomy instead.
This page should give you more idea about it: http://wordpress.stackexchange.com/questions/691/the-difference-between-hierarchical-and-non-hierarchical-taxonomies.
I hope this makes sense 🙂
The topic ‘ACF and CPT for Multilevel Product Logic’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!