News:

Support the VirtueMart project and become a member

Main Menu

How to hide shipment/payment description in PDF?

Started by pdstudio, February 14, 2013, 18:28:01 PM

Previous topic - Next topic

pdstudio

Hy all,
I want to discard the shipment description in the pdf what could be printed out on the backend.
Anybody knows how can I do that?
Thanks forward for your answer!

BR

seagul

Hi, I am looking for the same solution.
Did you find a way to hide the description in the PDF?

Thanks
Seagul

Milbo

FE/Views/invoice/tmpl/invoice_items.php 
around line 172

<tr>
<td align="right" class="pricePad" colspan="6"><?php echo $this->orderDetails['shipmentName'?></td>

<?php if ( VmConfig::get('show_tax')) { ?>
<td align="right"><span class='priceColor2'><?php echo $this->currency->priceDisplay($this->orderDetails['details']['BT']->order_shipment_tax$this->currency?></span> </td>
<?php ?>
<td align="right"></td>
<td align="right"><?php echo $this->currency->priceDisplay($this->orderDetails['details']['BT']->order_shipment $this->orderDetails['details']['BT']->order_shipment_tax$this->currency); ?></td>
</tr>
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Marttyn

Im having similar problem. Im using VM 2.6.6
On PDF invoice or order details, shipping and payment options are shown with description.
In my case, description for bank transfer payment is a long explanation about how to make bank transfer from abroad.
This occupy most of the screen on the order details, and most of the page on the PDF invoice.
I would like to only show the selected payment method, and not the description.
Is this possible?

echo $this->payment_name;
outputs both name and description :(

Regards!

Marttyn

Ive found that with PHP substr, and strpos i can find and remove the description in the order details:

<td class=""><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_PAYMENT_LBL'?></td>
<?php $substring substr($this->payment_name0strpos($this->payment_name'<br')); ?>
<td align="left"><?php echo $substring?></td>


But im sure there must be an easier way...

datajammer

With the latest version of VM I found that the BR didn't remove the description as the team have replaced the <br> with a </span><span>

I used the following code

      <?php echo substr($this->payment_name0strpos($this->payment_name'</span>')).'</span>';
//  echo $this->orderDetails['paymentName'];
  ?>


and

      <?php echo substr($this->shipment_name0strpos($this->shipment_name'</span>')).'</span>';
//  echo $this->orderDetails['shipmentName'];
  ?>


Hope this helps.

Niko

Quote from: datajammer on October 02, 2015, 18:45:20 PM
With the latest version of VM I found that the BR didn't remove the description as the team have replaced the <br> with a </span><span>

I used the following code

      <?php echo substr($this->payment_name0strpos($this->payment_name'</span>')).'</span>';
//  echo $this->orderDetails['paymentName'];
  ?>


and

      <?php echo substr($this->shipment_name0strpos($this->shipment_name'</span>')).'</span>';
//  echo $this->orderDetails['shipmentName'];
  ?>


Hope this helps.

Hello Everyone. I cannot find the code you are mentioning datajammer. What file is that in? I am editing Views/invoice/tmpl/invoice_items.php