Author Topic: Url in invoice per product  (Read 573 times)

Vivi_2018

  • Beginner
  • *
  • Posts: 13
  • A beginner
Url in invoice per product
« on: October 16, 2018, 14:51:38 pm »
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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8874
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Url in invoice per product
« Reply #1 on: October 16, 2018, 15:44:01 pm »
product custom text field?

hide in site but show in the invoice?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Vivi_2018

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: Url in invoice per product
« Reply #2 on: October 16, 2018, 16:06:51 pm »
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.
 

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8874
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Url in invoice per product
« Reply #3 on: October 16, 2018, 16:26:50 pm »
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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Vivi_2018

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: Url in invoice per product
« Reply #4 on: October 17, 2018, 09:14:00 am »
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.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8874
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Url in invoice per product
« Reply #5 on: October 17, 2018, 10:26:45 am »
???

are u discussing the invoice (pdf) or the confirmation email?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Vivi_2018

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: Url in invoice per product
« Reply #6 on: October 17, 2018, 11:10:24 am »
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?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8874
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Url in invoice per product
« Reply #7 on: October 17, 2018, 11:31:30 am »
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

Quote
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?

then u need to create the display for it .. u have the data  -- just move it
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Vivi_2018

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: Url in invoice per product
« Reply #8 on: October 17, 2018, 11:39:17 am »
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?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8874
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Url in invoice per product
« Reply #9 on: October 17, 2018, 12:01:05 pm »
Quote
two 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!
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Vivi_2018

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: Url in invoice per product
« Reply #10 on: October 17, 2018, 13:10:19 pm »
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?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8874
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Url in invoice per product
« Reply #11 on: October 17, 2018, 14:27:07 pm »
system plugin

VM Framework Loader during Plugin Updates
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Vivi_2018

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: Url in invoice per product
« Reply #12 on: October 17, 2018, 14:51:30 pm »
Ok i found it  in the admin panel ..It worked.. thank you very much