Inhalte aufrufen

Profilbild

How to get the current customer in a plugin


  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
3 Antworten zu diesem Thema

#1 Amr

Amr

    Newbie

  • Members
  • Punkt
  • 7 Beiträge

Geschrieben: 28 August 2019 - 09:32

Hey,

 

I am creating my own view for Payment which will be shown after the confirm 

I want to make sure that the the user owns the order 

in other words I need to access SmartStore.Services.WorkContext in my plugin controller 

 

but in visual studio i get namespace WorkContext doesn't exist 

 

any ideas?



#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3799 Beiträge

Geschrieben: 28 August 2019 - 10:35

WebWorkContext and its current customer is part of the framework project, so you have to reference SmartStore.Web.Framework in your plugin.
Please ensure that the Copy Local property of the reference is always set to False.

Marcus Gesing

Smartstore AG


#3 Amr

Amr

    Newbie

  • Members
  • Punkt
  • 7 Beiträge

Geschrieben: 28 August 2019 - 11:47

 

WebWorkContext and its current customer is part of the framework project, so you have to reference SmartStore.Web.Framework in your plugin.
Please ensure that the Copy Local property of the reference is always set to False.

 

I already did this still namespace doesn't exist 



#4 Amr

Amr

    Newbie

  • Members
  • Punkt
  • 7 Beiträge

Geschrieben: 28 August 2019 - 14:25

Never mind I understand now it was bad reverse engineering on my part 

 

Thank you for the help