Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

category control in Admin


zpupster

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

 

Link to comment
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.

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 5 months later...

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  ;)

Link to comment
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  ;)

Link to comment
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 CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Link to comment
Share on other sites

  • 2 weeks later...
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  ;)

Link to comment
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.

 

Link to comment
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  ;)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...