Git Product home page Git Product logo

arcommerce.productapi's Introduction

ARCommerce.ProductAPI

Sitecore Commerce product API to use in Augmented Reality application. Compatible with Apple ARKit.
Check ARCommerce.ClientApp for sample usage.

Usage

Project adds two API endpoints for accessing products data:

  • Search for all products in the category (for given category item id) and return paths to object scan files assigned to the products:
    GET /api/cxa/ARCatalog/GetProductScans?cci={catalog item id}
    Returned JSON (sample):

     [
     		{
     		  "ProductId":"123456",
     		  "ScanFilePath":"/-/media/AR-Maps/123456/iron.arobject"
     		},
     		{
     		  "ProductId":"321654",
     		  "ScanFilePath":"/-/media/AR-Maps/321654/plate.arobject"
     		},
     		...
     ]
    
  • Get product details for given product id:
    GET /api/cxa/ARCatalog/ProductInformation?id={product id}
    Returned JSON (sample):

     {
          "DisplayName":"Azur 10/02",
          "Description":"Text Description.",
          "SummaryImageUrl":"/-/media/Images/Habitat/123456.png?h=220\u0026w=263\u0026hash=5C258CA2D56764DF5E0ACCEBDEB186BA",
          "Link":"/shop/Connectedhome%3dhabitat_master-connected%20home/PhilipsAzurGC4410%5B%5BSS%5D%5D02%3d123456",
          "ProductId":"123456",
          "AdjustedPriceWithCurrency":"7.00 USD",
          "ListPriceWithCurrency":"45.00 USD",
          "StockStatusLabel":"Out of Stock",
          ...
     }
    

To link AR object scan (.arobject file) with commerce product, upload it to Sitecore Media Library under /sitecore/media library/AR Maps/{product id} item. Path is configured in ARCommerce.Feature.Catalog.config.

To generate .arobject files you can install Scanning and Detecting 3D Objects app on iOS device.

Sample iOS client code for this API can be found here

Requirements

Sitecore XC 9.0 Update-2 with SXA

Installation

Put following files into \lib\Modules\Commerce folder:

  • Sitecore.Commerce.XA.Feature.Catalog.dll
  • Sitecore.Commerce.XA.Foundation.Catalog.dll
  • Sitecore.Commerce.XA.Foundation.Common.dll
  • Sitecore.Commerce.XA.Foundation.Connect.dll

Deploy ARCommerce.Feature.Catalog.csproj to your Sitecore Commerce website with Visual Studio.

arcommerce.productapi's People

Contributors

whuu avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.