News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Module VirtueMart Products

Started by iRescue.gr, July 18, 2014, 14:41:05 PM

Previous topic - Next topic

iRescue.gr

Hello!
I need to sort the products at Module Virtuemart Products according to the order they have on Virtuemart.
Any help?

GJC Web Design

in modules/mod_virtuemart_product/mod_virtuemart_product.php

~ line 60 after

$products = $productModel->getProductListing($Product_group, $max_items, $show_price, true, false,$filter_category, $category_id);

add


function cmp($a, $b)
{
  return ($a->ordering < $b->ordering) ? -1 : 1;
}
usort($products, "cmp");


GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation