Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello, I migrate my website in other host, after migrate i have o problem up my category table. Problem write: Notice: Undefined variable: position in /home/zuklezve/public_html/vqmod/vqcache/vq2-catalog_view_theme_theme_free_template_module_category.tpl on line 1Notice: Undefined variable: position in /home/zuklezve/public_html/vqmod/vqcache/vq2-catalog_view_theme_theme_free_template_module_category.tpl on line 1

vq2-catalog_view_theme_theme_free_template_module_category.tpl

XML
<?php if ($position == 'content_top'  or $position == 'content_bottom') { ?>
<div class="box">
  <div class="box-heading"><?php echo $heading_title; ?></div>
  <div class="box-content">
    <div class="box-product">
      <?php foreach ($categories as $category) { ?>
        <div>
                  <?php if ($category['thumb']) { ?>
                <div class="image" style="text-align: center">
                    <a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a>
                </div>
          <?php } ?>
                <div style="text-align: center"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div>
        </div>
      <?php } ?>
    </div>
  </div>
</div>
<?php } else { ?>
<script type="text/javascript">
    $(document).ready(function(){
       $(".act-cat").toggle(
                function() {
                     $(this).next('.level-2-cat').slideToggle("slow"),{
                        duration: 'slow',
                        easing: 'easeOutBounce'
                    };
                },
                function() {
                     $(this).next('.level-2-cat').slideToggle("slow"),{
                        duration: 'slow',
                        easing: 'easeOutBounce'
                    };
                }
            );
        $('.box-category li').last().addClass('last');

    });

</script>

<div class="box category">
  <div class="box-heading"><?php echo $heading_title; ?></div>
  <div class="box-content">

    <div class="box-category">
      <ul>
        <?php foreach ($categories as $category) { ?>
        <?php if ($category['category_id'] == $category_id) { ?>
        <li class="active">
        <?php } else { ?>
        <li>
        <?php } ?>
          <?php if ($category['category_id'] == $category_id) { ?>
          <a href="<?php echo $category['href']; ?>" class="active"><?php echo $category['name']; ?></a>
          <?php } else { ?>
          <a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
          <?php } ?>
          <?php if ($category['children']) { ?><span  class="act-cat"></span>
          <ul class="level-2-cat">
            <?php foreach ($category['children'] as $child) { ?>
            <?php if ($child['category_id'] == $child_id) { ?>
            <li class="active">
            <?php } else { ?>
            <li>
            <?php } ?>
              <?php if ($child['category_id'] == $child_id) { ?>
              <a href="<?php echo $child['href']; ?>" class="active"><?php echo $child['name']; ?></a>
              <?php } else { ?>
              <a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a>
              <?php } ?>
            </li>
            <?php } ?>
          </ul>
          <?php } ?>
        </li>
        <?php } ?>
      </ul>
    </div>
  </div>
</div>
<?php } ?>
Posted
Comments
Sergey Alexandrovich Kryukov 10-Feb-15 12:37pm    
You cannot "repair" something which is not defined. Define it. This is your code; you are the one who is supposed to know what this variable should do.
—SA
W Balboos, GHB 10-Feb-15 14:45pm    
Your php statements (conditionsals) - what exactly are they supposed to be doing?
E.g.; line 1:
<?php if ($position == 'content_top' or $position == 'content_bottom') { ?>

It's certainly not controlling the HTML that follows it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900