- Posts: 4
- Thank you received: 0
Do not display Base Currency on Product Listing
- wooservers
-
Topic Author
- Offline
Less
More
8 years 4 months ago #294698
by wooservers
Do not display Base Currency on Product Listing was created by wooservers
-- HikaShop version -- : 3.4.1
-- Joomla version -- : 3.8.1
-- PHP version -- : 7.1
We would like to show products only in their own Currency and hide Base Currency on Product Listing.
There is a very old discussion about modifying code in Views >> Product Listing.
However, the code now is different and old patch can not be used.
Can you advise how to modify the code so that only product's own currency is shown both on Product Listing and Checkout?
www.hikashop.com/forum/checkout/866056-d...eir-currency-of.html
-- Joomla version -- : 3.8.1
-- PHP version -- : 7.1
We would like to show products only in their own Currency and hide Base Currency on Product Listing.
There is a very old discussion about modifying code in Views >> Product Listing.
However, the code now is different and old patch can not be used.
Can you advise how to modify the code so that only product's own currency is shown both on Product Listing and Checkout?
www.hikashop.com/forum/checkout/866056-d...eir-currency-of.html
Please Log in or Create an account to join the conversation.
8 years 4 months ago #294743
by nicolas
Replied by nicolas on topic Do not display Base Currency on Product Listing
Hi,
The piece of code mentioned on that other thread is still the exact same in product / listing_price.php:
so I don't see why the patch couldn't be used anymore. Did you get an error when you tried ? Which one ?
The piece of code mentioned on that other thread is still the exact same in product / listing_price.php:
Code:
if($this->params->get('price_with_tax')){
echo $this->currencyHelper->format($price->price_value_without_discount_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_without_discount,$price->price_currency_id);
}
if($this->params->get('price_with_tax') == 2) {
echo JText::_('PRICE_AFTER_TAX');
}
if($this->params->get('show_original_price') && !empty($price->price_orig_value_without_discount_with_tax)){
echo JText::_('PRICE_BEFORE_ORIG');
if($this->params->get('price_with_tax')) {
echo $this->currencyHelper->format($price->price_orig_value_without_discount_with_tax,$price->price_orig_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') && !empty($price->price_orig_value_without_discount)) {
echo $this->currencyHelper->format($price->price_orig_value_without_discount,$price->price_orig_currency_id);
}
if($this->params->get('price_with_tax') == 2) {
echo JText::_('PRICE_AFTER_TAX');
}
echo JText::_('PRICE_AFTER_ORIG');
}
Please Log in or Create an account to join the conversation.
- wooservers
-
Topic Author
- Offline
Less
More
- Posts: 4
- Thank you received: 0
8 years 4 months ago #294776
by wooservers
Replied by wooservers on topic Do not display Base Currency on Product Listing
and if we create a Module for "Product Listing" to be used with HikaMarket Vendor List, we also use "listing_price.php" or some other file?
sethealth.ru/список-продавцов/vendor/show/6-linda-cakes
here it shows Base currency "1 300 Баллов" and then in brackets the currency that we want to display: (1 300,00 РУБ)
sethealth.ru/список-продавцов/vendor/show/6-linda-cakes
here it shows Base currency "1 300 Баллов" and then in brackets the currency that we want to display: (1 300,00 РУБ)
Please Log in or Create an account to join the conversation.
8 years 4 months ago #294785
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Do not display Base Currency on Product Listing
Hello,
The product listing module under the vendor page is still a product listing.
If you create a menu or a module for a product listing, it will use the same HikaShop content. The place where you place the module doesn't matter but the module/menu settings do.
Regards,
The product listing module under the vendor page is still a product listing.
If you create a menu or a module for a product listing, it will use the same HikaShop content. The place where you place the module doesn't matter but the module/menu settings do.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- wooservers
-
Topic Author
- Offline
Less
More
- Posts: 4
- Thank you received: 0
8 years 4 months ago #294959
by wooservers
Replied by wooservers on topic Do not display Base Currency on Product Listing
but why replacing code doesn't help then?
Please Log in or Create an account to join the conversation.
8 years 4 months ago #294980
by nicolas
Replied by nicolas on topic Do not display Base Currency on Product Listing
Hi,
So do you mean that it works fine for other products listings and not for that products listing on the vendor page ?
I suppose that it doesn't work anymore because probably the modification you're doing is not the one you want to do.
For what you want, you need to change the code:
to:
Please note however that such customization is outside of the support we're supposed to provide. We can give hints but it's up to you to do such code modifications or hire someone to help you with them.
So do you mean that it works fine for other products listings and not for that products listing on the vendor page ?
I suppose that it doesn't work anymore because probably the modification you're doing is not the one you want to do.
For what you want, you need 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');
}
if($this->params->get('show_original_price') && !empty($price->price_orig_value)){
echo JText::_('PRICE_BEFORE_ORIG');
if($this->params->get('price_with_tax')){
echo $this->currencyHelper->format($price->price_orig_value_with_tax,$price->price_orig_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_orig_value,$price->price_orig_currency_id);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_AFTER_TAX');
}
echo JText::_('PRICE_AFTER_ORIG');
}
Code:
if(empty($price->price_orig_value)){
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');
}
} else {
if($this->params->get('price_with_tax')){
echo $this->currencyHelper->format($price->price_orig_value_with_tax,$price->price_orig_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_orig_value,$price->price_orig_currency_id);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_AFTER_TAX');
}
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.058 seconds