News:

Looking for documentation? Take a look on our wiki

Main Menu

checkout.2Checkout_result.php - display final bill

Started by sombik, August 16, 2005, 08:34:43 AM

Previous topic - Next topic

sombik

hello,
i added a line to subject file, because there was created wrong link
to see actual order bill. There was missing(actually empty value) order_id in the link.


Quote        <?php
        }
  }
  ?>
<br />
<?php
$order_id=$d['order_id']; // this is the added line
?>
<p><a href="<?php @$sess->purl( SECUREURL."index.php?option=com_phpshop&page=account.order_details&order_id=$order_id" ) ?>">
   <?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_LINK ?></a>
</p>
<?php
}


guys, what you think ... it's working but i'm not hardcoder. i just can't see behind the corner.

Soeren

Thanks for reporting this!
I've fixed that in the CVS also.

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

sombik

Actually I found a better solution, because there were more problems

Originally:
a) 2Checkout received order_number in x_invoice_num variable, which is MD5 and displayed the hash as cart number,

b) This hash was also sent back to  checkout.2Checkout_result.php script that used it for identifying the initial order.

In order display actual phpshop order number in 2CO payment I sent order_id from DB.

Therefore I made the following changes:
1) mambo-phpshop admin module-> list payment methods-> 2CheckOut-> Configuration-> Payment Extra Info
Quote'x_ship_to_zip' => $dbst->f("zip"),
       'x_ship_to_country' => $dbst->f("country"),
       'x_invoice_num' => $db->f("order_id"), //originally it was 'x_invoice_num' => $db->f("order_number"),

2) checkout.2Checkout_result.phpˇ


Quote<span class="message"><? echo $PHPSHOP_LANG->_PHPSHOP_PAYMENT_ERROR ?></span><?php
  }
  else {
        $qv = "SELECT order_id, order_number FROM #__pshop_orders ";
   $qv .= "WHERE order_id='".$order_number."'"; //originalli was so  $qv .= "WHERE order_number='".$order_number."'";
        $dbbt = new ps_DB;
        $dbbt->query($qv);
        $dbbt->next_record();
        $d['order_id'] = $dbbt->f("order_id");


and very end of the same file:

Quote<?php
        }
  }
  ?>
<br />
<?php
$order_id=$d['order_id']; // this is the added line
?>
<p><a href="<?php @$sess->purl( SECUREURL."index.php?option=com_phpshop&page=account.order_details&order_id=$order_id" ) ?>">
   <?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_LINK ?></a>
</p>
<?php
}

as posted earlier here