News:

Looking for documentation? Take a look on our wiki

Main Menu

Search results layout

Started by matrixkiko, April 04, 2012, 08:49:29 AM

Previous topic - Next topic

matrixkiko

Hi
When searching for products, it also displays the catagory's on top of the page.
How do i disable this?

balai

Hi

Go to VM Configuration->Templates->and uncheck the "Show Children Category"

matrixkiko


lipes

Balai: its possible to display the product final price in search results too? tks
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

Quote from: lipes on April 04, 2012, 16:21:15 PM
Balai: its possible to display the product final price in search results too? tks


Thats all that shows in mine, because I have mine setup to show only that price.

How is your price settings setup?

lipes

VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

lipes, what price is showing?

and make sure your category override has the most current price code.


lipes

oh.. sorry!! My mistake. I was talking about to show the price in search plugin - joomla search or advanced results / vm search..
(thus avoided, or not, that users do more clicks only see the product price. and improving the response time too)

My Categories are fine and show all prices impeccable!! :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

moshi

I have the same issue when searching for products, it also displays the categories on top of the page.

If i disable this with:

Go to VM Configuration->Templates->and uncheck the "Show Children Category"

does not show the other category levels (subcategories)!!

I'll appreciate your help!


PRO



What I do is wrap the childlist in an if statement

<?php
$searchnone=JRequest::getVar('keyword',0);
if (empty($searchnone)) {?>





<?php } ?>

moshi

Thank you but i am a beginer, could you please help me wrapping this statament to the following childlist code:


<?php
/* Show child categories */

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

      // Category and Columns Counter
      $iCol = 1;
      $iCategory = 1;

      // Calculating Categories Per Row
      $categories_per_row = VmConfig::get ( 'categories_per_row', 3 );
      $category_cellwidth = ' width'.floor ( 100 / $categories_per_row );

      // Separator
      $verticalseparator = " vertical-separator";
      ?>

      <div class="category-view">

      <?php // Start the Output
      if(!empty($this->category->children)){
      foreach ( $this->category->children as $category ) {

         // Show the horizontal seperator
         if ($iCol == 1 && $iCategory > $categories_per_row) { ?>
         <div class="horizontal-separator"></div>
         <?php }

         // this is an indicator wether a row needs to be opened or not
         if ($iCol == 1) { ?>
         <div class="row">
         <?php }

         // Show the vertical seperator
         if ($iCategory == $categories_per_row or $iCategory % $categories_per_row == 0) {
            $show_vertical_separator = ' ';
         } else {
            $show_vertical_separator = $verticalseparator;
         }

         // Category Link
         $caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );

            // Show Category ?>
            <div class="category floatleft<?php echo $category_cellwidth . $show_vertical_separator ?>">
               <div class="spacer">
                  <h2>
                     <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
                     <?php echo $category->category_name ?>
                     <br />
                     <?php // if ($category->ids) {
                        echo $category->images[0]->displayMediaThumb("",false);
                     //} ?>
                     </a>
                  </h2>
               </div>
            </div>
         <?php
         $iCategory ++;

      // Do we need to close the current row now?
      if ($iCol == $categories_per_row) { ?>
      <div class="clear"></div>
      </div>
         <?php
         $iCol = 1;
      } else {
         $iCol ++;
      }
   }
   }
   // Do we need a final closing row tag?
   if ($iCol != 1) { ?>
      <div class="clear"></div>
      </div>
   <?php } ?>
</div>
<?php }
} ?>

   <div id="bottom-pagination"><?php echo $this->vmPagination->getPagesLinks(); ?><span style="float:right"><?php echo $this->vmPagination->getPagesCounter(); ?></span></div>
</div>
<?php } ?>

PRO

Quote from: moshigigeis on May 01, 2012, 00:35:24 AM
Thank you but i am a beginer, could you please help me wrapping this statament to the following childlist code:


<?php
/* Show child categories */
$searchnone=JRequest::getVar('keyword',0);

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

      // Category and Columns Counter
      $iCol = 1;
      $iCategory = 1;

      // Calculating Categories Per Row
      $categories_per_row = VmConfig::get ( 'categories_per_row', 3 );
      $category_cellwidth = ' width'.floor ( 100 / $categories_per_row );

      // Separator
      $verticalseparator = " vertical-separator";
      ?>

      <div class="category-view">

      <?php // Start the Output
      if(!empty($this->category->children)){
      foreach ( $this->category->children as $category ) {

         // Show the horizontal seperator
         if ($iCol == 1 && $iCategory > $categories_per_row) { ?>
         <div class="horizontal-separator"></div>
         <?php }

         // this is an indicator wether a row needs to be opened or not
         if ($iCol == 1) { ?>
         <div class="row">
         <?php }

         // Show the vertical seperator
         if ($iCategory == $categories_per_row or $iCategory % $categories_per_row == 0) {
            $show_vertical_separator = ' ';
         } else {
            $show_vertical_separator = $verticalseparator;
         }

         // Category Link
         $caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );

            // Show Category ?>
            <div class="category floatleft<?php echo $category_cellwidth . $show_vertical_separator ?>">
               <div class="spacer">
                  <h2>
                     <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
                     <?php echo $category->category_name ?>
                     <br />
                     <?php // if ($category->ids) {
                        echo $category->images[0]->displayMediaThumb("",false);
                     //} ?>
                     </a>
                  </h2>
               </div>
            </div>
         <?php
         $iCategory ++;

      // Do we need to close the current row now?
      if ($iCol == $categories_per_row) { ?>
      <div class="clear"></div>
      </div>
         <?php
         $iCol = 1;
      } else {
         $iCol ++;
      }
   }
   }
   // Do we need a final closing row tag?
   if ($iCol != 1) { ?>
      <div class="clear"></div>
      </div>
   <?php } ?>
</div>
<?php }
} ?>

   <div id="bottom-pagination"><?php echo $this->vmPagination->getPagesLinks(); ?><span style="float:right"><?php echo $this->vmPagination->getPagesCounter(); ?></span></div>
</div>
<?php } ?>



U can try that

I just modified this

<?php
/* Show child categories */
$searchnone=JRequest::getVar('keyword',0);

if ( VmConfig::get('showCategory',1) ) && (empty($searchnone)) {