Jump to content

Undefined index


Recommended Posts

Hello, i got this notice that i would like to remove:

[Thu Feb 21 12:03:30.943027 2019] [fcgid:warn] [pid 612] [client 46.229.168.132:34272] mod_fcgid: stderr: PHP Notice:  Undefined index: orderprice in /var/www/clients/client1/web1/web/cache/smarty/compile/82/8e/1f/828e1f0d90c652fcd067fbf2f0f499cba85d5404.file.product-list.tpl.php on line 148

below the product-list.tpl code
 

{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

{if isset($products)}
	{if isset($number_p)}
		{assign var=numberperpage value=$number_p}
	{else}
		{assign var=numberperpage value=3}
	{/if}
	<ul id="product_list" class="clear {if isset($smarty.cookies.display_class)}{$smarty.cookies.display_class}{/if}">
	{foreach from=$products item=product name=products}
		
		{if !isset($grid_product) && isset($smarty.cookies.grid_product) }
			{assign var=grid_product value=$smarty.cookies.grid_product}
		{/if}
		{if !$numberperpage}
			{assign var=numberperpage value=$smarty.cookies.number_p}
		{/if}
		<li class="{if isset($grid_product) && $grid_product}{$grid_product}{else}grid_6{/if} ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % $numberperpage == 0}alpha clear{elseif ($smarty.foreach.products.index+1) % $numberperpage == 0}omega{/if} clearfix" data-animate="bounceIn" data-delay="0">
							<div class="p_content">
								<div class="image">
									<a href="{$product.link}" title="" class="product_image">
										<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'large_default')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" />
									</a>
									
									{*
									{if $product.specific_prices}										
											{if $product.specific_prices.reduction>0}
												{if $product.specific_prices.reduction_type == 'percentage'}
													<span class="on_sale">
														<span class="percen">-{$product.specific_prices.reduction*100}%</span>
													</span>
												{else}
													<span class="on_sale">
														<span class="amount">-{convertPrice price=$product.reduction}</span>
													</span>
												{/if}
											
										{/if}
									{else}
										{if $product.new==1}
											<span class="new"><span>{l s='new'}</span></span>
										{/if}
									{/if}
									*}
								</div>
								<div class="name_product">
									<h3>
									<a href="{$product.link}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:64:'...'|escape:'htmlall':'UTF-8'}</a>
									</h3>
								</div>
								{if isset($product.ratting) && $product.ratting>0}
								<p class="product_desc">{$product.description_short|strip_tags:'UTF-8'|truncate:30:'...'}</p>
								{else}
								<p class="product_desc">{$product.description_short|strip_tags:'UTF-8'|truncate:60:'...'}</p>
								{/if}
								
								{if isset($product.ratting) && $product.ratting>0}	
									<div class="star_content clearfix">
										{section name="i" start=0 loop=5 step=1}
											{if $product.ratting le $smarty.section.i.index}
												<div class="star"></div>
											{else}
												<div class="star star_on"></div>
											{/if}
										{/section}
									</div>
								{/if}
								
								<div class="content_price">
									{if $product.reduction}
										<span class="price old">{convertPrice price=$product.price_without_reduction}</span><span class="perc2">-{$product.specific_prices.reduction*100}%</span><br>
									{/if}

									{*
									{if $product.specific_prices.reduction_type == 'percentage'}
										<span class="on_sale">
											<span class="percen">-{$product.specific_prices.reduction*100}%</span>
										</span>
									{else}
										<span class="on_sale">
											<span class="amount">-{convertPrice price=$product.reduction}</span>
										</span>
									{/if}
									*}

									{if ($product.orderprice > $product.price_tax_exc) || ($product.old_price > $product.price_tax_exc)}
										<span id="old_price_display" class="linea">
											{if $product.orderprice}
												{convertPrice price=$product.orderprice}
											{else}
												{convertPrice price=$product.old_price}
											{/if}
										</span><br>
									{/if}

									{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
									<span class="price {if $product.reduction}{/if}">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>	
									{/if}
								</div>
								{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
									{if ($product.quantity > 0 OR $product.allow_oosp)}
									<a class="csbutton ajax_add_to_cart_button csdefault" rel="ajax_id_product_{$product.id_product|intval}"><span class="in_button">{l s='Add to cart'}</span></a>
									{else}
									<span class="csbutton cssecond">{l s='Out of stock'}</span>
									{/if}
									<a class="csbutton csssecondary" href="{$product.link}">{l s='See'}</a>
								{else}
									<div style="height:23px;"></div>
								{/if}
							
							</div></li>
	{/foreach}
	</ul>
	<!-- /Products list -->
{/if}

 

Link to comment
Share on other sites

{if ($product.orderprice > $product.price_tax_exc) || ($product.old_price > $product.price_tax_exc)}
<span id="old_price_display" class="linea">
	{if $product.orderprice}
	{convertPrice price=$product.orderprice}
	{else}
	{convertPrice price=$product.old_price}
	{/if}
</span><br>
{/if}

 

 

{if (isset($product.orderprice) && ($product.orderprice > $product.price_tax_exc)) || ($product.old_price > $product.price_tax_exc)}
<span id="old_price_display" class="linea">
	{if isset($product.orderprice) && $product.orderprice}
	{convertPrice price=$product.orderprice}
	{else}
	{convertPrice price=$product.old_price}
	{/if}
</span><br>
{/if}

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...