Trying to move products within sub-categories

Open to all! Ask other shopowners for help.
Post Reply
wal
Member
Posts: 25
Joined: Sun Mar 14, 2021 2:02 am
Phoenix Version:
Has thanked: 26 times
Been thanked: 1 time

Trying to move products within sub-categories

Post by wal »

Hi Forum,

I have just completed the upgrade to V1.0.8.3 and gone live, knowing I had minor product updates to complete.

However I've just noticed there is no way to move products from one sub-category to another - only to top categories, and there doesn't appear to be a setting that will allow it.

There must have been a change along the way from V1.0.5.0 that I was using, as I'm sure that version allowed product movement to wherever I wanted.

Is there now an add-on I haven't seen, or any fix I can try ? I now have a number of products from the old shop which aren't displayed as a category or sub-category (only in Admin Categories), and I really don't want to re-create a large range of products if I don't have to .. Suggestions welcome please.

Cheers
wal


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Trying to move products within sub-categories

Post by Kofod95 »

Just tested on 1.0.8.2, here I can move categories to TOP, Main categories and sub-categories, as I wish. I don't know if something changed for 1.0.8.3, or why you are unable to do it.

EDIT:
Just saw same problem reported here

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
wal
Member
Posts: 25
Joined: Sun Mar 14, 2021 2:02 am
Phoenix Version:
Has thanked: 26 times
Been thanked: 1 time

Re: Trying to move products within sub-categories

Post by wal »

Kofod95 wrote: Fri Jun 25, 2021 7:04 pm Just tested on 1.0.8.2, here I can move categories to TOP, Main categories and sub-categories, as I wish. I don't know if something changed for 1.0.8.3, or why you are unable to do it.

EDIT:
Just saw same problem reported here

//Daniel
Many thanks Kofod95 - this fixed my problem too ... now back to trying to get category products to show when they're not in a sub-category - any thoughts on that ??
(edit- what I mean is that any category that has sub-categories ONLY displays the sub-categories - any "loose" products are ignored. Categories with only "loose" products displays them ok ...)

cheers
wal
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Trying to move products within sub-categories

Post by ecartz »

wal wrote: Sat Jun 26, 2021 1:46 am now back to trying to get category products to show when they're not in a sub-category - any thoughts on that ??
(edit- what I mean is that any category that has sub-categories ONLY displays the sub-categories - any "loose" products are ignored. Categories with only "loose" products displays them ok ...)
On the products listing page, there is a cm_ip_products_listing.php module. You need a cm_in_products_listing.php module that you could enable.

The default behavior is to only show products in leaf categories. I.e. only products in categories that do not themselves have subcategories.
wal
Member
Posts: 25
Joined: Sun Mar 14, 2021 2:02 am
Phoenix Version:
Has thanked: 26 times
Been thanked: 1 time

Re: Trying to move products within sub-categories

Post by wal »

ecartz wrote: Sat Jun 26, 2021 2:30 am
wal wrote: Sat Jun 26, 2021 1:46 am now back to trying to get category products to show when they're not in a sub-category - any thoughts on that ??
(edit- what I mean is that any category that has sub-categories ONLY displays the sub-categories - any "loose" products are ignored. Categories with only "loose" products displays them ok ...)
On the products listing page, there is a cm_ip_products_listing.php module. You need a cm_in_products_listing.php module that you could enable.

The default behavior is to only show products in leaf categories. I.e. only products in categories that do not themselves have subcategories.

Thanks once more ecartz,

Not sure I have the skills to make new files - but can have a go !! Would I need to make just the 2 files cm_in_products_listing.php in both locations - includes and languages ? Or is there a bit more to the process ??

Would it be correct to use cm_in_category_listing.php files (both) as the basis for the new files (and change many codes :lol: ) ??

In the meantime, I'll just put everything I need into sub-categories to make them visible - or perhaps have no sub-categories - I'll do a product count and decide ;) .

Cheers

nev
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Trying to move products within sub-categories

Post by ecartz »

I would copy index_products/cm_ip_products_listing.php to to index_nested/cm_in_products_listing.php and edit all the UPPERCASE_CONSTANT_NAMES appropriately. You need at least three files. The module file, the template file, and the language files. I can't think of any more, but I haven't tried it.

I wouldn't try copying the category listing. There are more differences between the category listing and a product listing than there are between index_products and index_nested.

If you're confused by what I mean when I say UPPERCASE_CONSTANT_NAMES, look for lines like

Code: Select all

   const CONFIG_KEY_BASE = 'MODULE_CONTENT_IP_PRODUCT_LISTING_';
and change that to

Code: Select all

   const CONFIG_KEY_BASE = 'MODULE_CONTENT_IN_PRODUCT_LISTING_';
in the new file. Also

Code: Select all

<div class="col-sm-<?= (int)MODULE_CONTENT_IP_PRODUCT_LISTING_CONTENT_WIDTH ?> cm-ip-product-listing">
to

Code: Select all

<div class="col-sm-<?= (int)MODULE_CONTENT_IN_PRODUCT_LISTING_CONTENT_WIDTH ?> cm-ip-product-listing">
You could also change the cm-ip-product-listing, but that might cause other issues. Note that those are two examples of lines to change. There are others.
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Trying to move products within sub-categories

Post by Kofod95 »

Let me know if you have trouble - I have made something similar before, and I can adjust it and release it as an addon if someone needs it

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
wal
Member
Posts: 25
Joined: Sun Mar 14, 2021 2:02 am
Phoenix Version:
Has thanked: 26 times
Been thanked: 1 time

Re: Trying to move products within sub-categories

Post by wal »

Thanks ecartz - Have saved all those details to use in my attempt at making the files. Still fine-tuning the appearance of the shop, so will get to doing this eventually. Your assistance is really appreciated.

And thanks also Kofod95 - If I can't do it (most likely outcome ..) I'll ask you to help .. cheers ..

cheers
nev


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply