Page 1 of 3
Category Product Numbers?
Posted: Sun Jan 20, 2013 4:13 am
by Bluesplayer
Is there a way to implement this? Can't see anything in Admin for it. I have added the product numbers to the category title manually but I can see a problem with this. When I alter or update the numbers the previous category no longer exists. This would mean I will have to use 301 redirects to make sure that indexed links are not broken when I alter it on a live site.
Re: Category Product Numbers?
Posted: Sun Jan 20, 2013 5:39 am
by leo
Yes, there is. I had this function on my old shopping cart. Details in the evening or tomorrow morning.
Re: Category Product Numbers?
Posted: Mon Jan 21, 2013 8:08 am
by leo
It takes more time as I have flu and terrible headache. The php part is ready, need some modification in the template.
Re: Category Product Numbers?
Posted: Mon Jan 21, 2013 8:25 am
by Bluesplayer
No need to rush. My site isn't 'live' yet and I still have plenty to get on with before it is.
Re: Category Product Numbers?
Posted: Mon Jan 21, 2013 1:55 pm
by leo
Here are the files for testing.
PS. please use postreply instead of quote.
Re: Category Product Numbers?
Posted: Mon Jan 21, 2013 2:04 pm
by Bluesplayer
Nearly perfect but there is one issue. I am using sub categories and the main category is adding up the totals 2x. It is adding up the totals in the main and also the totals in the sub categories together.
Re: Category Product Numbers?
Posted: Mon Jan 21, 2013 2:44 pm
by leo
You have 11 products in Dog Bowls category + 3 products in Drinking bowls + 8 in Eating. That is 22.
Why do you list all the bowls under the Dog Bowls category then in the subcats again?
Re: Category Product Numbers?
Posted: Mon Jan 21, 2013 2:55 pm
by Bluesplayer
Ah right.
Sorry. Looks like everything is spot on.
Nice work.
Thanks
Re: Category Product Numbers?
Posted: Tue Jan 22, 2013 2:31 am
by leo
One question. If there is no product in the category I think the (0) should be hidden. Agree?
Re: Category Product Numbers?
Posted: Tue Jan 22, 2013 2:43 am
by Bluesplayer
leo wrote:One question. If there is no product in the category I think the (0) should be hidden. Agree?
Good point.
This is how it would look with the (0) hidden:
No zero Test Page
As you say it does look neater.