Class=Price

Hi.



I was wondering how I can change the word “Price” to “wholesale Price” in LIST view (or other views)



I have used Languages to change “Price” to “wholesale Price” in a normal product view, but LIST view etc just has the dollar sign, no words.



I have searched through product_data.tpl , styles.css and stylesbase.css, price.tpl etc



The code that appears in firebug that may be a clue is:

$



So … can I somewhere add to the ‘$’ sign some extra words, or is the whole thing coded to use just the $?



Screen shots below.



Normal product (full) view





LIST View

Have a look in skins//customer/common_templates/product_data.tpl

Hi John :slight_smile:



Yep have been through that file, as shared above.



400 lines of text, no clear area when I can adjust the code to make the $ sign, include other words.



Too confusing :slight_smile:

Find where the $ sign is and add {lang.price_text} directly in front of it without any spaces.



Then go into Content/Languages and create a new vairable named price_text and put whatever you want it to read as there.



Flush your cache and you should see the results.

Thanks tbirnseth :slight_smile:



I understand what you are telling and it makes sense to do that!



But I can’t find a clear indication of the ‘$’ apart from at the very top - which I tried and nothing happened ( I cleared the cache to make sure) :slight_smile:



All other instances seem to have codes and lang. links with the ‘$’ in the ‘product_data.tpl’ file

in skins//common_templates/price.tpl you will find:


{if $settings.General.alternative_currency == "Y"}
{$value|format_price:$currencies.$primary_currency:$span_id:$class:false}{if $secondary_currency != $primary_currency} {if $class}{/if}({if $class}{/if}{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true:$is_integer}{if $class}{/if}){if $class}{/if}{/if}
{else}
{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true}
{/if}




I would modify it to read:


{if $settings.General.alternative_currency == "Y"}
{if $lang.price_text != '_price_text'}{$lang.price_text}{/if}{$value|format_price:$currencies.$primary_currency:$span_id:$class:false}{if $secondary_currency != $primary_currency} {if $class}{/if}({if $class}{/if}{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true:$is_integer}{if $class}{/if}){if $class}{/if}{/if}
{else}
{if $lang.price_text != '_price_text'}{$lang.price_text}{/if}{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true}
{/if}




Hope that helps…

That worked perfectly!! Thank you so much tbirnseth.



I wouldn’t of got that on my own, I understand the idea, but the detail eludes me :slight_smile:



Again thank you to so many of you who help us so often like this. It is genuinely appreciated!

LOL Wait … I spoke too soon :slight_smile: (joking)



I just checked a normal listing and if it has a discount it reads as …



Original price: Wholesale Price $48.00

: Wholesale Price $38.00

You save: Wholesale Price $10.00 (21%)



Not prefect but still I Prefer the words to show in the LIST VIEW

I have reset the price.tpl file to normal.



As the words ‘Wholesale Price’ appear everywhere many times and all through invoices, it looks messy.



But thank you for your help, I will ponder it and maybe look into altering just the VIEWS eg LIST View somehow.

I had CS Cart do an addon for me on version 2.0.12 to change the list price to be called “Price From £” and it took the lowest price from the qty discount table.

Maybe you or someone can pick the bones out of it and get what you are looking for.

attached below

If anyone converts it to 2.1.2 Id appreciate a copy.

[url]http://www.hivis.co.uk/t_price_alteration.tgz[/url]

Thanks

John

You can modify just the templates your’re interested in by doing something like the following. You would look for {lines like:


{assign var="price" value="price_`$obj_id`"}
{$smarty.capture.price}




And change them to:


assign var="price" value="price_`$obj_id`"}
{if $lang.price_text != '_price_text'}{$lang.price_text}{/if}{$smarty.capture.price}

I’ve saved the code and guidelines tbirnseth, I just haven’t had a spare moment to look into it yet.



But I wanted to thank you for your input again :slight_smile:

I was hoping to reply back and say it worked, but maybe next week!