VM and One page checkout option

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Apr 18, 2014 9:01 pm
Reply with quote
Report this post
Hello Gavick team,
The most recent versions of VM have the onepage checkout option available. The template needs to support that, It seems that the latest version of Bike Store does not support that. Please tell me how I can update the template to support that?

Best Regards,
Milko Milkov
User avatar
Junior Boarder

GK User
Sat Apr 19, 2014 6:28 am
Reply with quote
Report this post
In the directory "... templates\gk_bikestore\html\com_virtuemart\cart" using only the modified files "select_shipment.php" and "default_pricelist.php" and One page checkout works differences from the originals compare, for example, in PSPad
default_pricelist.php:
Code: Select all
<?php defined ('_JEXEC') or die('Restricted access');
/**
 *
 * Layout for the shopping cart
 *
 * @package    VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 * @author Patrick Kohl
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 *
 */
?>
<div class="billto-shipto">
   <div class="width50 floatleft">

      <span><span class="vmicon vm2-billto-icon"></span>
         <?php echo JText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_LBL'); ?></span>
      <?php // Output Bill To Address ?>
      <div class="output-billto">
         <?php

         foreach ($this->cart->BTaddress['fields'] as $item) {
            if (!empty($item['value'])) {
               if ($item['name'] === 'agreed') {
                  $item['value'] = ($item['value'] === 0) ? JText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_NO') : JText::_ ('COM_VIRTUEMART_USER_FORM_BILLTO_TOS_YES');
               }
               ?><!-- span class="titles"><?php echo $item['title'] ?></span -->
               <span class="values vm2<?php echo '-' . $item['name'] ?>"><?php echo $this->escape ($item['value']) ?></span>
               <?php if ($item['name'] != 'title' and $item['name'] != 'first_name' and $item['name'] != 'middle_name' and $item['name'] != 'zip') { ?>
                  <br class="clear"/>
                  <?php
               }
            }
         } ?>
         <div class="clear"></div>
      </div>

      <a class="details" href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT', $this->useXHTML, $this->useSSL) ?>" rel="nofollow">
         <?php echo JText::_ ('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL'); ?>
      </a>

      <input type="hidden" name="billto" value="<?php echo $this->cart->lists['billTo']; ?>"/>
   </div>

   <div class="width50 floatleft">

      <span><span class="vmicon vm2-shipto-icon"></span>
         <?php echo JText::_ ('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL'); ?></span>
      <?php // Output Bill To Address ?>
      <div class="output-shipto">
         <?php
         if (empty($this->cart->STaddress['fields'])) {
            echo JText::sprintf ('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_EXPLAIN', JText::_ ('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'));
         } else {
            if (!class_exists ('VmHtml')) {
               require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php');
            }
            echo JText::_ ('COM_VIRTUEMART_USER_FORM_ST_SAME_AS_BT');
            echo VmHtml::checkbox ('STsameAsBTjs', $this->cart->STsameAsBT) . '<br />';
            ?>
            <div id="output-shipto-display">
               <?php
               foreach ($this->cart->STaddress['fields'] as $item) {
                  if (!empty($item['value'])) {
                     ?>
                     <!-- <span class="titles"><?php echo $item['title'] ?></span> -->
                     <?php
                     if ($item['name'] == 'first_name' || $item['name'] == 'middle_name' || $item['name'] == 'zip') {
                        ?>
                        <span class="values<?php echo '-' . $item['name'] ?>"><?php echo $this->escape ($item['value']) ?></span>
                        <?php } else { ?>
                        <span class="values"><?php echo $this->escape ($item['value']) ?></span>
                        <br class="clear"/>
                        <?php
                     }
                  }
               }
               ?>
            </div>
            <?php
         }
         ?>
         <div class="clear"></div>
      </div>
      <?php if (!isset($this->cart->lists['current_id'])) {
      $this->cart->lists['current_id'] = 0;
   } ?>
      <a class="details" href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]=' . $this->cart->lists['current_id'], $this->useXHTML, $this->useSSL) ?>" rel="nofollow">
         <?php echo JText::_ ('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'); ?>
      </a>

   </div>

   <div class="clear"></div>
</div>

<fieldset>
<table
   class="cart-summary"
   cellspacing="0"
   cellpadding="0"
   border="0"
   width="100%">
