Combination Facet Fitment#
Added in version 10.10.00 the Combination Facet Fit feature provides a mechanism for displaying product fitment based on combination facets.
Combination Facet Fitment Setting#
The Create Fitment Indicator
can be found within the Combination Facets section of the Miva admin under Utilities. By default this setting will be inactive for each combination facet record.
Functionality#
- When activated, a product custom field will be created.
- The custom field name will be derived from the
COMBINATION_FACE_CODE
with_fit
appended. For example, a combination facet code ofymm
will result in a custom field namedymm_fit
. - The custom field is dynamically populated and uneditable
Custom Field Values#
The custom field is dynamically populated with one of the following values:
- none: The product does not have combination facets, and the “include other” setting is not set in the combination facet.
- universal: The “include other products” setting is set in the combination facet, and the product has no facets.
- unknown: The product has combination facets, but none have been selected in the current session.
- partial: The combination facet allows partial submission, and the product has values entered in the partial submission.
- exact: The combination facet selected in the current session matches one listed for the product.
Integration with Shadows Framework#
-
Update Custom Field Settings:
- Go to the
Product Display Layout
section within thePROD
page and include theCOMBINATION_FACE_NAME Fitment
within the custom fields settings.
- Go to the
-
Add Custom Field Frontend:
- Insert the following code above the product SKU in the
prod-product_display.mvt
(Product Display Layout Section) file, here.
<mvt:if expr="l.settings:product:customfield_values:combofacets:COMBINATION_FACE_CODE_fit"> <span class="u-color-gray-600 x-product-layout-purchase__sku">&mvt:customfield_names:combofacets:COMBINATION_FACE_CODE_fit;: &mvt:product:customfield_values:combofacets:COMBINATION_FACE_CODE_fit;</span> </mvt:if>
- Insert the following code above the product SKU in the
-
Update Custom Field Settings:
- Go to the
Basket Contents
section within theBASK
page and include theCOMBINATION_FACE_NAME Fitment
within the custom fields settings.
- Go to the
-
Add Custom Field Frontend:
- Insert the following code after the product name in the
bask-basket.mvt
(Basket Contents Section) file, here.
<mvt:if expr="l.settings:group:customfield_values:combofacets:COMBINATION_FACE_CODE_fit"> <div class="c-heading--subheading">&mvt:group:customfield_names:combofacets:COMBINATION_FACE_CODE_fit;: &mvt:group:customfield_values:combofacets:COMBINATION_FACE_CODE_fit;</div> </mvt:if>
- Insert the following code after the product name in the
-
Update Custom Field Settings:
- Go to the
Search Results Layout
section within theSRCH
page and include theCOMBINATION_FACE_NAME Fitment
within the custom fields settings.
- Go to the
-
Add Custom Field Frontend:
- Insert the following code after the product name in the
srch-search_results.mvt
(Search Results Layout Section) file, here.
<mvt:if expr="l.settings:group:customfield_values:combofacets:COMBINATION_FACE_CODE_fit"> <span class="c-heading--subheading">&mvt:group:customfield_names:combofacets:COMBINATION_FACE_CODE_fit;: &mvt:group:customfield_values:combofacets:COMBINATION_FACE_CODE_fit;</span> </mvt:if>
- Insert the following code after the product name in the
-
Update Custom Field Settings:
- Go to the
Product List Layout
section within thePLST
page and include theCOMBINATION_FACE_NAME Fitment
within the custom fields settings.
- Go to the
-
Add Custom Field Frontend:
- Insert the following code after the product name in the
plst-all_products
(Product List Layout Section) file, here.
<mvt:if expr="l.settings:group:customfield_values:combofacets:COMBINATION_FACE_CODE_fit"> <span class="c-heading--subheading">&mvt:group:customfield_names:combofacets:COMBINATION_FACE_CODE_fit;: &mvt:group:customfield_values:combofacets:COMBINATION_FACE_CODE_fit;</span> </mvt:if>
- Insert the following code after the product name in the
-
Update Custom Field Settings:
- Go to the
Category Product List Layout
section within theCTGY
page and include theCOMBINATION_FACE_NAME Fitment
within the custom fields settings.
- Go to the
-
Add Custom Field Frontend:
- Insert the following code after the product name in the
ctgy-category_listing.mvt
(Category Product List Layout Section) file, here.
<mvt:if expr="l.settings:group:customfield_values:combofacets:COMBINATION_FACE_CODE_fit"> <span class="c-heading--subheading">&mvt:group:customfield_names:combofacets:COMBINATION_FACE_CODE_fit;: &mvt:group:customfield_values:combofacets:COMBINATION_FACE_CODE_fit;</span> </mvt:if>
- Insert the following code after the product name in the
Note
Remember to update COMBINATION_FACE_CODE_fit
to use the combination facet code that is set up in the store.
Conditional Example#
Here is an example of how template code on the product display might be used on an aftermarket vehicle parts store, where combination facets are used for Year / Make / Model:
<mvt:if expr="l.settings:product:customfield_values:combofacets:COMBINATION_FACE_CODE_fit">
<mvt:if expr="l.settings:product:customfield_values:combofacets:ymm_fit EQ 'none'">
&mvt:group:customfield_names:combofacets:ymm_fit;: Not Applicable
<mvt:elseif expr="l.settings:product:customfield_values:combofacets:ymm_fit EQ 'universal'">
&mvt:group:customfield_names:combofacets:ymm_fit;: Universal
<mvt:elseif expr="l.settings:product:customfield_values:combofacets:ymm_fit EQ 'unknown'">
&mvt:group:customfield_names:combofacets:ymm_fit;: Please select Year / Make / Model above to verify fitment
<mvt:elseif expr="l.settings:product:customfield_values:combofacets:ymm_fit EQ 'partial'">
&mvt:group:customfield_names:combofacets:ymm_fit;: Partial match to your selected Vehicle
<mvt:elseif expr="l.settings:product:customfield_values:combofacets:ymm_fit EQ 'exact'">
&mvt:group:customfield_names:combofacets:ymm_fit;: This is an exact match to your Vehicle
</mvt:if>
</mvt:if>
Part Level Facets#
When the combination facet is setup to use the Part Products
as the Variant Source the fitment value will be available using the Runtime_Fitment_Load_Product_Variant
function.
Here is an example done within an AJAX call that can be added below the variant_changed
function in the prod-attributemachine.mvt template.
Request Parameters#
Parameter | Type | Description |
---|---|---|
CombinationFacet_Code |
String | Combination Facet Code |
Product_Code |
String | Product code string |
Variant_ID |
Number | ID number of variant |
Example Request#
const Load_Fitment = function (fitmentData) {
console.log(fitmentData);
}
AJAX_Call_Module(Load_Fitment, 'runtime', 'combofacets', 'Runtime_Fitment_Load_Product_Variant', 'Product_Code=PRODUCT_CODE' + '&' + 'Variant_ID=VARIANT_ID' + '&' + 'CombinationFacet_Code=COMBINATION_FACET_CODE');
Response Parameters#
Parameter | Type | Description |
---|---|---|
fit |
String | Will be one of the following values none, unknown, universal, partial, exact |
Example Response#
{
"success": 1,
"data": {
"fit": "exact" // none, unknown, universal, partial, exact
}
}