Ver Mensaje Individual
  #6 (permalink)  
Antiguo 16/07/2009, 10:58
alvarols
 
Fecha de Ingreso: diciembre-2008
Mensajes: 738
Antigüedad: 15 años, 5 meses
Puntos: 15
Respuesta: Quiero que aparezca la dirección en la cotización en Virtuemart

Mira, este es todo el Ro_basket_b2c.php tal y como lo tengo

Código PHP:
<?php
defined
'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 

?>
<?php
require_once(CLASSPATH.'ps_checkout.php');
require_once(
CLASSPATH.'ps_product.php');

    
$db =& new ps_DB;
$q "SELECT * FROM `#__{vm}_orders` WHERE ";
$q .= "#__{vm}_orders.user_id='" $auth["user_id"] . "' ";
$q .= "AND #__{vm}_orders.order_id='$order_id'";
$db->query($q);

    
$dbbt = new ps_DB;
    
$q  "SELECT * FROM `#__{vm}_order_user_info` WHERE order_id='" $db->f("order_id") . "' ORDER BY address_type ASC";
    
$dbbt->query($q);
    
$dbbt->next_record();
    
$user $dbbt->record;
    

?>
<?php $direccion
=$dbbt->p("address_1");?>
<form id="form1" name="form1" method="post" action="">
  <label>
  <input name= style="textfield" type="text" value="<?php  echo $auth["first_name"] ;?>" />
  </label>
  <label>
  <input name="textfield2" type="text" value="<?php  echo $auth["last_name"] ;?>" />
  </label>
  <label>
  <input name="textfield2" type="text" value="<?php  echo $auth["zip"] ;?>" />
  </label>
  <label>
  <input name="textfield2" type="text" value="<?php  echo $auth["country"] ;?>" />
  </label>
    <label>
  <input name="textfield2" type="text" value="<?php echo "$direccion"?>" />
  </label>
  <br />
  <?php echo $dbbt->p("address_1");?>
  
 <?php
 
if (isset($direccion)) {echo "Si está obteniendo la variable";} else {echo "no está obteniendo la variable";} ?>
</form>
<?php echo "$address_details";?>
<table width="100%" cellspacing="2" cellpadding="4" border="0">
  <tr align="left" class="sectiontableheader">
    <th><?php echo $VM_LANG->_PHPSHOP_CART_NAME ?></th>
    <th>&nbsp;</th>
    <th>&nbsp;</th>
    <th><?php echo $VM_LANG->_PHPSHOP_CART_QUANTITY ?></th>
    <th>&nbsp;</th>
  </tr>
  <?php foreach( $product_rows as $product ) { ?>
  <tr valign="top" class="<?php echo $product['row_color'?>">
    <td><?php echo $product['product_name'] . $product['product_attributes'?></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><?php echo $product['quantity'?></td>
    <td>&nbsp;</td>
  </tr>
  <?php ?>
  <!--Begin of SubTotal, Tax, Shipping, Coupon Discount and Total listing -->
  <tr class="sectiontableentry2">
    <td colspan="4" align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <?php if( $payment_discount_before ) { ?>
  <tr class="sectiontableentry2">
    <td colspan="4" align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <?php 
if( 
$coupon_discount_before ) { ?>
  <tr>
    <td colspan="4" align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <?php 
}
if( 
$shipping ) { ?>
  <tr class="sectiontableentry1">
    <td colspan="4" align="right">&nbsp;</td>
    <td >&nbsp;</td>
  </tr>
  <?php 
if( 
$payment_discount_after ) { ?>
  <tr class="sectiontableentry2">
    <td colspan="4" align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <?php 
if( 
$coupon_discount_after ) { ?>
  <tr>
    <td colspan="4" align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <?php 
}
?>
  <tr>
    <td colspan="3">&nbsp;</td>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4" align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <?php if ( $tax ) { ?>
  <tr class="sectiontableentry2">
    <td colspan="4" align="right" valign="top">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <?php 
?>
  <tr>
    <td colspan="5"><hr /></td>
  </tr>
</table>