Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

(0) ShareShare
ReportReport
Posted on by 10

Hello guys,

I've created some custom controls/extensions in the SimpleProductDetailsView, during all the development I was using the Cloud POS to test them and everything is working fine there... Then I created a Store Commerce installer and installed the package, I can see that the extension package is installed/loaded, also when I debug the code I can see that the data is being populated, but the UI is not showing in the Store Commerce...

Do you guys have any idea what could be?

* It's everything running in an LCS Commerce DEV VM

* I am using the knockoutjs

* I've compared my projects with the example from GitHub, everything looks similar

Best regards,

Luiz

  • LuizVentura Profile Picture
    10 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    Hi Monis,

    It worked, thanks!

    Where did you get this info? Next time I can check there as well.

    Kind regards,

    Luiz

  • Verified answer
    Monis Azhar Profile Picture
    62 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    Hi Luiz,

    This is known issue in Microsoft build version of MPOS and Store commerce app in version 10.0.28

    Please download the latest application version of MPOS/store commerce app from LCS > Shared asset library > Self service packages > select 10.0.28 Modern POS (sealed) > On the action pane, you will find a button for VERSIONS, click that button and select the most recent version.

  • LuizVentura Profile Picture
    10 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    Hi Monis,

    Unfortunately, I'm still having the issue.

    Since nobody here could help me, I think I will open a support ticket with Microsoft next week.

  • Monis Azhar Profile Picture
    62 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    I am facing the same problem. Did you find any solution?

    This is not the problem with Knockout JS but the view extension.

  • LuizVentura Profile Picture
    10 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    Luke Graham can you please help me with that?

  • LuizVentura Profile Picture
    10 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    Hi Muhammad,

    Thanks for your answer, but it's all the same in my solution.

    When investigating the Network tab in the inspector, I could see:

    • All data is there, this is one of my requests as an example:

    pastedimage1663598691740v1.png

    • BUT all the custom controls HTML are in red, their responses are failing:

    Store Commerce

    pastedimage1663598835008v2.png

    Same control in the Cloud POS (everything is working fine there)

    pastedimage1663598935650v3.png

    What I've noticed is that in the Store Commerce their Request URL is kind of duplicating, see example:

    pastedimage1663599120327v4.png

    I don't know what is missing, or why this URL is "duplicating".

    Kind regards.

  • umer draz Profile Picture
    94 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    You will need to include the knockout.js in storecommmerce.pos project

    <Project Sdk="Microsoft.NET.Sdk">

     <Import Project="..\CustomizationPackage.props" />

     <PropertyGroup>

       <TargetFramework>netstandard2.0</TargetFramework>

     </PropertyGroup>

     <ItemGroup>

       <Compile Remove="devDependencies\**" />

       <EmbeddedResource Remove="devDependencies\**" />

       <TypeScriptCompile Remove="devDependencies\**" />

       <PackageReference Include="knockoutjs" Version="3.5.*" />

     </ItemGroup>

     <ItemGroup>

       <None Include="Libraries\applicationinsights-web.js" />

       <None Include="Libraries\applicationinsights-web.min.js" />

       <None Include="Libraries\knockout.js" />

     </ItemGroup>

     <ItemGroup>

       <PackageReference Include="Microsoft.Dynamics.Commerce.Sdk.Pos" Version="$(CommerceSdkPackagesVersion)" />

       <PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.0.*" />

     </ItemGroup>

     <ItemGroup>

       <ProjectReference Include="..\CommerceRuntime\XX.StoreCommerce.CommerceRuntime.csproj" />

     </ItemGroup>

     <Target Name="ContentIncludeKnockoutLibrary" BeforeTargets="AssignTargetPaths" DependsOnTargets="RunResolvePackageDependencies">

       <PropertyGroup>

         <KnockoutLibraryFilePath Condition="'%(PackageDefinitions.Name)' == 'knockoutjs'">%(PackageDefinitions.ResolvedPath)\Content\Scripts\knockout-%(PackageDefinitions.Version).js</KnockoutLibraryFilePath>

         <KnockoutjsFile>Libraries/knockout.js</KnockoutjsFile>

       </PropertyGroup>

       <Copy SourceFiles="$(KnockoutLibraryFilePath)" DestinationFiles="$(KnockoutjsFile)" SkipUnchangedFiles="true" />

       <!-- Necessary for CPOS -->

       <ItemGroup>

         <Content Include="$(KnockoutjsFile)"></Content>

         <Content Include="Libraries/applicationinsights-web.js"></Content>

         <Content Include="Libraries/applicationinsights-web.min.js"></Content>

       </ItemGroup>

     </Target>

    </Project>

    And tsconfig should look like this

    {

     "extends": "./devDependencies/pos-tsconfig-base.json",

     "compilerOptions": {

       "baseUrl": ".",

       "paths": {

         "knockout": [ "Libraries/knockout" ],

         "applicationinsights-web": [ "Libraries/applicationinsights-web" ]

       },

       "noImplicitAny": false,

       "noUnusedLocals": false,

       "noUnusedParameters": false

     }

    }

    I am alos using the app insights but if you arent using it then remove

  • LuizVentura Profile Picture
    10 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    Hi Muhammad,

    I have it in my solution, the extension package is loaded there:

    Screenshot-2022_2D00_09_2D00_08-103001.jpg

    The problem is with the visuals... when debugging the code, I can see that the extensions are being executed and the data is also there... but I cannot see anything on the page.

    I understood that the same code should work for all POS versions, but now it's only working in the Cloud POS.

    Maybe something wrong with the knokoutjs?

    Regards,

    Luiz

  • umer draz Profile Picture
    94 on at
    RE: View extension UI not showing in the Store Commerce, but it works fine in the Cloud POS

    you should have DefinePosExtensionPackageTrigger in CRT extensions and also the name used in

    public void OnExecuted(Request request, Response response)

    Should match the PackageName used when packaging the customization package

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,274 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,947 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans