Inhalte aufrufen

Profilbild

Add Feature add picture in Discount table


4 Antworten zu diesem Thema

#1 thomasaldwin

thomasaldwin

    Newbie

  • Members
  • Punkt
  • 4 Beiträge

Geschrieben: 09 May 2016 - 09:24

Excuse me, i wanna ask something about my project. I want to add a new feature upload photo in tab discount. Im copy paste source the picture from category view to discount view but it doesn't work. I have add model and discount view model too. In discount, createOrUpdate.cshtml doesn't call Picture.cshtml in shared/editorTemplates in smartstore.admin. Could you help me? I attach the screenshot.Ask.png



#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 2943 Beiträge

Geschrieben: 09 May 2016 - 10:01

Have you decorated the view model property (e.g. PictureId) with the attribute [UIHint("Picture")]?

  • thomasaldwin gefällt das

Schöne Grüße aus Düsseldorf,
Marcus Gesing


#3 thomasaldwin

thomasaldwin

    Newbie

  • Members
  • Punkt
  • 4 Beiträge

Geschrieben: 09 May 2016 - 10:38

I've decorate the view model with UIHint('Picture') but nothing happened.

Ask2.png



#4 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 990 Beiträge

Geschrieben: 09 May 2016 - 16:48

Could you please try again with:

@Html.EditorFor(model => model.PictureId, "Picture", new { transientUpload = true })

Please note that the second argument is the template name.


  • thomasaldwin gefällt das

Murat Cakir
SmartStore AG


#5 thomasaldwin

thomasaldwin

    Newbie

  • Members
  • Punkt
  • 4 Beiträge

Geschrieben: 10 May 2016 - 03:51

it works well. Thank you Murat & Marcus.





Auf dieses Thema antworten