- Posts: 27
- Thank you received: 0
show Price with options incl and excl tax
- Christoph59
-
Topic Author
- Offline
Less
More
14 years 1 month ago #62020
by Christoph59
show Price with options incl and excl tax was created by Christoph59
Hi price with options is displayed with tax. How can I display both, price with option incl and excl tax. Thanks christoph
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62139
by nicolas
Replied by nicolas on topic Re: show Price with options incl and excl tax
Hi,
You would need to edit the file "option_price" via the menu Display->Views and change the line:
echo '<span class="hikashop_option_price_title">'.JText::_('PRICE_WITH_OPTIONS').':</span> <span class="hikashop_option_price_value">'.$currency->format($price, hikashop_getCurrency()).'</span>';
to:
echo '<span class="hikashop_option_price_title">'.JText::_('PRICE_WITH_OPTIONS').':</span> <span class="hikashop_option_price_value">'.$currency->format($price, hikashop_getCurrency()).' ('.$currency->format($currency->getUntaxedPrice($price,hikashop_getZone(),XXX,2), hikashop_getCurrency()).')</span>';
where XXX is the id of the tax category you're using in your products.
You would need to edit the file "option_price" via the menu Display->Views and change the line:
echo '<span class="hikashop_option_price_title">'.JText::_('PRICE_WITH_OPTIONS').':</span> <span class="hikashop_option_price_value">'.$currency->format($price, hikashop_getCurrency()).'</span>';
to:
echo '<span class="hikashop_option_price_title">'.JText::_('PRICE_WITH_OPTIONS').':</span> <span class="hikashop_option_price_value">'.$currency->format($price, hikashop_getCurrency()).' ('.$currency->format($currency->getUntaxedPrice($price,hikashop_getZone(),XXX,2), hikashop_getCurrency()).')</span>';
where XXX is the id of the tax category you're using in your products.
Please Log in or Create an account to join the conversation.
- Christoph59
-
Topic Author
- Offline
Less
More
- Posts: 27
- Thank you received: 0
14 years 1 month ago #62249
by Christoph59
Replied by Christoph59 on topic Re: show Price with options incl and excl tax
Hi Nicolas,
thanks for your quick reply.
Can´t find the code mentioned.My option_price.php includes the following code only:
<?php
if(!headers_sent()){
header('Content-Type: text/css; charset=utf-8');
}
$price = JRequest::getVar( 'price', 0 );
$currency = hikashop_get('class.currency');
echo JText::_('PRICE_AFTER_TAX').': '.$currency->format($price, hikashop_getCurrency());
exit;
I use Hikashop Business 1.5.8. - has this .php file been updated? I would prefer not to update (if there is one) as I want to launch my page in the next few days and there is a potential risk for errors as I changed alot of files (some of them not properly). Can you pls let me know what to do?
Thanks Christoph
thanks for your quick reply.
Can´t find the code mentioned.My option_price.php includes the following code only:
<?php
if(!headers_sent()){
header('Content-Type: text/css; charset=utf-8');
}
$price = JRequest::getVar( 'price', 0 );
$currency = hikashop_get('class.currency');
echo JText::_('PRICE_AFTER_TAX').': '.$currency->format($price, hikashop_getCurrency());
exit;
I use Hikashop Business 1.5.8. - has this .php file been updated? I would prefer not to update (if there is one) as I want to launch my page in the next few days and there is a potential risk for errors as I changed alot of files (some of them not properly). Can you pls let me know what to do?
Thanks Christoph
Please Log in or Create an account to join the conversation.
14 years 1 month ago - 14 years 1 month ago #62356
by nicolas
Replied by nicolas on topic Re: show Price with options incl and excl tax
Hi,
That file has been updated yes.
You should try to replace:
echo JText::_('PRICE_AFTER_TAX').': '.$currency->format($price, hikashop_getCurrency());
with:
echo JText::_('PRICE_AFTER_TAX').': '.$currency->format($price, hikashop_getCurrency()).' ('.$currency->format($currency->getUntaxedPrice($price,hikashop_getZone(),XXX,2), hikashop_getCurrency()).')';
That file has been updated yes.
You should try to replace:
echo JText::_('PRICE_AFTER_TAX').': '.$currency->format($price, hikashop_getCurrency());
with:
echo JText::_('PRICE_AFTER_TAX').': '.$currency->format($price, hikashop_getCurrency()).' ('.$currency->format($currency->getUntaxedPrice($price,hikashop_getZone(),XXX,2), hikashop_getCurrency()).')';
Last edit: 14 years 1 month ago by nicolas.
Please Log in or Create an account to join the conversation.
- Christoph59
-
Topic Author
- Offline
Less
More
- Posts: 27
- Thank you received: 0
14 years 1 month ago #62426
by Christoph59
Replied by Christoph59 on topic Re: show Price with options incl and excl tax
Hi Nicolas,
does not work. new code results in "undefined" instead of text+price - I used ID of tax category as per yr advise and tried tax zone as well but did not work.
christoph
does not work. new code results in "undefined" instead of text+price - I used ID of tax category as per yr advise and tried tax zone as well but did not work.
christoph
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62481
by nicolas
Replied by nicolas on topic Re: show Price with options incl and excl tax
Try like that instead:
echo JText::_('PRICE_AFTER_TAX').': '.$currency->format($price, hikashop_getCurrency()).' ('.$currency->format($currency->getUntaxedPrice($price,hikashop_getZone(),XXX,2), hikashop_getCurrency()).')';
echo JText::_('PRICE_AFTER_TAX').': '.$currency->format($price, hikashop_getCurrency()).' ('.$currency->format($currency->getUntaxedPrice($price,hikashop_getZone(),XXX,2), hikashop_getCurrency()).')';
Please Log in or Create an account to join the conversation.
- Christoph59
-
Topic Author
- Offline
Less
More
- Posts: 27
- Thank you received: 0
14 years 1 month ago #62685
by Christoph59
Replied by Christoph59 on topic Re: show Price with options incl and excl tax
Many thanks Nicolas , that works! To all visitors: you need to change the code via the views tab (as always mentioned in this forum) and Not in an external editor. I tried that as well and it crashes the layout of the complete website. Rg christoph
Please Log in or Create an account to join the conversation.
Time to create page: 0.181 seconds