Carlos Martinez
Carlos Martinez

Reputation: 31

how to override a shared component in spartacus storefront

I am trying to add more information to the price section in the cx-cart-item component:

cart entries

However, I don't see an outlet so that I can just attach the component "after" or "before" the price

How do I extend the render functionality? I am thinking:

Upvotes: 3

Views: 2045

Answers (1)

dunqan
dunqan

Reputation: 974

The simplest answer, for now, would be overriding the component, as in the docs you've specified.

You can check the working example here: https://github.com/tobi-or-not-tobi/spartacus-bootcamp/tree/master/src/app/features/components/banner

In the future, it should be possible to easily replace not only cms components, but also lower-level components.

Upvotes: 2

Related Questions