Author Topic: Get product same as view-virtuemart  (Read 579 times)

baoquocmt159

  • Jr. Member
  • **
  • Posts: 57
  • Skype Name: cpo.smartbits
Get product same as view-virtuemart
« on: September 25, 2013, 10:30:56 am »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2660
Re: Get product same as view-virtuemart
« Reply #1 on: September 26, 2013, 16:06:01 pm »
I would like to get products same as view = virtuemart
....
However, correct order does not show products
What is your final goal?