Jump to content

[SOLVED] Delivery slip / order slip with location


Prestafan1234
 Share

Recommended Posts

Hi

 

For a B2B site, I am looking for a way to print the database field "location" onto the delivery slip (PDF-file). The PDF is printed automatically, whenever an order is received, but it contains information about delivery address, payment method and reference only.

 

Any suggestions on how to modify it so that the database field location is added? I have searched for a module that allows this with no luck.

Edited by Prestafan1234 (see edit history)

Share this post


Link to post
Share on other sites

I'm a hack - certainly the way I solved the problem isn't correct, but here it is ... it's in the delivery-slip.tpl ... as I have only two warehouses, I test for $product.id_warehouse and print accordingly.

 

hope this helps, but remember - it's not elegant

 

 

<td style="text-align: center; width: 7%">{$product.product_quantity}</td>
<td style="text-align: center; width: 21%">
{if $product.id_warehouse < 2}
{l s='St.Louis, FR' pdf='true'}
{else}
{l s='Commugny, CH' pdf='true'}
{/if}
</td>
</tr>

Share this post


Link to post
Share on other sites

Thanks for your answer. What I was looking for, was the excact location in the warehouse of the product, sorry if that wasn't clear - eg. row 7, shelf 4, so your solution didn't work for me. I paid a developer fix this for me. The solution is (at your own risk - it worked for me):

 

/modules/mailalert/mailalerts.php

around line 147 add:

 

$product_table = new Product($product['product_id'], true, (int)$id_lang);

 

and further down

 

<td style="padding:0.6em 0.4em;">'.$product_table->location.'</td>

 

Open: /modules/mailalert/mails/LANG/new_order.html

 

in line 39 add this:

<th style="width: 15%; padding: 0.6em 0;">Location or whatever text you wish</th>

 

EDIT: This was implemented in version 1.4.9

Edited by Prestafan1234 (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More