Label can't be assigned

Phoca Cart - complex e-commerce extension
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 268
Joined: 07 Nov 2018, 14:55

Label can't be assigned

Post by Nidzo »

Hi Jan, I found one more problem in Phoca Cart Beta versions. Maybe it is just me but I can't assign Label to product. When I hit Save button label selection become unfilled. Tags works O.K.
Image
5.0.0Beta49
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 91
Joined: 13 Feb 2024, 17:00

Re: Label can't be assigned

Post by lpatrick »

I can't even find how/where to create Labels. :-)

And you seem to have advanced access to newer beta versions?
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 268
Joined: 07 Nov 2018, 14:55

Re: Label can't be assigned

Post by Nidzo »

I download Betas from Phoca github.
https://github.com/PhocaCz/PhocaCart/releases
Labels are "hidden" under Tags. There is option to select Label or Tag
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 91
Joined: 13 Feb 2024, 17:00

Re: Label can't be assigned

Post by lpatrick »

Thanks!

I can confirm what you stated, also in Beta 47.

I think there could be an error in libraries/phocacart/tags/tag.php line 47:

Code: Select all

           . ' LEFT JOIN ' . self::getRelatedTable($type) . ' AS r ON a.id = r.tag_id';
as $type is an array:

Code: Select all

private static function getProductTags(array $type, $itemId, $select = 0, $checkPublish = 0) {
Because the tags do go into the table _phocacart_tags_related and labels go correctly in _phocacart_taglabels_related.

They are just being incorrectly retrieved IMHO.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47891
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Label can't be assigned

Post by Jan »

Hi, thank you for info, confirmed. I will consult it with other members to solve it (yes, the problem was transforming from integer to array and have the options for this function to load different types)

Thank you, Jan
If you find Phoca extensions useful, please support the project
Post Reply