Skip to main content

change Price (price without tax) to ...

More
13 years 3 months ago #110500 by chocovo
Hello,

When somebody want to show twice prices, with and without tax Hikashop show... 50€ (40€ without tax).

How can I change it to 40€ (50€ with tax) ?

Thanks and regards

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

More
13 years 3 months ago - 13 years 3 months ago #110502 by Eliot
Hi there,

You have to edit the listing_price view in Display>Views and play aroud these lines:
Code:
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'); }

Just move the prices the way you cant and switch the translations (made with JText)
Last edit: 13 years 3 months ago by Eliot.
The following user(s) said Thank You: chocovo

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

More
13 years 3 months ago #110505 by chocovo
Just one question before try it?

Doing this edition, the price will change in all pages? listing, product, and checkout?

Thanks and regards.

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

More
13 years 3 months ago #110506 by Eliot
If you edit the view for product it will change for product page and listing.
But you can also made the modification for the checkout with the other listing_price view and in the cart with showcart.

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

More
13 years 3 months ago - 13 years 3 months ago #110514 by chocovo
Hello Eliot,

It is not so easy as it seems because I don't understand the code but I will try to obtain it...

I think I need to edit all the page because of discounts, and all other parameters in the page...

Thanks
Last edit: 13 years 3 months ago by chocovo.

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

More
13 years 3 months ago #110519 by Eliot
No problem, here is what you have to do:

Spot this code first:
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'); }

and change it to this:
Code:
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_BEFORE_TAX'); } 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_AFTER_TAX'); }

I basically just switched the two prices, you can refresh to see what it did ;). Then, you have to edit the translation. To do so, open your language file (in System>Configuration>languages) and spot this translation: PRICE_AFTER_TAX. You just have to change it to 'with tax)' and it should be ok.

Do not hesitate if you have any other question

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

Time to create page: 0.153 seconds
Powered by Kunena Forum