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

Require Orders Model failed

Started by sprachrohr, January 15, 2019, 13:55:46 PM

Previous topic - Next topic

sprachrohr

Hello,

after Updating to VM 3.4.2 i have a problem. Joomla version is 3.9.1.

I have an Backend QuickIcon Plugin, where i require the VM Orders Model.
I used this code:
if (!class_exists('VirtueMartModelOrders')) {
   require(VMPATH_ADMIN . DS . 'models' . DS . 'orders.php');
}

After Update to VM 3.4.2 this code doesnt work anymore. I get a blank page without errors. Even if i fill in the whole path, i get a blank page.

Any suggestions?

Thank you!!!

Best regards
Dirk

GJC Web Design

maybe try
if (!class_exists( 'VmConfig' )) require(JPATH_ROOT .'/administrator/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();

before 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

sprachrohr

thats it!!! Thanks a lot!!!

Could you explain why this is needed?

GJC Web Design

it ensures that the VM config is available and loaded
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