News:

Support the VirtueMart project and become a member

Main Menu

Remove Browse Controls When a Category Is Empty

Started by qwerty678, September 02, 2015, 16:11:53 PM

Previous topic - Next topic

qwerty678

Hello,
I want to hide the browse controls (manufacture, pagination etc) when the category has no products.

I try to change inside the template and inside the vm 3 the line

if$this->showproducts{ ?>

to
if(!empty($this->showproducts)){ ?>

But nothing happens.
Is there any other line that I have to change?

I'm using Vm3 and joomla 3.
Thank you.

GJC Web Design

if$this->showproducts{ ?>  is just the config setting

you would need something like

if ($this->showproducts && $this->products  ) { ?>

maybe .. something similar anyway
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

z-analysts

Thank you GJC Web Design for the hint! I was looking for the right place to make the change. Here is the code that worked for me:

if (($this->showproducts) && (!empty($this->products))) {