<tr>
   <th align="left" class="CartLeft"><?php echo JText::_ ('COM_VIRTUEMART_CART_NAME') ?></th>
   <th align="left" class="CartLeft"><?php echo JText::_ ('COM_VIRTUEMART_CART_SKU') ?></th>
   <th
      align="center"
      width="60px"><?php echo JText::_ ('COM_VIRTUEMART_CART_PRICE') ?></th>
   <th
      align="right"
      width="140px"><?php echo JText::_ ('COM_VIRTUEMART_CART_QUANTITY') ?>
      / <?php echo JText::_ ('COM_VIRTUEMART_CART_ACTION') ?></th>


   <?php if (VmConfig::get ('show_tax')) { ?>
   <th align="right" width="60px"><?php  echo "<span  class='priceColor2'>" . JText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_TAX_AMOUNT') . '</span>' ?></th>
   <?php } ?>
   <th align="right" width="60px"><?php echo "<span  class='priceColor2'>" . JText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_DISCOUNT_AMOUNT') . '</span>' ?></th>
   <th align="right" width="70px"><?php echo JText::_ ('COM_VIRTUEMART_CART_TOTAL') ?></th>
</tr>

<?php
$i = 1;
//       vmdebug('$this->cart->products',$this->cart->products);
foreach ($this->cart->products as $pkey => $prow) {
   ?>
<tr valign="top" class="sectiontableentry<?php echo $i ?>">
   <td align="left" class="cart-product">
      <?php if ($prow->virtuemart_media_id) { ?>
      <span class="cart-images">
                   <?php
         if (!empty($prow->image)) {
            echo $prow->image->displayMediaThumb ('', FALSE);
         }
         ?>
                  </span>
      <?php } ?>
      <?php echo JHTML::link ($prow->url, $prow->product_name) . $prow->customfields; ?>

   </td>
   <td align="left"><?php  echo $prow->product_sku ?></td>
   <td align="center">
      <?php
      if (VmConfig::get ('checkout_show_origprice', 1) && $this->cart->pricesUnformatted[$pkey]['discountedPriceWithoutTax'] != $this->cart->pricesUnformatted[$pkey]['priceWithoutTax']) {
         echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $this->cart->pricesUnformatted[$pkey], TRUE, FALSE) . '</span><br />';
      }
      if ($this->cart->pricesUnformatted[$pkey]['discountedPriceWithoutTax']) {
         echo $this->currencyDisplay->createPriceDiv ('discountedPriceWithoutTax', '', $this->cart->pricesUnformatted[$pkey], FALSE, FALSE);
      } else {
         echo $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $this->cart->pricesUnformatted[$pkey], FALSE, FALSE);
      }
      //                echo $prow->salesPrice ;
      ?>
   </td>
   <td align="right"><?php
