News:

Looking for documentation? Take a look on our wiki

Main Menu

Trusted Shops integration in VM3 / variables output on order_done.php

Started by netwa, November 04, 2015, 19:51:37 PM

Previous topic - Next topic

netwa

Hello,

I need the following output on order_done.php

<div id="trustedShopsCheckout" style="display: none;">
<span id="tsCheckoutOrderNr">%Value: ORDER_NUMBER%</span>
<span id="tsCheckoutBuyerEmail">%Value: BUYER_EMAIL_ADDRESS%</span>
<span id="tsCheckoutBuyerId">%Value: CUSTOMER_ID%</span>
<span id="tsCheckoutOrderAmount">%Value: SHOPPING_BASKET_TOTAL%</span>
<span id="tsCheckoutOrderCurrency">%Value: ORDER_CURRENCY%</span>
<span id="tsCheckoutOrderPaymentType">%Value: PAYMENT_METHOD%</span>
</div>



Does anyone know how to address the variables on the final cart page. I think it should work like
<?php echo vRequest::getInt('virtuemart_order_id'?>
but I didn't find the needed functions.

There is a summary be default on the last page, maybe I can extend this? Maybe someone can tell me, where the code for the output is generated? The output will be generated by:
$this->html = vRequest::get('html', vmText::_('COM_VIRTUEMART_ORDER_PROCESSED') );
echo $this->html;


Best, Alex

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

netwa


netwa

<div class="vm-wrap vm-order-done"><h3>Vielen Dank für Ihre Bestellung!</h3><div class="post_payment_payment_name" style="width: 100%">
<span class="post_payment_payment_name_title">Zahlungsart:  </span>
<span class="vmpayment_name">Vorkasse</span><span class="vmpayment_description"><strong></div>

<div class="post_payment_order_number" style="width: 100%">
<span class="post_payment_order_number_title">Bestellnummer </span>
25WH084</div>

<div class="post_payment_order_total" style="width: 100%">
<span class="post_payment_order_total_title">Endsumme </span>
139,00 €</div>
<a class="vm-button-correct" href="/orders/number/25WH084.html?order_pass=p_rwELqTAr">Ihre Bestellung ansehen</a>


Where is post_payment_order_number generated? I don't find the position :(

Milbo

The new version keeps the order for this problem. Just wait 2-3 days
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

netwa


jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

netwa

OK. done.
But how do I get my variables filled?

I tried this in order.php:
<div id="trustedShopsCheckout" style="display: none;">
<span id="tsCheckoutOrderNr"><?php echo vRequest::getInt('virtuemart_order_id'?></span>
<span id="tsCheckoutBuyerEmail"><?php echo vRequest::getInt('virtuemart_order_email'?></span>
<span id="tsCheckoutBuyerId"><?php echo vRequest::getVar('virtuemart_user_id',0); ?></span>
<span id="tsCheckoutOrderAmount"><?php echo vRequest::getInt('virtuemart_order_total'?></span>
<span id="tsCheckoutOrderCurrency"><?php echo vRequest::getInt('virtuemart_order_id'?></span>
<span id="tsCheckoutOrderPaymentType"><?php echo vRequest::get('payment_name',''?></span>
</div>


This code doesn't work :( How do I adress the variables on this place?

Milbo

vRequest is completly wrong, because it must come from teh stored order.

Use vmdebug to print this object, it keeps the data you want  $this->cart->orderDetails
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

netwa

Is it possible to get the payment type ? I only found virtuemart_paymentmethod_id, but not the text-version.

Milbo

trust me, you need the orderdetails, becaus I just did the same job, you could just buy it from me.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/