Got a question?

We have compiled a list of articles and common questions that we hear from our customers. Ask or enter a search term below for quick results.

Note: If you can't find what you're looking for; try this custom search.

This article explains how to customize the voucher theme.

Requirements

  • You need to install Tools App in jApps >> Applications to automatically generate the PDF.

Clone the voucher theme

  • From the admin panel, navigate to jVouchers >> Tools >> Theme
  • Locate "Sample Coupon" theme and clone it by clicking "Clone" button
  • Edit your cloned theme to access the files
  • Under Files section you will see default.php and template.php

Warning

The difficulty level of this tutorial is quiet high and will require some good understanding of HTML. You need to hire a freelancer to help you out. Theme customization is not part of the Free support we provide for everyone. Please contact Joobi support for Freelancer recommendations.

There are 2 ways to create a coupon pdf:

  • Generate the pdf from a pdf template ( recommended )

This method is much better has it allow you to make an design for your theme.

The pdf template is named original.pdf and it is located in joobi/user/theme/coupon/[name of the cloned theme]/
The php file called template.php allow you to define the positioning and font style of the text you want to print on the pdf.

  • Generate the pdf from an HTML file ( not recommended )

This method allow you to generate a pdf from an HTML file.
There are limitation on the images due to the pdf library limitation.
The HTML template file is called default.php

Please note if template.php fine is present into the template the method 1 will be used to generate the pdf.
If you want to use the older method number 2 and generate the pdf from an HTML file you need to rename template.php to something else.


Custom Coupon Theme

Cloned the default coupon

jVouchers >> Tools >> Theme >> Sample Coupon

Edit the file through FTP
  • Navigate to /joobi/user/theme/coupon/your_coupon
  • Get the file named Original.pdf
  • Create new one with the design that you need. Name your file with the same name: original.pdf.
  • Replace the default file with the one you just created.
  • To change the order or remove some of the information that are displayed on the coupon you need to edit the template.php file.
  • In order to edit this file you will need to have some technical skill or know some php.
  • In order to change the position of some information ( text) in the coupon you will need to change the X and Y coordinates for that string (information) .

For example to change the position of an element :

x-y-positions

To remove some information from the coupon you need to comment that block of code. That means you need to put the code between: /* some_code */

Example, to remove the phone from the Vendor Information, you will need to comment this code:

/* if ( !empty( $InformationO->vendorPhone ) ) { // phone number
$addresY += 6;
$this->SetXY( 160, $addresY );
$this->Write( 10, $InformationO->vendorPhone );
} */