//            $step=$prow->min_order_level;
            if ($prow->step_order_level)
               $step=$prow->step_order_level;
            else
               $step=1;
            if($step==0)
               $step=1;
            $alert=JText::sprintf ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED', $step);
            ?>
                <script type="text/javascript">
            function check<?php echo $step?>(obj) {
             // use the modulus operator '%' to see if there is a remainder
            remainder=obj.value % <?php echo $step?>;
            quantity=obj.value;
             if (remainder  != 0) {
                alert('<?php echo $alert?>!');
                obj.value = quantity-remainder;
                return false;
             }
             return true;
             }
            </script>

            <!--<input type="text" title="<?php echo  JText::_('COM_VIRTUEMART_CART_UPDATE') ?>" class="inputbox" size="3" maxlength="4" name="quantity" value="<?php echo $prow->quantity ?>" /> -->
            <input type="text"
               onblur="check<?php echo $step?>(this);"
               onclick="check<?php echo $step?>(this);"
               onchange="check<?php echo $step?>(this);"
               onsubmit="check<?php echo $step?>(this);"
               title="<?php echo  JText::_('COM_VIRTUEMART_CART_UPDATE') ?>" class="quantity-input js-recalculate" size="3" maxlength="4" name="quantity[<?php echo $prow->cart_item_id ?>]" value="<?php echo $prow->quantity ?>" />
         <input type="submit" class="vmicon vm2-add_quantity_cart" name="update[<?php echo $prow->cart_item_id ?>]" title="<?php echo  JText::_ ('COM_VIRTUEMART_CART_UPDATE') ?>" align="middle" value=""/>

      <a class="vmicon vm2-remove_from_cart" title="<?php echo JText::_ ('COM_VIRTUEMART_CART_DELETE') ?>" align="middle" href="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=cart&task=delete&cart_virtuemart_product_id=' . $prow->cart_item_id) ?>" rel="nofollow"> </a>
   </td>

   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"><?php echo "<span class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('taxAmount', '', $this->cart->pricesUnformatted[$pkey], FALSE, FALSE, $prow->quantity) . "</span>" ?></td>
   <?php } ?>
   <td align="right"><?php echo "<span class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('discountAmount', '', $this->cart->pricesUnformatted[$pkey], FALSE, FALSE, $prow->quantity) . "</span>" ?></td>
   <td colspan="1" align="right">
      <?php
      if (VmConfig::get ('checkout_show_origprice', 1) && !empty($this->cart->pricesUnformatted[$pkey]['basePriceWithTax']) && $this->cart->pricesUnformatted[$pkey]['basePriceWithTax'] != $this->cart->pricesUnformatted[$pkey]['salesPrice']) {
         echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceWithTax', '', $this->cart->pricesUnformatted[$pkey], TRUE, FALSE, $prow->quantity) . '</span><br />';
      }
      elseif (VmConfig::get ('checkout_show_origprice', 1) && empty($this->cart->pricesUnformatted[$pkey]['basePriceWithTax']) && $this->cart->pricesUnformatted[$pkey]['basePriceVariant'] != $this->cart->pricesUnformatted[$pkey]['salesPrice']) {
         echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $this->cart->pricesUnformatted[$pkey], TRUE, FALSE, $prow->quantity) . '</span><br />';
      }
      echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $this->cart->pricesUnformatted[$pkey], FALSE, FALSE, $prow->quantity) ?></td>
</tr>
   <?php
   $i = ($i==1) ? 2 : 1;
} ?>
<!--Begin of SubTotal, Tax, Shipment, Coupon Discount and Total listing -->
<?php if (VmConfig::get ('show_tax')) {
   $colspan = 3;
} else {
   $colspan = 2;
} ?>
<tr>
   <td colspan="4">&nbsp;</td>

   <td colspan="<?php echo $colspan ?>">
      <hr/>
   </td>
</tr>
<tr class="sectiontableentry1">
   <td colspan="4" align="right"><?php echo JText::_ ('COM_VIRTUEMART_ORDER_PRINT_PRODUCT_PRICES_TOTAL'); ?></td>

   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"><?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('taxAmount', '', $this->cart->pricesUnformatted, FALSE) . "</span>" ?></td>
   <?php } ?>
   <td align="right"><?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('discountAmount', '', $this->cart->pricesUnformatted, FALSE) . "</span>" ?></td>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ('salesPrice', '', $this->cart->pricesUnformatted, FALSE) ?></td>
</tr>

<?php
if (VmConfig::get ('coupons_enable')) {
   ?>
<tr class="sectiontableentry2">
<td colspan="4" align="left">
   <?php if (!empty($this->layoutName) && $this->layoutName == 'default') {
   // echo JHTML::_('link', JRoute::_('index.php?view=cart&task=edit_coupon',$this->useXHTML,$this->useSSL), JText::_('COM_VIRTUEMART_CART_EDIT_COUPON'));
   echo $this->loadTemplate ('coupon');
}
   ?>

   <?php if (!empty($this->cart->cartData['couponCode'])) { ?>
   <?php
   echo $this->cart->cartData['couponCode'];
   echo $this->cart->cartData['couponDescr'] ? (' (' . $this->cart->cartData['couponDescr'] . ')') : '';
   ?>

            </td>

                <?php if (VmConfig::get ('show_tax')) { ?>
      <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ('couponTax', '', $this->cart->pricesUnformatted['couponTax'], FALSE); ?> </td>
      <?php } ?>
   <td align="right"> </td>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ('salesPriceCoupon', '', $this->cart->pricesUnformatted['salesPriceCoupon'], FALSE); ?> </td>
   <?php } else { ?>
   </td><td colspan="3" align="left">&nbsp;</td>
   <?php
}

   ?>
</tr>
   <?php } ?>


