Product Price Dispay Change...

Hi everyone,



A simple question…



This product [url]http://www.impactreact.co.uk/labelshop2/25-sheets-10-labels-per-sheet-83-x-53-mm.html[/url] shows price like this,



Price: £5.00

(£5.88 including VAT)



Can I show in the following layout?



Price: £5.88

(£5.00 ex. VAT)



OR



Price: £5.88 Inc. VAT

(£5.00 ex. VAT)



I will apprecaite all inputs…



Thanks

IR

[quote name=‘impactreact’]Hi everyone,



A simple question…



This product [URL]http://www.impactreact.co.uk/labelshop2/25-sheets-10-labels-per-sheet-83-x-53-mm.html[/URL] shows price like this,



Price: £5.00

(£5.88 including VAT)



Can I show in the following layout?



Price: £5.88

(£5.00 ex. VAT)



OR



Price: £5.88 Inc. VAT

(£5.00 ex. VAT)



I will apprecaite all inputs…



Thanks

IR[/quote]

You can switch to “Design mode” in your admin panel, then you will be able to change the code in the template file.

I have not tested this - you are likely to run into a few issues but it should get you started.

[COLOR=“Red”]*** backup the templates before making changes ***[/COLOR].



This will require changes in a couple of templates.



To change the order the prices are displayed, in /skins/YOURSKIN/customer/blocks/list_templates/simple_list.tpl, reverse the order of the two blocks of code:

[COLOR="Red"] {if !$smarty.capture.$old_price|trim || $details_page}

{/if}
{assign var="price" value="price_`$obj_id`"}
{$smarty.capture.$price}
{if !$smarty.capture.$old_price|trim || $details_page}

{/if}[/COLOR]

[COLOR="Blue"]{if $show_old_price || $show_clean_price || $show_list_discount}
{assign var="clean_price" value="clean_price_`$obj_id`"}
{$smarty.capture.$clean_price}

{assign var="list_discount" value="list_discount_`$obj_id`"}
{$smarty.capture.$list_discount}[/COLOR]




You will then need to adjust your CSS to account for these changes.



To change the “inc tax” to “inc VAT”, search for ‘inc_tax’ and change the value to “inc VAT”. If you prefer to remove this, remove the bit in red in /skins/YOURSKIN/customer/common_templates/product_data.tpl:

{******************* Clean Price ******************}
{if $show_clean_price}
{capture name="clean_price_`$obj_id`"}
{if $settings.Appearance.show_prices_taxed_clean == "Y" && $product.taxed_price}
{if $product.clean_price != $product.taxed_price && $product.included_tax}
({include file="common_templates/price.tpl" value=$product.taxed_price span_id="product_price_`$obj_id`" class="list-price"} [B][COLOR="Red"]{$lang.inc_tax}[/COLOR][/B])
{elseif $product.clean_price != $product.taxed_price && !$product.included_tax}
({$lang.including_tax})
{/if}
{/if}
{/capture}
{/if}




To add “exc VAT”, first create a new language variable called ‘exc_tax’ with a value of “exc VAT” in Content_languages.



Then add the bit in red in /skins/YOURSKIN/customer/common_templates/product_data.tpl:

{********************** Price *********************}
{if $show_price}
{hook name="products:prices_block"}
{capture name="price_`$obj_id`"}
{if $product.price|floatval || $product.zero_price_action == "P" || ($hide_add_to_cart_button == "Y" && $product.zero_price_action == "A")}
{if $details_page}{$lang.price}: {/if}{include file="common_templates/price.tpl" value=$product.price span_id="discounted_price_`$obj_id`" class="price"}[B][COLOR="red"]{$lang.exc_tax}[/COLOR][/B]
{elseif $product.zero_price_action == "A"}
{$lang.enter_your_price}:
{elseif $product.zero_price_action == "R"}
{$lang.contact_us_for_price}
{/if}
{/capture}
{/hook}
{/if}




Bob

Ok I admit indy0077 is a Guru and jobosales is a star, you guys have dragged me back on cs cart again … ! I have never seen that level of support anywhere…!



I have successfully made changes (not bother about css yet) on product detail page, can i do same on following pages?



[url]http://www.impactreact.co.uk/labelshop2/[/url]

[url]http://www.impactreact.co.uk/labelshop2/material.html[/url]



Please suggest which tpl/css files i need to edit to get this working???



Thanks again for your help!!

For your category lists, you will need to mod the appropriate TPL in /skins/YOURSKIN/customer/blocks/list_templates. For instance, when ‘View as’ is set to “List”, you need to modify /skins/YOURSKIN/customer/blocks/list_templates/products_list.tpl. If it is set to one of the grid layouts, you would modify that template in the same directory. You can suss out the proper layout for the category lists by reviewing the TPLs in /skins/YOURSKIN/customer/views/categories/custom_templates - they contain an include to the file that does that actual layout.



For your product blocks (e.g., Featured), you will need to change the appropriate TPL in /skins/YOURSKIN/customer/blocks. You can determine which file to change by checking the ‘Appearance type’ set for that bock in Design->Blocks.



Bob

jobosales … I am going to try this now… will let you know the outcome!! Thanks

It has worked for List and Grid options however I can’t get it working for “compact list” … I’m trying to replace following code



{assign var=“price” value=“price_$obj_id”}

{$smarty.capture.$price}



with this one…



{assign var=“clean_price” value=“clean_price_$obj_id”} {$smarty.capture.$clean_price}



I believe “clean_price” means inc. tax and “price” means ex.tax or no tax …



Please suggest … thanks

I think this should work. In /skins/YOURSKIN/customer/views/categories/custom_templates/short_list.tpl, add the following:

show_clean_price=true



The TPLs in /skins/YOURSKIN/customer/views/categories/custom_templates contain the ‘switches’ to turn display of items on or off.



Bob

thanks jobosales, it has worked … you’re star.



Can you please advise me about this?



[url]http://forum.cs-cart.com/showthread.php?t=16178[/url]



I’m trying to show ex.vat prices in shopping cart and checkout!!



Thanks.

[quote name=‘jobosales’]I think this should work. In /skins/YOURSKIN/customer/views/categories/custom_templates/short_list.tpl, add the following:

show_clean_price=true



The TPLs in /skins/YOURSKIN/customer/views/categories/custom_templates contain the ‘switches’ to turn display of items on or off.



Bob[/QUOTE]



Hello everyone and thanks for great support.

It’s my first post in here and i’d like to ask …



If someone makes the change you suppose what will happen after an upgrade?

I’m trying to hide old_price from categories listing but i cant decide which is the best way …



Thanks in advance :slight_smile:

[quote name=‘atsaloux’]If someone makes the change you suppose what will happen after an upgrade?

I’m trying to hide old_price from categories listing but i cant decide which is the best way …

[/QUOTE]

There are no hooks in the short_list.tpl so you would have to manually apply the change if the upgrade included a new short_list.tpl. If the file is upgraded, you should see the discrepancy in the final process of the upgrade where you can review the differences making it fairly easy to reapply your changes.



Bob

anyone got this one working in V4?