Hello guys,
I'm trying to configure a two separate CPTs that works together and there's 2-3 things I'm not sure how to achieve or even if it's possible at all.
The purpose is to have a general approach to registering custom designs for different type of products or creation process.
1) We would like to configure "templates" for a CPT "Design" in order to have different fields displayed according to the value of a drop-down menu. Can this be done?
For example, when we add a new entry in CPT "Design" and we choose from a drop-down menu field the value "Template #1" we have a text field and a date field, and if we choose the value "Template #2" we get a different set of fields?
2) The second layer is a CPT "Creation" that should use the data of CPT "Design" to figure out what data needs to be configured. I have attached a link to a document below to illustrate this, but a simple example would be, let's say CPT "Design" has a field "Colors" that has a value of "3". In CPT "Creation", we will want to define these colors, so we need 3 text fields. The value of "Colors" in CPT "Design" is a fixed range from 0 to 15.
3) In theory, our customers can add an infinite amount of elements (logos, images, etc.) when they are creating full-custom products. Elements are stored in the Design CPT and Creations CPTs use the Design data. Is it possible to have an unknown size for a CPT? What I mean is that we don't know in advance if the customer will use only 1 element or 28 elements. Is it possible to have "repeatable" fields that we add/remove?
The workflow would be as following...
1) Admin add new Design (CPT) and 3 sections are displayed: Design ID (autoincremented), User (from existing users) and Design Template (a drop-down menu).
2) He then selects the Design Template in a drop-down menu
[HAT (READY-MADE)]
3) 4x fields/sections appear – "Element #1" to "Element #4" have a drop-down menu to select the type. By default value is "N/A" and no other fields are displayed.
4) Admin select "Element #1" type to "Flat Embroidery"
5) 6x fields appear – Reference file url, matrix id, colorpaths, etc.
6) Admin enters value "2" in field "colorpaths" and creates the post
7) Admin add new Creation (CPT)
8) Admin assign to Creation the Design that was just created along with a Base Model
9) Creation reads that the selected Design has only 1x Element and that Element has "2" colorpaths
10) Each colorpaths must be configured with a Source and Code so 2x fields appear (E#1C#1 + E#1C#2)
or for another template...
[HAT (FULL-CUSTOM)]
3) 3x sections appear: "Product Layout" (drop-down menu), "Options" (various checkboxes and fields) and "Elements" (with a button "Add new element", maybe).
4) Admin selects the Product Layout "6-panel" which has 15x fields to configure (6 of which could be hidden conditional to a checkbox) and are displayed once the layout is set
5) After configuring the fabrics, admin can now add elements
6) For each element, he has to select a Type, a Method and the configure the corresponding fields (view excel file)
7) He saves the Design and add a new Creation
8) Based on the previously created Design, the Creation detects which fields are configurable (mostly color sources and codes) and adapt to show the proper fields.
I hope I didn't make that overly confusing.
File for reference: enlace oculto