Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PDF Catalogs v.1.6 beta


Recommended Posts

Hello!

 

I am pleased to announce the unofficial release of PDF Catalogs version 1.6 beta. It is a bug finding release, even if there should be no bug! ;-). You can get it here, it will be added to the contribution section after some 'life' testing!

 

Changes:

- Basic options can be set through the administration panel and the database,

less file editing will be required,

- Further developped the administration page to give more control over the

created PDF files,

- Integrated some preliminary checks to prevent some common errors,

- Separated the administration page from the pdf-creating portion of code,

- Integrated different 'looks' for the PDF catalog, to make life easier to

people who want to customize the script,

- Settled image distortion problems,

- Added as much comments in the files as possible, to make life easier to

people who want to customize the script,

- Added ZIP support,

- Added italian language files,

- Changed some filenames, directories and file locations, to make installation

and un-installation easier,

- Adapted the file in /catalog to the new configuration and corrected some

image displaying problems,

- Other minor changes that I don't remember! ;-)

 

Please note that:

- the HTML supporting template is still under development, but the basic functionalities are OK!

- the Italian language files are not 100% completed.

 

Feedback is highly appreciated!

(For images issue, look for my next post!)

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

so me again :D

done some testing and here the first bug reports

1. when using standart.tpl.php the ulr is not correct.

instead of foo-bar.com/catalog.... the links of the images are

foo-bar.comcatalog... ( / is missing )

with standart_enhanched.tpl.php it works.

 

standart.tpl

$link=HTTP_CATALOG_SERVER.DIR_WS_PDF_DIRECTORY.

 

enhanched.tpl

$link=HTTP_CATALOG_SERVER.DIR_WS_CATALOG.

 

2. when trying to change the template to use I get this error

Parse error: parse error in /var/www/catalog_new/admin/configuration.php(127) : eval()'d code on line 1

 

now I still need to get it working on my main server, but till then I can still do the workaround over the second server.

and can I also add a text to the header ? I want the logo on the left and a text on the side.

I will try to see if I cand find it myself.

 

Thanks a lot for this great contribution ! keep the good work going.

I will translate it to romanian and give you the files if you want.

Link to comment
Share on other sites

Hi, thanx for your report!

 

I will have to make a slash test somewhere and eventually add or remove them as needed!

 

I see you found out how to put text together with the logo ... the pdf catalog looks nice, I just would also adapt the orange background of the categories to the logo's colors, e.g yellow ... just a personal opinion of course! :)

 

The problem in the administration section and the configuration.php must have somehing to do with the database additions made, because I know that I haven't tweaked anything in that file!

 

Thanx again, have a nice day!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

I have installed the beta version on my site and all has installed except the sql file I am unable to add it thows errors all the time in phpadmin.

 

I have a number of contribs installed and this may be the problem? I am not a coder so I am lost a little here.

 

Error

 

SQL-query :

 

INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible )

VALUES (

'20', 'PDF Catalog', 'PDF Catalog Configuration', '20', '1'

)

 

MySQL said:

#1062 - Duplicate entry '20' for key 1

 

Any thoughts on this error much appreciated.

Link to comment
Share on other sites

Antonios, excuse me if this is already covered in the 1.6 beta but I have not got it working yet, but are you as admin able to select the categories to make pdf's for.

 

I do not want to create a catalog for the whole site, yet, just 1 category, would this be a good feature? this would reduce the size of pdfs downloaded and created which would reduce the load on the server?

 

Thx for this contribution, I hope to get it working soon.

Link to comment
Share on other sites

I have installed the beta version on my site and all has installed except the sql file I am unable to add it thows errors all the time in phpadmin.

 

I have a number of contribs installed and this may be the problem? I am not a coder so I am lost a little here.

 

Error

 

SQL-query :

 

INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible )

VALUES (

'20', 'PDF Catalog', 'PDF Catalog Configuration', '20', '1'

)

 

MySQL said:

#1062 - Duplicate entry '20' for key 1

 

Any thoughts on this error much appreciated.

just edit the sql file and replace the 20 with something else, its just for sorting.

as far as I saw in the select statement ...

but before doing so MAKE A BACKUP OF YOUR DATABASE !

the go ahead and give it a try.

if you still get a duplicate entry go in mysql and look what you have ( either with phpmyadmin or manual )

 

select configuration_group_id from configuration_group;

 

and see what's free

Link to comment
Share on other sites

Hi j0ker!

 

Antonios, excuse me if this is already covered in the 1.6 beta but I have not got it working yet, but are you as admin able to select the categories to make pdf's for.

 

Nope ... at least not yet! That would indeed be a good idea to implement somehow! You are the second person asking for, we could try to do it, but I can't promise anything for the moment!

 

As for the configuration problem, see the reply of Dracula! I think I will create an DB installation script to avoid such concerns!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Thx for reply and help I have sorted the sql as dracula said. Another problem,

PDF Template to use in admin click this and I get this error:

 

