I'm trying to use AutoSKU to generate the SKU.This works really well but I can't use the product_display name to do so, there is no token. I have to use the product-title token and use the auto generate product title (On Inline Entity Form) which uses the product display names.
Unfortunately, the generated title append the value of the attributes but I want the bare one.

Example

I want my SKU to have a dash between the product name and the color (that's how the SKU are, I can't change it)

it looks like this

product-black.

I configure AutoSKU this way :

[commerce-product:title]-[commerce-product:field-colour]

What I get is
productblack-black instead of product-black

(productblack is the title generated by 'Inline Entity Form').

I can either
- enter the SKU manually (this dismiss the use of AutoSKU)
- enter the product title manually (this dismiss the use of 'auto generate title')
- unset my color field as an attribute whilst I'm entering new product (I'll endup forgetting and having wrong SKU)
- patch commerce_product.inline_entity_for.inc to no use attributes (that's what I do, not great)

Alternatively, having either a product_display token in the AutoSKU
or (probably better) be able to configure the generate title using Token would solve the problem nicely.

Comments

vasike’s picture

did you try Automatic Entity Label - http://drupal.org/project/auto_entitylabel ?

Here is a topic for Auto generate the product title : http://www.drupalcommerce.org/comment/5619#comment-5619

of course this could be done also with custom Rules with set value actions for both Product titles and SKUs.

elax’s picture

No I haven't tried, just using the normal autosku module.
I've given up anyway in using it. I'll create sku externally and import them with feeds.
However, I still think autosku would benefit from having access to the product display (and its token).

vasike’s picture

Category:feature» support
Status:Active» Fixed

so I can confirm that you can get this work with Automatic Entity Label module
as #1980652: Make auto_entitylabel work with inline_entity_form widget issue was fixed and included on the latest version.

so the question is if this module should be part of Commerce Kickstart?

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.