VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: 10287 on May 28, 2015, 16:50:18 PM

Title: Show products in Checkout
Post by: 10287 on May 28, 2015, 16:50:18 PM
Virtuemart: 2.0.24c
Joomla 2.5

Hi, is there a method that is built into Virtuemart where I can display products in the checkout?

I am querying the database for products with a custom field and I was hoping I could use a product ID(s) to display products in the checkout as a way to hopefully get some products sold as the customer is checking out.

I have looked around the forum but it's quite difficult to search for as there are many related searches.

Thanks, Steve.
Title: Re: Show products in Checkout
Post by: 10287 on May 28, 2015, 17:03:08 PM
Answered my own question:

In case anyone is interested:

Inside default_pricelist.php template override: (I have not tried elsewhere)

$productModel = VmModel::getModel('Product');
$product = $productModel->getProduct('enter_product_id', false, false);

Then you can go $product->product_sku

Like you normally would.