Hello,
I am trying to build an e shop that sells videos in vimeo.
I want every user when he is buying a video(product) to see in his invoice a url of the video. All this process i want it to be automated.What i thought is to override the invoice file in the components/com_virtuemart/views/invoice/tmpl/invoice.php in order to read a field of the product(I have seen that in the creation of a product there is a URL field maybe to read that field) that is not visible in the front end and display it in the invoice.
Do you know any other way to do this? A shipment method maybe?
Thank you in advance
product custom text field?
hide in site but show in the invoice?
This is just a thought. Basically the product is a url. I thought that may there is a way to send this url in the invoice to the buyer. This is what i am trying to do. I don't want the administrator to send the url himself when the order is done. I am trying to find a way to send this url automatically when the purchase is done.
thats what I mean .. if it is a product custom field just fill in the url per product
hide it in all FE pages
but this will be available in the invoice template
components\com_virtuemart\views\invoice\tmpl\invoice_items.php
over ride
$product_attribute = VirtueMartModelCustomfields::CustomsFieldOrderDisplay($item,'FE');
echo $product_attribute;
you may find a better customfields function to display/get it
I just found out that there is a field "URL" in the admin panel of the product that isn't visible in the description of the product in the fron end. Can i take the value of that field and show it in the invoice?
Also the product details aren't visible in the invoice. If i have understand it correctly the product details are in the invoice_item.php and if i want them to show them in the invoice i have to load this file in the mail_html.php i have wrote this in the mail_html.php
echo $this->loadTemplate('invoice_items');
but it doesn't work.
???
are u discussing the invoice (pdf) or the confirmation email?
As confirmation email you mean the email that the user gets as an invoice when he is buying a product ( i have attached an image )? This invoice i can download it as a pdf when the status is 'confirmed'. I want to be in the pdf too.
Also i found this :
http://forum.virtuemart.net/index.php?topic=138734.0
and i wrote this code in the file :mail_html_pricelist.php.
<?php $productModel = VmModel::getModel('product'); //should be inserted before the $item foreach loop
foreach($this->orderDetails['items'] as $item) {
$p = $productModel->getProduct($item->virtuemart_product_id);
$product_link = $p->product_url;
} ?>
<?php echo $product_link; ?>
And it worked.
But i don't want to show the url in pricelist table. I want to have a table in the invoice with the details of the products and there to show the product_url. The invoice_items.php isn't the file that show the details of the product in the invoice?
(http://invoice_li.jpg)
the email is an email -- the invoice is a pdf
two separate things and dealt with in completely separate but similar files in the invoice template folder
QuoteBut i don't want to show the url in pricelist table. I want to have a table in the invoice with the details of the products and there to show the product_url. The invoice_items.php isn't the file that show the details of the product in the invoice?
then u need to create the display for it .. u have the data -- just move it
The pdf of the invoice the buyer gets it, whenever i change the status of the order to status " Confirmed " Is this the way get it?
Also with the changes that i made whenever i change the status to "confirmed" i get this error :TCPDF ERROR: Unable to create output file: vminvoice_181017FJIG01.pdf.
Can you tell me which files do i have to change in order to change the email and pdf that the user gets?
Quotetwo separate things and dealt with in completely separate but similar files in the invoice template folder
components\com_virtuemart\views\invoice\tmpl\invoice.php
over ride!
Thank you for your help. I have a different problem now and i hope that you can help me.
After installing virtuemart the registration form of my site changed and it uses the registration form of virtuemart. I don't want that.
How can i bring back my own registration form?
system plugin
VM Framework Loader during Plugin Updates
Ok i found it in the admin panel ..It worked.. thank you very much