
08-08-2010, 08:10 AM
|
|
|
|
 eXpert
|
|
Join Date: Sep 2006
Posts: 310
|
|
|
product_prices.tpl for wholesale prices - won't edit
Hi, I've been trying to change the colors on the wholesale prices on the product pages, but I've come across something very strange - part of the code in customer/main/product_prices.tpl is outputting HTML, but the other part just doesn't seem to do anything.
My product_prices.tpl looks like this:
Code:
{*
$Id: product_prices.tpl,v 1.23.2.1 2010/02/25 11:15:18 aim Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
<div id="wl-prices"{if !$product_wholesale} style="display: none;"{/if}>
{if $product.taxes}
{capture name=taxdata}
{include file="customer/main/taxed_price.tpl" taxes=$product.taxes display_info="N"}
{/capture}
{/if}
<table cellspacing="1" summary="{$lng.lbl_wholesale_prices|escape}">
<tr class="head-row">
<th>{$lng.lbl_quantity}</th>
<th>{$lng.lbl_price}{if $smarty.capture.taxdata}*{/if}</th>
</tr>
{foreach from=$product_wholesale item=w name=wi}
<tr class="wholesale">
<td>
{strip}
{$w.quantity}{if $w.next_quantity eq 0}+{elseif $w.next_quantity ne $w.quantity}-{$w.next_quantity}{/if}
{$lng.lbl_item}{if $w.quantity > 1}s{/if}
{* COMMENTING OUT X-CART PLURAL CODE *}
{* {if $w.quantity eq "1"}
{$lng.lbl_item}
{else}
{$lng.lbl_items}
{/if} *}
{* COMMENTING OUT X-CART PLURAL CODE --->END *}
{/strip}
</td>
<td>{include file="currency.tpl" value=$w.taxed_price tag_id="wp`$smarty.foreach.wi.index`"}</td>
</tr>
{/foreach}
</table>
<div{if !$smarty.capture.taxdata} style="display: none;"{/if}>
<strong>*{$lng.txt_note}:</strong>{$smarty.capture.taxdata}
</div>
</div>
You can see that I thought I'd do an experiment to make the automatic insertion of 's' for plural items, a little shorter code-wise, but then I decided to add a class to the second table row, and use a descendant selector to modify the table cells. But it doesn't work. The class doesn't show up when I view the site in my browser, and check the source HTML.
But the code in the table header DOES work. If I insert the word 'test' as follows:
Code:
<tr class="head-row">
<th>{$lng.lbl_quantity}TEST</th>
<th>{$lng.lbl_price}{if $smarty.capture.taxdata}*{/if}TEST</th>
</tr>
it appears in the browser, but no matter what I do to the next table row (including completely commenting out all of the following piece of code), it still appears exactly the same!
Code:
{foreach from=$product_wholesale item=w name=wi}
<tr class="wholesale">
<td>
{strip}
{$w.quantity}{if $w.next_quantity eq 0}+{elseif $w.next_quantity ne $w.quantity}-{$w.next_quantity}{/if}
{$lng.lbl_item}{if $w.quantity > 1}s{/if}
{* COMMENTING OUT X-CART PLURAL CODE *}
{* {if $w.quantity eq "1"}
{$lng.lbl_item}
{else}
{$lng.lbl_items}
{/if} *}
{* COMMENTING OUT X-CART PLURAL CODE --->END *}
{/strip}
</td>
<td>{include file="currency.tpl" value=$w.taxed_price tag_id="wp`$smarty.foreach.wi.index`"}</td>
</tr>
{/foreach}
Even when I commented out all of that code, it still displays in the browser, but I can't work out how!
Does anybody have any ideas? It's hard enough trying to edit things, without them refusing to change after being edited!
You can see what it looks like on the product page for 'Test product' here:
http://www.mrdtrading.co.uk/store/home.php?shopkey=martin
Many thanks.
__________________
X-Cart Gold Version 4.3.2
|
|