Author Topic: Search results without category list  (Read 14682 times)

IB Development Team

  • Beginner
  • *
  • Posts: 3
Search results without category list
« on: April 25, 2012, 20:11:12 pm »
Hello,

VM2 search results screen contains category list before search results if showCategory is enabled in config.

Attached please find patch for VM2 2.0.6a that hides category list on search results page - only search results are displayed.

Please consider including into mainstream.

Regards,
Pawel

IB Development Team
http://dev.ib.pl/


[attachment cleanup by admin]

armin17

  • Beginner
  • *
  • Posts: 2
Re: Search results without category list
« Reply #1 on: April 25, 2012, 21:47:06 pm »
Please, if you can make a pach for a similar problem:
When I click on link "show All products form manufacturer" on Manufacturer Details Layout page:

VM2 All products from manufacturer  screen contains category list before products from manufacturer. (  if showCategory is enabled in config).

Can I hide a category on this page. On the other pages except the search page, I need to display categories.

Thank you

IB Development Team

  • Beginner
  • *
  • Posts: 3
Re: Search results without category list
« Reply #2 on: April 26, 2012, 10:28:36 am »
Hello,

See attached patch IB#1005297_search_results_wo_categories_1.zip for removing category list from manufacturer products list. Should be applied _after_ the IB#1005297_search_results_wo_categories.zip patch above. These two patches should remove category list from both: search results page and manufacturer products page.

Test before use in production please. Hope it helps.

Regards,
Pawel

IB Development Team
http://dev.ib.pl/

[attachment cleanup by admin]

armin17

  • Beginner
  • *
  • Posts: 2
Re: Search results without category list
« Reply #3 on: April 26, 2012, 17:25:42 pm »
Everything is working correctly. This is very useful. Thank you for your help.

Fonias

  • Beginner
  • *
  • Posts: 7
    • Λέβητες Στερεών καυσίμων
Re: Search results without category list
« Reply #4 on: April 30, 2012, 21:12:13 pm »
Hello there,

i want to remove the categories but i don't know how to install the patch.

Can you please tell me how to install this patch?


Thank you in advance!!

Λέβητες Στερεών καυσίμων
http://levites.gr/

RobertL

  • Beginner
  • *
  • Posts: 49
Re: Search results without category list
« Reply #5 on: May 04, 2012, 10:52:29 am »
Never applied a .patch before, but here's how you do it manually. This is for removing categories from search results, haven't done the other yet.

Edit file components/com_virtuemart/views/category/tmpl/default.pfp   You can either save it in same location, or if you don't want it to be overridden by an update, you can put it in templates/YOUR_TEMPLATE_NAME/html/com_virtuemart/category/ and since those last two folders aren't there by default, just create them

1. Around Line 49
Original:
Code: [Select]
echo $edit_link; */ ?>
<div class="category_description">
<?php echo $this->category->category_description ?>
</div>
<?php

Replace with:
Code: [Select]
echo $edit_link; */
if ( empty($this->keyword) ) {
?>
<div class="category_description">
<?php echo $this->category->category_description ?>
</div>
<?php
}

2. Around Line 56
Original:
Code: [Select]
if ( VmConfig::get('showCategory',1) ) {
Replace with:
Code: [Select]
if ( VmConfig::get('showCategory',1) && empty($this->keyword) ) {

3. Around Line 136
Original:
Code: [Select]
<h3><?php echo $this->keyword?></h3>
Replace with:
Code: [Select]
<h2><?php echo JText::_('COM_VIRTUEMART_SEARCH_RESULTS') . ( $this->keyword ': ' $this->keyword '' ); ?></h2>
You can of course still use h3 tag if you want, this is just exact from .patch file

Last thing to do is to edit language file located in language/en-GB/en-GB.com_virtuemart.ini or whichever other language you use
Original:
Code: [Select]
COM_VIRTUEMART_SEARCH_ORDER_VIRTUEMART_PRODUCT_ID="Product ID"
Replace with (essentially just adding one more line_:
Code: [Select]
COM_VIRTUEMART_SEARCH_ORDER_VIRTUEMART_PRODUCT_ID="Product ID"
COM_VIRTUEMART_SEARCH_RESULTS="Search results"


That's it. Thanks to IB Development Team for the hack

Fonias

  • Beginner
  • *
  • Posts: 7
    • Λέβητες Στερεών καυσίμων
Re: Search results without category list
« Reply #6 on: May 04, 2012, 23:22:25 pm »
Thank you veeeery much for your reply! You are very helpful! It works great now!

Thanks to IB Development Team and to you for the guidance. ;)


I have one more, small issue. I get this "Choose Product Type" field (Which is empty). Can you please tell me how to get rid of this?

Thank you again!

Fotis.

[attachment cleanup by admin]
Λέβητες Στερεών καυσίμων
http://levites.gr/

552288

  • Beginner
  • *
  • Posts: 13
Re: Search results without category list
« Reply #7 on: May 05, 2012, 07:09:50 am »
Dear RobertL ..........

THX a lot for this helpful reply, im search long time for the solution, you make my day!

Greetz .... 8)

silkwork

  • Beginner
  • *
  • Posts: 1
Re: Search results without category list
« Reply #8 on: June 04, 2012, 09:58:12 am »
Thank you from me too!

andrew.glover

  • Beginner
  • *
  • Posts: 11
Re: Search results without category list
« Reply #9 on: June 08, 2012, 18:37:03 pm »
Thank You so much for supplying this amazing patch!

mowgs

  • Beginner
  • *
  • Posts: 48
Re: Search results without category list
« Reply #10 on: June 13, 2012, 13:21:33 pm »
Hi, can you give details on how to apply the .patch files?

I've changed all the details as shown in the above post, but still no change?

Using 2.0.6 and beez5 default template (amended)

karaoke

  • Beginner
  • *
  • Posts: 28
Re: Search results without category list
« Reply #11 on: June 23, 2012, 20:44:58 pm »
Hi ... Can somebody please explain how to use this patch?

karaoke

  • Beginner
  • *
  • Posts: 28
Re: Search results without category list
« Reply #12 on: June 24, 2012, 06:26:04 am »
I've just tried this hack but it's useless. Nothing has changed on the search results page.

Menace

  • Jr. Member
  • **
  • Posts: 53
Re: Search results without category list
« Reply #13 on: July 27, 2012, 13:51:20 pm »
I'm using this thread for a related question.

How would I do it the other way round?
I'm looking for a solution for getting only Categories in VM search results and the products should not be listed. Is that possible somehow?

gcoulter

  • Beginner
  • *
  • Posts: 8
    • Website in a Box
Re: Search results without category list
« Reply #14 on: September 08, 2012, 10:45:00 am »
Hi

I got the first patch to work ok on ver 2.10 with a small edit.
You don't need the line
 echo $edit_link; */
It no longer exists, code should look like this.

if ( empty($this->keyword) ) {
?>
<div class="category_description">
   <?php echo $this->category->category_description ; ?>
</div>
<?php
}
/* Show child categories */

if ( VmConfig::get('showCategory',1) && empty($this->keyword) ) {
   if ($this->category->haschildren) {

However I can't get the manufacturer patch to work.
Anyone got this working?

Thanks.
Graham Coulter
Ireland