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

Multi-dimensional size variations #211

Open
SolidSnakeGr opened this issue Apr 27, 2023 · 1 comment
Open

Multi-dimensional size variations #211

SolidSnakeGr opened this issue Apr 27, 2023 · 1 comment

Comments

@SolidSnakeGr
Copy link

SolidSnakeGr commented Apr 27, 2023

Hello, I am implementing a plugin solution for a client of mine that uses multi-dimensional size variations.
The specific product type I'm referring to is a mattress that is variable on length, width and height so the actual dimension is generated as AxBxCcm and is required for every variation.

My issue is that when all options are collected together in the parent size definition it crosses the 1000 characters limit causing the validator to drop it. I'll try to break this down using an example:

One specific product has way too many variations:

Length: 170 to 210 cm with a 2cm step.
Width: 70 to 180 cm with a 2cm step.
Height: 12, 20, 28 cm (3 options)

The way price is handled accross these variations is based on width and height options, while length dimension even though it is variable it is set as "any" in the options and play no part in price adjustment.

The price in ranges using width and height only:
Width: 70-90cm in relation to height 12cm options have the same price.
Width: 70-90cm in relation to height 20cm options have the same price but different than the above case.
Width: 92-100cm in relation to height 12cm options have the same price but different than the 70-90cm x 12cm options.
etc.

I successfully export all variations with the variations size like this:
<variations> <variation> ... <size>170x70x12cm</size> ... </variation> <variation> ... <size>170x72x12cm</size> ... </variation> ... </variations>

However in the parent product where all of them are concatenated like this:
<size>170/70/25, 172/70/25, ...</size>
...the string is becoming huge causing the validator to reject it.

It is important for us to allow the user to select a specific dimension in a 2cm step because this is one of our selling advantages and we need to keep it that way. What is the best course of action to dynamically handle such cases?

@mrwhizzy
Copy link
Member

mrwhizzy commented May 11, 2023

Hello, since you are using variations (and each one of them has a size attribute), the parent product is not required to have a size attribute as well.

Therefore, you should be able to proceed in generating the XML with size variations for a given product, without having a size attribute on the parent product.

However, currently size variations are only supported in Fashion (and similar) categories.

Size variations are not supported for dimensions, as in the case you've described.

We are working on adding support for dimensions as well, but right now it is not supported yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants