News:

Support the VirtueMart project and become a member

Main Menu

Get product same as view-virtuemart

Started by baoquocmt159, September 25, 2013, 10:30:56 AM

Previous topic - Next topic

baoquocmt159

I would like to get products same as view = virtuemart


	
	
	
$doc JFactory::getDocument();
	
	
	
	

	
	
	
$vendorId JRequest::getInt('vendorid'1);

	
	
	
$vendorModel VmModel::getModel('vendor');
	
	
	
	

	
	
	
$vendorModel->setId(1);
	
	
	
$vendor $vendorModel->getVendor();
	
	
	
	

	
	
	
/////////////////////////////////////////////////////////
	
	
	
$categoryModel VmModel::getModel('category');
	
	
	
$productModel VmModel::getModel('product');
	
	
	
$products = array();
	
	
	
	

	
	
	
$products_per_row VmConfig::get('homepage_products_per_row',3);
	
	
	

	
	
	
$featured_products_rows VmConfig::get('featured_products_rows',1);
	
	
	
$featured_products_count $products_per_row $featured_products_rows;

	
	
	
if (!empty(
$featured_products_count) and VmConfig::get('show_featured'1)) {
	
	
	
	
$products['featured'] = $productModel->getProductListing('featured'$featured_products_count);

// 
	
	
	
	
echo "<pre>".print_r($products['featured']->product_name,1)."</pre>";
// 
	
	
	
	
$this->assignRef('products', $products);
	
	
	
	
$links = array();

	
	
	
	
foreach(
$products['featured'] as $type => $product){
.....................


However, correct order does not show products

Please help me !

Maxim Pishnyak

Quote from: baoquocmt159 on September 25, 2013, 10:30:56 AM
I would like to get products same as view = virtuemart
....
However, correct order does not show products
What is your final goal?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart