Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pdf catalog problem


Tomcat

Recommended Posts

Posted

Hi,

 

I have a strange error when trying to generate a pdf catalog with this contribution:

 

http://www.oscommerce.com/community/contributions,908

 

The script creates 6 catalogs as follows ( only the 1st one showned ) :

 

catalog_1.pdf

catalog_2.pdf

catalog_3.pdf

catalog_4.pdf

catalog_6.pdf

catalog_7.pdf

 

I only have a test category of items and only the first pdf file generated seems to be valid ( the other five are empty )

 

Also my server usesPHP 3 so the function :

/* foreach ($foo as $key => $value) 

  { 

     if ($foo[$key]['parent'] == $cid) 

    { 

       $this->Order($key, $level+1, $foo, $cid); 

     } 

   } 

*/}

included in pdf_catalog.php is not supported and I had to comment it out.

 

Any suggestion on how to replace this bit of code ( foreach ) with one suitable for php 3 ?

 

Thanks[/code]

Outside links in signatures are not allowed!

Posted

Hi again,

 

I found out that the problem is not php 3, but still I have the following error with the "foreach" command :

 

Warning: Invalid argument supplied for foreach() in /home/tomcat/public_html/catalog/admin/pdf_catalogue.php on line 279

 

The syntiax in the pdf_catalog.php is :

 

 

foreach ($foo as $key => $value)

{

     if ($foo[$key]['parent'] == $cid)

  {

       $this->Order($key, $level+1, $foo, $cid);

     }

   }

}

 

Any suggestions ?

 

Thanks

Outside links in signatures are not allowed!

Posted

Johnson,

 

I DO have php 4 installed, but still have a " not valid argument" for foreach.......

 

Could you check the syntiax for me ?

 

Many thanks

Outside links in signatures are not allowed!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...