VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: tanjapika on June 28, 2017, 14:25:35 PM

Title: Remove the search button from category layout and change sort order
Post by: tanjapika on June 28, 2017, 14:25:35 PM
Hallo

I have 3 questions about the Search field in categorie layout:

1. question:

I´d like to remove the search field and search button from layout in categorie result (over the list of display products in chosen category).

2. question:
In the field "search by" I´d like the Default product sort order by name of the product.
In the list of choices I´d like to have the options:
- by name
- by price ond
- by manufacturer

3. question
The field Manufecturer I´d also like to remove, becouse I don´t need it.


Is it possible to change this?

I use VirtueMart 3.0.18 ad Joomla 3.4.5

(http://kreatim.eu/search-field.jpg)

Web:http://kreatim.eu/spletna-trgovina/villa-lodola (http://kreatim.eu/spletna-trgovina/villa-lodola)


Title: Re: Remove the search button from category layout and change sort order
Post by: Ghost on June 28, 2017, 14:38:28 PM
1. Disable 'Show search' option in VM Configuration -> Templates.

2. Configure this in VM Configuration -> Product Order Settings.

3. Create a template override of /components/com_virtuemart/views/category/default.php and comment out or remove this line:

<?php echo $this->orderByList['manufacturer']; ?>
Title: Re: Remove the search button from category layout and change sort order
Post by: jenkinhill on June 28, 2017, 15:12:14 PM
Quote from: tanjapika on June 28, 2017, 14:25:35 PM

I use VirtueMart 3.0.18 ad Joomla 3.4.5


Joomla 3.4.5 is very old and known to have critical security issues. Current version is 3.7.2 - and you should update VirtueMart to the latest (3.2.4 will be available very soon). That latest VM versions enhanced template/layout configuration options.
http://forum.virtuemart.net/index.php?topic=118683.0
Title: Re: Remove the search button from category layout and change sort order
Post by: tanjapika on June 28, 2017, 15:26:20 PM
Quote from: Ghost on June 28, 2017, 14:38:28 PM
1. Disable 'Show search' option in VM Configuration -> Templates.

2. Configure this in VM Configuration -> Product Order Settings.

3. Create a template override of /components/com_virtuemart/views/category/default.php and comment out or remove this line:

<?php echo $this->orderByList['manufacturer']; ?>


Hallo

Thanks for the answers.

My 2. and 3. question are solved - thanks :).

But I have still problems with my 1. question.

In the Configuration / Templates I can´t find the option "Show search"  :( - is any other option to remove the search field?

(http://www.kreatim.eu/search-field-2.jpg)


Title: Re: Remove the search button from category layout and change sort order
Post by: jenkinhill on June 28, 2017, 16:11:33 PM
You should update VirtueMart to see the new options. In addition to extra options on the config/templates  page there are also options to show/hide search etc within the Joomla menu configurations.

(https://image.ibb.co/kOfY8Q/catmenu.jpg)
Title: Re: Remove the search button from category layout and change sort order
Post by: tanjapika on June 28, 2017, 21:14:42 PM
Thanks :)
It´s working.