# sBlockPrices im Warenkorb verfügbar machen

**URL:** <https://forum.shopware.com/t/sblockprices-im-warenkorb-verfugbar-machen/14078>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [1. Juli 2013 um 11:47 UTC](https://forum.shopware.com/t/sblockprices-im-warenkorb-verfugbar-machen/14078 "2013-07-01T11:47:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktwo](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@ktwo](https://forum.shopware.com/u/ktwo)\
**Post date:** [1. Juli 2013 um 11:47 UTC](https://forum.shopware.com/t/sblockprices-im-warenkorb-verfugbar-machen/14078/1 "2013-07-01T11:47:57Z")

</div>

Hallo, ich habe mal wieder ein Problem: Ich würde gerne die $sArticle.sBlockPrices im Warenkorb verfügbar machen, sodass ich diese dort aufrufen kann. Leider habe ich noch nicht verstanden, wie ich eine Variablen der Klasse Article in der Klasse basket verfügbar machen kann. Hat jemand hierfür eine Idee? Oder vielleicht sogar schon eine Lösung? Danke gruß

---

<div class="post-metadata">

**Author:** ![pino](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/pino/32/14373_2.png) [@pino](https://forum.shopware.com/u/pino)\
**Post date:** [2. Juli 2013 um 19:21 UTC](https://forum.shopware.com/t/sblockprices-im-warenkorb-verfugbar-machen/14078/2 "2013-07-02T19:21:52Z")

</div>

hi, mach ein plugin mit nem hook ` $this-\>subscribeEvent( 'sBasket::sGetBasket::after', 'onBasket' ); ` die methode ` public static function onBasket(Enlight\_Hook\_HookArgs $args) { $article = $args-\>getReturn(); foreach($article['content'] as $aK =\> $aV){ $thisArticle = Shopware()-\>Modules()-\>Articles()-\>sGetArticleById($aV['articleID']); $article['content'][$aK]['sBlockPrices'] = $thisArticle['sBlockPrices']; } $args-\>setReturn($article); } ` im warenkorb kannst du das dan so ansprechen. `{$basket.0.sBlockPrices}` hier die schleife: ` {foreach name=basket from=$sBasket.content item=sBasketItem key=key} {$sBasketItem.sBlockPrices} {/foreach} ` so in etwa sollte es gehen.
