I want to share my small modification of NSP GK4 module for user that use NSP GK4 together with Virtuemart. This modification add options to sort Virtuemart products by order field or by product_id or by product_sku.
In file modulesmod_news_pro_gk4gk_classesgk.source.vm.php find this code:
- Code: Select all
else $sort_value = 'product_id';
$order_options = ' content.'.$sort_value.' '.$config['news_sort_order'].' ';
replace with this code:
- Code: Select all
else if($config['news_sort_value'] == 'product_sku') $sort_value = 'product_sku';
else $sort_value = 'product_id';
if ($config['news_sort_value'] == 'ordering') {
$order_options = ' category_xref.product_list'.' '.$config['news_sort_order'].' ';
} else {
$order_options = ' content.'.$sort_value.' '.$config['news_sort_order'].' '; }
In file modulesmod_news_pro_gk4mod_news_pro_gk4.xml, right after <option value="hits">HITS</option> insert this code:
- Code: Select all
<option value="product_id">PRODUCT_ID</option>
<option value="product_sku">PRODUCT_SKU</option>
Last, in file languageen-GBen-GB.mod_news_pro_gk4.ini, right after HITS=By hits amount, insert this:
PRODUCT_ID=By product id
PRODUCT_SKU=By product SKU