VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: jbenes on August 23, 2012, 06:43:54 AM

Title: Change Order Complete Page
Post by: jbenes on August 23, 2012, 06:43:54 AM
Hi. When completing an order on my site, www.jberryskincare.com, the checkout complete page (once you had completed the checkout), says Amount: xxxx United States dollar. I would like to change it to $xxx. Where can I do this? I've looked under compenents/com_virtuemart/views/cart/tmpl/order_done.php, but the only things to edit within the file are

echo "<h3>".JText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU')."</h3>";

echo $this->html;


Where can I change this? Thanks!



UPDATE: On line in plugins/vmpayment/authorizenet/authorizenet.php, starting at lines 974, I have edited:

   $html = '<table class="adminlist">' . "\n";
    $html .= $this->getHtmlRow ('AUTHORIZENET_PAYMENT_NAME', $payment_name);
    $html .= $this->getHtmlRow ('AUTHORIZENET_ORDER_NUMBER', $authorizeNetResponse['invoice_number']);
    $html .= $this->getHtmlRow ('AUTHORIZENET_AMOUNT', $authorizeNetResponse['amount']);
    //$html .= $this->getHtmlRow('AUTHORIZENET_RESPONSE_AUTHORIZATION_CODE', $authorizeNetResponse['authorization_code']);
    $html .= $this->getHtmlRow ('AUTHORIZENET_RESPONSE_TRANSACTION_ID', $authorizeNetResponse['transaction_id']);
    $html .= '</table>' . "\n";
    $this->logInfo (JText::_ ('VMPAYMENT_AUTHORIZENET_ORDER_NUMBER') . " " . $authorizeNetResponse['invoice_number'] . ' payment approved', 'message');
    return $html;
  }


All I did was remove the string that displayed currency in the fourth line (in the code above). How can I add in a $ sign? Thanks!
Title: Re: Change Order Complete Page
Post by: jbenes on August 25, 2012, 06:01:37 AM
$5 via Paypal to anyone that can help me figure out how to add the dollar sign.  :D
Title: Re: Change Order Complete Page
Post by: jbenes on August 25, 2012, 22:28:06 PM
Bump. Still offering $5!
Title: Re: Change Order Complete Page
Post by: tarihci20 on August 26, 2012, 03:04:05 AM
Hİ jbenes,
go
/administrator/index.php?option=com_virtuemart&view=currency

click United States dollar or add new currency

line 7 write dollar sign. (maybe AltGr+4).

if correct my answer, my paypal adress:     bilgi@kpsscd.com
Title: Re: Change Order Complete Page
Post by: jbenes on August 26, 2012, 20:40:30 PM
What do you mean by line 7? This isn't a file that I'm editing. I did take a look at the currency options for USD, but still no luck.
Title: Re: Change Order Complete Page
Post by: ivus on August 27, 2012, 03:47:53 AM
Hi jbenes,

In your authorizenet.php plugin look for this function

function _handleResponse ($response, $submitted_values, $order, $payment_name) {}

Right at the end of the function you should see this piece of code:



$html = '<table class="adminlist">' . "\n";
$html .= $this->getHtmlRow ('AUTHORIZENET_PAYMENT_NAME', $payment_name);
$html .= $this->getHtmlRow ('AUTHORIZENET_ORDER_NUMBER', $authorizeNetResponse['invoice_number']);
$html .= $this->getHtmlRow ('AUTHORIZENET_AMOUNT', $authorizeNetResponse['amount'] . ' ' . $currency->currency_name);
//$html .= $this->getHtmlRow('AUTHORIZENET_RESPONSE_AUTHORIZATION_CODE', $authorizeNetResponse['authorization_code']);
$html .= $this->getHtmlRow ('AUTHORIZENET_RESPONSE_TRANSACTION_ID', $authorizeNetResponse['transaction_id']);
$html .= '</table>' . "\n";
$this->logInfo (JText::_ ('VMPAYMENT_AUTHORIZENET_ORDER_NUMBER') . " " . $authorizeNetResponse['invoice_number'] . ' payment approved', 'message');
return $html;



$html .= $this->getHtmlRow ('AUTHORIZENET_AMOUNT', '$' . $authorizeNetResponse['amount'] . ' ' . $currency->currency_name);

That should do it. You can keep your money.

ivus ;)
Title: Re: Change Order Complete Page
Post by: jbenes on August 29, 2012, 19:04:04 PM
Thanks a ton!  :D :D

Oddly enough, my authorize.net had a completely different line. Instead of saying $html .= $this->getHtmlRow ('AUTHORIZENET_AMOUNT', '$' . $authorizeNetResponse['amount'] . ' ' . $currency->currency_name);, it said something else different.