[Typo3-shop] tt-products, product sorting by pid (based on tree position)

Rick [Futuros] typo3 at futuros.nl
Fri Sep 9 15:53:12 CEST 2005


Okay, confused by the title?

I will explane my problem. For the ttproducts ext i want to display the 
products sorted. The first step is to sort the products by the page they are 
on.

I have an array with all the products so i use:
uasort($myarray,myCompFunc())

So in my comp func i can easily get the pid of the rows:
$pid1 = $row1['pid'];
$pid2 = $row2['pid'];

Now comes the tricky part:
I want to compare the both pids by there position in the tree. I couldnt 
find a usefull function in the API, but i can't believe there isn't one.

So before i start writing my own function, can some one point me to a 
function i can use?

- Rick 





More information about the TYPO3-project-tt-products mailing list