News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Search results without category list

Started by IB Development Team, April 25, 2012, 20:11:12 PM

Previous topic - Next topic

gxHL

Quote from: gcoulter 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.

Can you please explain the process on how to installing the patch please?
VM 2.0.10 J 2.5.7

krentzis

Hello,

I applied the first patvh but I don't see any difference.

You can see here www.choiceandattitude.com/demo what my problem is.

For example if you go to Menswear/T-Shirts you will see some products.

If you go to the footer and press o Clock for example you will not get any results simply because o Clock does not manufacture any t-shirts.

I have this module that displays manufacturers vertically so I dont know if that is the reason.

it was that link that produced the output
<?php foreach ($manufacturers as $manufacturer) {
$link JROUTE::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' $manufacturer->virtuemart_manufacturer_id);


How I can display ALL products from manufacturer o Clock no matter in which category I am ?


thanks


friends1976

This worked perfectly for me.  There is one problem, though, that the new formatting isn't using my template anymore.  Is there any reason why? 

http://www.omegasports.net/index.php/component/virtuemart/manufacturer/balega

Quote from: RobertL 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:
echo $edit_link; */ ?>
<div class="category_description">
<?php echo $this->category->category_description ?>
</div>
<?php


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


2. Around Line 56
Original:
if ( VmConfig::get('showCategory',1) ) {

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


3. Around Line 136
Original:
<h3><?php echo $this->keyword?></h3>

Replace with:
<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:
COM_VIRTUEMART_SEARCH_ORDER_VIRTUEMART_PRODUCT_ID="Product ID"

Replace with (essentially just adding one more line_:
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