#38 – Delete orders and one page issue

Posted in ‘Taxi Booking for Joomla’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 12 June 2014 08:34 BST
stratos
Hi, I have 2 questions:

1. Is there a way to delete orders? I have made several tests and can't find a way to delete my fake orders, there's just an option to archive an order which still shows it on the orders list.

2. I want to insert a conversion tracking code in the 'Thank you' page after an order is submitted to track conversions for website purchasing. Problem is I need to specify the google_conversion_value to be equal to the total order amount. I found the file I need to insert the code which is /components/com_taxibooking/views/thanks/tmpl/default.php but I can't find a way to get the price value in that page. I've tried adding the following lines of code in the beginning of the file to get the cost

$session = JFactory::getSession();
$sub_total = JRequest::getVar('sub_total', 0);
$price = JRequest::getVar('total_price', 0);
$flat_cost = JRequest::getVar('flat_cost', 0);
$percentage_cost = JRequest::getVar('percentage_cost', 0);
// total cost
$grand_total = $sub_total+$flat_cost+$percentage_cost;

but I get 0 as a result

Is there a way to get the total order price on the 'thank you' page ?
Thursday, 12 June 2014 17:50 BST
martso
SumUp for Taxi Booking J4
Hi Stratos,
1. Of course you can delete Orders. In back end Orders list section just select the orders you wish to delete by clicking on the check box in front of them and then click on "Delete" icon in the Toolbar - top right on Joomla 2.5
2. Unfortunately with Order submission all data gets cleared before the Thank you page and you won't be able to get the data you need there. We are planning to separate the Thank you page from this process in the future and will add some more features like Social sharing there along with the possibility to get that Order data. Sorry for this inconvenience.
Best regards.
 
Friday, 13 June 2014 13:20 BST
stratos
Amazing! I really don't know how I could have missed the Delete button. Thanks martso.

Now, about the other issue: so is there a way to put my conversion tracking code somewhere where i can also track the amount of the order? If not the 'Thank you' page then where else before the data get's cleared ?
Friday, 13 June 2014 16:35 BST
martso
SumUp for Taxi Booking J4
Hi stratos,
I'm glad I could help with Delete problem :)
Regarding conversion tracking you can try adding your code to /components/com_taxibooking/views/taxibooking/tmpl/default_onepage.php which is the booking form page (make sure that you back up your website and files that you are about to change so you can revert if something happens).
Also please remember that your changes will be overridden next time you update Taxi Booking so you will have to apply them again.
Let me know if that worked.
Regards.
 
Monday, 16 June 2014 17:31 BST
stratos
martso hi,

I checked the default_onepage.php file and I guess I could insert my conversion tracking code there but I can't find the total cost variable to access..
I can see there's a span with id "price_wrap" which displays the price but can't find the actual variable to access. I guess it's coming from the onepage_taxibooking.js somehow.

Wednesday, 18 June 2014 14:53 BST
martso
SumUp for Taxi Booking J4
Total price will be the sum of selected vehicle price and payment method's prices. Please use the following code block to calculate total cost.

$price = $session->get('price', 0);
$flat_cost = $session->get('flat_cost', 0);
$percentage_cost = $session->get('percentage_cost', 0);
$grand_total = $price+$flat_cost+$percentage_cost;

Hope this helps.
Regards.
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

KANEV Web Development limited is not affiliated with or endorsed by the Joomla Project or Open Source Matters.

KANEV Web Development limited is registered in England and Wales #8902407