Jump to content

greyfinality

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • First Name
    Ido
  • Last Name
    Shoshani

greyfinality's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi everyone, I'm a new prestashop developer, and after a lot of looking around the forums and googling I can't seem to find any resources on how to generate a pdf other from a template within the module. When I try to simply generate the pdf by putting the direct link in the template field, I don't generate anything. Can anyone tell me what I need to fix so I can get a pdf that says "hello world" to generate from this process? public function processGeneratePdf(){ if(Tools::isSubmit("id_order")) $order=new Order(Tools::getValue("id_order")); if(!Validate::isLoadedObject($order)) $this->errors[] = Tools::displayError('Order not found in DB'); $helloTemplate=_PS_MODULE_DIR_.'module/pdf/helloWorld.tpl'; $pdf=new PDF($order,$helloTemplate,$this->context->smarty); $pdf->render(); } When I do the same thing with, PDF::TEMPLATE_INVOICE, it works fine, but I want to be able to generate my own PDF forms manually. What am I missing?
×
×
  • Create New...