Skip to main content

Notifications

Dynamics 365 Community / Forums / Commerce forum / E-commerce Extension -...
Commerce forum
Suggested answer

E-commerce Extension - Get the current product to use in a custom data action

Posted on by 152

I'm working on an extension module for the e-commerce that will be inside the 'product details' page, so I need to know the current product ID to use in my custom data actions....

 

I couldn't find any example showing how to get the current product, I also tried to find an example in the 'core modules', but no success... I only could find examples using 'inputData.config.productIds', where you need to set up the product ID in the configuration of the module (or in the mock files when testing).

 

Can you guys help me with that? Probably it's something very simple/stupid, but I'm struggling a lot.

 

Thanks!

Categories:
  • E-commerce Extension - Get the current product to use in a custom data action
     
     
    The link below does not work for me.
     
    Thanks / Regards,
    Florian
  • RE: E-commerce Extension - Get the current product to use in a custom data action

    Glad to hear that. thanks!

  • Jritz Profile Picture
    Jritz 281 on at
    RE: E-commerce Extension - Get the current product to use in a custom data action

    The samples you linked to are a godsend. Really helps to un-magic a lot of things. Thank you!!

  • Suggested answer
    RE: E-commerce Extension - Get the current product to use in a custom data action

    Hi Jritz,

    I dont know how one can get access to yammer anymore but while that can be figured out, i am sharing the getting started guide here for broader reach. I would also suggest taking a look at the samples that provides step by step on various common customization scenarios. 

    These samples are something we continue to build on so if you have any feedback or scenarios you would like to see, please do feel free to share. 

    Dynamics-365-Commerce-Online-Extensibility-Getting-Started-Guide.pdf

  • Jritz Profile Picture
    Jritz 281 on at
    RE: E-commerce Extension - Get the current product to use in a custom data action

    I know this post is old, but ran across this post trying to better understand the Commerce SDK and data actions. Any idea how I can get access to the Yammer post or to the document that has explanatory chapters that you've quoted?

  • Suggested answer
    RE: E-commerce Extension - Get the current product to use in a custom data action

    Hi Luiz,

    I saw that Sam Jarawan, answered your yammer post about the same topic.

    www.yammer.com/.../

    "In chapter 8, you will see a section on building a custom theme extension, where we have a sample of adding a "share" link to the PDP page.  In this sample you'll see how to get access to the selected product info via the props.data.product.result object specifically for the product Id you can use .ItemId property as shown in attached image."

Helpful resources

Quick Links

Contextual content recommendations & SharePoint Q&A

Instantly access relevant sales materials…

Beyond the DRA Cloud Label Printing

Explore cloud-based label printing within Dynamics 365…

HR Infrastructure Customer merge

Important considerations for HR Customer migrations…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,418 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,631 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,142

Featured topics

Product updates

Dynamics 365 release plans