Jump to content
zpupster

category control in Admin

Recommended Posts

Hello Support,

oscommerce 234 BS

Is there a way to turn categories on and off in the admin.

Searched for an addon with --Turn categories  off" ----nothing seems to apply.

Searched the forum also , and surprised it has not come up before.

I can always delete the category from the database, but it would seem easier to have a button to turn them on and off --like the products.

Is anyone using an addon for this??  How are the rest of you  turning categories on and off??

 

TY,

 

Craig

 

Share this post


Link to post
Share on other sites

There are several addons that do that though I don't any have been updated in some time. They will still work but their instructions might be a little off.

You shouldn't delete the categories to do this since that will change all of the urls for the category and the products in it and that will affect your ranking for those pages.

 

Share this post


Link to post
Share on other sites

Hi guys & ladies 

Interestingly nobody seemed to care about this "little" but IMHO very useful tweak.

Switching whole catagerories off or on could be used for seasonal specials, quick selling items etc.

Furthermore if a category exists, there is no way to hide it unless you delete it... So even if a category is empty as for some items temporary OoS (eg) you still have it displayed with "no items exist in this category).

Especially if you have categories with pictures and descriptions, you don't want to lose it or delete it.

I use sometimes the categories as well for some manufacturers...

For me, this has not been thought further - or what do yo all think?

How do you handle these categories?

Any advise would be apreciated.

Kind regards

Felix


Whoever finds errors and misspellings in my postings can keep them  o:)

 

Moving from 2.2 MS to 2.3.4 BS EDGE - and I love this version!

 

I might show "online" all the time - but I might be away from my computer  ;)

Share this post


Link to post
Share on other sites

As stated above i use the addon that I linked to. Does everything I need it to.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

@14steve14 

yes - I used this addon myself as well - with my 2.2 MS2 - now with 2.3.4 BS it is not doing the trick anymore.

I guess (or hope..) that there are not many 2.2 around.

So a solution for this would be great.

 


Whoever finds errors and misspellings in my postings can keep them  o:)

 

Moving from 2.2 MS to 2.3.4 BS EDGE - and I love this version!

 

I might show "online" all the time - but I might be away from my computer  ;)

Share this post


Link to post
Share on other sites

I use it in a B.S. gold sore no problems. Also added it to a latest frozen store and with small ateations that even I can do it worked.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites
On 9/5/2018 at 4:35 PM, 14steve14 said:

I use this addon but it may need an update depending on your osc and php version.

https://apps.oscommerce.com/RnLn2

yep this addon works with CE Frozen, the changes/additions to the admin side works as described.  For the shop side, as index.php is now modualised you just have to find the appropriate database queries and put insert:

where c.categories_status = 1

usually find:

$categories_query = tep_db_query

and add:

where c.categories_status = 1

as a condition to the search.

Hope that helps.


osC BS gold live - osC CE in development (awesome)

Share this post


Link to post
Share on other sites
On 2/20/2019 at 5:32 PM, Mikepo said:

yep this addon works with CE Frozen, the changes/additions to the admin side works as described.  For the shop side, as index.php is now modualised you just have to find the appropriate database queries and put insert:

where c.categories_status = 1

usually find:

$categories_query = tep_db_query

and add:

where c.categories_status = 1

as a condition to the search.

Hope that helps.

Hey @Mikepo and @14steve14 I tried and it worked - more or less to say... Still havent figured out, how to have the subcategories to vanish - but my workaround is to move the subcategories to the main categorie and then everything is fine.

I am having quite a deep structure - so it is of great help to me. Stopping now to "fiddle" aroud as I'm planning on moving to frozen - so every additional change I will have to redo again.

 

Thank you guys for pointing me to the right direction. If only this would be included already... I can not imagine, that this is not a wish of more people.

If taking about wishing... The same would apply for manufactures for me as well... 

Kind regards

Felix


Whoever finds errors and misspellings in my postings can keep them  o:)

 

Moving from 2.2 MS to 2.3.4 BS EDGE - and I love this version!

 

I might show "online" all the time - but I might be away from my computer  ;)

Share this post


Link to post
Share on other sites

Most of the code in Frozen and later uses the category_tree class to display category data etc.  So it's now (or should be!) a lot less code to do the job.

You'd still need some type of admin interface to turn categories inactive with some type of 0/1 flag as described above. On the shop side, you'd need to amend the class file to not load the categories if flag = 0 (inactive) here:

https://github.com/gburton/Responsive-osCommerce/blob/master/includes/classes/category_tree.php#L41

I *think* (in the shop side) I updated most things to use the Category Tree, eg:

Category Box:
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/boxes/bm_categories.php#L43

Category Descriptions:
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/content/index_nested/cm_in_category_description.php#L40

Category Icons:
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/content/index_nested/cm_in_category_listing.php#L46

Etc and so on.  I may have missed some.  

Obviously addons may not (probably almost certainly not) be using the category_tree, so those would need attention for your flag, or they would need to be updated to use the category_tree class.

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
On 3/5/2019 at 12:04 PM, burt said:

Most of the code in Frozen and later uses the category_tree class to display category data etc.  So it's now (or should be!) a lot less code to do the job.

You'd still need some type of admin interface to turn categories inactive with some type of 0/1 flag as described above. On the shop side, you'd need to amend the class file to not load the categories if flag = 0 (inactive) here:

https://github.com/gburton/Responsive-osCommerce/blob/master/includes/classes/category_tree.php#L41

I *think* (in the shop side) I updated most things to use the Category Tree, eg:

Category Box:
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/boxes/bm_categories.php#L43

Category Descriptions:
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/content/index_nested/cm_in_category_description.php#L40

Category Icons:
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/content/index_nested/cm_in_category_listing.php#L46

Etc and so on.  I may have missed some.  

Obviously addons may not (probably almost certainly not) be using the category_tree, so those would need attention for your flag, or they would need to be updated to use the category_tree class.

 

Hello and good evening @burt - this did the trick --> Just updated the the category_tree class and put the condition query in (three times total) and it worked! (On top of the rest of changes)

Great and thank you very much 🙂

Kind regards - Felix 


Whoever finds errors and misspellings in my postings can keep them  o:)

 

Moving from 2.2 MS to 2.3.4 BS EDGE - and I love this version!

 

I might show "online" all the time - but I might be away from my computer  ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×