News:

Support the VirtueMart project and become a member

Main Menu

Add paramter to order done page with standard payment

Started by kratzi, August 03, 2016, 01:16:21 AM

Previous topic - Next topic

kratzi

Hi
when paying by standard payment the url is www.myurl/cart throughout the whole buying process but also when the order is already done.
In earlier versions this was solved with the order_done view. Is there a way to call an additional parameter in the url or similar.

I would like to load the google tag manager only when the order_done page is reached.

Thank you

VM3.0.14 J. 3.5

Jumbo!

Override - components/com_virtuemart/views/cart/tmpl/default.php

Find following codes between lines 56 to 57:

$taskRoute = '';
?><form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::('index.php?option=com_virtuemart&view=cart' $taskRoute$this->useXHTML$this->useSSL); ?>">


Replace above by:

$taskRoute = ($this->checkout_task == 'confirm') ? '&layout=order_done' : '';
?><form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::('index.php?option=com_virtuemart&view=cart' $taskRoute$this->useXHTML$this->useSSL); ?>">



kratzi

Thank you a lot. This was the trick

I would have one more question regarding this.

I have the following php code to include a php file as soon a view is loaded.
$jinput = JFactory::getApplication()->input;
$view = $jinput->get('view');
if($view == 'pluginresponse'){
include ("templates/default/datalayer.php");
}


Now I would like to add the view if standard payment is used. So I changed the code to the following:

$jinput = JFactory::getApplication()->input;
$view = $jinput->get('view');
$layout = $jinput->get('layout');
if(($view == 'pluginresponse') or ($view == 'cart' && $layout == 'order_done'){
include ("templates/default/datalayer.php");
}


Unfortunately the including php is not loaded under order_done.

Thank you

kratzi

Hello,

This solution is not working any more after the update to VM 3.2.4. and J 3.8.1

Could please anyone assist or have the solution how to get it to work again. The url always stays with cart now.

Thank you and regards

kratzi

ArchiB

I am guessing here but, if you updated... the files probably got overwritten.  You probably need to make the change again.