Post by thinksync » Tue Aug 29, 2017 8:30 am

Hi there,

I'm wondering what I'm missing here, but the site I'm building currently only needs a sidebar for one category. The rest of the categories are very simple, with just a few products. One category however requires a filter as it has a lot of options.

I've created a separate category.tpl file and created a new layout with a route for that tpl, and assigned it to just that category.

This works great, for that category - the filter appears only on that category.

However the empty sidebar is appearing in all other views - home, product, cart, checkout and the categories without the sidebar.

I've been trying to figure out how to manage it, but so far it escapes me!

Newbie

Posts

Joined
Fri Jul 26, 2013 5:05 am

Post by paulfeakins » Tue Aug 29, 2017 7:16 pm

Did you add the correct route to your tpl?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by thinksync » Wed Aug 30, 2017 8:55 am

Yeah, I had that completely wrong.

I created an additional file in /product called category-with-sidebar.tpl and create a new category layout with the route product/category-with-sidebar

But I've realised that it's driven from the URL generated by the controller. I've sorted it out now. Thanks for the reply.

Newbie

Posts

Joined
Fri Jul 26, 2013 5:05 am

Post by paulfeakins » Wed Aug 30, 2017 6:13 pm

Thought it was that ;)

Great stuff.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Bing [Bot] and 16 guests