change Price (price without tax) to ...

  • Posts: 38
  • Thank you received: 0
11 years 4 months ago #110500

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.

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #110502

Hi there,

You have to edit the listing_price view in Display>Views and play aroud these lines:

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: 11 years 4 months ago by Eliot.
The following user(s) said Thank You: chocovo

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

  • Posts: 38
  • Thank you received: 0
11 years 4 months ago #110505

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.

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #110506

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.

  • Posts: 38
  • Thank you received: 0
11 years 4 months ago #110514

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: 11 years 4 months ago by chocovo.

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

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #110519

No problem, here is what you have to do:

Spot this code first:

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:
			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.072 seconds
Powered by Kunena Forum