Zen Cart Logo

Custom Product Page

Locked

Views: 1,731

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
21 Dec 2006, 11:54 PM
#1
matthelm avatar

matthelm

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Custom Product Page

Is there a tutorial (and if so a pointer to it please) which describes the steps to:

Setting up a custom product page - for instance for Books

Adding custom attributes to the page such as:

  • ISBN with input field ________
  • Author name with input field ________
  • Publisher ________

With books you commonly see links to a pdf displaying perhaps Table of Contents, Index, excepts from a Chapter.

I would like to be able to do this programmatically the same way you would add an image in the "Products Image" section. I understand how to manage images using ftp, control panels. In this case I would like to have zen-cart do it for my client, meaning not the easy way of adding an html link to the pdf in the Product Description.

I'm comfortable working adding tables/fields to the database and adding custom forms as described in a turorial.

-Bob

22 Dec 2006, 1:37 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: Custom Product Page

Check the Downloads section for the custom product type for books.

22 Dec 2006, 6:31 AM
#3
matthelm avatar

matthelm

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: Custom Product Page

Long night, but mostly successful. finding the tutorial was a little cryptic. After browsing the OBVIOUS downloads folders several times, I clicked on older contributions link which I had ignored and found it there.

As per the README in the demo_books product type, I was able to successfully add 3 items:

PDF for a Table of Contents
PDF for Sample Chapter
PDF for About the Author

This is now working in both the admin tool and the public shop view. For the public view I added some html around the variables so that they would display as links and open the PDF docs.

This is great, thanks.

The other function I would love to add when I have a little more energy is the ability to use the admin form to upload the PDF files to the server. One victory is as much as I can handle in a day...

-Bob

5 Jan 2007, 5:20 PM
#4
matthelm avatar

matthelm

New Zenner

Join Date:
Dec 2006
Posts:
15
Plugin Contributions:
0

Re: Custom Product Page

The public product page is working fine displaying:

PDF to About Author: document.pdf

document.pdf is correctly linking to the pdf file which opens in a new window. The variable for the pdf file is $products_about_author_pdf. The line on the products page that works to display the pdf as text is:

echo TEXT_BOOK_ABOUT_AUTHOR_PDF . " " . $products_about_author_pdf ."<br>";

Next puzzle piece. Client would me to change the construct so that it displays as a button image rather than text, similar to Tell a friend, etc.

I uploaded some sample button images and added the image definitions to:

includes/languages/english/button_names.php

However I do not undersand how to set up the product page so that the image will link to the pdf document (as it works in the text).

I tried messing with the line of code from Tell a Friend, but don't understand the logic, and/or what other files might need to be modified.

Help please, Bob