VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: centinela on October 30, 2020, 11:23:53 AM

Title: paying method in invoice
Post by: centinela on October 30, 2020, 11:23:53 AM
Hello, how can I show the paying method used in the inovices? At the moment that field is blank. Thank you,
Title: Re: paying method in invoice
Post by: Jörgen on October 30, 2020, 12:43:09 PM
Look at the original file, not the overridden file from Your template and see how it is done. It is shown by default.

Jörgen @ Kreativ Fotografi
Title: Re: paying method in invoice
Post by: centinela on October 30, 2020, 15:18:22 PM
Sorry Jörguen, could you please specify where can I find the original file? Thank you,
Title: Re: paying method in invoice
Post by: GJC Web Design on October 30, 2020, 15:53:00 PM
<?php echo $this->orderDetails['paymentName']; ?>

components\com_virtuemart\views\invoice\tmpl\invoice_order.php
Title: Re: paying method in invoice
Post by: pinochico on October 30, 2020, 16:03:37 PM
1. First learn how function Joomla and MVC - find on Joomla DOC - what is view, what is layout, what is template, where do you find layout/template for view from HTML code, which is different between basic template (invoice.php) and sublayout (invoice_items.php)
2. Try this
- Show the invoice
- Use Inspect element for showing the html code
- Find mark about view and tmpl - on body or html mark
(Etc: on body mark I see -> contentpane x-c-s option-com-virtuemart view-invoice lang-en-GB => then I know, this view is from component VirtueMart and view Invoice.)
(Etc.: in URL I see -> index.php?option=com_virtuemart&view=invoice&layout=invoice&tmpl=component => then I know. the layout is invoice)

Ok, now I go to FTP, find folder component (this is for FE - frontend), the subfolder com_virtuemart (this is OPTION == COMPONENT), then subfolder views (there are all views for FE), then subfolder invoice (this is VIEW), then subfolder tmpl (this is LAYOUT), then find file invoice.php (this is finally layout for invoice).
Inside this files is loaded some sublayout (invoice_order.php, ...)

So if I know which file I must change and know how function override in Joomla, then next action is very simple :)

Find in original file info about payment Name - find echo $this->orderDetails['paymentName']

Good luck for your a way...


To GJC:
If you post exact code, then people nothing will be to learn (never) and next time go again for solution (for personally free freelancer)
Title: Re: paying method in invoice
Post by: centinela on November 03, 2020, 16:33:34 PM
Thank you all, but this is beyond me. In Orders I can see the paying method used, but in the downloaded version of the order the payment method is not there anymore. In
components\com_virtuemart\views\invoice\tmpl\invoice_order.php y have <?php echo $this->orderDetails['paymentName']; ?> so I don´t know what is going on.

The url is index.php?option=com_virtuemart&view=orders&task=callInvoiceView&tmpl=component, so it is a virtuemart template.

Title: Re: paying method in invoice
Post by: pinochico on November 03, 2020, 16:53:23 PM
QuoteThe url is index.php?option=com_virtuemart&view=orders&task=callInvoiceView&tmpl=component, so it is a virtuemart template.

Yes, component is virtuemart
Yes, in URL is not administration, then view is for frontend (you must search in folder on FTP - root/components/com_virtuemart)
No, view is not invoice, but orders
No, tmpl is not DEFAULT (inside folder tmp, inside view orders), but TASK=> task is function in model ORDERS (because you have view orders) or function in VIEW.HTML.PHP for orders == this function you can not override, then you must hack core code VirtueMart or develop custom plugin for override or look inside this task (function) - I think maybe call another view?....
No, tmpl=component is special format from template for VIEW without head, headers, menu, footer, ... - try find on Joomla DOC - is not from VirtueMart
Title: Re: paying method in invoice
Post by: Jörgen on November 03, 2020, 19:33:18 PM
It is not a Virtuemart template, all templates are Joomla templates.
Check:
tempates/your_used_template/html/com_virtuemart (http://tempates/your_used_template/html/com_virtuemart)

If You rename this folder temporary, you can "unpublish" a bit of the template for the virtuemart component.
If This brings out the oayment name, You will have to work You way throgh the override files and see how you insert the code that is missing.

This is an issue with Your template, have You checked with Your template supplier about this ?

Jörgen @ Kreativ Fotografi
Title: Re: paying method in invoice
Post by: centinela on November 05, 2020, 17:25:32 PM
Quote from: Jörgen on November 03, 2020, 19:33:18 PM
It is not a Virtuemart template, all templates are Joomla templates.
Check:
tempates/your_used_template/html/com_virtuemart (http://tempates/your_used_template/html/com_virtuemart)

There is no /com_virtuemart in my template folder.

I think is something to do with the paying method plugin. All the PayPal payments show the paying method in the invoice, whereas all the credit card payments don´t. I will ask the plugin supplier. Thanks a lot.
Title: Re: paying method in invoice
Post by: pinochico on November 05, 2020, 18:14:46 PM
QuoteThere is no /com_virtuemart in my template folder.  - I will ask the plugin supplier. Thanks a lot.

Right. This is the right solution.
Which payment plugin do you use?
Title: Re: paying method in invoice
Post by: jenkinhill on November 06, 2020, 10:23:07 AM
Quote from: centinela on November 05, 2020, 17:25:32 PM
There is no /com_virtuemart in my template folder.

Which tells us that template overrides for VirtueMart are not used by your Joomla template.

The deault disply for payment method used in an invoice is to use the Payment Name set in the Payment Method Information tab (in some cases followed by the Payment Description.  Check the entries for these in your plugin.