checkout / cart.php change order for paiment VAT

  • Posts: 117
  • Thank you received: 3
10 years 11 months ago #159771

-- HikaShop version -- : 23.1
-- Joomla version -- : 3.3

Hi I would invert the position on VAT and taxes with Payments.
It would be much better that VAT and taxes are always the last values (hope you'll consider it in future releases).

Which part of code should I change?

Thanks in advice

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
10 years 11 months ago #159785

Hi,

As you say in your title, it's the file "cart" of the view "checkout" that you need to edit if you want to change that.

This is for the payment:

if(!empty($this->payment) && $this->payment->payment_price != 0) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_payment_title" class="hikashop_cart_payment_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_PAYMENT'); ?>
					</td>
					<td class="hikashop_cart_payment_value">
						<span class="hikashop_checkout_cart_payment">
						<?php
							if(!isset($this->payment->payment_price) && isset($this->payment->payment_price_with_tax) ) {
								if(isset($this->value)) {
									echo $this->value;
								} else {
									$this->payment->payment_price = 0.0;
									$this->payment->payment_price_with_tax = 0.0;
								}
							}
							if(isset($this->payment->payment_price)) {
								if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($this->payment->payment_price_with_tax) ){
									echo $this->currencyHelper->format(@$this->payment->payment_price,$this->full_total->prices[0]->price_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->payment->payment_price_with_tax,$this->full_total->prices[0]->price_currency_id);
								}
							}
						?>
						</span>
					</td>
				</tr>
				<?php }
This is for the taxes:
if(bccomp($taxes,0,5)){
			if($this->config->get('detailed_tax_display') && isset($this->full_total->prices[0]->taxes)) {
				foreach($this->full_total->prices[0]->taxes as $tax) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo $tax->tax_namekey; ?>
					</td>
					<td class="hikashop_cart_tax_value">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format($tax->tax_amount,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
				}
			} else {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo JText::_('TAXES'); ?>
					</td>
					<td class="hikashop_cart_tax_value">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format($taxes,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
			}
		}

The following user(s) said Thank You: crealiagroup

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

Time to create page: 0.056 seconds
Powered by Kunena Forum