- Posts: 7
- Thank you received: 0
Pricedisplay: 100.00€ ( 119.00€ incl. Vat )?
14 years 4 months ago - 14 years 4 months ago #49701
by 4drian
Pricedisplay: 100.00€ ( 119.00€ incl. Vat )? was created 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:
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)
like this:
500,00€
(595,00€ incl. VAT)
(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.
14 years 4 months ago #49813
by nicolas
Replied by nicolas on topic Re: Pricedisplay: 100.00€ ( 119.00€ incl. Vat )?
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.
14 years 4 months ago - 14 years 4 months ago #49825
by R_Fey
Replied by R_Fey on topic Re: Pricedisplay: 100.00€ ( 119.00€ incl. Vat )?
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.
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.
14 years 4 months ago #49882
by 4drian
Replied by 4drian on topic Re: Pricedisplay: 100.00€ ( 119.00€ incl. Vat )?
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.
14 years 4 months ago - 14 years 4 months ago #49964
by nicolas
Replied by nicolas on topic Re: Pricedisplay: 100.00€ ( 119.00€ incl. Vat )?
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:
to:
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.
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');
}
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);
}
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.
14 years 4 months ago #50154
by R_Fey
Replied by R_Fey on topic Re: Pricedisplay: 100.00€ ( 119.00€ incl. Vat )?
Thank you very much. That did the trick.
Please Log in or Create an account to join the conversation.
Time to create page: 0.190 seconds