Jump to content

ro6er

Members
  • Posts

    12
  • Joined

  • Last visited

ro6er's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. How do you pull in a field from another table into the pdf. For example something from a custom module that I'd like to added which lives here: table: ps_order_paymentcard col: cardholdername I tried an sql query and it only worked under the order tab and not the email, here's what I did: $orderid1 = $order->id; $result = mysql_query("SELECT * FROM ps_orders INNER JOIN ps_order_paymentcard ON ps_orders.id_order = ps_order_paymentcard.id_order WHERE ps_orders.id_order = $orderid1") or die(mysql_error()); $pdf->Cell($width, 10, self::l('Customer order number:').$row['cardholdername']); there must be an easier way to do what I'm trying to achieve. Roger
  2. Ok so if I use $orderid1 = intval($this->id); in PaymentModule.php that worked.. Now for some reason the pdf that is sent via email doesn't have the new field I've added. If any one's reading this which file generates the pdf in the email? Is it PDF.php? As that works in terms of my field appearing from order's when I use that to get a pdf.
  3. Talking to myself.. So I figured I'm looking at the wrong file. I needed PaymentModule.php In order_conf.html I used {invoice_other} as it doesn't seem to do a great deal (not much prestashop knowledge sorry) as my new field. In PaymentModule.php I added the following: $orderid1 = intval($order->id); $result = mysql_query("SELECT * FROM ps_orders INNER JOIN ps_order_paymentcard ON ps_orders.id_order = ps_order_paymentcard.id_order WHERE ps_orders.id_order = $orderid1") or die(mysql_error()); $row = mysql_fetch_array( $result ); And in the // Send an e-mail to customer I referenced it: '{invoice_other}' => $row['cardholdername'], And it kinda works.. Well it works if I replace intval($order->id) with a number obviously but it just seems like I'm re-inventing the wheel just to echo a field which should be easy??? yes/no? If I figure out what I'm doing wrong I'll post it here..
  4. Hi, I'm trying to add a new field to order_conf.html Here's what I've done so far: I have a new payment module which I made from editing a tutorial I found online. This allow's customers to add an order number at the end of the transaction (don't ask why I'm doing it this way around it's the clients idea not mine so I'm stuck with it..). I can pop this field into the pdf by using some mysql, I don't really get the whole smarty/hook thing in prestashop which is where I think I'm falling down here. Any way I read that if I edit mailalerts.php and add to // Filling-in vars for email '{invoice_cardHoldername}' => $cardHoldername, it will appear in my order_conf.html But it doesn't, how do I call this? Thanks in advance, Roger
  5. I found the template I was using had this missing I just re-added the category.tpl from themes/prestashop into the template I was using and it worked fine.
  6. Gotta love the way things get moved to a different topic WITH NO LINK! Back to the google.
  7. How do I add sub categories so they appear under the category section? I've seen this done on the attached screenshot. I just can't figure it out. Thanks, Roger
×
×
  • Create New...