Shipping price not display in checkout

  • Posts: 52
  • Thank you received: 2
11 years 2 months ago #124247

-- url of the page with the problem -- : www.wynchcotewebsites.com/
-- HikaShop version -- : 2.2.1
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.2
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : n/a

In checkout, after selection of delivery method, the total value increases but the shipping amount does not display.

This is happening since the last update.

Review of source shows the amount is not being called i.e. not hidden by CSS.

Example:

---

<tr>
<td></td> <td>
</td>
<td>
</td>
<td id="hikashop_checkout_cart_total2_title" class="hikashop_cart_subtotal_title hikashop_cart_title">
Total </td>
<td class="hikashop_cart_subtotal_value">
<span class="hikashop_product_price_full">
<span class="hikashop_product_price">£ 1.00</span> </span>
</td>
</tr>
<tr>
<td></td> <td>
</td>
<td>
</td>
<td id="hikashop_checkout_cart_shipping_title" class="hikashop_cart_shipping_title hikashop_cart_title">
Shipping </td>
<td class="hikashop_cart_shipping_value" >
<span class="hikashop_checkout_cart_shipping">
</span>
</td>
</tr>
<tr>
<td></td> <td>
</td>
<td>
</td>
<td id="hikashop_checkout_cart_final_total_title" class="hikashop_cart_total_title hikashop_cart_title">
Final total </td>
<td class="hikashop_cart_total_value">
<span class="hikashop_checkout_cart_final_total">
£ 2.00 </span>
</td>
</tr>

---

Screenprint of result attached.



---

Is this a glitch to be fixed in next release?

Thanks, ken :)

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124273

Hi,

Have you edited the view "checkout / cart" ?
If it is, thanks to remove the customization and see if it's working.

Can you give us a screenshot of your shipping method configuration ?

The following user(s) said Thank You: pymgym

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

  • Posts: 52
  • Thank you received: 2
11 years 2 months ago #124280

Sorted - I overlooked updating my template HTML overrides. Can now sort.

Thanks for pointing me in the right direction!

Ken :)

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

  • Posts: 92
  • Thank you received: 0
11 years 4 days ago #133820

Hi,
I had the same problem: the total value increases but the shipping amount does not display.
I removed customization of the view "checkout / cart" and solved partially the problem.
After that, shipping price displayed with taxes and I needed to display it without.
I did the following changes in the view "checkout / cart", but I'm not sure if those changes are correct:

<td class="hikashop_cart_shipping_value" >
            <span class="hikashop_checkout_cart_shipping">
<?php
      if(isset($this->value)) {
        echo $this->value;
      } else {
        $shipping_price = null;
        foreach($this->shipping as $shipping) {
          if(!isset($shipping->shipping_price) && isset($shipping->shipping_price) ) {
            $shipping->shipping_price = $shipping->shipping_price;
          }
          if(isset($shipping->shipping_price)) {
            if($shipping_price === null)
              $shipping_price = 0.0;
            if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($shipping->shipping_price)) {
              $shipping_price += $shipping->shipping_price;
            } else {
              $shipping_price += $shipping->shipping_price;
            }
          }
        }
        if($shipping_price !== null) {
          echo $this->currencyHelper->format($shipping_price, hikashop_getCurrency());
        }
      }
?>
could you confirm me those changes are right?
Thanks

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 4 days ago #133924

It's much more simple than that.

In the checkout/cart file, you have the code:
echo $this->currencyHelper->format(@$additional->price_value_with_tax,$additional->price_currency_id);
Simply change it to:
echo $this->currencyHelper->format(@$additional->price_value,$additional->price_currency_id);

and you will get the shipping price without tax displayed instead of the shpiping price with tax.

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

  • Posts: 92
  • Thank you received: 0
11 years 3 days ago #133988

I removed my customization in the checkout/cart file and I changed the code you said to me, but shipping price display with taxes.
This is the code I changed:

<span class="hikashop_checkout_cart_shipping">
<?php
        if(!empty($additional->price_value) || empty($additional->value)) {
          if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax')){
            echo $this->currencyHelper->format(@$additional->price_value,$additional->price_currency_id);
          }else{
            echo $this->currencyHelper->format(@$additional->price_value,$additional->price_currency_id);
          }
        } else {
          echo $additional->value;
        }
?>
            </span>

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 days ago #134100

Hi,

That should work, how do you have removed the customization ? By clicking on the dustbin in the views listing ?
Thanks to check in your template folder if there is not another version of the file or something like that.

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

  • Posts: 92
  • Thank you received: 0
11 years 2 days ago #134138

Hi,
yes, I have removed the customization by clicking on the dustbin in the views listing and there is not another version of the file in my template folder.
This change of code does not works but I changed the following code:

<?php
      if(isset($this->value)) {
        echo $this->value;
      } else {
        $shipping_price = null;
        foreach($this->shipping as $shipping) {
          if(!isset($shipping->shipping_price) && isset($shipping->shipping_price_with_tax) ) {
            $shipping->shipping_price = $shipping->shipping_price_with_tax;
          }
          if(isset($shipping->shipping_price)) {
            if($shipping_price === null)
              $shipping_price = 0.0;
            if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($shipping->shipping_price_with_tax)) {
              $shipping_price += $shipping->shipping_price;
            } else {
              $shipping_price += $shipping->shipping_price_with_tax;
            }
          }
        }
        if($shipping_price !== null) {
          echo $this->currencyHelper->format($shipping_price, hikashop_getCurrency());
        }
      }
?>
by:
<?php
      if(isset($this->value)) {
        echo $this->value;
      } else {
        $shipping_price = null;
        foreach($this->shipping as $shipping) {
          if(!isset($shipping->shipping_price) && isset($shipping->shipping_price_with_tax) ) {
            $shipping->shipping_price = $shipping->shipping_price_with_tax;
          }
          if(isset($shipping->shipping_price)) {
            if($shipping_price === null)
              $shipping_price = 0.0;
            if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($shipping->shipping_price_with_tax)) {
              $shipping_price += $shipping->shipping_price;
            } else {
              $shipping_price += $shipping->shipping_price;
            }
          }
        }
        if($shipping_price !== null) {
          echo $this->currencyHelper->format($shipping_price, hikashop_getCurrency());
        }
      }
?>
and together with your code changes seems to work fine.
I have no idea of php and I don't know if these changes are correct.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 1 day ago #134242

Hi,

This change seems to be correct :)

The following user(s) said Thank You: pymgym

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

Time to create page: 0.066 seconds
Powered by Kunena Forum