Skip to main content

Edit view order / show.php how to

More
12 years 6 months ago - 12 years 6 months ago #150193 by crealiagroup
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.3
-- PHP version -- : 5.3.2

Hi,

we need to change order display for customers. We need to show VAT and taxes just before HIKASHOP_TOTAL row.

How to?
Last edit: 12 years 6 months ago by crealiagroup.

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

More
12 years 6 months ago #150262 by Mohamed Thelji
Hello,
Can you show me a screenshots of what do you want to do ? Also, note that the end of your cart summary is displayed by these lines :
Code:
<tr> <td style="border-top:2px solid #B8B8B8;" colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_subtotal_title" style="border-top:2px solid #B8B8B8;" class="key"> <label> <?php echo JText::_( 'SUBTOTAL' ); ?> </label> </td> <td class="hikashop_order_subtotal_value" style="border-top:2px solid #B8B8B8;"> <?php if($this->config->get('price_with_tax')){ echo $this->currencyHelper->format($this->order->order_subtotal,$this->order->order_currency_id); }else{ echo $this->currencyHelper->format($this->order->order_subtotal_no_vat,$this->order->order_currency_id); } ?> </td> </tr> <?php $taxes = $this->order->order_subtotal-$this->order->order_subtotal_no_vat+$this->order->order_shipping_tax-$this->order->order_discount_tax; if(!empty($this->order->order_discount_code)){ ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_coupon_title key"> <label> <?php echo JText::_( 'HIKASHOP_COUPON' ); ?> </label> </td> <td class="hikashop_order_coupon_value" > <?php if($this->config->get('price_with_tax')){ echo $this->currencyHelper->format($this->order->order_discount_price*-1.0,$this->order->order_currency_id); }else{ echo $this->currencyHelper->format(($this->order->order_discount_price-@$this->order->order_discount_tax)*-1.0,$this->order->order_currency_id); } ?> </td> </tr> <?php } if($taxes != 0){ if($this->config->get('detailed_tax_display') && !empty($this->order->order_tax_info)){ foreach($this->order->order_tax_info as $tax){ ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_tax_title key"> <label> <?php echo $tax->tax_namekey; ?> </label> </td> <td class="hikashop_order_tax_value"> <?php echo $this->currencyHelper->format($tax->tax_amount,$this->order->order_currency_id); ?> </td> </tr> <?php } }else{ ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_tax_title key"> <label> <?php echo JText::_( 'VAT' ); ?> </label> </td> <td class="hikashop_order_tax_value"> <?php echo $this->currencyHelper->format($taxes,$this->order->order_currency_id); ?> </td> </tr> <?php } } if(!empty($this->order->additional)) { $exclude_additionnal = explode(',', $this->config->get('order_additional_hide', '')); foreach($this->order->additional as $additional) { if(in_array($additional->order_product_name, $exclude_additionnal)) continue; ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_additionall_title key"> <label><?php echo JText::_($additional->order_product_name); ?></label> </td> <td class="hikashop_order_additional_value"><?php if(!empty($additional->order_product_price)) { $additional->order_product_price = (float)$additional->order_product_price; } if(!empty($additional->order_product_price) || empty($additional->order_product_options)) { if($config->get('price_with_tax')){ echo $this->currencyHelper->format($additional->order_product_price+@$additional->order_product_tax, $this->order->order_currency_id); }else{ echo $this->currencyHelper->format($additional->order_product_price, $this->order->order_currency_id); } } else { echo $additional->order_product_options; } ?></td> </tr> <?php } } if(!empty($this->order->order_shipping_method)){ ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_shipping_title key"> <label> <?php echo JText::_( 'SHIPPING' ); ?> </label> </td> <td class="hikashop_order_shipping_value" > <?php if($this->config->get('price_with_tax')){ echo $this->currencyHelper->format($this->order->order_shipping_price,$this->order->order_currency_id); }else{ echo $this->currencyHelper->format($this->order->order_shipping_price-@$this->order->order_shipping_tax,$this->order->order_currency_id); } ?> </td> </tr> <?php } if(!empty($this->order->order_payment_method) && $this->order->order_payment_price != 0){ ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_payment_title key"> <label> <?php echo JText::_( 'HIKASHOP_PAYMENT' ); ?> </label> </td> <td class="hikashop_order_payment_value" > <?php echo $this->currencyHelper->format($this->order->order_payment_price,$this->order->order_currency_id); ?> </td> </tr> <?php } ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_total_title key"> <label> <?php echo JText::_( 'HIKASHOP_TOTAL' ); ?> </label> </td> <td class="hikashop_order_total_value" > <?php if($this->config->get('show_taxes') == 'both'){ } else if($this->config->get('show_taxes') == 'with'){ } else{ echo $this->currencyHelper->format($this->order->order_full_price,$this->order->order_currency_id); }?> </td> </tr> </tbody> </table> </fieldset> </td> </tr>

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

More
12 years 6 months ago - 12 years 6 months ago #150280 by crealiagroup
Hi,

I want to move the VAT and taxes rows soon before the TOTAL. Note: in invoice (and order) view in frontend for customers.

Take a look at the image, IVA (VAT in Italy)
Last edit: 12 years 6 months ago by crealiagroup.

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

More
12 years 6 months ago #150327 by Mohamed Thelji
So the solution will probably be to move that lines :
Code:
if($taxes != 0){ if($this->config->get('detailed_tax_display') && !empty($this->order->order_tax_info)){ foreach($this->order->order_tax_info as $tax){ ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_tax_title key"> <label> <?php echo $tax->tax_namekey; ?> </label> </td> <td class="hikashop_order_tax_value"> <?php echo $this->currencyHelper->format($tax->tax_amount,$this->order->order_currency_id); ?> </td> </tr> <?php } }else{ ?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_tax_title key"> <label> <?php echo JText::_( 'VAT' ); ?> </label> </td> <td class="hikashop_order_tax_value"> <?php echo $this->currencyHelper->format($taxes,$this->order->order_currency_id); ?> </td> </tr> <?php } }
just before these lines :
Code:
?> <tr> <td colspan="<?php echo $colspan; ?>"> </td> <td class="hikashop_order_total_title key"> <label> <?php echo JText::_( 'HIKASHOP_TOTAL' ); ?> </label> </td>

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

More
12 years 6 months ago #150393 by crealiagroup
I already tryed to edit that way but didn't tested it 'cause my PHP editing software gave me sintax error, so I thought that wasn't the right solution.
I will try it anyway and let you know.

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

More
12 years 6 months ago #150479 by crealiagroup
Ok, it work fine now! I made a mistake before; I didn't moved that piece of code before " ?> " but after that!

Thanks for support

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

Time to create page: 0.188 seconds
Powered by Kunena Forum