<?php
foreach ($this->cart->cartData['DBTaxRulesBill'] as $rule) {
   ?>
<tr class="sectiontableentry<?php echo $i ?>">
   <td colspan="4" align="right"><?php echo $rule['calc_name'] ?> </td>

   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"></td>
   <?php } ?>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->pricesUnformatted[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?></td>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->pricesUnformatted[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?> </td>
</tr>
   <?php
   if ($i) {
      $i = 1;
   } else {
      $i = 0;
   }
} ?>

<?php

foreach ($this->cart->cartData['taxRulesBill'] as $rule) {
   ?>
<tr class="sectiontableentry<?php echo $i ?>">
   <td colspan="4" align="right"><?php echo $rule['calc_name'] ?> </td>
   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->pricesUnformatted[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?> </td>
   <?php } ?>
   <td align="right"><?php ?> </td>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->pricesUnformatted[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?> </td>
</tr>
   <?php
   if ($i) {
      $i = 1;
   } else {
      $i = 0;
   }
}

foreach ($this->cart->cartData['DATaxRulesBill'] as $rule) {
   ?>
<tr class="sectiontableentry<?php echo $i ?>">
   <td colspan="4" align="right"><?php echo   $rule['calc_name'] ?> </td>

   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"></td>

   <?php } ?>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->pricesUnformatted[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?>  </td>
   <td align="right"><?php echo $this->currencyDisplay->createPriceDiv ($rule['virtuemart_calc_id'] . 'Diff', '', $this->cart->pricesUnformatted[$rule['virtuemart_calc_id'] . 'Diff'], FALSE); ?> </td>
</tr>
   <?php
   if ($i) {
      $i = 1;
   } else {
      $i = 0;
   }
}

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

   <?php /*   <td colspan="2" align="right"><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_SHIPPING'); ?> </td> */ ?>
            <td colspan="4" align="left">
            <?php echo $this->cart->cartData['shipmentName']; ?>
   <br/>
   <?php
   if (!empty($this->layoutName) && $this->layoutName == 'default' && !$this->cart->automaticSelectedShipment) {
      if (VmConfig::get('oncheckout_opc', 1)) {
         $previouslayout = $this->setLayout('select');
         echo $this->loadTemplate('shipment');
         $this->setLayout($previouslayout);
      } else {
         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');
   }?>
   </td>
<?php
} else {
   ?>
   <td colspan="4" align="left">
      <?php echo $this->cart->cartData['shipmentName']; ?>
   </td>
   <?php } ?>

   <?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>
<?php if ($this->cart->pricesUnformatted['salesPrice']>0.0 ) { ?>
<tr class="sectiontableentry1" valign="top">
   <?php if (!$this->cart->automaticSelectedPayment) { ?>

   <td colspan="4" align="left">
      <?php echo $this->cart->cartData['paymentName']; ?>
      <br/>
      <?php if (!empty($this->layoutName) && $this->layoutName == 'default') {
         if (VmConfig::get('oncheckout_opc', 1)) {
            $previouslayout = $this->setLayout('select');
            echo $this->loadTemplate('payment');
            $this->setLayout($previouslayout);
         } else {
            echo JHTML::_('link', JRoute::_('index.php?view=cart&task=editpayment', $this->useXHTML, $this->useSSL), $this->select_payment_text, 'class=""');
         }
      } else {
      echo JText::_ ('COM_VIRTUEMART_CART_PAYMENT');
   } ?> </td>

   </td>
   <?php } else { ?>
   <td colspan="4" align="left"><?php echo $this->cart->cartData['paymentName']; ?> </td>
   <?php } ?>
   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"><?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('paymentTax', '', $this->cart->pricesUnformatted['paymentTax'], FALSE) . "</span>"; ?> </td>
   <?php } ?>
   <td align="right"><?php if($this->cart->pricesUnformatted['salesPricePayment'] < 0) echo $this->currencyDisplay->createPriceDiv ('salesPricePayment', '', $this->cart->pricesUnformatted['salesPricePayment'], FALSE); ?></td>
   <td align="right"><?php  echo $this->currencyDisplay->createPriceDiv ('salesPricePayment', '', $this->cart->pricesUnformatted['salesPricePayment'], FALSE); ?> </td>
</tr>
<?php } ?>
<tr>
   <td colspan="4">&nbsp;</td>
   <td colspan="<?php echo $colspan ?>">
      <hr/>
   </td>
</tr>
<tr class="sectiontableentry2">
   <td colspan="4" align="right"><?php echo JText::_ ('COM_VIRTUEMART_CART_TOTAL') ?>:</td>

   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"> <?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('billTaxAmount', '', $this->cart->pricesUnformatted['billTaxAmount'], FALSE) . "</span>" ?> </td>
   <?php } ?>
   <td align="right"> <?php echo "<span  class='priceColor2'>" . $this->currencyDisplay->createPriceDiv ('billDiscountAmount', '', $this->cart->pricesUnformatted['billDiscountAmount'], FALSE) . "</span>" ?> </td>
   <td align="right"><div class="bold"><?php echo $this->currencyDisplay->createPriceDiv ('billTotal', '', $this->cart->pricesUnformatted['billTotal'], FALSE); ?></div></td>
