VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: decola977 on March 03, 2013, 20:38:42 PM

Title: Use Price of Virtue Mart Product in own Modul
Post by: decola977 on March 03, 2013, 20:38:42 PM
Hallo out there,

if have googled for some time now but im not finding an answer to my question. I want to display the price of an virtue mart product in an own written joomla modul. If got the Product ID an some code as follows:


require_once (JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_virtuemart' . DS .'helpers' . DS . 'config.php');
$product_model = VmModel::getModel ('product');
var_dump($product_model->getPrice($product_id, array('' => ''), 1));




I tought i just have to get the model and pull the price out of it ... so you see how far i have come. The point is that this code is referring to the right products. (This is giving me all product related infos:)

var_dump($product_model); but it just doesn't gives me the price. Has someone any idea what im doing wrong? Or my an better idea how to get a price of an product?

Thank you very much ;)
Title: Re: Use Price of Virtue Mart Product in own Modul
Post by: PRO on March 04, 2013, 01:32:54 AM
download this
http://forum.virtuemart.net/index.php?topic=108108.0


and see how they do it