문제

How to manage Banner module for Web and Mobile Application as per service contact standards and REST API ?

  • Should i make different modules for mobile and web ?
  • Or it can be manageable by common ?
도움이 되었습니까?

해결책

As I know Magento isn't contained REST API for banners. So I see two ways

1) you can create your custom Magento extension, where you will be adding banners data and provide your API endpoints to get this data via REST.

2) you can store banner data inside cms block and fetch with default REST API like

/V1/cmsBlock/:blockId

For web part usually used Cms Block where you can place banners with simple html/css/javascript.

다른 팁

It returns image ULR that can only be used on a PHTML file. We can't use that in mobile app. What's the point of giving such image src in rest api. See the content filed returned from the REST API rest/V1/cmsBlock/:{blockId}

"content": "<p><img src=\"{{media url=&quot;banner1.jpg&quot;}}\" alt=\"\"></p>"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top