Developer forum

Forum » Ecommerce - Standard features » Pattern images inheritance

Pattern images inheritance

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I was wondering if the Pattern images are supposed to be inherited from master product to variants.
For example, I have a Master product with ProductNumber Product001 and a variant of this master with the product number Product001_01

I have an image called Product001.jpg and a pattern : {ProductNumber}.jpg

I have set the Images assets to Merge (I have actually tried also Fallback).

My expectation is to have the same image in both Master products and Variant. But apparently I can't make the variant inherit the image.

Is this by design or I am missing a configuration?

I am using DW 9.14.7 with Swift.

Thank you,

Adrian

 


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

You have a specific setting to determine the pattern for variants. Why not simply duplicate the pattern value if you want it to be the same?

 

Since the field is there, having it inherit from the master if that value is empty could lead to false assumptions as well.

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

The variant has a different ProductNumber and the Master product number is not stored on the Variants.

And I was trying to avoid any intervention on the integration part.

In my case the variants are always sizes. Which means images are always the same. It does not make sense to duplicate the images for each variant and rename them.

Thank you,

Adrian

 

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

If it's that simple, then you can use ProductID as the pattern value for variants too.

 

I know things become a bit trickier when you have 2 variant groups (size + color) where a variant group impacts the image (color) and the other one doesnt (size). In those cases you either have to have duplicate files (so the filename matches) or you set the pattern to a product custom field, where you'd update the values based on whatever logic you want (in other words, you need to stick to ProductId nor ProductNumber)

 

I know it's not an awesome answer, but that's just because you know a lot already :P

 

Best Regards,

Nuno

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

Only if it would be that simple :)

Their product numbers cannot be used as ProductIds because they have dots and dashes and we have used a custom ProductId when importing.

And the images are named based on the ProductNumber of the master product. And the renaming is out of the question.

What I need to understand is if the Pattern images are supposed to be inherited. If they are, it means I am missing a setting or configuration. If they are not, I have to adjust the Integration and store the Master ProductNumber on every Variant. But that also means that Pattern images would support custom fields. Which I am unsure of at this point.

Thank you,

Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

I guess I'm not making myself understand :)

  • Image Patterns support custom fields - we've been using them for years for
    • the scenario I described
    • your exact scenario
      when customer's ProductNumbers contain special chars like slashes, we map (through integration) the ProductNumber to a custom field and replace the special chars

 

I was not aware the dots would be an issue for filenames though, and dashes are not supposed to be an issue either. You should only have issues with window's special characters

If you do need to rename files, there are some great free tools out there that would help you with it, or use some powershell. I would expect it to be a 1 time thing and that the customer can honor those changes.

 

Another alternative is to use a tablescript to take the ProductNumber and have it "normalized" and then map it to the custom field. We do that sometimes too, and the customer just needs to name the files accordingly.

 

And regarding your question about inheritance, I don't think they are inherited, but as I mentioned, we also never saw that need.

 

Hope this helps,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nucno,

Thank you for the confirmation on the use of Customfields for patterns. I have not tried it yet.

The dots are not an issue for the filenames but for the ProductIds. I have had a lot of pains in the past when using ProductIds with anything else but numbers and letters.

Renaming of images is out of the question becuase we are using some images that the customer is also using for other purposes.

I was trying to avoid touching the integration but if they are not inherited, I have no other option. Will have to save the Master ProductID on every Variant.

Thank you,
Adrian

 

 

You must be logged in to post in the forum