Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Commit

Permalink
fix commerce service for cart
Browse files Browse the repository at this point in the history
adapt cart from current page instead of resource to make it work for components used within the template
  • Loading branch information
mhaack committed Nov 4, 2016
1 parent 251b336 commit f98ce28
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var global = this;
*/
use(function () {

var commerceService = resource.adaptTo(com.adobe.cq.commerce.api.CommerceService);
var commerceService = currentPage.getContentResource().adaptTo(com.adobe.cq.commerce.api.CommerceService);
var session = commerceService.login(request, response);
var resolver = resource.getResourceResolver();

Expand Down Expand Up @@ -68,4 +68,4 @@ use(function () {
total: total,
entries: _entries
}
});
});

0 comments on commit f98ce28

Please sign in to comment.