Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Product Price Dispay Change... Rate Topic   - - - - -

 
  • impactreact
  • Senior Member
  • Members
  • Join Date: 10-Jan 10
  • 139 posts

Posted 10 March 2010 - 11:46 AM #1

Hi everyone,

A simple question....

This product http://www.impactrea...83-x-53-mm.html 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

 
  • indy0077
  • Senior Member
  • Banned
  • Join Date: 03-Nov 09
  • 1431 posts

Posted 10 March 2010 - 06:18 PM #2

Hi everyone,

A simple question....

This product http://www.impactrea...83-x-53-mm.html 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

You can switch to "Design mode" in your admin panel, then you will be able to change the code in the template file.
.
CS-Cart Professional €160.00 | CS-Cart Multi-Vendor €625.00 | CS-Cart Hosting | SSL Certificates
.
CS-Cart Optimized Servers *** USA & UK VPS Servers

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 10 March 2010 - 09:56 PM #3

I have not tested this - you are likely to run into a few issues but it should get you started.
*** backup the templates before making changes ***.

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}<p>{/if}
				{assign var="price" value="price_`$obj_id`"}
				{$smarty.capture.$price}
		{if !$smarty.capture.$old_price|trim || $details_page}</p>{/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}
					<span class="list-price" id="line_product_price_{$obj_id}">({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])</span>
				{elseif $product.clean_price != $product.taxed_price && !$product.included_tax}
					<span class="list-price">({$lang.including_tax})</span>
				{/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")}
				<span class="price{if !$product.price|floatval} hidden{/if}" id="line_discounted_price_{$obj_id}">{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]</span>
			{elseif $product.zero_price_action == "A"}
				<span class="price">{$lang.enter_your_price}: <input class="input-text-short" type="text" size="3" name="product_data[{$obj_id}][price]" value="" /></span>
			{elseif $product.zero_price_action == "R"}
				<span class="price">{$lang.contact_us_for_price}</span>
			{/if}
		{/capture}
	{/hook}
	{/if}

Bob
CS-Cart 2.0.14 (testing)

 
  • impactreact
  • Senior Member
  • Members
  • Join Date: 10-Jan 10
  • 139 posts

Posted 11 March 2010 - 09:50 AM #4

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?

http://www.impactrea....uk/labelshop2/
http://www.impactrea...2/material.html

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

Thanks again for your help!!

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 11 March 2010 - 06:38 PM #5

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
CS-Cart 2.0.14 (testing)

 
  • impactreact
  • Senior Member
  • Members
  • Join Date: 10-Jan 10
  • 139 posts

Posted 12 March 2010 - 02:52 PM #6

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

 
  • impactreact
  • Senior Member
  • Members
  • Join Date: 10-Jan 10
  • 139 posts

Posted 12 March 2010 - 08:25 PM #7

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

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 12 March 2010 - 08:43 PM #8

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
CS-Cart 2.0.14 (testing)

 
  • impactreact
  • Senior Member
  • Members
  • Join Date: 10-Jan 10
  • 139 posts

Posted 12 March 2010 - 09:02 PM #9

thanks jobosales, it has worked .... you're star.

Can you please advise me about this?

http://forum.cs-cart...ead.php?t=16178

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

Thanks.

 
  • atsaloux
  • Junior Member
  • Members
  • Join Date: 26-Mar 10
  • 3 posts

Posted 26 March 2010 - 11:21 AM #10

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


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 :)

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 26 March 2010 - 06:00 PM #11

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

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
CS-Cart 2.0.14 (testing)

 
  • pvein
  • Member
  • Members
  • Join Date: 27-Apr 09
  • 98 posts

Posted 19 March 2014 - 04:42 PM #12

anyone got this one working in V4?