Show subtotal without taxes in order summary

  • Posts: 11
  • Thank you received: 0
9 years 11 months ago #182263

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4
-- Error-message(debug-mod must be tuned on) -- : I would like to show, in order summary before pay, subtotal (without tax), tax and Total (with VAT). Now, subtotal shows price with tax.

I would like to show, in order summary before pay, subtotal (without tax), tax and Total (with VAT). Now, subtotal shows price with tax.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 11 months ago #182273

Hi,

You can edit the view "checkout / cart" and replace:

					<td id="hikashop_checkout_cart_total2_title" class="hikashop_cart_subtotal_title hikashop_cart_title">
						<?php echo JText::_('SUBTOTAL'); ?>
					</td>
					<td class="hikashop_cart_subtotal_value">
					<?php
						$this->row = $this->total;
						echo $this->loadTemplate();
					?>
					</td>
By:
					<td id="hikashop_checkout_cart_total2_title" class="hikashop_cart_subtotal_title hikashop_cart_title">
						<?php echo JText::_('SUBTOTAL'); ?>
					</td>
					<td class="hikashop_cart_subtotal_value">
					<?php
$defTaxDisp = $this->params->get('price_with_tax');
$this->params->set('price_with_tax',0);
						$this->row = $this->total;
						echo $this->loadTemplate();
$this->params->set('price_with_tax',$defTaxDisp);
					?>
					</td>

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

  • Posts: 1
  • Thank you received: 0
9 years 1 month ago #216363

Hello Xavier,
I have just recently purchased Hikashop Business and want to do the same thing as described in this thread. I am in the checkout/cart view and cannot find the exact code as listed in the 'before' section. What do I need to replace in Hikashop Business to get the Subtotal to show without taxes?

Thanks.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 1 month ago #216374

Hi,

With the current version, the code is now:

<td id="hikashop_checkout_cart_total2_title" class="hikashop_cart_subtotal_title hikashop_cart_title">
						<?php echo JText::_('SUBTOTAL'); ?>
					</td>
					<td class="hikashop_cart_subtotal_value" data-title="<?php echo JText::_('SUBTOTAL'); ?>">
						<span class="hikashop_checkout_cart_subtotal">
							<?php
								if($this->params->get('price_with_tax')){
									echo $this->currencyHelper->format(@$this->total->prices[0]->price_value_with_tax,@$this->total->prices[0]->price_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->total->prices[0]->price_value,@$this->total->prices[0]->price_currency_id);
								}
							?>
						</span>
					</td>
and you can replace it by:
<td id="hikashop_checkout_cart_total2_title" class="hikashop_cart_subtotal_title hikashop_cart_title">
						<?php echo JText::_('SUBTOTAL'); ?>
					</td>
					<td class="hikashop_cart_subtotal_value" data-title="<?php echo JText::_('SUBTOTAL'); ?>">
						<span class="hikashop_checkout_cart_subtotal">
							<?php
								if(false){
									echo $this->currencyHelper->format(@$this->total->prices[0]->price_value_with_tax,@$this->total->prices[0]->price_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->total->prices[0]->price_value,@$this->total->prices[0]->price_currency_id);
								}
							?>
						</span>
					</td>

The following user(s) said Thank You: jose94h

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

  • Posts: 7
  • Thank you received: 1
  • Hikashop Business
8 years 4 months ago #245637

I still can't find this, I've been through everything called "cart" in the views tab and I'm having 0 luck.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 1 month ago #251331

Hi,

Sorry for the delay ; we had a bug with the ticket moderation system which do not allow us to see pending messages when it was not a creation of a thread.

Did you manage to perform the modification ?
The view is "checkout | cart" if you want to modify the cart during the checkout ; and it is "product | cart" if you want to modify the module.
The easier to find the block is to look for the display of the "SUBTOTAL" translation.

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: 246
  • Thank you received: 5
7 years 6 months ago #269414

Hi,

Is this still necessary ? I've noticed an constant language "TOTAL_WITHOUT_VAT".
We want to display in the final checkout under the cart list the subtotal block as :
Total hors taxes : 100
TVA : 20
Total TTC à payer : 120

Thanks,

Laurent

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 6 months ago #269416

Hello,

The translation is just some text ; in order to be displayed it needs some code and that code is using a context and settings.

So unfortunately, I don't understand your message.
But what is sure is that the Nicolas' message is still valid in HikaShop 3.0.x

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: 246
  • Thank you received: 5
7 years 6 months ago #269453

I was wondering if the code modification was really necessary (option available). Not the translation question.
Thanks for answering.

However, I think that when choosing to display both "incl VAT" and "Excl Vat", the bottom part of the checkout summary should display the line "SUBTOTAL" with prices without VAT.
In situation where the store has to show "Excl VAT" prices the total amount of purchase "Excl VAT" is much more useful than the Total with VAT before shipment or else.

In some future version we should have an option to choose to display things the B2C expect (VAT is purely indicative, all prices shown "Incl VAT") and the way B2B expects (Prices has to be shown "Excl VAT", VAT only shown as a final item added to the grand total to compute the final price to pay.

The following user(s) said Thank You: Forward Marketing

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

  • Posts: 41
  • Thank you received: 2
7 years 6 months ago #270104

Is this valid for the one page checkout in the latest version of Hikashop? Because I can't get it to work :(

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
7 years 6 months ago #270313

Hello,

Sorry but can you please complete your question, with by example what you want to achieve, your desired checkout elements line (like the previous explanation), and maybe your display configuration taxes, and other useful elements that you can provide.

Awaiting news from you.

Regards

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

  • Posts: 5
  • Thank you received: 0
7 years 2 months ago #278731

Hello friend.

I just made it. In the view "checkout / cart" ( line 293 when you edit the view ) just replace this:
---> if($this->params->get('price_with_tax')){
for this:
---> if(false){

I got it working.

Hope it helps you.

BR,

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

Time to create page: 0.104 seconds
Powered by Kunena Forum