Jump to content
  • 0

rabat 0% w koszyku


utrlok

Question

Myślę, że załącznik najlepiej wyjaśni mój problem. Żaden produkt nie jest przeceniony. Problem występuje tylko w koszyku.

 

shopping-cart-product-line.tpl:

{if isset($product.is_discounted) && $product.is_discounted && $product.price_wt != $product.price_without_specific_price}
                	<span class="price-percent-reduction small">
            			{if !$priceDisplay}
            				{if isset($product.reduction_type) && $product.reduction_type == 'amount'}
                    			{assign var='priceReduction' value=($product.price_wt - $product.price_without_specific_price)}
                    			{assign var='symbol' value=$currency->sign}
                    		{else}
                    			{assign var='priceReduction' value=(($product.price_without_specific_price - $product.price_wt)/$product.price_without_specific_price) * 100 * -1}
                    			{assign var='symbol' value='%'}
                    		{/if}
						{else}
							{if isset($product.reduction_type) && $product.reduction_type == 'amount'}
								{assign var='priceReduction' value=($product.price - $product.price_without_specific_price)}
								{assign var='symbol' value=$currency->sign}
                    		{else}
                    			{assign var='priceReduction' value=(($product.price_without_specific_price - $product.price)/$product.price_without_specific_price) * 100 * -1}
                    			{assign var='symbol' value='%'}
                    		{/if}
						{/if}
						{if $symbol == '%'}
							 {$priceReduction|round|string_format:"%d"}{$symbol} 
						{else}
							 {$priceReduction|string_format:"%.2f"}{$symbol} 
						{/if}
                    </span>
					<span class="old-price">{convertPrice price=$product.price_without_specific_price}</span>
				{/if}

Na szybko poprawiłem to w dość prymitywny sposób w linii 47 

&& $product.price_wt != $product.price_without_specific_price

post-871242-0-28783100-1439811538_thumb.png

Edited by utrlok (see edit history)
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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...