News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Don't displaying shipping method price 0,00

Started by nutastur, March 05, 2013, 15:03:57 PM

Previous topic - Next topic

nutastur

Hey forum!

I using joomla 2.5 and VM 2.0.18a.

When I configure shipping method and set price 0,00 in Shipment Cost field, then in checkout page it's not displaying, but if I set example 0,01, then it's displaying correctly.

How to display Free shipping (Discount/Fee: 0,00 Ls)???

Look up to my screenshoot:
http://s16.postimage.org/pipwvvuj7/hide_cost_price.jpg

PRO

here is how I do mine

cart/default_pricelist.php

   <td align="right"><?php if (empty($this->cart->pricesUnformatted['salesPriceShipment'])){echo 'FREE';} ?><?php echo $this->currencyDisplay->createPriceDiv('salesPriceShipment','', $this->cart->pricesUnformatted['salesPriceShipment'],false); ?> </td>

nutastur

Quote from: PRO on March 05, 2013, 15:38:24 PM
here is how I do mine

cart/default_pricelist.php

   <td align="right"><?php if (empty($this->cart->pricesUnformatted['salesPriceShipment'])){echo 'FREE';} ?><?php echo $this->currencyDisplay->createPriceDiv('salesPriceShipment','', $this->cart->pricesUnformatted['salesPriceShipment'],false); ?> </td>



Not work for me =//


nutastur

I found and tried this code,

<td align="right"><?php
if($this->cart->pricesUnformatted['salesPriceShipment'] == '0.00'){
echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', '0.00', FALSE);
}else{
echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment', '', $this->cart->pricesUnformatted['salesPriceShipment'], FALSE);
}?>
</td>

but nothing happens =//

http://www.gjcwebdesign.com/joomla-virtuemart-tips/754-auspost-virtuemart-20-shipping-plugin-upgraded-for-free-shipping.html



Can anyone help me?

PRO

 if($this->cart->pricesUnformatted['salesPriceShipment'] <= '.01')

nutastur

Quote from: PRO on March 05, 2013, 18:25:03 PM
if($this->cart->pricesUnformatted['salesPriceShipment'] <= '.01')

nothing changing....
PRO can You please share Your default_pricelist.php file?

PRO

what page is THAT on?

That looks like the select shipment page

nutastur

Quote from: PRO on March 05, 2013, 19:01:09 PM
what page is THAT on?

That looks like the select shipment page
This page:
index.php/component/virtuemart/cart/edit_shipment?Itemid=0

http://s18.postimage.org/74guoq3y1/step2.jpg

PRO

easy way would be to change the shipment name to

Free Shipping (0.00)

nutastur

Quote from: PRO on March 05, 2013, 20:27:26 PM
easy way would be to change the shipment name to

Free Shipping (0.00)

it will look ugly, I think it's not the way to slove this problem =D



PRO

cart/select_shipment.php


Change it to this

<?php
    if ($this->found_shipment_method) {


      echo "<fieldset>\n";
   // if only one Shipment , should be checked by default
       foreach ($this->shipments_shipment_rates as $shipment_shipment_rates) {
      if (is_array($shipment_shipment_rates)) {
          foreach ($shipment_shipment_rates as $shipment_shipment_rate) {
         echo $shipment_shipment_rate;
         if ($shipment_shipment_rate<=0){echo 'WhatYOUWANTHERE';}
         echo '<br/>';
          }
      }
       }
       echo "</fieldset>\n";
    } else {
    echo "<h1>".$this->shipment_not_found_text."</h1>";
    }

    ?>




nutastur

Quote from: PRO on March 05, 2013, 21:33:01 PM
cart/select_shipment.php


Change it to this

<?php
    if ($this->found_shipment_method) {


      echo "<fieldset>\n";
   // if only one Shipment , should be checked by default
       foreach ($this->shipments_shipment_rates as $shipment_shipment_rates) {
      if (is_array($shipment_shipment_rates)) {
          foreach ($shipment_shipment_rates as $shipment_shipment_rate) {
         echo $shipment_shipment_rate;
         if ($shipment_shipment_rate<=0){echo 'WhatYOUWANTHERE';}
         echo '<br/>';
          }
      }
       }
       echo "</fieldset>\n";
    } else {
    echo "<h1>".$this->shipment_not_found_text."</h1>";
    }

    ?>

http://s22.postimage.org/ety4so31d/nothing.jpg

Now after both shipping methods are displaying text "WhatYOUWANTHERE"

I tried change you code to if ($shipment_shipment_rate=0){echo 'WhatYOUWANTHERE';} and ($shipment_shipment_rate=0.00){echo 'WhatYOUWANTHERE';}
when I used changed code then text WhatYOUWANTHERE hide...

Other solutions?


PRO


nutastur

Quote from: PRO on March 06, 2013, 21:15:21 PM
sorry, I tried, but cannot figure it out

Mate don't sorry, thanks about help!