News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Export order data to CSV fie

Started by molasar, January 14, 2016, 12:14:00 PM

Previous topic - Next topic

molasar

Hello,

Joomla3+VM3.

I need to export the order data to CSV file after click on "Submit order" button on Shopping cart page.
In what file and what place I need to add my PHP code?

Please help me.


Thank you,
Anton.

GJC Web Design

you need to build a vm plugin that triggers on  plgVmOnUpdateOrderPayment

Have done quite a few so contact if interested
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

molasar

I already have a PHP code to make export order data.
But I can't find the function that handles the click on a button.

Which VM file contain this function?

GJC Web Design

I told you.. a plugin that triggers on plgVmOnUpdateOrderPayment

that's how VM works
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

molasar

I found function confirmedOrder() in the com_vm/helpers/cart.php file.
There is $orderDetails in this function. I think it contains order data.

How can I get order details from $orderDetails like name, address, products name, quantity, total amount...

GJC Web Design

FFS .. as u seem determined to ignore my advice this is the last try

function plgVmOnUpdateOrderPayment ($data,$old_order_status) {

}

$data contains everything u need

e.g

$data->virtuemart_order_id

then do a query for anything not in it
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

molasar

In what VM fie I can find plgVmOnUpdateOrderPayment function?
Or I need create it?

GJC Web Design

read the basic info on plugin development - afraid not up to date  http://docs.virtuemart.net/tutorials/development/84-extension-plugins.html
study other vm custom plugins

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation