Ver Mensaje Individual
  #7 (permalink)  
Antiguo 16/07/2009, 11:03
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

Y este esa un parte de account.order_details.php (no la pongo toda porque no cabe en el post, pero viene lo fundamental relacionado con lo que estoy platicando?.

y este es una parte del account.order_details.php, de donde si se puede extraer esta información

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

mm_showMyFileName__FILE__ );

require_once(
CLASSPATH.'ps_checkout.php');
require_once(
CLASSPATH.'ps_product.php');
$ps_product= new ps_product;

global 
$vendor_currency;

$print mosgetparam$_REQUEST'print'0);
$order_id mosgetparam$_REQUEST'order_id'0);

$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);

if (
$db->next_record()) {
    
    
$mainframe->setPageTitle$VM_LANG->_PHPSHOP_ACC_ORDER_INFO.' : '.$VM_LANG->_PHPSHOP_ORDER_LIST_ID.' '.$db->f('order_id'));
    require_once( 
CLASSPATH.'ps_product_category.php');
    
$pathway "<a class=\"pathway\" href=\"".$sess->urlSECUREURL ."index.php?page=account.index")."\" title=\"".$VM_LANG->_PHPSHOP_ACCOUNT_TITLE."\">"
          
.$VM_LANG->_PHPSHOP_ACCOUNT_TITLE."</a> ".ps_product_category::pathway_separator().' '
          
.$VM_LANG->_PHPSHOP_ACC_ORDER_INFO;
    
$mainframe->appendPathWay$pathway );
    
    
// Get bill_to information
    
$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;

    
/** Retrieve Payment Info **/
    
$dbpm = new ps_DB;
    
$q  "SELECT * FROM `#__{vm}_payment_method`, `#__{vm}_order_payment`, `#__{vm}_orders` ";
    
$q .= "WHERE #__{vm}_order_payment.order_id='$order_id' ";
    
$q .= "AND #__{vm}_payment_method.payment_method_id=#__{vm}_order_payment.payment_method_id ";
    
$q .= "AND #__{vm}_orders.user_id='" $auth["user_id"] . "' ";
    
$q .= "AND #__{vm}_orders.order_id='$order_id' ";
    
$dbpm->query($q);
    
$dbpm->next_record();

  if (empty( 
$print )) { ?>
  <a href="<?php $sess->purl(SECUREURL.'index.php?page=account.index'); ?>">
  <img src="<?php echo IMAGEURL ?>ps_image/undo.png" alt="Back"  height="32" width="32" border="0" align="left" />
  </a>
    
    <br />
    <script type="text/javascript">
    document.write('<a href="javascript:void window.open(\'<?php echo $mosConfig_live_site."/index2.php?page=account.order_details&order_id=$order_id&pop=1&option=com_virtuemart&print=1" ?>\', \'win2\', \'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=yes,resizable=yes,width=640,height=480,directories=no,location=no\');">');
    </script>
    <noscript><a href="<?php echo $mosConfig_live_site."/index2.php?page=account.order_details&order_id=$order_id&pop=1&option=com_virtuemart&print=1" ?>" target="_blank"></noscript>
    <?php echo $VM_LANG->_PHPSHOP_CHECK_OUT_THANK_YOU_PRINT_VIEW ?>
    </a>
    <br /><br />
  <?php 
  
}
?>
  
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td valign="top">
     <h2><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_LBL ?></h2>
     <p><?php
     
echo $vendor_name "<br />";
     echo 
$vendor_address "<br />";
     echo 
$vendor_city ", ";
     if (
CAN_SELECT_STATES == '1') {
         echo 
$vendor_state " ";
     }
     echo 
$vendor_zip?></p>
    </td>
    <td valign="top" width="10%" align="right"><?php echo $vendor_image?></td>
  </tr>
</table>
<?php
if ( $db->f("order_status") == "P" ) {
    
// Copy the db object to prevent it gets altered
    
$db_temp ps_DB::_clone$db );
 
/** Start printing out HTML Form code (Payment Extra Info) **/ ?>
<table width="100%">
  <tr>
    <td width="100%" align="center">
    <?php 
    
@include( CLASSPATH"payment/".$dbpm->f("payment_class").".cfg.php" );

    echo 
DEBUG vmCommonHTML::getInfoField('Beginning to parse the payment extra info code...' ) : '';

    
// Here's the place where the Payment Extra Form Code is included
    // Thanks to Steve for this solution (why make it complicated...?)
    
if( eval('?>' $dbpm->f("payment_extrainfo") . '<?php ') === false ) {
        echo 
vmCommonHTML::getErrorField"Error: The code of the payment method ".$dbpm->f'payment_method_name').' ('.$dbpm->f('payment_method_code').') '
        
.'contains a Parse Error!<br />Please correct that first' );
    }
      
?>
    </td>
  </tr>
</table>
<?php
    $db 
$db_temp;
}

/** END printing out HTML Form code (Payment Extra Info) **/
?>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
  <!-- begin customer information --> 
  <tr class="sectiontableheader"> 
    <th align="left" colspan="2"><?php echo $VM_LANG->_PHPSHOP_ACC_ORDER_INFO ?></th>
  </tr>
  <tr> 
    <td><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_NUMBER?>:</td>
    <td><?php printf("%08d"$db->f("order_id")); ?></td>
  </tr>

  <tr> 
    <td><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_DATE ?>:</td>
    <td><?php echo strftime"%d %B %Y"$db->f("cdate")); ?></td>
  </tr>
  <tr> 
    <td><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_STATUS ?>:</td>
    <td><?php
    $q 
"SELECT order_status_name,order_status_code FROM #__{vm}_order_status WHERE ";
    
$q .= "order_status_code = '" $db->f("order_status") . "'";
    
$dbos = new ps_DB;
    
$dbos->query($q);
    
$dbos->next_record();
    echo 
$dbos->f("order_status_name");
    
?>

</td>
  </tr>
  <!-- End Customer Information --> 
  <!-- Begin 2 column bill-ship to --> 
  <tr class="sectiontableheader"> 
    <th align="left" colspan="2"><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_CUST_INFO_LBL ?></th>
  </tr>
  <tr valign="top"> 
    <td width="50%"> <!-- Begin BillTo -->
      <table width="100%" cellspacing="0" cellpadding="2" border="0">
        <tr> 
          <td colspan="2"><strong><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_BILL_TO_LBL ?></strong></td>
        </tr>
        <tr> 
          <td><?php echo $VM_LANG->_PHPSHOP_ORDER_PRINT_COMPANY ?> :</td>
          <td><?php $dbbt->p("company"); ?></td>
        </tr>
        <tr> 
          <td><?php echo $VM_LANG->_PHPSHOP_SHOPPER_LIST_NAME ?> :</td>
          <td><?php 
          $dbbt
->p("first_name");
          echo 
" ";
          
$dbbt->p("middle_name");
          echo 
" ";
          
$dbbt->p("last_name");
         
?></td>
        </tr>
        <tr valign="top"> 
          <td><?php echo $VM_LANG->_PHPSHOP_ADDRESS ?> :</td>
          <td><?php 
          $dbbt
->p("address_1");
          echo 
"<br />";
          
$dbbt->p("address_2");
         
?></td>
        </tr>