Jump to content

[SOLVED] Cart layout for pricing


Recommended Posts

open file: shopping-cart-product-line.tpl

 

there is a code like:
 


             {if !$priceDisplay}
<span class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}">{convertPrice price=$product.price_wt}</span>
{else}
                  <span class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}">{convertPrice price=$product.price}</span>
{/if}
{if isset($product.is_discounted) && $product.is_discounted}
                 <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}

change it to:

                {if isset($product.is_discounted) && $product.is_discounted}
                <span class="old-price">{convertPrice price=$product.price_without_specific_price}</span>
                {/if}
            	{if !$priceDisplay}
					<span class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}">{convertPrice price=$product.price_wt}</span>
				{else}
               	 	<span class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}">{convertPrice price=$product.price}</span>
				{/if}
				{if isset($product.is_discounted) && $product.is_discounted}
                	<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>
				{/if}
Link to comment
Share on other sites

×
×
  • Create New...