Every time when I add Related Products to an item, then this Related Products are added two times in product view.
Example image
Update
After Related Products added and when we go back products list, then there we see twice product what I add to related products.
Example image
Related Products bug?
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Related Products bug?
Hi, which version do you use? Testing now version 3.0.3 without any such problem:
???
Jan
???
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 26 Jan 2018, 10:10
Re: Related Products bug?
My ver 3.0.3. Ok i try clean install (jooomla and Phoca Cart). Maybe update messed up something.
-
- Phoca Newbie
- Posts: 9
- Joined: 26 Jan 2018, 10:10
Re: Related Products bug?
Hi, Jan
So these two sites were in my local machine. But now moved to the server and problems still exist (Clean install).
My test site: https://omakoduleht.ee/test/tuisk/1-vobler/1-hall-ujuv
So these two sites were in my local machine. But now moved to the server and problems still exist (Clean install).
My test site: https://omakoduleht.ee/test/tuisk/1-vobler/1-hall-ujuv
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Related Products bug?
Hi, this seems like it is related to only full group by database rule, try to open this file:
administrator\components\com_phocacart\libraries\phocacart\related\related.php
And try to edit it.
LINE cca. 82
FROM
TO
LINE cca. 115
FROM
TO
Testing now, it should work. Please let me know if this is working for you.
Thank you, Jan
administrator\components\com_phocacart\libraries\phocacart\related\related.php
And try to edit it.
LINE cca. 82
FROM
Code: Select all
$query = ' SELECT a.id as id, a.title as title, a.image as image, a.alias as alias,'
.' c.id as catid, c.alias as catalias, c.title as cattitle';
Code: Select all
//$query = ' SELECT a.id as id, a.title as title, a.image as image, a.alias as alias,'
// .' c.id as catid, c.alias as catalias, c.title as cattitle';
$query = ' SELECT DISTINCT a.id as id, a.title as title, a.image as image, a.alias as alias,'
.' SUBSTRING_INDEX(GROUP_CONCAT(c.id ORDER BY c.parent_id), \',\', 1) as catid,'
.' SUBSTRING_INDEX(GROUP_CONCAT(c.title ORDER BY c.parent_id), \',\', 1) as cattitle,'
.' SUBSTRING_INDEX(GROUP_CONCAT(c.alias ORDER BY c.parent_id), \',\', 1) as catalias';
FROM
Code: Select all
$query .= ' GROUP BY a.id, a.title, a.image, a.alias, c.id, c.alias, c.title';
Code: Select all
//$query .= ' GROUP BY a.id, a.title, a.image, a.alias, c.id, c.alias, c.title';
$query .= ' GROUP BY a.id, a.title, a.image, a.alias';
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 26 Jan 2018, 10:10
Re: Related Products bug?
Hi Jan
Tested and its working.
Tested and its working.
-
- Phoca Newbie
- Posts: 9
- Joined: 26 Jan 2018, 10:10
Re: Related Products bug?
another bug. When you want to delete related Products you can't. After clearing fields and save it, then related products are still there.
See video: https://youtu.be/YqbUg_Lka1A
See video: https://youtu.be/YqbUg_Lka1A
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Related Products bug?
Hi, thank you very much for the info, this was caused but not removing the changes for the debugging, will be fixed in next version, for now just make a quick fix, open:
administrator\components\com_phocacart\models\fields\phocaselectitem.php
on line cca 138
uncomment: // $s[] = ' jQuery(element).val(\'\');';
so
FROM:
TO:
Thank you, Jan
administrator\components\com_phocacart\models\fields\phocaselectitem.php
on line cca 138
uncomment: // $s[] = ' jQuery(element).val(\'\');';
so
FROM:
Code: Select all
//$s[] = ' jQuery(element).val(\'\');';
Code: Select all
$s[] = ' jQuery(element).val(\'\');';
If you find Phoca extensions useful, please support the project