Page 1 of 1
Product Terms
Posted: Wed Mar 30, 2022 3:00 am
by Dnj1964
CE Phoenix v1.0.8.12 and using S02e06 -> 1.0.8.5 - Product Terms
Adding a term doesn't allow html to be used. Shows as one long document.
Not sure why it doesn't work same as privacy, conditions or other info pages.
Any way to get product terms to use html.
Thanks
Re: s02e06 - Product Terms
Posted: Wed Mar 30, 2022 4:29 am
by ecartz
Dnj1964 wrote: ↑Wed Mar 30, 2022 3:00 am
Any way to get product terms to use html.
If you want HTML in the product terms, you will have to change in admin/includes/actions/ insert.php and save.php the Text::input to Text::prepare for any column you want to have HTML. E.g. the name and description.
Re: s02e06 - Product Terms
Posted: Wed Mar 30, 2022 4:25 pm
by Dnj1964
Thanks again.
Worked perfectly.
ecartz wrote: ↑Wed Mar 30, 2022 4:29 am
Dnj1964 wrote: ↑Wed Mar 30, 2022 3:00 am
Any way to get product terms to use html.
If you want HTML in the product terms, you will have to change in admin/includes/actions/ insert.php and save.php the Text::input to Text::prepare for any column you want to have HTML. E.g. the name and description.
Re: s02e06 - Product Terms
Posted: Wed Sep 21, 2022 12:50 pm
by heatherbell
Found a couple of issues.
1. On admin/terms.php, Action icon does not change when clicked as expected.
Possibly issue is on Line 43 which is:
Code: Select all
return (isset($row['info']->id) && ($row['info']->id === $row['terms_id']))
2. On admin/terms.php, click Delete and then Delete confirm on first item in list gives notice and associated error:
Undefined index: tID - /includes/actions/terms/delete_confirm.php on line 12
However, possibly issue is in admin/includes/actions/terms/infoboxes/default.php Line 13 which is:
Code: Select all
$link = $GLOBALS['Admin']->link()->retain_query_except();
Re: s02e06 - Product Terms
Posted: Wed Sep 21, 2022 2:14 pm
by ecartz
heatherbell wrote: ↑Wed Sep 21, 2022 12:50 pm
Found a couple of issues.
TY. I updated the zip in the previous post.
Re: s02e06 - Product Terms
Posted: Thu Nov 09, 2023 10:28 am
by Denzel
Found an other issue in admin/includes/actions/terms/infoboxes/delete.php causing error 500 on confirm delete.
Line 13 should be :
Code: Select all
$link = $link = $GLOBALS['Admin']->link()->retain_query_except(['action'])->set_parameter('tID', (int)$table_definition['info']->terms_id);
and Line 15 should be:
Code: Select all
$contents = ['form' => new Form('terms', (clone $link)->set_parameter('action', 'delete_confirm'))];
to work.
Re: s02e06 - Product Terms
Posted: Thu Nov 30, 2023 6:02 am
by Pierre_P
In admin if you assigned terms to products it will only count the number of products using that term.
If you have many products assigned to that term and you have long forgot what products it was i added a simple output to show you what products are assigned to that term.
Added change in admin/includes/actions/terms/infoboxes/default.php
below
Code: Select all
$contents[] = ['text' => '<b>' . $table_definition['info']->products_count . '</b> Products is using this Term'];
add:
Code: Select all
$terms_query = $GLOBALS['db']->query("SELECT pb.terms_id, pb.products_id, p.products_id, pd.products_name, pd.language_id FROM products p LEFT JOIN products_to_terms pb ON (pb.products_id=p.products_id) LEFT JOIN products_description pd ON (pd.products_id=pb.products_id) WHERE pd.language_id = '1' AND terms_id = " . (int)$table_definition['info']->terms_id);
if (mysqli_num_rows($terms_query) < 1) {
$contents[] = ['text' => '<b>Congratulations!</b> There are no products assigned to this Term'];
} else {
while ($terms = $terms_query->fetch_assoc());
foreach ($terms_query as $option => $value) {
$contents[] = ['text' => 'Products Name: ' . $value['products_name'] . ' pID: ' . $value['products_id']];
}
}
Hth.
Re: s02e06 - Product Terms
Posted: Thu Jun 20, 2024 11:56 pm
by Cary
Anyone using this with 1.0.9.1+? Just wondering before I add since this handy feature I have running on an older 1.0.8.5 site.
Thanks!