Multiple variations and modifiers


#1

Hi !

I have 2 variations for examples, color and size. Each options variations add a modifiers of type ‘slug_append’ with values like -red, -green, -45, -44 .

Now I add this two variations on a product with a slug adidas, how can I know wich modifiers will be apply first ? Will I get adidas-red-45 or adidas-45-red ?

I tried some solutions on my store and I have some quit unexpected results, for example I don’t have the same slug for the same child product on the dashboard or via the API.

While I’m here, I used your option list_child_products: false and it didn’t do anything, I still have my child product on the dashboard AND on the API.

Thanks


#2

Hi jean,

Modifiers are applied in order their variation options are applied. There is no guarantee that this will not change when you edit/add/remove variations so we added the sku_builder and slug_builder modifiers.

These effectively allow you to template your SKU and slug values. See the seek/set modifier types for sku/slug-builder this should give you the control you need; that post states only SKUs have this available but we’ve introduced slug_builder since that was released.

With regard to the list child products…

I’ll flag this but I believe the initial feedback we had on this was that it was useful to have that information with the base product.

Hope this helps.


#3

I wanted to use the slug_builder but I dont want the slug for my main product to be “adidas-{color}-size”. I use the slug of my product in my url.

For example : http://shoes.com/products/adidas

I didn’t understand your respond about the settings list_child_products :confused:

Thanks for your very quick answer !!


#4

Sorry.

I’ll flag this but I believe the initial feedback we had on this was that it was useful to have that information with the base product.

I actually misunderstood the list_child_products thinking it was a query parameter you were using…

This setting dictates whether child products (one built from variations) are shown in product listings - the individual product will always return any children it has - hope this clears that up.


#5

Yes I know, but it doesn’t work, I still have my child products in the dashboard and with the endpoint GET https://api.moltin.com/v2/products


#6

Hi @ian is it possible to have an answer about the setting list_child_products that doesn’t works ?

Our website isn’t functionnal without this, so if I have to code a workaroung can you tell us ? Thanks

Jean


#7

Hi Jean,

Am I correct in thinking your store has been migrated from v1? If so I’m going ot have a look at the data and get back to you.

Apologies for delay.


#8

Yes you are correct.

My store ID 1401518133759443103


#9

Hi Jean,

Thinking the data may not have been migrated across as child products of a base, instead they may be products in their own right, without being associated to or built from any base product.

I’ll confirm this for you. Can you work with the data in the current format?

Thanks,
Matt


#10

Hi @Matt I already deleted all the past child product.

On this store ( 1791378886676709477 ) I used your new variations mechanism to recreate child product.

So I don’t think that the issue is related to the migration process.


#11

@Matt it s been 2 weeks that our e-shop is not functional because of this issue with child products. Can you please have a look? It is really really urgent.

Apparently, this problem is not new. It was already raised in october 2017 by @dom so I guess Moltin came with a solution.

Thanks


#12

Hi Corentin,

My apologies for this, we understand that this is a pressing issue and have an engineer looking into the issue as a priority. We hope to get you back up and running as soon as possible.

Thank you


#13

Hi @drew,
Thanks.
Any news?
We have some very important deadlines this week (articles in the press…) and we really need to have our website up and running.

Regards,

Corentin


#14

Hi Corentin,

We have changed the settings to filter out the children when you request your products. At the moment the totals will look wrong as they still take into account the children products, but the actual children objects will not be returned in the body of the JSON.

Engineering has an issue raised to look into how the totals are being handled and it will go on to their work stack as soon as possible.

Thanks


#15

Hi @drew it still not working. When I filter to just have the products with the status live I still have the child products.


#16

Hi Jean,

Can you send me the call you are making please?


#17

I use the ruby SDK, this is my call.
With this call I don’t get the child products :

moltin.products.all

With this one I get all the product including the child products :

moltin.products.all.filter(eq: { status: 'live' })

It’s the same on the dasboard :

With no filter :

When I filter for active product :

It’s the same if I filter by category or any other filter. Isn’t it possible to do a filter like this ?

 .filter(eq: { kind: 'main_product' })