</tr>
<?php
if ($this->totalInPaymentCurrency) {
?>

<tr class="sectiontableentry2 totalInPaymentCurrency">
   <td colspan="4" align="right"><?php echo JText::_ ('COM_VIRTUEMART_CART_TOTAL_PAYMENT') ?>:</td>

   <?php if (VmConfig::get ('show_tax')) { ?>
   <td align="right"></td>
   <?php } ?>
   <td align="right"></td>
   <td align="right"><strong><?php echo $this->totalInPaymentCurrency;   ?></strong></td>
</tr>
   <?php
}
?>

</table>
</fieldset>

select_shipment.php:
Code: Select all
<?php
/**
 *
 * Template for the shipment selection
 *
 * @package   VirtueMart
 * @subpackage Cart
 * @author Max Milbers
 *
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: cart.php 2400 2010-05-11 19:30:47Z milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');


   if (VmConfig::get('oncheckout_show_steps', 1)) {
      echo '<div class="checkoutStep" id="checkoutStep2">' . JText::_('COM_VIRTUEMART_USER_FORM_CART_STEP2') . '</div>';
   }

   if ($this->layoutName!='default') {
      $headerLevel = 1;
      if($this->cart->getInCheckOut()){
         $buttonclass = 'button vm-button-correct';
      } else {
         $buttonclass = 'default';
      }
      ?>
<form method="post" id="userForm" name="chooseShipmentRate" action="<?php echo JRoute::_('index.php'); ?>" class="form-validate">
   <?php
   } else {
      $headerLevel = 4;
      $buttonclass = 'vm-button-correct';
   }

   echo "<h".$headerLevel.">".JText::_('COM_VIRTUEMART_CART_SELECT_SHIPMENT')."</h".$headerLevel.">";

   ?>

   <div class="buttonBar-right">

           <button  name="setshipment" type="submit" ><?php echo JText::_('COM_VIRTUEMART_SAVE'); ?></button>  &nbsp;
      <?php   if ($this->layoutName!='default') { ?>
      <button type="reset" onClick="window.location.href='<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart'); ?>'" ><?php echo JText::_('COM_VIRTUEMART_CANCEL'); ?></button>
      <?php  } ?>
   </div>

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

      echo "<fieldset class='selShipment'>\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."<br />\n";
             }
         }
       }
       echo "</fieldset>\n";
    } else {
    echo "<h".$headerLevel.">".$this->shipment_not_found_text."</h".$headerLevel.">";
    }


if ($this->layoutName!='default') {
?> <input type="hidden" name="option" value="com_virtuemart" />
    <input type="hidden" name="view" value="cart" />
    <input type="hidden" name="task" value="setshipment" />
    <input type="hidden" name="controller" value="cart" />
</form>
<?php
}
?>


Web: http://www.vlakymodely.cz/
User avatar
Fresh Boarder

GK User
Mon Apr 21, 2014 10:55 pm
Reply with quote
Report this post
Thank you, ROBERT!
The code works perfect for me!

Best Regards,
Milko
User avatar
Junior Boarder

GK User
Mon Apr 28, 2014 3:59 pm
Reply with quote
Report this post
Hello,
I need more help for this. I replaced the code, but now the style is not good. Please help me with the style. I want to make every checkbox option of new line and a refresh button is on the right. I attached view of my site and Robbert site view.

This is my site view - bad style:
my site.png


This is what I want to do:
Robert_site_vew.png



Best Regards,
Milko
User avatar
Junior Boarder

GK User
Thu May 01, 2014 8:29 pm
Reply with quote
Report this post
Send me a link to your website.
I'll look into it.
User avatar
Fresh Boarder


cron