Understanding how basket items are traversed in basket.tpl

Hello there,

I wonder how the basket items in the basket.tpl are traversed, line 77-79:

[{assign var="basketitemlist" value=$oView->getBasketArticles() }]
[{foreach key=basketindex from=$oxcmp_basket->getContents() item=basketitem name=test_Contents}]
[{assign var="basketproduct" value=$basketitemlist.$basketindex }]

What I do not get is why there are two calls: getBasketArticles() and getContents(). As far as I understand that, both should return an array of current basket items, so I do not see the need for this interweaved structure, but I am sure there is one.

For a future implementation of a modified basket this might be important to me.

Thanks very much,
Richard

The first call gives you an array of “oxarticles”, the second one “oxbasketitems”.

Regards

Rafael

Hi Rafael,

thanks very much for the advice. I will dig into this difference.

Cheers,
Richard

You are welcome.
You know the Codedocumentation ?

http://docu.oxid-esales.com/CE/sourcecodedocumentation/4.5.0.34568/

Regards

Rafael