News:

Looking for documentation? Take a look on our wiki

Main Menu

How to get the "view your order" link on the Thank you page

Started by design609, January 26, 2012, 02:17:15 AM

Previous topic - Next topic

design609

Hi
How to get the "view your order" link on the Thank you page, right after checkout
/cart/order_done.php

Hope some programmer know the syntax
Tried use the:
Quote<a class="default" title="<?php echo $this->cart->vendor->vendor_store_name ?>" href="<?php echo JURI::root().'index.php?option=com_virtuemart&view=orders&task=details&order_number='.$this->order['details']['BT']->order_number.'&order_pass='.$this->order['details']['BT']->order_pass; ?>">
         <?php echo JText::_('COM_VIRTUEMART_CART_MAIL_SHOPPER_YOUR_ORDER_LINK'); ?></a>
to no effect - seems order_number and pass is not available...

Any help would be appreciated.
Cheers


renegadesk

Easiest way to get this done would be to just add a link to the view orders page wouldn't it? Then you don't have to worry about picking the order our and what not. You could also put your HTML right in the order_done.php file too.

If you really want to make the link happen, it's going to be tricky I reckon. Best resource would be to open the payment method plugin file to create the link that you want. For standard payment plugin it's /plugins/vmpayment/standard/standard.php

Love to help out more but the code is hectic in there! Good luck

kratzi

Hi,

I have exactly the same problem and need a solution.

In /plugins/vmpayment/standard/standard.php I have found the following code that displays the order number on the order done page:

$html = '<table class="vmorder-done">' . "\n";
$html .= $this->getHtmlRow ('STANDARD_PAYMENT_INFO', $dbValues['payment_name'], 'class="vmorder-done-payinfo"');
if (!empty($payment_info)) {
$lang = JFactory::getLanguage ();
if ($lang->hasKey ($method->payment_info)) {
$payment_info = JText::_ ($method->payment_info);
} else {
$payment_info = $method->payment_info;
}
$html .= $this->getHtmlRow ('STANDARD_PAYMENTINFO', $payment_info, 'class="vmorder-done-payinfo"');
}
if (!class_exists ('VirtueMartModelCurrency')) {
require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php');
}
$currency = CurrencyDisplay::getInstance ('', $order['details']['BT']->virtuemart_vendor_id);
$html .= $this->getHtmlRow ('STANDARD_ORDER_NUMBER', $order['details']['BT']->order_number, "vmorder-done-nr");
$html .= $this->getHtmlRow ('STANDARD_AMOUNT', $currency->priceDisplay ($order['details']['BT']->order_total), "vmorder-done-amount");

//$html .= $this->getHtmlRow('STANDARD_INFO', $method->payment_info);
//$html .= $this->getHtmlRow('STANDARD_AMOUNT', $totalInPaymentCurrency.' '.$currency_code_3);
$html .= '</table>' . "\n";


How can I change the following code to generate a link?

$html .= $this->getHtmlRow ('STANDARD_ORDER_NUMBER', $order['details']['BT']->order_number, "vmorder-done-nr");


Thank you in advance

Kratzi

PRO

this is done in the payment method plugin


i thought this was normal vmart behavior. I think mine does this


kratzi

Hi,

the values for order value, order number are loaded. But there is no link generated.

$html .= $this->getHtmlRow ('STANDARD_ORDER_NUMBER', $order['details']['BT']->order_number, "vmorder-done-nr");
$html .= $this->getHtmlRow ('STANDARD_AMOUNT', $currency->priceDisplay ($order['details']['BT']->order_total), "vmorder-done-amount");

I think it should be something like this f.e. echo (http//www.yourserver.eu/index.php/ ..... $order['details']['BT']->order_number)

However I don't have any clue how to code php therefore it would be great you could please adjust this code for me.

Regards

Kratzi