Skip to main content

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

More
14 years 4 months ago - 14 years 4 months ago #49701 by 4drian
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: 14 years 4 months ago by 4drian.

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

More
14 years 4 months ago #49813 by nicolas
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.

More
14 years 4 months ago - 14 years 4 months ago #49825 by R_Fey
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: 14 years 4 months ago by R_Fey.

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

More
14 years 4 months ago #49882 by 4drian
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.

More
14 years 4 months ago - 14 years 4 months ago #49964 by nicolas
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:
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:
Code:
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: 14 years 4 months ago by nicolas.

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

More
14 years 4 months ago #50154 by R_Fey
Thank you very much. That did the trick.

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

Time to create page: 0.169 seconds
Powered by Kunena Forum