Hide product photo if it has exact Display Order Number? How?

3 months ago
NC 4.40

I want to hide all product photos which have display order number "777".

Only admin can see those photos with display order number (777).



How to do it?

Thanks.
3 months ago
The DisplayOrder and the PictureId are not available in the View Model
So you probably need to change the code to use the DisplayOrder

The pictures are returned in                
var pictures = await _pictureService.GetPicturesByProductIdAsync(product.Id);
In nopCommerce_4.40.4_Source\Presentation\Nop.Web\Factories\ProductModelFactory.cs
So you would need to check the Display Order of the returned pictures and not add them to the model

If you dont want to change the code the AlternateText is available in the model so you use that instead and check that in the View
See Views\Product\_ProductDetailsPictures.cshtml