View Single Post
  #31  
Old 10-29-2003, 08:40 AM
 
Gibberish Gibberish is offline
 

Senior Member
  
Join Date: Sep 2003
Posts: 182
 

Default

If your still around Deals on Deals I have been ripping your code apart trying to get it to work on my xcart 3.4.8

I am stuck on one part though. I am getting an error that says:

Warning: Variable passed to each() is not an array or object in /usr/www/htdocs/saddlemen/test_site/xcart/customer/slidedown.php on line 32
slideMenu.init();

Line 32 is the bold one:

function preparelist($list)
{
$r = array();
$c = false;
$cnt = 1;
while (list ($k, $v) = each ($list) ){
$l = split('/',$v['category']);
// init tree
$p = & $r;
for( $i=0; $i<sizeof($l); $i++ ){
$idx = find_idx($p,$l[$i]);
$lastest = ( $i == sizeof($l)-1 );
if( $idx == -1 ) {
if( $lastest ){
if( isset($p[0]) && isset($p[0]['orderby']) && $p[0]['orderby'] > $v['order_by']){
array_unshift($p, array( 'label'=>$l[$i] ) );
$idx = 0;
}


Now I may have been just staring at this code to long, Im going to go get something to eat and come back but thought I would post in the chance you see this.
Reply With Quote