Parse error: parse error in /home/sites/supaosc.com/public_html/1/customers/toys/admin/configuration.php(125) : eval()'d code on line 1

 

Any ideas anyone plz

Link to comment
Share on other sites

Parse error: parse error in /home/sites/supaosc.com/public_html/1/customers/toys/admin/configuration.php(125) : eval()'d code on line 1

 

I may have an idea ... using phpMyAdmin or similar script, find in the 'configuration' database the 3 added records (DIR_WS_PDF_DIRECTORY, PDF_FILENAME, PDF_TEMPLATE) and make sure that the values for fields 'use_function' and 'set_function' are set to NULL (not zero, not space but NULL). I found a problem in the third one (PDF_TEMPLATE), so I suppose that you will have to check it also! Remember NULL!

 

Please keep us informed about the results!

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

thx again I will check that now I am also getting this error on click create pdf in admin:

 

Warning: main(includes/modules/pdf_files/templates/): failed to open stream: No such file or directory in /home/sites/supaosc.com/public_html/1/customers/toys/admin/pdf_catalog.php on line 127

 

Fatal error: main(): Failed opening required 'includes/modules/pdf_files/templates/' (include_path='.:/usr/share/pear') in /home/sites/supaosc.com/public_html/1/customers/toys/admin/pdf_catalog.php on line 127

 

Thx in advance

Link to comment
Share on other sites

I found a problem in the third one (PDF_TEMPLATE), so I suppose that you will have to check it also! Remember NULL!

You where correct the third sql edit was in error I will change and see if it cures some of the problems I am havin. Thx

Link to comment
Share on other sites

Good fix, sql change has cured the 1st problem, thx for that any thoughts on this new one, I have attempted to install template folders 755chmod to virtually every folder, I have checked the config and I have folders matching the config setup so I am at loss.

 

Any pointers plz where is the template folder meant to be.

Link to comment
Share on other sites

OK guys, if you get errors concerning 'eval', please check your database as advised in the previous posts!

 

Any pointers plz where is the template folder meant to be.

 

Try closing the browser window and clearing the browser cache! Then load again the administration section and try again to generate the catalogs. Normally the script would warn you with a pink message on the top of the page if something was wrong with the template file you have choosen to use and would not let you proceed (but you would get a nice osc admin page!).

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Error: PDF templates directory does not exist. Please set this in pdf_catalog.php.

Error: PDF directory does not exist. Please set this in Configuration --> PDF Catalog.

Error: PDF Template filename is not defined. Please set this in Configuration --> PDF Catalog.

 

 

Like these pink errors, yep I have em 2 are the config in admin im not concerned with, it the top one which I am unable to get rid off I have put a template file in every folder in osc virtualy no change, the templates folder I am using is the one from the 1.6, where is it meant to be?

Link to comment
Share on other sites

It could be a slash problem ... please edit admin/pdf_catalog.php and locate around line 35-36 following:

 

// Directory where are located the PDF related files (with trailing slash!!)
define('DIR_WS_PDF_FILES', DIR_WS_MODULES . 'pdf_files/');

 

Add a slash in front of pdf_files/. The new line should look like

 

define('DIR_WS_PDF_FILES', DIR_WS_MODULES . '/pdf_files/');

 

Any change?

 

PS. The template files should be in directory /admin/includes/modules/pdf_files/templates !

Edited by detsouvalas

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Just to confirm I have the tempkates folder in the correct dir, and also I have tried the extra slash in admin>pdf_catalog.php as illustrated I have also tried it with templates as the messgae below illustrates.

 

Fatal error: main(): Failed opening required 'includes/modules/pdf_files//templates/standart_enhanced.tpl.php' (include_path='.:/usr/share/pear') in /home/sites/supaosc.com/public_html/1/customers/toys/admin/pdf_catalog.php on line 127

 

everything is right as I can see config is right and in admin cofiguration, I am lost now I dont know where to look now.

Link to comment
Share on other sites

OK, no slash problem ... hmmm ...

 

What version of osC are you using, on what kind of server, are you working offline and then uploading to the server?? I want to know everything!! (sorry to ask, but as I don't see it in front of me I need to know ...) ( I am sure it's a small silly thing that we oversee!! :( )

Antonios

 

olympicslogo_en.gif

Link to comment
Share on other sites

Ok no problem I understand it must be hard, I am using the latest version of osc ms2, downloaded yesterday.

Server is unix, virtual hosting, I am using shared ssl but not in admin, catlog front works fine, its a redhat server, and I work local then upload modded files via ftp. Anything else just ask.

 

I have noticed this, im not a coder so excuse I just compare with other sections and this seems diff. admin>pdf_catalog.php line 127

 

// Create the PDF files

case 'createpdf':

tep_set_time_limit(0);

require(DIR_WS_PDF_TEMPLATES . PDF_TEMPLATE);

// Download created PDF files

 

Shouldnt the bold bit be a file lke template.php? :unsure:

 

Hope this helps

Edited by j0ker
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...