Page size table


Page size can be displayed automatically as part of the product description using data from your ZetaPrints web-to-print portal. The data is extracted automatically and is shown as a table wherever you insert a special code snippet as explained in this post.

The contents of the table depends on weather it is a web-to-print or dynamic imaging template, the table may contain the size of the PDF, JPEG or GIF/PNG output files that are set to be generated for that particular template.

Activate page size table

This feature comes built in our web-to-print extension for Magento but is disabled by default. In order to activate this size info table, you need to edit view.php file.

Navigate to app/design/frontend/default/<your_theme_name>/template/catalog/product/ folder of your Magento installation and download the view.php file to you local hard drive.

Note. Keep in mind that if you’re editing the view.php file located in zptheme folder, your changes will get overwritten during the next web-to-print extension update. Editing the same file as part of a custom theme you’re using will ensure the activation is permanent.

Open the file with a text editing application (Notepad, Notepad++ etc.) and paste the following code depending on where you want the page size info to appear:

<?php $this->helper('webtoprint/personalization-form')->getPageSizeTable($this); ?>

In this example, the function was added right after the image fields function.

Note. By default, the function displays the page size in inches. To show the sizes in centimeters, use an additional parameter:

<?php $this->helper('webtoprint/personalization-form')->getPageSizeTable($this, 'cm'); ?>

After you’ve entered the code and saved the file, upload it to the same location overriding its previous version.

Note. You may need to clear the cache in order for the changes to take place.

See also: