here is screenshot from our live shop runs PHP 8.2 without errorstessthepup wrote: ↑Sun Nov 12, 2023 1:20 pm
@Omar_one
Still getting the same error![]()
I am running php 8.0 if that makes any difference.
Could you check and see at your side?
Show linked categories on catalog.php
-
Omar_one
- Senior Contributor
- Posts: 679
- Joined: Fri Oct 25, 2019 5:06 pm
- Phoenix Version: v1.0.8.16
- Has thanked: 100 times
- Been thanked: 56 times
Re: Show linked categories on catalog.php
You do not have the required permissions to view the files attached to this post.
- tessthepup
- Certified Developer
- Posts: 383
- Joined: Mon Mar 01, 2021 5:55 pm
- Phoenix Version:
- Has thanked: 56 times
- Been thanked: 62 times
Re: Show linked categories on catalog.php
@Omar_oneOmar_one wrote: ↑Sun Nov 12, 2023 1:29 pmhere is screenshot from our live shop runs PHP 8.2 without errorstessthepup wrote: ↑Sun Nov 12, 2023 1:20 pm
@Omar_one
Still getting the same error![]()
I am running php 8.0 if that makes any difference.
Could you check and see at your side?
21213.JPG
Thanks for the help although when I switch php versions up or down from version 8 the store breaks urgh
-
Omar_one
- Senior Contributor
- Posts: 679
- Joined: Fri Oct 25, 2019 5:06 pm
- Phoenix Version: v1.0.8.16
- Has thanked: 100 times
- Been thanked: 56 times
Re: Show linked categories on catalog.php
which phoenix versions you have?tessthepup wrote: ↑Sun Nov 12, 2023 1:35 pm Thanks for the help although when I switch php versions up or down from version 8 the store breaks urgh
- tessthepup
- Certified Developer
- Posts: 383
- Joined: Mon Mar 01, 2021 5:55 pm
- Phoenix Version:
- Has thanked: 56 times
- Been thanked: 62 times
Re: Show linked categories on catalog.php
@Omar_oneOmar_one wrote: ↑Sun Nov 12, 2023 1:54 pmwhich phoenix versions you have?tessthepup wrote: ↑Sun Nov 12, 2023 1:35 pm Thanks for the help although when I switch php versions up or down from version 8 the store breaks urgh
CE Phoenix v1.0.8.20
-
Omar_one
- Senior Contributor
- Posts: 679
- Joined: Fri Oct 25, 2019 5:06 pm
- Phoenix Version: v1.0.8.16
- Has thanked: 100 times
- Been thanked: 56 times
- tessthepup
- Certified Developer
- Posts: 383
- Joined: Mon Mar 01, 2021 5:55 pm
- Phoenix Version:
- Has thanked: 56 times
- Been thanked: 62 times
Re: Show linked categories on catalog.php
@Omar_one
It is a cut and paste of your code
Code: Select all
<?php
class hook_admin_catalog_categories{
function listen_infoBox($parameters) {
global $product;
if (isset($product && ($product Instanceof Product)) $parameters['contents'][] = ['class' => 'style', 'text' => Categories::draw_breadcrumbs($product->get('categories'))];
}
}-
Omar_one
- Senior Contributor
- Posts: 679
- Joined: Fri Oct 25, 2019 5:06 pm
- Phoenix Version: v1.0.8.16
- Has thanked: 100 times
- Been thanked: 56 times
Re: Show linked categories on catalog.php
tessthepup wrote: ↑Sun Nov 12, 2023 2:12 pm@Omar_one
It is a cut and paste of your code
Code: Select all
<?php class hook_admin_catalog_categories{ function listen_infoBox($parameters) { global $product; if (isset($product && ($product Instanceof Product)) $parameters['contents'][] = ['class' => 'style', 'text' => Categories::draw_breadcrumbs($product->get('categories'))]; } }
I was edit my post .. this should work
Code: Select all
class hook_admin_catalog_categories{
public function listen_infoBox($parameters) {
global $product;
if (isset($product) && ($product Instanceof Product)) $parameters['contents'][] = ['class' => 'style', 'text' => Categories::draw_breadcrumbs($product->get('categories'))];
}
}
- tessthepup
- Certified Developer
- Posts: 383
- Joined: Mon Mar 01, 2021 5:55 pm
- Phoenix Version:
- Has thanked: 56 times
- Been thanked: 62 times
Re: Show linked categories on catalog.php
@Omar_oneOmar_one wrote: ↑Sun Nov 12, 2023 2:18 pmtessthepup wrote: ↑Sun Nov 12, 2023 2:12 pm@Omar_one
It is a cut and paste of your code
Code: Select all
<?php class hook_admin_catalog_categories{ function listen_infoBox($parameters) { global $product; if (isset($product && ($product Instanceof Product)) $parameters['contents'][] = ['class' => 'style', 'text' => Categories::draw_breadcrumbs($product->get('categories'))]; } }
I was edit my post .. this should workCode: Select all
class hook_admin_catalog_categories{ public function listen_infoBox($parameters) { global $product; if (isset($product) && ($product Instanceof Product)) $parameters['contents'][] = ['class' => 'style', 'text' => Categories::draw_breadcrumbs($product->get('categories'))]; } }
Perfect
Thank you and @Kofod95 for this