Set category on admin/product

Ask the community for help and support.
Post Reply
LeeFoster
VIP Member
VIP Member
Posts: 228
Joined: Sun Feb 28, 2021 9:41 pm
Has thanked: 1 time
Been thanked: 5 times

Set category on admin/product

Post by LeeFoster »

A while back I remember having an addon that allowed to me to specify what category a product would appear in from the product within admin. It was on an older osCommerce site, can anyone remember what it is/was called?

Tags:
wHiTeHaT44
Posts: 3
Joined: Wed Sep 22, 2021 10:41 pm
Has thanked: 1 time

Re: Set category on admin/product

Post by wHiTeHaT44 »

Here you go.........
(link removed by Admin)
LeeFoster
VIP Member
VIP Member
Posts: 228
Joined: Sun Feb 28, 2021 9:41 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Set category on admin/product

Post by LeeFoster »

wHiTeHaT44 wrote: Wed Sep 22, 2021 11:28 pm Here you go.........
(link removed by Admin)
Thanks though I'm not sure that is it. I was pretty sure it was a later version than that.
wHiTeHaT44
Posts: 3
Joined: Wed Sep 22, 2021 10:41 pm
Has thanked: 1 time

Re: Set category on admin/product

Post by wHiTeHaT44 »

well, i use google to search it..........
I typed :
product to category site:(link removed by Admin)
User avatar
Kofod95
VIP Member
VIP Member
Posts: 605
Joined: Sat Feb 06, 2021 7:38 pm
Has thanked: 80 times
Been thanked: 141 times

Re: Set category on admin/product

Post by Kofod95 »

The product manager allows that as far as I understand.

It wouldn't be too bad to write something to do that for Phoenix, if you prefer DIY - one hook-file should be enough

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
LeeFoster
VIP Member
VIP Member
Posts: 228
Joined: Sun Feb 28, 2021 9:41 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Set category on admin/product

Post by LeeFoster »

Kofod95 wrote: Thu Sep 23, 2021 6:25 am The product manager allows that as far as I understand.

It wouldn't be too bad to write something to do that for Phoenix, if you prefer DIY - one hook-file should be enough

//Daniel
I think that might be overkill for what I need. I'll have a proper look though.

Might go down the DIY, will check all my options first.
User avatar
Kofod95
VIP Member
VIP Member
Posts: 605
Joined: Sat Feb 06, 2021 7:38 pm
Has thanked: 80 times
Been thanked: 141 times

Re: Set category on admin/product

Post by Kofod95 »

LeeFoster wrote: Thu Sep 23, 2021 7:02 am I think that [the product manager] might be overkill for what I need.
It does do a lot of stuff, so it might be like shooting sparrows with canons (that expression exist in Denmark, and hopefully it makes sense for others as well).
LeeFoster wrote: Thu Sep 23, 2021 7:02 am Might go down the DIY, will check all my options first.
Sure - if you decide to DIY, you can look at how the specials are added to the product_edit and change to fit your needs - I will gladly try to help with that, should it be necessary

//Daniel
Last edited by Kofod95 on Fri Sep 24, 2021 6:45 am, edited 1 time in total.
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
LeeFoster
VIP Member
VIP Member
Posts: 228
Joined: Sun Feb 28, 2021 9:41 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Set category on admin/product

Post by LeeFoster »

Kofod95 wrote: Thu Sep 23, 2021 8:48 pm Sure - if you decide to DIY, you can look at how the specials are added too the product_edit and change to fit your needs - I will gladly try to help with that, should it be necessary

//Daniel
Downloading this now to have a look to see if I can modify it to work.
LeeFoster
VIP Member
VIP Member
Posts: 228
Joined: Sun Feb 28, 2021 9:41 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Set category on admin/product

Post by LeeFoster »

OK I mostly got something working, the issue I'm now having is I'd like it to show the whole category tree, not just a list of categories as I have in the image below.
Capture3.PNG
This is the code being used to create the list.

Code: Select all

$categories_query = tep_db_query("select categories_id, categories_name FROM categories_description where language_id = '" . (int)$languages_id . "' order by categories_name");
    
    while ($categories = tep_db_fetch_array($categories_query)) {
      $checked = $this->category_checked($pID, $categories['categories_id']);
      
      //$categories_checkbox .= tep_draw_checkbox_field('categories[]', $categories['categories_id'], $checked) . ' - ' . $categories['categories_name'] . '<br />';
      
      
      $categories_checkbox .= '<div class="custom-control custom-switch">';
        $categories_checkbox .= tep_draw_selection_field('categories[]', 'checkbox', $categories['categories_id'], $checked, 'class="custom-control-input" id="c_' . $categories['categories_id'] . '"');
        $categories_checkbox .= '<label for="c_' . $categories['categories_id'] . '" class="custom-control-label text-muted"><small>' . $categories['categories_name'] . '</small></label>';
      $categories_checkbox .= '</div>';
You do not have the required permissions to view the files attached to this post.
Post Reply