Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
155 stars 153 forks source link

how to know, which of the images of the product is the cover. #360

Closed MpmSys closed 4 years ago

MpmSys commented 5 years ago

how to know, which of the images of the product is the cover. I can access the images but I don't see any parameter that tells me which one is the highlight on the cover

PHonorato commented 5 years ago

I made this way.

Dim ImageFactory As ImageFactory = New ImageFactory(PrestashopURL, PrestashopKey, "") Dim ProductFactory As ProductFactory = New ProductFactory(PrestashopURL, PrestashopKey, "") Dim Imagem_cover As Long

Imagem_cover = ImageFactory.AddProductImage(CLng(id_ArtCatMar), fileName)

Dim Product As Bukimedia.PrestaSharp.Entities.product = ProductFactory.Get Product.id_default_image = Imagem_cover ProductFactory.Update(Product)