Pricedisplay: 100.00€ ( 119.00€ incl. Vat )?

  • Posts: 7
  • Thank you received: 0
12 years 6 months ago #49701

I've found the CSS files to set up the Priceformatting so far, but is it possible to have Prices w/o VAT as default and only display price incl. Vat in brackets afterwards or even below the main price and smaller?

like this:

500,00€

(595,00€ incl. VAT)

That format should be used in the whole shop (incl. Cart, shipping, category divs, etc.)

Kind regards,
Adrian.

(p.s. could the topic be moved to How-To? I thought i was in that category when creating this thread)

Last edit: 12 years 6 months ago by 4drian.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #49813

To do that, you will have to edit the file "listing_price" of the view "product" via the menu Display->Views and change the code there to what you want as there is not option for that.

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 1
12 years 6 months ago #49825

I have bought the Business Edition last week and was wondering about this too.

I'm not very well into PHP coding. Would it be possible to post a code snippet, that fits this format?

Would also be glad to see this as a core option for shops that maintain business customers.

Greetings,
Ralf.

Last edit: 12 years 6 months ago by R_Fey.

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
12 years 6 months ago #49882

Tried around a bit but didnt get the results I aimed for. Can calculation be messed up by edititing these views?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #49964

The calculations are done before that view file is called. So you won't mess the calculations.

What you want to do is to change the code:

if($this->params->get('price_with_tax')){
				echo $this->currencyHelper->format($price->price_value_with_tax,$price->price_currency_id);
			}
			if($this->params->get('price_with_tax')==2){
				echo JText::_('PRICE_BEFORE_TAX');
			}
			if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
				echo $this->currencyHelper->format($price->price_value,$price->price_currency_id);
			}
			if($this->params->get('price_with_tax')==2){
				echo JText::_('PRICE_AFTER_TAX');
			}
to:
if($this->params->get('price_with_tax')==2){
				echo JText::_('PRICE_BEFORE_TAX');
			}
			if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
				echo $this->currencyHelper->format($price->price_value,$price->price_currency_id);
			}
			if($this->params->get('price_with_tax')==2){
				echo JText::_('PRICE_AFTER_TAX');
			}
			if($this->params->get('price_with_tax')){
				echo $this->currencyHelper->format($price->price_value_with_tax,$price->price_currency_id);
			}
in that view file.
That will revert the taxed price and the untaxed price. Then, you can use CSS to style the display and translations override to change the brackets and the excl. tax text.

Last edit: 12 years 6 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 1
12 years 6 months ago #50154

Thank you very much. That did the trick.

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum