Shows Cost with shipping even though shipping is hidden

  • Posts: 63
  • Thank you received: 1
  • Hikashop Business
5 years 8 months ago #296728

-- Joomla version -- : 3.8.11
-- PHP version -- : 7.0

Hello,

In the Hikashop Cart Module, we have it configured as:

www.dropbox.com/s/dsmic758u2da8da/Screen...%2015.43.51.png?dl=0

As you can see coupon = yes, but shipping = no, price is calculated with shipping always event though shipping isn't shown and it looks like:
www.dropbox.com/s/yleidua0lnwb1ys/Screen...%2015.46.06.png?dl=0 , if I disable coupon the calculation is correct.

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

  • Posts: 12953
  • Thank you received: 1778
5 years 8 months ago #296733

Hello,

A solution can eventually be to directly edit the code of the "Cart" file of the "Product" view of your front-end template via "Hikashop->Display->Views" and change these lines :

<td class="hikashop_cart_module_product_total_value"><?php
	$this->row = $this->total;
	echo $this->loadTemplate();
?></td>
by :
<td class="hikashop_cart_module_product_total_value"><?php
	//
	//
	$price_name  = '';
	if(!$this->params->get('show_shipping', 0) && isset($this->total->prices[0]->price_value_without_shipping)){
		$price_name = '_without_shipping';
	}
	if(!$this->params->get('show_coupon', 0) && isset($this->total->prices[0]->price_value_without_discount)){
		$price_name = '_without_discount';
	}
	$price = '';
	if($this->params->get('price_with_tax')){
		$var_name = 'price_value'.$price_name.'_with_tax';
		$price .= $this->currencyClass->format(@$this->total->prices[0]->$var_name, $this->total->prices[0]->price_currency_id);
	}
	if($this->params->get('price_with_tax')==2){
		$price .= JText::_('PRICE_BEFORE_TAX');
	}
	if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
		$var_name = 'price_value'.$price_name;
		$price .= $this->currencyClass->format(@$this->total->prices[0]->price_value, $this->total->prices[0]->price_currency_id);
	}
	if($this->params->get('price_with_tax')==2){
		$price .= JText::_('PRICE_AFTER_TAX');
	}
	echo $price;
?></td>

Last edit: 5 years 8 months ago by Mohamed Thelji.

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

  • Posts: 63
  • Thank you received: 1
  • Hikashop Business
5 years 8 months ago #296805

Thank you, I take it this will be in the next release?

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
5 years 8 months ago #296809

Hello,

The patch that Mohamed gave you is adapted to your configuration.
For the moment we don't think that we will integrate it in the next release because it won't suit for all users.
We need to find for other solutions and see if there is one which can be useful for everybody.

But if you apply the modification via a view override, you will be sure to not loose it with updates.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 63
  • Thank you received: 1
  • Hikashop Business
5 years 8 months ago #296906

Hello,

But it is a bug is it not? You tell it not to show shipping within the cart yet it still calculates the price of shipping....

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

  • Posts: 63
  • Thank you received: 1
  • Hikashop Business
5 years 8 months ago #296916

Hello,

It is rather a nightmare. Now we have the coupon not being added to the total configuration.

Many thanks
Tony

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

  • Posts: 12953
  • Thank you received: 1778
5 years 8 months ago #296920

Hello,

But it is a bug is it not? You tell it not to show shipping within the cart yet it still calculates the price of shipping....


Thank you for your feedback we just added it on our TODO list for futur HikaShop versions, we'll keep you updated about it.

It is rather a nightmare. Now we have the coupon not being added to the total configuration.


Depending on your configuration some adaptation should be applied through the code we gave you.

Best regards,
Mohamed Thelji.

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

Time to create page: 0.073 seconds
Powered by Kunena Forum