I know its a bit late, but you can understand it with this.
As the documentation of Virtuemart says
getProduct()
function creates a product with the attributes of the
parent.
We know in Virtuemart we can make child products leaving some of its parameters that will be taken from parent product.
So we set product
Parent Price = $100, Manufacturer = 'xyz'.
Now if two child products are created like:
Child1 is created with blank Price and Manufacturer
Child2 is created with its own values Price = $250, Manufacturer = 'abc'.
The buyer will finally get to see:
Child1 Price = $100, Manufacturer = 'xyz', taken from its parent.
Child2 Price = $250, Manufacturer = 'abc'.
Use of functions and return data:
for Child1: getProductSingle()
, returns Manufacturer = '', on the same hand getProduct()
, returns Manufacturer = 'xyz'.
for Child2: both getProductSingle()
and getProduct()
returns Manufacturer = 'abc' as it is directly set onto that product.
There are other difference in parameters, as you get salesPrice
using getProduct()
but have to calculate final price if you use getProductSingle()