Zen Follower
- Join Date:
- Dec 2008
- Location:
- Pittsburgh, PA
- Posts:
- 241
- Plugin Contributions:
- 0
How to hide categories with no active products?
Has anyone had success w/ this one 1.5.5? I can't seem to get it to work for me...
Views: 26,152
Zen Follower
Has anyone had success w/ this one 1.5.5? I can't seem to get it to work for me...
Zen Follower
Yes it works in 1.5.5d...which mod are you having trouble with? Category Tabs? Subcategories? Sideboxes?
Zen Follower
wolfderby:
Has anyone had success w/ this one 1.5.5? I can't seem to get it to work for me...
Ignore all the code changes except for those on page 5 of this thread...much of it was experimental until we nailed it down.
I just verified that the changes are working in my live shop...1.5.5d. The site map, horizontal menu (css dropdown on my website), and center box subcategories are working. I do not use the sidebox menu, so, let me know if you are using it and I'll open up my test shop to help if needed.
Did you add the option to your admin table layout settings and set it to the correct value?
Zen Follower
mikeel100:
Ignore all the code changes except for those on page 5 of this thread...much of it was experimental until we nailed it down.
I just verified that the changes are working in my live shop...1.5.5d. The site map, horizontal menu (css dropdown on my website), and center box subcategories are working. I do not use the sidebox menu, so, let me know if you are using it and I'll open up my test shop to help if needed.
Did you add the option to your admin table layout settings and set it to the correct value?
Yeah I added the option and set it. I was eager to go live w/ the westminster new template, so I'm setting up a /test site now to experiment w/ it more on the classic template. I switched it late at night to see if the template was the cause, and it didn't seem to be the cause of it not working. I struggled to bring my site up to 1.5.5d from 1.3.9 recently, so it's probably something I did.
Zen Follower
I feel your pain...took me a while to upgrade as well. I tried Westminster a couple of years ago and had to abandon it.
Be careful with the responsive templates...I'm having an awful time with page load speeds when I use the default install in 1.5.5d. The layout is okay but I do not like the performance.
It sounds like you are on the right path. I probably don't need to say this but...after you fresh install your test shop and before installing any other mods, I recommend you copy the classic files to your template system and modify the appropriate files with the suggestions on page 5 of this feed and test them first.
Good luck.
Administrator
mikeel100:
I feel your pain...took me a while to upgrade as well. I tried Westminster a couple of years ago and had to abandon it.
Be careful with the responsive templates...I'm having an awful time with page load speeds when I use the default install in 1.5.5d. The layout is okay but I do not like the performance.
It sounds like you are on the right path. I probably don't need to say this but...after you fresh install your test shop and before installing any other mods, I recommend you copy the classic files to your template system and modify the appropriate files with the suggestions on page 5 of this feed and test them first.
Good luck.
There's a plugin (Clone a Template) that will help! Just "clone" the *classic *template.
Zen Follower
lat9:
There's a plugin (Clone a Template) that will help! Just "clone" the *classic *template.
Thanks for the tip. The link is not working.
Administrator
mikeel100:
Thanks for the tip. The link is not working.
That's weird, it worked for me just now.
Zen Follower
lat9:
That's weird, it worked for me just now.
It is not working with Chrome in my Samsung Android tablet.
I don't know why.
A new tab opens with this "https://www.zen-cart.com/downloads.php?do=file&id=2087" in the address bar but the page never opens???
zennedOut
mikeel100:
I feel your pain...took me a while to upgrade as well. I tried Westminster a couple of years ago and had to abandon it.
Be careful with the responsive templates...I'm having an awful time with page load speeds when I use the default install in 1.5.5d. The layout is okay but I do not like the performance.
It sounds like you are on the right path. I probably don't need to say this but...after you fresh install your test shop and before installing any other mods, I recommend you copy the classic files to your template system and modify the appropriate files with the suggestions on page 5 of this feed and test them first.
Good luck.
i am not sure why a responsive design template would in fact be slower.... other than the template itself might be poorly coded.... but a responsive design template per se, in my experience, does not slow a site down...
page speed, y-slow and the like are all fine.... they can point you to elements that can make your site faster..... and caching resources definitely helps with a responsive template (or any template for that matter), but...
really tells a better story (thanks to @rodg)....
in my experience, ZC can slow down due to database lookups, and hosting on fast servers makes a big difference....
and when i say a fast server, i mean a server with SSD drives including hosting of of your database. big difference IMHO....
if you can ssh to your server, you can test the speed of your drives. you are looking for under 1 second when you run the following code:
time for i in `seq 1 1000`; do
dd bs=4k if=/dev/sda count=1 skip=$(( $RANDOM * 128 )) >/dev/null 2>&1;
done;
and if your disks respond with under 1 second, ensure that your db is hosted on the same server. i have had some shared hosts where they claimed SSD drives, only to host the db on a separate server using HDD.
best.
Zen Follower
carlwhat:
i am not sure why a responsive design template would in fact be slower.... other than the template itself might be poorly coded.... but a responsive design template per se, in my experience, does not slow a site down...
page speed, y-slow and the like are all fine.... they can point you to elements that can make your site faster..... and caching resources definitely helps with a responsive template (or any template for that matter), but...
really tells a better story (thanks to @rodg)....
in my experience, ZC can slow down due to database lookups, and hosting on fast servers makes a big difference....
and when i say a fast server, i mean a server with SSD drives including hosting of of your database. big difference IMHO....
if you can ssh to your server, you can test the speed of your drives. you are looking for under 1 second when you run the following code:
time for i in seq 1 1000; do
dd bs=4k if=/dev/sda count=1 skip=$(( $RANDOM * 128 )) >/dev/null 2>&1;
done;the
>
> and if your disks respond with under 1 second, ensure that your db is hosted on the same server. i have had some shared hosts where they claimed SSD drives, only to host the db on a separate server using HDD.
>
> best.
Off topic for this thread...but I appreciate the input.
My DB is on the same drive, speed is okay, and I use db cache already...not sure what is happening.
All I know is that when I turn on responsive in every version of ZC since 1.5.0, my page load speeds are unacceptable (4-5 times slower with GoDaddy and Inmotion Hosting).
So, it is, in fact, slower for me. I have reported this in another forum and if I figure out why it is happening, I will update in that forum.
My images are off site, so I thought something in the CSS might be causing it. <https://www.webpagetest.org/> verifies the image loads are the issue, but only in Responsive. Images and pages load very fast in Classic...which tells me the problem is with Responsive.
Maybe it will not be an issue when Bootstrap is introduced in 1.6. I'll live with Classic for now.
Thanks.
Totally Zenned
mikeel100:
My images are off site, so I thought something in the CSS might be causing it.
Seriously?
Your images are someplace other than your images folder?
Putting them where they belong would certainly be the first way to fix image slowness. Don't know what you have with the responsive but, any image caching would certainly be hampered by having to go offsite for every request. Not to mention problems in https mode.:dontgetit
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Zen Follower
dbltoe:
Seriously?
Your images are someplace other than your images folder?
Putting them where they belong would certainly be the first way to fix image slowness. Don't know what you have with the responsive but, any image caching would certainly be hampered by having to go offsite for every request. Not to mention problems in https mode.:dontgetit
What is the subject of this thread-- " How to hide categories with no active products?"
This discussion shouldn't even be happening here...and I did mention that in the previous post. Please stop responding in this thread unless it has to do with the subject of this thread:-)
Speed is not an issue in Classic...even with the images off site. Believe me, I know all about image optimization. I was reluctant to use off-site images but it works fine in Classic...and there are no cache, speed, or https issues. Again, Classic works great but Responsive does not.
Totally Zenned
I won't mention what I thought of responding but, I would like to point out that you made a blanket comment in post #65 that could affect many folk's decisions on templates.
Be careful with the responsive templates...I'm having an awful time with page load speeds when I use the default install in 1.5.5d. The layout is okay but I do not like the performance.Like lat9, we have somewhat of an interest in helping with responsive templates. Your comment sent me straight to test sites to see what could be the cause UNTIL... I saw your offsite images comment.
Non-standard practices WILL have an adverse effect on Zen Cart performance. Other things like old mods, wrong PHP, etc. as well. That's why the posting tips are so important. One of those posting tip questions is "In what ways is your site customized or different from a brand new uncustomized install?"
Your statement (without clarification that yours was not a standard install) could very well cause someone to make an unwise decision in template selection or image placement. You might be able to handle it well but, are you willing to tell others that they could do it as well? Speed is not the only concern when images are off site.
The posting tips are there because we are never "in the same boat." Once one letter; one bit of code; one div call is changed, it becomes your cart unlike any other. Always a similar situation but never the same.
I will comment whenever I feel there is something a budding Zenner needs to know, regardless of the topic. Hopefully, it being found on a Google or forum search will help someone in the future.
That's why I'm here.
you?
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Zen Follower
dbltoe:
I won't mention what I thought of responding but, I would like to point out that you made a blanket comment in post #65 that could affect many folk's decisions on templates.
Like lat9, we have somewhat of an interest in helping with responsive templates. Your comment sent me straight to test sites to see what could be the cause UNTIL... I saw your offsite images comment.Non-standard practices WILL have an adverse effect on Zen Cart performance. Other things like old mods, wrong PHP, etc. as well. That's why the posting tips are so important. One of those posting tip questions is "In what ways is your site customized or different from a brand new uncustomized install?"
Your statement (without clarification that yours was not a standard install) could very well cause someone to make an unwise decision in template selection or image placement. You might be able to handle it well but, are you willing to tell others that they could do it as well? Speed is not the only concern when images are off site.
The posting tips are there because we are never "in the same boat." Once one letter; one bit of code; one div call is changed, it becomes your cart unlike any other. Always a similar situation but never the same.
I will comment whenever I feel there is something a budding Zenner needs to know, regardless of the topic. Hopefully, it being found on a Google or forum search will help someone in the future.
That's why I'm here.
you?
I did not mean to be abrasive in my post. I've been hammered a couple of times by the Good Doctor for having off topic conversations...just trying to prevent it from happening again.
I do appreciate your insight.
Let's end the discussion on Responsive Classic speed in this topic.
Later:-)
Zen Follower
mikeel100:
I feel your pain...took me a while to upgrade as well. I tried Westminster a couple of years ago and had to abandon it.
Be careful with the responsive templates...I'm having an awful time with page load speeds when I use the default install in 1.5.5d. The layout is okay but I do not like the performance.
It sounds like you are on the right path. I probably don't need to say this but...after you fresh install your test shop and before installing any other mods, I recommend you copy the classic files to your template system and modify the appropriate files with the suggestions on page 5 of this feed and test them first.
Good luck.
thanks for the advice, I followed it and realized I must have been trying to make these mods too late at night haha.
New Zenner
This does not create a switch in layout:
Ajeh:
Then add the switch to the configuration table via the Tools ... Install SQL Patches ...
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Categories with Inactive Products Status', 'CATEGORIES_PRODUCTS_INACTIVE_HIDE', '0', 'Hide Categories with Inactive Products?<br />0= off<br />1= on', 19, 30, 'zen_cfg_select_option(array('0', '1'), ', now());
>
> Setting this new setting in the Configuration ... Layout Settings ... for Categories with Inactive Products Status to 0 or OFF will NOT hide the empty Categories or Categories with all Products set to products_status = 0 and setting this to 1 or ON will hide them ...
Totally Zenned
net3431:
This does not create a switch in layout:
When you access your admin and select configuration->Layout Settings, what does the rest of your uri show after configuration.php ?
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
New Zenner
configuration.php?gID=19
New Zenner
Son of gun... it's there now.
Categories with Inactive Products Status
Edit
Hide Categories with Inactive Products?
0= off
1= on
Tell staff why this post should be reviewed.