Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Variant attributes import ? #188

Open
AXNW opened this issue Apr 19, 2024 · 1 comment
Open

[Feature] Variant attributes import ? #188

AXNW opened this issue Apr 19, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@AXNW
Copy link

AXNW commented Apr 19, 2024

Is there a way to import the specific variant attributes described here in Sylius ?
Example :

the variant attributes by color: pictures, composition
the variant attributes by color/size: EAN, SKU

@oallain oallain added enhancement New feature or request question Further information is requested labels Apr 19, 2024
@TheGrimmChester
Copy link
Member

Hello,

As there is no attribut for variant on Sylius, you can use our ProductVariantTranslationModelAkeneoAttributeProcessor to add simple data to your entity. Link to doc

It works by checking if the attribute name exists in your class and the property must be suffixed by AkeneoAttribute.
ie:
#[ORM\Column(name: 'sku', type: 'string')]
private string $skuAkeneoAttribute = '';

Importing variant attributes like Sylius is something we are looking into for the futur but there are a lot of work to be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants