Complect product add-on, not satisfied with functionality

25.06.2013 13:58
#1
vgromov
Joomshopping forum user no avatar
Name: Vsevolod V Gromov
10.06.2013
Posts: 3
Quote
Complect product add-on, not satisfied with functionality

Hello.
I've bought and tested Complect add-on : http://www.webdesigner-profi.de/joomla-webdesign/shop/addons/complect.html?lang=en
Order: 06-KH-105574
Config: J!3.1.1, JS4.2.2, Complect 2.1.2
It ocurred, that this add-on lacks functionality in many aspects, not to say that it's not functional out-of-box.
Not only #__jshopping_complects table has strange name_image column, but 'localized' name columns are missing in multi-langiage environment, like name_ru-RU and name_en-GB, which results in SQL exceptions.
In addition, it appears, that count of the product item could not be specified in complect editor. So assuming, that my complect consists of one motherboard, two similar HDDs, two similar HDD cables, there is no way to specify that in Complect editor form.
I would like to get refund.
Regards, Vsevolod.


Joomla: 3.1.1
JoomShopping: 4.2.2
PHP: 5.1.41
MySQL: 5.1.41
Website Url: http://eco-e
 
25.06.2013 15:27
#2
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16517
Quote
Aw: Complect product add-on, not satisfied with functionality

We have not seen errors. everything works.
url?
admin login?

 
27.06.2013 08:58
#3
vgromov
Joomshopping forum user no avatar
Name: Vsevolod V Gromov
10.06.2013
Posts: 3
Quote
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:
Aw: Complect product add-on, not satisfied with functionality
Oops!
Aw: Complect product add-on, not satisfied with functionality
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:
Aw: Complect product add-on, not satisfied with functionality
Aw: Complect product add-on, not satisfied with functionality
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:
Aw: Complect product add-on, not satisfied with functionality
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
 
28.06.2013 15:45
#4
vgromov
Joomshopping forum user no avatar
Name: Vsevolod V Gromov
10.06.2013
Posts: 3
Quote
Aw: Complect product add-on, not satisfied with functionality

One more bug found.
File tables/addon_complect.php line 89: getListComplect($complect_id)
If getListComplect is called with empty $complect_id parameter - for instance, if no complects defined at all,
the following code (line 97) produces invalid query - IN (), resulting in error on site.
$query = "SELECT complect_id, `".$lang->get("complect_name")."` as complect_name, `".$lang->get("complect_short_description")."` as complect_short_description, complect_tax, ordering, complect_thumb_image, complect_price FROM `#__jshopping_complects` WHERE complect_id IN (".$complect_id.") ORDER BY ordering ";
Therefore, if no complectes defined, any access to the category listing, or product, produces error 1064.
Aw: Complect product add-on, not satisfied with functionality
Fix - update getListComplect as follows:
function getListComplect($complect_id) {
$complect_id = implode($complect_id,",");

if( empty($complect_id) )
return null;
... the rest of code...

 
30.06.2013 18:06
#5
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16517
Quote
Aw: Complect product add-on, not satisfied with functionality

Not use cache.

 
Copyrights MAXXmarketing GmbH. All Rights Reserved