Inhalte aufrufen

Profilbild

Add Feature add picture in Discount table


7 Antworten zu diesem Thema

#1 thomasaldwin

thomasaldwin

    Newbie

  • Members
  • 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
  • 3304 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
  • 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
  • 1077 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
  • 4 Beiträge

Geschrieben: 10 May 2016 - 03:51

it works well. Thank you Murat & Marcus.



#6 SmartStore

SmartStore

    Newbie

  • Members
  • 2 Beiträge

Geschrieben: 16 March 2018 - 05:57

Hi ,

 

I have created one new plugin and trying to get the file upload for image. When I tried the same was getting editor only not the file upload. Can you please help.

 

[UIHint("Picture")]
[SmartResourceDisplayName("Plugins.Widgets.Slider.Picture")]
public int Picture1Id { get; set; }
 
configure.cshtml
<td class="adminTitle">
 
@Html.SmartLabelFor(model => model.Picture1Id)
</td>
<td class="adminData">
@Html.EditorFor(model => model.Picture1Id, "Picture", new { transientUpload = true })
</td>
</tr>
  
 
but still I am not seeing the upload button or image. can you please help.

 



#7 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3304 Beiträge

Geschrieben: 16 March 2018 - 10:29

Have you decorated the action method with the AdminThemed attribute?

  • SmartStore gefällt das

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


#8 SmartStore

SmartStore

    Newbie

  • Members
  • 2 Beiträge

Geschrieben: 16 March 2018 - 15:53

Thanks Marcus I am missing this piece... It worked :-) Thanks a ton





Auf dieses Thema antworten