I am using [bulk_defaults:entered_sku] [bulk_defaults:combination_values] as an SKU pattern.

I have 2 fields to modify the SKU pattern: field_meret and field_hosszmeret. The order of these fields in admin/commerce/products/types/nadrag/fields is as above (field_meret is the 1st and field_hosszmeret is the 2nd).

The problem is: the generated SKU pattern contains field_hosszmeret 1st and field_meret 2nd, so the code reverses the order of them.

How can I set the exact order of the combination_values?

Comments

sven.lauer’s picture

Category: bug » support
Status: Active » Closed (fixed)

As your issue title suggests, this is a question, not a bug report, so it should be labelled a "support request". Please use the "category" field appropriately.

The order of the fields in the combination_values token does not follow the order of the fields set in the fields settings at present (though I agree that this would be desirable). However, there is a way to control the order of the fields' values in the SKU: Edit the product type specific settings (at admin/commerce/products/types/PRODUCT_TYPE/commerce_bpc) and use the field-specific tokens instead of [bulk_defaults:combination_values] ... in your case, you could do something like [bulk_defaults:entered_sku]--[bulk_product:field_meret-value]-[bulk_product:field_hosszmeret-value].