Showing product variants in minibasket

Hi!

I have worked with Oxid couple of months and everything has went just fine. But now I am stucked with a problem where my confined OOP/smarty -skills are really tested (or so I think): how can I show product variant (color,size) information in right column minibasket? By looking Smarty-debug -information I can see there is an array (chosen_selectlist) where the right information sits and laughs at me :slight_smile:

How can I get my hands on to that information? Is there a simple solution which I can’t find or do I have to try to write a module (a get-function?) or what?

Can anyone point me to the right direction? Any help would be much appreciated!

/sami

I`m not sure, but I think that the basket-box use the same object like the basket itself.

So check this and if I´m right, you can use the same methods like in out/basic/basket.tpl.

Thank you for your answer! I did at the very beginning look at the basket-template (basket.tpl) but I think it doesn’t use the same object. Anyway I did a bit more experimenting and tried to use a smarty foreach-loop inside a loop where articles are shown in minibasket. And it worked!

[B]So here is the answer[/B] for the question of how to show product-variants in minibasket (dyn/minibasket.tpl):
put this (or a modification of this):


[{foreach from=$_product->chosen_selectlist item=oList}]
  [{ basket_variants item = $oList->value }]
[{/foreach}]

inside a loop where articles are shown at the very beginning of minibasket.tpl:


[{foreach from=$oxcmp_basket->getContents() name=rightlist item=_product}] 
...
[{/foreach}]

/sami

[QUOTE=salli;16043]Thank you for your answer! I did at the very beginning look at the basket-template (basket.tpl) but I think it doesn’t use the same object. [/QUOTE]
Its easy to check…
[{$oObject|@get_class}] give you the classname.