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

Description of my classes (category) appears 2 times, one under the other.

Started by avanti, September 10, 2012, 19:16:35 PM

Previous topic - Next topic

avanti

Hi,

Sorry for my bad english and thank you google!

I have a problem with version 2.0.6.

Description of my classes (category) appears 2 times, one under the other.

I do not know why

I purchased a template and I do not know what changed. Perhaps there is an error in t code? if yes, what is the page change? Is it that the directory category or categories? Is "depault.php" or one that is in the "tmp" (in category)?

I'm really lost and my client is getting impatient ...

I hope someone can help me

Thanks in advance

avanti  ???

[attachment cleanup by admin]

ivus

Hi avanti,

looks like you're in the "/category/default.php" page of your theme.

Do a search and make sure this is only called once.



echo $this->category->category_description


zorro lee

Avanti could you please tell me what the name of that template is? Im trying to find category view same like is on your screen shoot. So if it isn't big problem please PM me with link or name of the VM theme which you are using on your site. Thank You!

avanti

Hi Ivus and Zorro Lee

The template is 40096 number
It is found here for exemple http://www.templatemonster.com/virtuemart-templates/40096.html

The problem exists on the template bought ... I have attached the photo.

ABOUT CODE :

For the code, I have two directories "category" in com-virtuemart/views

1 / category
2 / caegories (but I do not know what this book is different because the code in the default.php file in that directory ...)

and in each directory there are:

1 / TMPL directory
2 / view.html.php file

and directory TMPL
there is the file "default.php"

I show below the code of the page concerned default.php located in

What can I change?

thanks by advance

avanti

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

views / category / tmpl / default.php
================================
=======================================================
<?php
if ($this->category->category_name)
{ ?>
   <h1 class="browse-view"><span><span><?php echo $this->category->category_name; ?></span></span></h1>
   
<?php } ?>

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

if ( VmConfig::get('showCategory',1) && $this->search ==null && $this->category->category_name) {
   if ($this->category->haschildren) {

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

      // Calculating Categories Per Row
      $categories_per_row = 4;
      $category_cellwidth = ' width'.floor ( 100 / $categories_per_row );

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

      <div class="category-view pad-bot">

      <?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 $show_vertical_separator ?>">
               <div class="spacer">
                  <h2>
                     <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
                     <div class="category-border">
                     <?php // if ($category->ids) {
                        echo $category->images[0]->displayMediaThumb("",false);
                     //} ?>
                     </div>
                     <div class="category-title"><?php echo $category->category_name ?></div>
                     </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 }
}
?>

<?php
// Show child categories
if (!empty($this->products)) {
                  if (!empty($this->keyword)) {
                     ?>
                     <h3><?php echo $this->keyword; ?></h3>
                  <?php }   ?>
               
                  <?php if ($this->search == null ) { ?>
                     <?php if ($this->category->category_description ): ?>
                     <div class="category_description">
                        <?php echo $this->category->category_description ; ?>
                     </div>
                     <?php endif; ?>
                  <?php } ?>
               
<?php } ?>
               
      <?php if ($this->search !==null ) { ?>
      
         <?php if (empty($this->products)) { ?>
            <h2><?php echo JText::_('COM_VIRTUEMART_NO_RESULT');?></h2>
         <?php } ?>
=========================================
==================================================================


[attachment cleanup by admin]

zorro lee

Have you tried to chat with template monster team on http://chat.template-help.com/ ? Im interested in VM modifications they did but I dont need template. I just need virtuemart modifications they did. :)

ivus

If you're using a theme the files should be under

/templates/your_template/html/com_virtuemart/category/default.php

avanti

Hi,

I deleted a line and it is resolved.
<?php echo $this->category->category_description ; ?>

but the file to edit is located here:
coomponents/com_virtuemart/vews/category/tmpl/default.php

Thanks much much