Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

[Solved] Only the price without VAT appears in the mod_sj_hk_listing_tabs module !!!
(1 viewing) (1) Guest
User guides, update and bug fixes
  • Page:
  • 1

TOPIC: [Solved] Only the price without VAT appears in the mod_sj_hk_listing_tabs module !!!

[Solved] Only the price without VAT appears in the mod_sj_hk_listing_tabs module !!! 9 years, 7 months ago #20566

Hello there,

I have a very big problem with the mod_sj_hk_listing_tabs module in the SJ Kampe template.

Only the price without VAT appears in the mod_sj_hk_listing_tabs module but I absolutely need the price with VAT and without VAT are displayed together.

Here's an example of what I realy need:



But here's what I get with the default mod_sj_hk_listing_tabs module until now:



I think that the problem comes from this section of code in the file at \modules\mod_sj_hk_listing_tabs\tmpl\default_items.php (line 81) :

<?php if ((int)$params->get('item_prices_display', 1) && !empty($item->_price)) { ?>
<div class="acd-prices">
<span class="acd-price">
<?php echo $item->_price; ?>
</span>

or from this section of code in the file at \templates\sj_kampe\html\mod_sj_hk_listing_tabs\default_items.php (line 82) :

<?php if ((int)$params->get('item_prices_display', 1) && !empty($item->_price)) { ?>
<div class="acd-prices">
<span class="acd-price">
<?php echo $item->_price; ?>
</span>


But i don't know what must be changed...

I want to clarify that I have set taxes in Hikashop without any worries. Indeed, elsewhere (other modules, checkout of Hikashop), prices with and without VAT are displayed perfectly together.

Can you help me please? It's really urgent, I have to deploy the website tonight at the latest.

Thank you for the help provided in advance.

Best regards.
Last Edit: 9 years, 7 months ago by Dragon.
The topic has been locked.

Re: Only the price without VAT appears in the mod_sj_hk_listing_tabs module !!! 9 years, 7 months ago #20575

Could you help me please ?

Best regards.
The topic has been locked.

Re: Only the price without VAT appears in the mod_sj_hk_listing_tabs module !!! 9 years, 7 months ago #20576

  • SA Thuy
Dear David DESTOMBES,

Please go to the file: modules\mod_sj_hk_listing_tabs\core\helper.php and find:

private static function _processPrice($item)
	{
		$_price = '';
		$currencyHelper = hikashop_get('class.currency');
		$config = hikashop_config();
		if (empty($item->prices)) {
			$_price .= JText::_('FREE_PRICE');
		} else {
			foreach ($item->prices as $price) {
				$_price .= $currencyHelper->format($price->price_value, $price->price_currency_id);
			}
		}
		return $_price;
	}

=> Edit to:
private static function _processPrice($item)
	{
		$_price=null;
		$currencyHelper = hikashop_get('class.currency');
		$config = hikashop_config();
		if (empty($item->prices)) {
			$_price [0]= JText::_('FREE_PRICE');
		} else {
			foreach ($item->prices as $price) {
				$_price[0]= $currencyHelper->format($price->price_value, $price->price_currency_id);
				$_price[1]= $currencyHelper->format($price->price_value_with_tax, $price->price_currency_id);
			}
		}
		return $_price;
	}

Find:
$item->_price = self::_processPrice($item);

=> Edit to:
$prices=self::_processPrice($item);
$item->_price = $prices[0];
$item->_price_with_tax=$prices[1];


Then go to file: \templates\sj_kampe\html\mod_sj_hk_listing_tabs\default_items.php and find:
<div class="acd-prices">
										<span class="acd-price">
											<?php echo $item->_price; ?>
											
										</span>
								<?php if ((int)$params->get('item_per_unit_display', 1)) { ?>
									<span class="acd-per-unit">
											<?php echo JText::_('PER_UNIT'); ?>
										</span>
								<?php } ?>	
</div>

=> Edit to:
<div class="acd-prices">
										<span class="acd-price">
											<?php echo $item->_price; ?>
											
										</span>
								<?php if ((int)$params->get('item_per_unit_display', 1)) { ?>
									<span class="acd-per-unit">
											<?php echo JText::_('PER_UNIT'); ?>
										</span>
								<?php } ?>	
                                        <span class="acd-price">
											<?php echo " (".$item->_price_with_tax.")"; ?>
											
										</span>										
							</div>


Thanks
The topic has been locked.

Re: Only the price without VAT appears in the mod_sj_hk_listing_tabs module !!! 9 years, 7 months ago #20578

Thank you very much for your help !
The topic has been locked.
  • Page:
  • 1
Time to create page: 0.28 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes