Author Topic: Access virtuemart product data externally  (Read 212 times)

Russell6

  • Beginner
  • *
  • Posts: 1
  • A beginner
Access virtuemart product data externally
« on: August 21, 2019, 07:05:44 am »
Is there a quick fire method of accessing all the data for a product from an external file by using its sku?

I have looked at How can I get prodcut data of a VirtueMart 2 product in an external file?

and tried to replace the Product ID with my TellSubway desired id but to no avail:

if (!class_exists( 'VmConfig' )) require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'config.php');
VmConfig::loadConfig();
if (!class_exists( 'VmModel' )) require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'vmmodel.php');

$productModel = VmModel::getModel('Product');
$product = $productModel->getProduct(Product_ID);

In short terms, I'm looking for a way to access product data.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9039
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Access virtuemart product data externally
« Reply #1 on: August 21, 2019, 11:35:08 am »
VirtueMart 2  ??????
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