Developer forum

Forum » PIM » Query to display products without images

Query to display products without images

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I am trying to setup a PIM query to display products without images.

I am using 9.8.5.

I am using the new image patterns and I have defined some patterns and I get a default image for product in Ecommerce section, front-end and PIM.

However, if I include a rule in the PIM query:

"Primary Image from Details or Image Pattern" "Is Empty"

I get some products without images but also some products that have an image resulted from using the pattern.

One more thing that I have noticed.

If I have a pattern like this: /{ProductNumber}.jpg but my image is called ProductNumber.JPG the image is displayed in the preview in the list (in PIM) but not when opening the wrench section and it is not output in the image tag on product list and product detail.

And I don't seem to be able to use /{ProductNumber}.* in MainProduct field.

Is this the expected behavior?

Thank you,

Adrian


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

I believe I understand why I get products without images and products with images based on patterns. The Rule I used contains "OR" which will render wiother products without Pattern images or Products without Default Image.

I have tried combining 2 separate expressions combined with "And" and compare Primary Image from Details and Primary Image from Pattern against "Is Empty" but it does not seem to work for products having an image in the Details section.

I am wondering if I can check the ProductImages array and see if it is empty.

So far, I believe I have tried all methods without accomplishing what I was expecting.

Maybe somebody has a proved method for the above scenario.

Thank you,
Adrian

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply

Hi Adrian,

Be aware of that these new Expressions "Primary Image from Details or ImagePattern" are only working with the new "Improved ImagePatterns".

I have tested on DW9.8.9, and seems to work OK.

if you still have problem, please contact our support

/Søren

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Soren,

I am aware and my project is already switched to "Improved Image Patterns".

However, I believe the rule is not enough for my purpose.

Some products have Images defined in Details, some have patterns. What I need to find out is a list of products not having ANY of them.

The "Primary Image from Details or ImagePattern" will return true for both cases above. Which means the list of products will be mixed and might include products with no images but also products not having images in one of the 2 situations.

And I cannot combine the other tags individually because they don't seem to be able to be compared with an empty string.

I hope it makes sense.

Thank you,
Adrian

 
Michael Knudsen
Reply

Hello Adrian,

- did you find a solution on this issue?  I'm struggling with something similar and can't get it to work, when the products have variants.

 

Br. Michael

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Michael,

Unfortunately, I could not find a solution. The suggestions above have not solved my issue.

We are still relying on Soren or Dynamicweb for a solution.

Adrian

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply

Hi,

I have reproduced your problem with validation on "Primary Image"

I have made BUG #83976, and we will get it fixed 

/Søren

 
Helene Kjærbøl
Reply

Sounds good, I have the same issue on quering on empty images - and the customer really needs this functionality :-)

BR Helene

 
Aki Ruuskanen
Aki Ruuskanen
Reply

I'm also waiting for this one smileyyes

/Aki

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply
This post has been marked as an answer

Hi all

The bug #83976 regarding Query - "Primary Image" validation not working correct

Has been fixed in Dynamicweb version 9.9.6

You are able to find this release in the download section

https://doc.dynamicweb.com/downloads/releases

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

Votes for this answer: 1
 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I have circled back on this one on a solution upgraded to 9.9.7.

I am trying to create a PIM query to list all products without images.

In the solution, I have some products with Images based on Patterns and some products with images defined in Details.

I have tried using all possible combinations of criteria in the query but I cannot get to a list containing all products without images of any kind.

Please help me accomplish this, apparently, small task.

Thank you,

Adrian

 
Nicolai Pedersen
Reply

Could it be 90668: https://doc.dynamicweb.com/downloads/releases/bug-fixes/known-bugs

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Possibly. I was confused that the 9.9.6 release was supposed to fix it.

I have managed to get the list using Razor in the meantime.

Looking forward to the final fix :)

Thank you,


Adrian

 

You must be logged in to post in the forum