Category Product Numbers?

General Support for technical Issues relating to AlegroCart
Bluesplayer
Posts: 152
Joined: Sun Jan 06, 2013 3:03 pm

Category Product Numbers?

Post by Bluesplayer » Sun Jan 20, 2013 4:13 am

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.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Category Product Numbers?

Post by leo » Sun Jan 20, 2013 5:39 am

Yes, there is. I had this function on my old shopping cart. Details in the evening or tomorrow morning.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Category Product Numbers?

Post by leo » Mon Jan 21, 2013 8:08 am

It takes more time as I have flu and terrible headache. The php part is ready, need some modification in the template.

Bluesplayer
Posts: 152
Joined: Sun Jan 06, 2013 3:03 pm

Re: Category Product Numbers?

Post by Bluesplayer » Mon Jan 21, 2013 8:25 am

No need to rush. My site isn't 'live' yet and I still have plenty to get on with before it is.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Category Product Numbers?

Post by leo » Mon Jan 21, 2013 1:55 pm

Here are the files for testing.

PS. please use postreply instead of quote.
Attachments
category_product_numbers.zip
(5.46 KiB) Downloaded 313 times

Bluesplayer
Posts: 152
Joined: Sun Jan 06, 2013 3:03 pm

Re: Category Product Numbers?

Post by Bluesplayer » Mon Jan 21, 2013 2:04 pm

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.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Category Product Numbers?

Post by leo » Mon Jan 21, 2013 2:44 pm

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?

Bluesplayer
Posts: 152
Joined: Sun Jan 06, 2013 3:03 pm

Re: Category Product Numbers?

Post by Bluesplayer » Mon Jan 21, 2013 2:55 pm

Ah right.

Sorry. Looks like everything is spot on.

Nice work.

Thanks

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Category Product Numbers?

Post by leo » Tue Jan 22, 2013 2:31 am

One question. If there is no product in the category I think the (0) should be hidden. Agree?

Bluesplayer
Posts: 152
Joined: Sun Jan 06, 2013 3:03 pm

Re: Category Product Numbers?

Post by Bluesplayer » Tue Jan 22, 2013 2:43 am

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.

Post Reply