PDF Catalog Error in Admin
I have installed the PDF Catalog on a localhost WAMP site to see if I can get it working. I fixed the first p.products error by applying a fix found on the OSC website. Now wehn I go to generate the PDF Catalog I get the following error:
[Thu Apr 19 20:50:05 2007] [error] [client 127.0.0.1] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 696 bytes) in C:\\***\\***\\zencart\\admin\\includes\\functions\\general.php on line 156
Does anyone know how to fix this? I cannot see anything in general.php which says anything about 8388608 bytes. Think it is a bit beyond my knowledge to be honest :no:
Re: PDF Catalog Error in Admin
Right - Fixed that one. The setting is in PHP.ini (memory_limit = 8M). Changed that to 20M and got rid of the error. Now I have a new error in the log file:
[Thu Apr 19 21:13:55 2007] [error] [client 127.0.0.1] PHP Fatal error: Cannot access empty property in C:\\***\\***\\zencart\\admin\\pdf_catalogue.php on line 606
I have no idea what that means - I am soooh out of my depth.
LINE 606 of pdf_catalogue.php reads:
PHP Code:
$this->$parent_category_name='';
$this->ParentsName($current_category_level,$i,$categorieslevelsarray, $categoriesnamearray);
Re: PDF Catalog Error in Admin
Ok - I have now fixed all the warnings and errors from the PDF Generator, but it is not creating the PDF file. I am pretty sure there cannot be much wrong with it so if someone wants to have a bash at making it work I will be happy to send over the amended zip archive
Re: PDF Catalog Error in Admin
Does nobody want to volunteer their PHP skills to help make this contribution work?
Lots of people will find it useful
Re: PDF Catalog Error in Admin
I am trying to port an OSC PDF Catalog Creator to Zencart and am replacing OSC PHP code with Zencart PHP Code. I am a bit stuck with the following and would be grateful if someone could glance over it for me:
ORIGINAL OSC CODE
PHP Code:
if(VAT == '1')
{
$vatprice_query=tep_db_query("select p.products_id, p.products_tax_class_id, tr.tax_rate from " . TABLE_PRODUCTS . " p, " . TABLE_TAX_RATES . " tr where p.products_id = '" . $data_array[10] . "' and p.products_tax_class_id = tr.tax_class_id");
while($vatprice1 = tep_db_fetch_array($vatprice_query)) {
$steuer = $vatprice1['tax_rate'];
}
$vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",(($steuer/100)*$data_array[9])+$data_array[9]);
$vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",(($steuer/100)*$data_array[8])+$data_array[8]);
}
else
{
$vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[9]);
$vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[8]);
}
MY PHP CODE ATTEMPT FOR ZENCART
PHP Code:
global $db;
if(VAT == '1')
{
$query= "SELECT p.products_id, p.products_tax_class_id, tr.tax_rate from (" . TABLE_PRODUCTS . " p, " . TABLE_TAX_RATES . " tr) where p.products_id = '" . $data_array[10] . "' and p.products_tax_class_id = tr.tax_class_id";
$vatprice = $db->Execute($query);
while (!$vatprice->EOF) {
$steuer = $vatprice['tax_rate'];
}
$vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",(($steuer/100)*$data_array[9])+$data_array[9]);
$vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",(($steuer/100)*$data_array[8])+$data_array[8]);
}
else
{
$vatprice=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[9]);
$vatspecialsprice=sprintf("%01.".DIGITS_AFTER_DOT."f",$data_array[8]);
}
As you may have guessed I am not a PHP coder so am just following the instructions on how to port an OSC mod to Zencart. Can any PHP guru please tell me if the code I have produced is correct.
Thanks
Re: PDF Catalog Error in Admin
Am I talking to myself or something? Have I posted in the wrong place? Surely just because it is a little bit technical it is not too difficult.
If I ask how to change my store name I bet every zencart developer would be answering the thread but ask something even the tiniest bit technical and nobody bothers to answer.
Maybe I am using the wrong shopping cart. After all OSC has a working PDF generator and it is updated and maintained. :censored:
Re: PDF Catalog Error in Admin
Hi Bekinky,
An OSC PDF generator has already been ported to ZenCart. Check the contribs section for "PDF Order Center". That code may help you for the PDF catalog code.
Re: PDF Catalog Error in Admin
Welcome back grayson. Good to see you posting again. :smile:
Re: PDF Catalog Error in Admin
bekinky,
I got the same error in PDE Catalog module as you had before. How did you fix the problem?
PHP Fatal error: Cannot access empty property in C:\\***\\***\\zencart\\admin\\pdf_catalogue.php on line 606
Thank you,
Steve
Re: PDF Catalog Error in Admin
hi bekinky,
you are not talking to yourself. just you don't share the information enough.
please send your corrected zen odf creator in zip in the forum, then we can follow with eeachother at the same time to go further you are talking that you fixed some errors, by using osc coments, then let us see what you did, than we will not more waste the time on the same errors from start.
thanks and success