Aw: Complect product add-on, not satisfied with functionality
Ok, to be discreet:
Installation is OK. Installed recommended menu builder add-on 2.0.4,
Complect add-on 2.1.2
Menu builder plugin 1.0 for Complect
Well, let's click on "Set of prodcuts" link:
Oops!
Query is obviously trying to select name column for Russian, that's OK, from #__jshopping_complects table, under alias name, but it fails.
Let's find out, why so.
Textual columns in, for instance, #__jshopping_products table, are padded with language codes, currently supported by the J! system. In my case, it's ru-RU and en-GB:
I assume, that any new JoomShopping extension, which provides textual fields with multi-lingual support,
has some SQL query executed upon installation, which, for each base textual field creates as many copies, padded with language codes, as needed.
Let's look into #__jshopping_complects table structure:
Oops again, there is no complect_name column at all. Well, there is, but due to some error, I presume, it was padded with _image suffix. So, even if installation script tried to find textual column complect_name, copy, and concatenate with language suffixes, it fails.
Upon entering complect editor, another query tries to select column complect_name_ru-RU for Russian, and
fails as well.
For the same reason, errors would occur in cart views (temporary, order, wishlist).
Hope, situation is clearer now. It would be OK, if I was your beta-tester on a budget :), but so far, it's just my time wasted on debugging of supposedly working product I paid for :).
As for lacking functionality, I'd like to have complect, say A, B, C, are products, like A+2xB+3xC, but so far, at least, there is no way to specify amount of nested product in complect.
Tracked down the problem...
1) Language aliases for textual fields get created by jshopping/addon_complect/addon_complect.php plugin in onLoadMultiLangTableField handler.
But, if clean installation is performed, plugin code is not called (in my configuration). Only if I re-run installation over an existing one,
plugin got called, and all necessary textual fields with languages aliases got created. I suspect, that J! caching is intervening.
Adding small portion of code for cache cleaning in update.php, for instance, before:
$db->setQuery('TRUNCATE `#__jshopping_languages`');
$db->query();
helps to work-around it:
$cache = JCache::getInstance();
$cacheData = $cache->getAll();
foreach($cacheData as $grp)
$cache->clean($grp);
2) controllers perform call to the non-existent member function prototype:
frontend: addon_complect.php line 55: $complect->complect_name = $complect->getName($complect_id);
admin: addon_complect.php line 49: $complect->complect_name = $complect->getName($complect_id);
$complect is instance of class jshopAddon_complect extends JTableAvto
its getName member function is (tables/addon_complect.php line 18)
function getName() {
$lang = JSFactory::getLang();
$name = $lang->get('complect_name');
return $this->$name;
}
taking no parameter, which is OK, since base class load method takes PK value and record is selected automatically, but
in previus version of code, just before current getName is commented out old implementation, which takes this id as parameter (same file, line 11):
/* function getName($id) {
$db = JFactory::getDBO();
$lang = JSFactory::getLang();
$query = "SELECT `".$lang->get("complect_name")."` as complect_name FROM `#__jshopping_complects` WHERE `complect_id` = '".$db->getEscaped($id)."'";
$db->setQuery($query);
return $db->loadResult();
} */
So, all controller calls to getName($complect_id) should be changed to getName()
Joomla: 3.1.1
JoomShopping: 4.2.2
PHP: 5.3.13
MySQL: 5.1.41
Website Url: http://eco-e
Letzte Änderung: 28.06.2013 14:31