News:

Support the VirtueMart project and become a member

Main Menu

Shipping price missing

Started by paulhazell, May 30, 2013, 14:32:37 PM

Previous topic - Next topic

paulhazell

VM 2.0.20b and Joomla 2.5.11

On my shopping cart page the shipping (by weight) calculates correctly but nothing is showing in the shipping price column.....any idea's?

PRO

sounds like a template issue

have you tried with a standard joomla template?


paulhazell

Yes, tried it on Beez....same problem.

paulhazell

By the way, the tax is showing, just not the price

PRO

shipping price is not a column,

its a row ?

is that what you mean?

so the total is correct? but does not display in the row?

paulhazell

Yes sorry, row not column.
The tax is showing and the tax total includes the main cost of the shipping plus the tax so the calculation is working, it's just the main shipping price that isn't there.

paulhazell

Update....just noticed that i go to the shopping cart with no items in it the shipping charge is already applied. The cost is still not showing but the tax and the total with the tax is as well......does this help anyone understand this issue at all?

PRO

Quote from: paulhazell on June 03, 2013, 21:10:21 PM
Update....just noticed that i go to the shopping cart with no items in it the shipping charge is already applied. The cost is still not showing but the tax and the total with the tax is as well......does this help anyone understand this issue at all?

do you have auto select shipping turned on?

what happens when you turn it off?

we cannot help t7hat much without more info, and a link

paulhazell

Auto shipping makes no difference on or off.

Ignore the issue about the shipping appearing if nothing is in the cart, that only seems to happen if you empty the cart and then go back to the shipping page so i can live with that, but i really need to fix the missing shipping price.

I would gladly post a link if i can do it privately as this store isn't intended for public use. If anyone is willing to take a look for me please let me know and how i can send the link in private.

PRO


PRO



Paul, I see what you mean now.
You mean you do not see the shipment price BEFORE tax.


Test this code somewhere in

cart/default_pricelist.php

& tell me if it uses the right number for before tax.



<?php
$shipbeforetax=$this->cart->pricesUnformatted['salesPriceShipment']-$this->cart->pricesUnformatted['shipmentTax'];
echo $shipbeforetax;
?>

paulhazell

I still can't make sense of this :-(

If i add the code anywhere on the page the shipping price does show up, albeit with a decimal place missing.
However, the price shows up in the wrong place because i don't know how to add it correctly.

My real question though is why is this happening in the first place? Surely the cart should show the price without me having to alter the source code so what is going wrong? This is the second site i am having the same problem on, both use different templates to i'm struggling to understand the issue.

PRO

Quote from: paulhazell on August 12, 2013, 16:03:57 PM
I still can't make sense of this :-(

If i add the code anywhere on the page the shipping price does show up, albeit with a decimal place missing.
However, the price shows up in the wrong place because i don't know how to add it correctly.

My real question though is why is this happening in the first place? Surely the cart should show the price without me having to alter the source code so what is going wrong? This is the second site i am having the same problem on, both use different templates to i'm struggling to understand the issue.

I talked to the head developers about this, and dont think they will change it.

views/cart/default_pricelist.php

I changed 2 of these
<td colspan="4" align="left">

to this
<td colspan="3" align="left">

Then I added this code
<td colspan="3" align="left">
      <?php echo $this->cart->cartData['shipmentName']; ?>
   </td>
   <?php } ?>


In the code below, you can see what I changed & where I added the code



<tr class="sectiontableentry1">
   <?php if (!$this->cart->automaticSelectedShipment) { ?>

   <?php /*   <td colspan="2" align="right"><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_SHIPPING'); ?> </td> */ ?>
            <td colspan="3" align="left">
            <?php echo $this->cart->cartData['shipmentName']; ?>
   <br/>
   <?php
   if (!empty($this->layoutName) && $this->layoutName == 'default' && !$this->cart->automaticSelectedShipment) {
      echo JHTML::_ ('link', JRoute::_ ('index.php?view=cart&task=edit_shipment', $this->useXHTML, $this->useSSL), $this->select_shipment_text, 'class=""');
   } else {
      echo JText::_ ('COM_VIRTUEMART_CART_SHIPPING');
   }
} else {
   ?>
   <td colspan="3" align="left">
      <?php echo $this->cart->cartData['shipmentName']; ?>
   </td>
   <?php } ?>
!!!!!!!!!!!!!!!!!! This line below is where i added it
<td align="left">
      <?php
$shipbeforetax=$this->cart->pricesUnformatted['salesPriceShipment']-$this->cart->pricesUnformatted['shipmentTax'];
echo $shipbeforetax;
?>
   </td>
!!!!!!!!!!!!!!!!!!!!! Stopped
   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"><?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('shipmentTax', '', $this->cart->pricesUnformatted['shipmentTax'], FALSE) . "</span>"; ?> </td>
   <?php } ?>
   <td align="right"><?php if($this->cart->pricesUnformatted['salesPriceShipment'] < 0) echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->pricesUnformatted['salesPriceShipment'], FALSE); ?></td>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->pricesUnformatted['salesPriceShipment'], FALSE); ?> </td>
</tr>