-
AuthorPosts
-
Ian Friend
Ian
- Join date:
- April 2007
- Posts:
- 158
- Downloads:
- 32
- Uploads:
- 3
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
June 4, 2013 at 2:42 pm #187973Hi guys, i am using joomla 2.5.11 vm 2.0.20 and i am trying to get products at tabs from subcategories of vm but without luck, module
JA VM Products displays only top-parent categories and none of subcategories.
How can i fix it, is it a bug or something else?
ThanksMoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
June 4, 2013 at 3:52 pm #494720Hi andronopoulos,
<blockquote>JA VM Products displays only top-parent categories and none of subcategories.</blockquote>
I tried to check it in developer site, it’s showing as normal. Pls send PM to me with url and admin access of your site for closer checking.
Regards
Ian FriendIan
- Join date:
- April 2007
- Posts:
- 158
- Downloads:
- 32
- Uploads:
- 3
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
June 5, 2013 at 10:54 am #494842Hi, thanks for your reply,
the problem is that module can’t get subcategories so it can’t display products that belong to a subcategory, gets only root categories, are you saying that you can display, at backed settings, subcategories???MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
June 6, 2013 at 1:40 am #494931Hi ,
<blockquote>it can’t display products that belong to a subcategory, gets only root categories</blockquote>
It’s bug of this module. It’s raised to dev team and will be fixed soon. You can check the status here : http://pm.joomlart.com/browse/JAECVMPROD-3
When it’s fixed, I will be back to you.
Regards
Ian FriendIan
- Join date:
- April 2007
- Posts:
- 158
- Downloads:
- 32
- Uploads:
- 3
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
June 6, 2013 at 6:18 am #494968Hi, thanks for info… well i got a project running, fixed soon=???
ThanksMoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
June 6, 2013 at 7:22 am #494973Hi andronopoulos,
It’s fixed. Please open file “mod_javmproducts/assets/elements/vmcategories.php” find code:
[PHP]
self::categoryListTreeLoop ($selectedCategories, $childId, $level, $disabledFields);
[/PHP]
and change it to :
[PHP]
$categoryTree .= ShopFunctions::categoryListTreeLoop ($selectedCategories, $childId, $level, $disabledFields);
[/PHP]If it’s hard for you, you can send PM to me with ftp access of your site, i will fix it for you.
Regards
1 user says Thank You to MoonSailor for this useful post
Ian FriendIan
- Join date:
- April 2007
- Posts:
- 158
- Downloads:
- 32
- Uploads:
- 3
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
June 6, 2013 at 11:22 am #495002Hi, thanks for your response, i replaced the code and now i can see at backed subcategories but at front gives blank module and is strange when select a category or sub when you save it posted 3 times at backed pls see my code
<?php
defined('_JEXEC') or die();/**
*
* @package VirtueMart
* @subpackage Plugins - Elements
* @author Valérie Isaksen
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2011 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: $
*/
if (!class_exists('VmConfig'))
require(JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php');if (!class_exists('ShopFunctions'))
require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php');
if (!class_exists('TableCategories'))
require(JPATH_VM_ADMINISTRATOR . DS . 'tables' . DS . 'categories.php');if (!class_exists('VmElements'))
require(JPATH_VM_ADMINISTRATOR . DS . 'elements' . DS . 'vmelements.php');
/*
* This element is used by the menu manager
* Should be that way
*/
class VmElementVmCategories extends VmElements {var $type = 'vmcategories';
// This line is required to keep Joomla! 1.6/1.7 from complaining
function getInput() {
$key = ($this->element['key_field'] ? $this->element['key_field'] : 'value');
$val = ($this->element['value_field'] ? $this->element['value_field'] : $this->name);
$ispublish = ($this->element['publish'] ? $this->element['publish'] : '0');
$lang = JFactory::getLanguage();
$lang->load('com_virtuemart',JPATH_ADMINISTRATOR);
$value = $this->value?$this->value:array();
$categorylist = $this->categoryListTree($value,$ispublish);
if($categorylist){
$html = '<select class="inputbox" name="' . $this->name . '[]" multiple="multiple">';
//$html .= '<option value="0">' . JText::_('COM_VIRTUEMART_CATEGORY_FORM_TOP_LEVEL') . '</option>';
$html .= $categorylist;
$html .="</select>";
}else{
$html = '<span color="red">'.JText::_('COM_VIRTUEMART_CATEGORY_DOES_NOT_CREATED_CATEGORIES').'</span>';
}
return $html;
}
/**
* Creates structured option fields for all categories
*
* @todo: Connect to vendor data
* @author RolandD, Max Milbers, jseros
* @param array $selectedCategories All category IDs that will be pre-selected
* @param int $cid Internally used for recursion
* @param int $level Internally used for recursion
* @return string $category_tree HTML: Category tree list
*/
static public function categoryListTree($selectedCategories = array(),$ispublish=0, $cid = 0, $level = 0, $disabledFields = array()) {//self::$counter++;
$publish = false;
if ($ispublish==1) {
$publish = true;
}
static $categoryTree = '';$virtuemart_vendor_id = 1;
// vmSetStartTime('getCategories');
$categoryModel = VmModel::getModel ('category');
$level++;$categoryModel->_noLimit = TRUE;
$app = JFactory::getApplication ();
$records = $categoryModel->getCategories ($publish, $cid);
// vmTime('getCategories','getCategories');
$selected = "";
if (!empty($records)) {
foreach ($records as $key => $category) {$childId = $category->category_child_id;
if ($childId != $cid) {
if (in_array ($childId, $selectedCategories)) {
$selected = 'selected="selected"';
} else {
$selected = '';
}$disabled = '';
if (in_array ($childId, $disabledFields)) {
$disabled = 'disabled="disabled"';
}if ($disabled != '' && stristr ($_SERVER['HTTP_USER_AGENT'], 'msie')) {
//IE7 suffers from a bug, which makes disabled option fields selectable
} else {
$categoryTree .= '<option ' . $selected . ' ' . $disabled . ' value="' . $childId . '">';
$categoryTree .= str_repeat (' - ', ($level - 1));$categoryTree .= $category->category_name . '</option>';
}
}if ($categoryModel->hasChildren ($childId)) {
$categoryTree .= ShopFunctions::categoryListTreeLoop ($selectedCategories, $childId, $level, $disabledFields);
}}
}return $categoryTree;
}}
if (JVM_VERSION === 2 ) {
class JFormFieldVmCategories extends VmElementVmCategories {
}
} else {
class JElementVmCategories extends VmElementVmCategories {
}
}
Ian FriendIan
- Join date:
- April 2007
- Posts:
- 158
- Downloads:
- 32
- Uploads:
- 3
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
June 6, 2013 at 11:39 am #495006i have install again module and i replace again the code, now i can see and the products but at the backend each subcategory appears 3 times when i save parameters… but for now its ok thanks!!!
Ian FriendIan
- Join date:
- April 2007
- Posts:
- 158
- Downloads:
- 32
- Uploads:
- 3
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
June 14, 2013 at 10:13 am #495897Hi again,
well module working but the problem exists with repeated categories when you are going to select them from backet is (see my previous post) it happening only to me?
Thanks.MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
June 14, 2013 at 10:19 am #495898Hi andronopoulos ,
<blockquote>but for now its ok thanks!!!</blockquote>
Pls send PM to me with url and admin access of your site. I’ll recheck for you.
Regards
Ian FriendIan
- Join date:
- April 2007
- Posts:
- 158
- Downloads:
- 32
- Uploads:
- 3
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
June 14, 2013 at 10:42 am #495900Ok, check your msgs
MoonSailor FriendMoonSailor
- Join date:
- November 2011
- Posts:
- 1106
- Downloads:
- 0
- Uploads:
- 245
- Thanks:
- 89
- Thanked:
- 248 times in 223 posts
June 17, 2013 at 3:52 am #496018Hi,
Pls check again, I can not access your site.
Regards
-
AuthorPosts
This topic contains 12 replies, has 2 voices, and was last updated by MoonSailor 11 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum