Skip to content
This repository has been archived by the owner on Nov 30, 2017. It is now read-only.

Creating custom CartItem, from which extend #293

Open
crevillo opened this issue Jun 12, 2015 · 0 comments
Open

Creating custom CartItem, from which extend #293

crevillo opened this issue Jun 12, 2015 · 0 comments

Comments

@crevillo
Copy link

Hi there. I'm reading the docs and following for my project. For creating my custom CartItem entity doc suggest to extend from
use Sylius\Component\Cart\Model\CartItem as BaseCartItem;

After that, in the ItemResolver it calls a setVariant function

$item->setVariant($product);

but there's no setVariant in the CartItem i'm extending.

What i see is i have that function defined at https://github.com/Sylius/Core/blob/master/Model/OrderItem.php#L75, in a model extending the same CartItem i'm trying to extend.

so, to use this setVariant, shouldn't we extend from Sylius\Core\Model\OrderItem? or am i understanding it totally wrong?

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant