VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: pdstudio on February 14, 2013, 18:28:01 PM

Title: How to hide shipment/payment description in PDF?
Post by: pdstudio on February 14, 2013, 18:28:01 PM
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
Title: Re: How to hide shipment/payment description in PDF?
Post by: seagul on June 11, 2013, 23:09:33 PM
Hi, I am looking for the same solution.
Did you find a way to hide the description in the PDF?

Thanks
Seagul
Title: Re: How to hide shipment/payment description in PDF?
Post by: Milbo on June 12, 2013, 13:04:46 PM
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>
Title: Re: How to hide shipment/payment description in PDF?
Post by: Marttyn on February 24, 2015, 16:42:41 PM
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!
Title: Re: How to hide shipment/payment description in PDF?
Post by: Marttyn on February 24, 2015, 16:53:28 PM
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...
Title: Re: How to hide shipment/payment description in PDF?
Post by: 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.
Title: Re: How to hide shipment/payment description in PDF?
Post by: Niko on November 05, 2015, 14:15:44 PM
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