Post by jimaras » Fri Feb 10, 2012 6:30 am

Hi,
In system->error logs i have this:

Code: Select all

PHP Notice:  Undefined variable: product in /usr/www/users/***/e-kreopoleio.com/vqmod/vqcache/vq2-catalog_view_theme_default_template_product_product.tpl on line 271
PHP Notice:  Undefined variable: product in /usr/www/users/***/e-kreopoleio.com/vqmod/vqcache/vq2-catalog_view_theme_default_template_product_product.tpl on line 272
Can someone tells me how to fix it?

In product.tpl 271,272:

Code: Select all

 </div>
  <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a>
Last edited by jimaras on Sat Feb 11, 2012 5:29 am, edited 1 time in total.

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by victorj » Fri Feb 10, 2012 6:58 am

install vqmod manager and deinstall the add on that creates the error.
When you post add the add on you installed so we know where to look

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Eigen productie en snelle levering.
https://123-deurrubbers.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by straightlight » Fri Feb 10, 2012 7:19 am

The generated error does not come from product.tpl file but rather from vqcache/vq2-catalog_view_theme_default_template_product_product.tpl file. Would it be possible to post between line 265 and line 275 ? Looks like the associated product object is not validated momentarily.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by jimaras » Sat Feb 11, 2012 5:12 am

straightlight wrote:The generated error does not come from product.tpl file but rather from vqcache/vq2-catalog_view_theme_default_template_product_product.tpl file. Would it be possible to post between line 265 and line 275 ? Looks like the associated product object is not validated momentarily.
lines 254-285

Code: Select all

<!-- AddThis Button END -->
		   <div><!--code start-->
		  <?php if ($price) { ?>
		  <?php if (!$sold_out) { ?>	
		  <?php echo $text_qty; ?>
		 <?php echo $qtydescription; ?>
          <input type="text" name="quantity" size="4" value="<?php echo $minimum; ?>" />
          <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
          &nbsp;<a id="button-cart" class="button"><span><?php echo $button_cart; ?></span></a>
		  <?php } else { ?>
		  <a id="button-cart" class="button"><span><?php echo $button_soldout; ?></span></a>
		  <?php } ?>
		  <?php } else { ?>
		  <a id="button-cart" class="button"><span><?php echo $button_callforprice; ?></span></a>
		  <?php } ?>
		  <!--code end--></div>
        <div><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $text_or; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
      <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/default/image/wish_icon.png" title="<?php echo $button_wishlist; ?>" border="0" alt="" /></a></div> <div>&nbsp;&nbsp;&nbsp;</div>
      <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/default/image/compare_icon.png" title="<?php echo $button_compare; ?>" border="0" alt="" /></a></div>
        <?php if ($minimum > 1) { ?>
        <div class="minimum"><?php echo $text_minimum; ?></div>
        <?php } ?>
      </div>
      <?php if ($review_status) { ?>
      <div class="review">
        <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />&nbsp;&nbsp;<a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div>
        <div class="share">
        </div>
      </div>
      <?php } ?>
    </div>
  </div>
lines 271-272 are

Code: Select all

      <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/default/image/wish_icon.png" title="<?php echo $button_wishlist; ?>" border="0" alt="" /></a></div> <div>&nbsp;&nbsp;&nbsp;</div>
      <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/default/image/compare_icon.png" title="<?php echo $button_compare; ?>" border="0" alt="" /></a></div>

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by straightlight » Sat Feb 11, 2012 5:23 am

Obviously, the position where the $product object is called in the template cannot be found since the $product_info array from the controller is what is rather used.

How about changing this part:

Code: Select all

<div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/default/image/wish_icon.png" title="<?php echo $button_wishlist; ?>" border="0" alt="" /></a></div> <div>&nbsp;&nbsp;&nbsp;</div>
      <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/default/image/compare_icon.png" title="<?php echo $button_compare; ?>" border="0" alt="" /></a></div>
into:

Code: Select all

<div class="wishlist"><a onclick="addToWishList('<?php echo $product_id; ?>');"><img src="catalog/view/theme/default/image/wish_icon.png" title="<?php echo $button_wishlist; ?>" border="0" alt="" /></a></div> <div>&nbsp;&nbsp;&nbsp;</div>
      <div class="compare"><a onclick="addToCompare('<?php echo $product_id; ?>');"><img src="catalog/view/theme/default/image/compare_icon.png" title="<?php echo $button_compare; ?>" border="0" alt="" /></a></div>

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by jimaras » Sat Feb 11, 2012 5:29 am

straightlight wrote:Obviously, the position where the $product object is called in the template cannot be found since the $product_info array from the controller is what is rather used.

How about changing this part:

Code: Select all

<div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/default/image/wish_icon.png" title="<?php echo $button_wishlist; ?>" border="0" alt="" /></a></div> <div>&nbsp;&nbsp;&nbsp;</div>
      <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><img src="catalog/view/theme/default/image/compare_icon.png" title="<?php echo $button_compare; ?>" border="0" alt="" /></a></div>
into:

Code: Select all

<div class="wishlist"><a onclick="addToWishList('<?php echo $product_id; ?>');"><img src="catalog/view/theme/default/image/wish_icon.png" title="<?php echo $button_wishlist; ?>" border="0" alt="" /></a></div> <div>&nbsp;&nbsp;&nbsp;</div>
      <div class="compare"><a onclick="addToCompare('<?php echo $product_id; ?>');"><img src="catalog/view/theme/default/image/compare_icon.png" title="<?php echo $button_compare; ?>" border="0" alt="" /></a></div>

You are right!
Thank you very much!

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am
Who is online

Users browsing this forum: No registered users and 35 guests