Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Support / Invoicing Support / [RESOLVED] Edit Invoice Page. Which file to edit?

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

[RESOLVED] Edit Invoice Page. Which file to edit?

  • expressmove
  • Topic Author
  • Offline
  • Silver
  • Silver
More
9 years 5 months ago - 9 years 5 months ago #16162 by expressmove
I am talking about "my invoices page" the Page at the frontend containing lists of invoices and their statuses. I want to give a css class to The payment status. So that I can style the text depending on whether it is "Pending" or "Paid". And I also want to give css padding to the <td> containing the texts. Which php file can I edit or create override for? Or any better idea how I can style those texts? Thanks
Last edit: 9 years 5 months ago by loic.
More
9 years 5 months ago #16197 by loic
Hello,

This file is in 'components/com_invoicing/views/invoices/tmpl/default.php'.

If you wish to custom this view, you can modify the file directly or create an override.
Here is an article to help you: www.joomprod.com/support/doc/customizati...c-view-override.html

Best regards.
  • expressmove
  • Topic Author
  • Offline
  • Silver
  • Silver
More
9 years 5 months ago #16239 by expressmove
Replied by expressmove on topic Edit My Invoice Page. Which file to edit?
I am not too good in php but it seems that the file you have provided ('components/com_invoicing/views/invoices/tmpl/default.php'.)
is making reference to certain variables and functions in another file. That is why these
<table class="adminlist table table-striped">
<tr>
	<th><?php echo JText::_('INVOICING_INVOICE_ID')?></th>
	<th><?php echo JText::_('INVOICING_INVOICE_DATE')?></th>
	<th><?php echo JText::_('INVOICING_INVOICE_STATUS')?></th>
	<th><?php echo JText::_('INVOICING_INVOICE_NET_AMOUNT')?></th>
	<th><?php echo JText::_('INVOICING_INVOICE_ACTIONS')?></th>
</tr>
are recognized in 'components/com_invoicing/views/invoices/tmpl/default.php'.
file.

I want the file where it is stated that if an order meets some requirements, it should write the text "Pending" else, it should write "Paid"
If I find this file, then I will add that the text "Pending" should have CSS class "pending" and also "Paid" should have CSS class "paid". Also I want to change the text "Paid" to "Active" to "Instead". I don't seem to find what I am looking for in 'components/com_invoicing/views/invoices/tmpl/default.php'. Please advise.
defined('_JEXEC') or die( 'Restricted access' );
 
$this->loadHelper('format');
 
JHtml::_('behavior.modal');
 
?>
<div class="row-fluid">
    <div class="span12">
        <fieldset>
            <legend><?php echo JText::_('INVOICING_INVOICES')?></legend>
<table class="adminlist table table-striped">
<tr>
	<th><?php echo JText::_('INVOICING_INVOICE_ID')?></th>
	<th><?php echo JText::_('INVOICING_INVOICE_DATE')?></th>
	<th><?php echo JText::_('INVOICING_INVOICE_STATUS')?></th>
	<th><?php echo JText::_('INVOICING_INVOICE_NET_AMOUNT')?></th>
	<th><?php echo JText::_('INVOICING_INVOICE_ACTIONS')?></th>
</tr>
<?php
foreach($this->items as $order) { ?>
<tr>
	<td><?php echo InvoicingHelperFormat::formatInvoiceNumber($order) ?></td>
	<td><?php echo date("d-m-Y",strtotime($order->created_on)) ?></td>
	<td>
	<?php echo InvoicingHelperFormat::formatInvoiceStatus($order->status) ?>
	</td>
	<td><?php echo InvoicingHelperFormat::formatPrice($order->net_amount,$order->currency_id); ?></td>
	<td>
		<?php if ($order->status != "CANCELLED") { /* ?>
		<a target='_blank' href="<?php echo JRoute::_('index.php?option=com_invoicing&view=invoice&id='.$order->invoicing_invoice_id.'&tmpl=component')?>"></a>
		<?php } else { ?>
		<a href="<?php echo JRoute::_('index.php?option=com_invoicing&view=invoice&id='.$order->invoicing_invoice_id.'&layout=payment')?>"><?php echo JText::_('INVOICING_INVOICE_PAY')?></a>
		<?php } ?> */
		?>
		<div id="pic_actions">			
			<a id="see_pic_actions" class="modal" rel="{handler: 'iframe', size: {x: 900, y: 600}}" href='<?php echo JRoute::_("index.php?option=com_invoicing&view=invoice&id=".$order->invoicing_invoice_id."&tmpl=component") ?>'></a>
 
			<a id="pdf_pic_actions" href='<?php echo JRoute::_("index.php?option=com_invoicing&view=invoice&id=".$order->invoicing_invoice_id."&tmpl=component&format=pdf") ?>'></a>
 
			<?php if ($order->status == "PENDING" || $order->status == "NEW") { ?>
			<a id="pay_pic_actions" href='<?php echo JRoute::_("index.php?option=com_invoicing&view=invoice&id=".$order->invoicing_invoice_id."&layout=payment") ?>'></a>
			<?php } ?>
 
		</div>
		<?php } ?>
	</td>
 
</tr>
<?php } ?>
            </table>
        </fieldset>
    </div>
</div>
More
9 years 5 months ago #16365 by loic
Hello,

Replace this:
foreach($this->items as $order) { ?>
<tr>

By this:
foreach($this->items as $order) {
if(isset($order->status) && $order->status != '') {
    $orderClass = "order-".strtolower($order->status);
} else {
    $orderClass = "";
}
?>
<tr class="<?php echo $orderClass; ?>">

The class will be 'order-{state of the order}'.

Best regards.
The following user(s) said Thank You: expressmove
  • expressmove
  • Topic Author
  • Offline
  • Silver
  • Silver
More
9 years 5 months ago #16488 by expressmove
Replied by expressmove on topic Edit My Invoice Page. Which file to edit?
This is beautiful! Thank you. Now, I got the classes for Pending and the Paid with the code you provided
More
9 years 5 months ago #16494 by loic
Great news :)

I update this topic to resolved.

Best regards.
Time to create page: 0.204 seconds
Powered by Kunena Forum