Hi,
Joomla 2.5.16
VM 2.0.24c
mod_phoca_vm_category 1.0.2
I was looking for a solution to my problem on this forum, as I can see there're many topics about not working Phoca Virtuemart Category Module, but I didn't find anything related to my issue...
After update to vm 2.0.24c module stop working, so I updated it to 1.0.2, categories are showing, but ordering is totally wrong - module doesn't show categories order as they're on backend, neither alphabetically or by ID. It's nearly alphabetically until last category which start with special letter "Ł".
Before update, module was showing categories ordered by ordering from backend - and that's what I'm trying to get.
How can I solve this?
Any suggestions, please?
Best regards,
Chris
Virtuemart Category Module - categories order issue
-
- Phoca Newbie
- Posts: 2
- Joined: 02 Dec 2013, 14:46
- Jan
- Phoca Hero
- Posts: 48345
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Virtuemart Category Module - categories order issue
Hi, please open this file:
modules\mod_phoca_vm_category\mod_phoca_vm_category.php
and change (cca line 40):
FROM:
TO:
and (cca line 79):
FROM:
TO:
and let me know if this helped.
Jan
modules\mod_phoca_vm_category\mod_phoca_vm_category.php
and change (cca line 40):
FROM:
Code: Select all
$categories = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category_id );
$categories = $categoryModel->getChildCategoryList($vendorId, $category_id);
Code: Select all
//$categories = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category_id );
$categories = $categoryModel->getChildCategoryList($vendorId, $category_id, 'c.ordering');
FROM:
Code: Select all
$childCats = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $c->virtuemart_category_id );
$childCats = $categoryModel->getChildCategoryList($vendorId, $c->virtuemart_category_id);
Code: Select all
//$childCats = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $c->virtuemart_category_id );
$childCats = $categoryModel->getChildCategoryList($vendorId, $c->virtuemart_category_id, 'c.ordering');
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 1
- Joined: 03 Dec 2013, 09:04
Re: Virtuemart Category Module - categories order issue
mod_phoca_vm_category_v1.0.2.zip
Joomla! 2.5.16
com_virtuemart.2.0.24c.zip
( ! ) Fatal error: Using $this when not in object context in ...\administrator\components\com_virtuemart\models\category.php on line 121
Joomla! 2.5.16
com_virtuemart.2.0.24c.zip
( ! ) Fatal error: Using $this when not in object context in ...\administrator\components\com_virtuemart\models\category.php on line 121
Code: Select all
public function getChildCategoryList($vendorId, $virtuemart_category_id,$selectedOrdering = null, $orderDir = null, $cache = true) {
if($selectedOrdering===null){
//$selectedOrdering = VmConfig::get('browse_cat_orderby_field','category_name');
line 121: $selectedOrdering = $this->_selectedOrdering;
}
if(!in_array($selectedOrdering, self::$_validOrderingFields)){
$selectedOrdering = 'category_name';
}
- Jan
- Phoca Hero
- Posts: 48345
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Virtuemart Category Module - categories order issue
Hi, testing now with 1.0.3 - get no such problem, really no idea what can be wrong in the VM getShilcCategoryList method. Try to update to 1.0.3:
https://www.phoca.cz/download/category/6 ... ory-module
and let me know.
Jan
https://www.phoca.cz/download/category/6 ... ory-module
and let me know.
Jan
If you find Phoca extensions useful, please support the project