- Posts: 10
- Thank you received: 0
Display Generated coupon on thank you message
- luciogodoy
-
Topic Author
- Offline
I've a website that creates a coupon with a unique serial number, and sends it to the user, however i would like to have the coupon printed as part of the thank you message, is it possible to do so pls?
I'm using the latest version with Joomla 2.5
Many thanks
Lucio
Please Log in or Create an account to join the conversation.
To be able to display the coupon in the "thank you" page, we have to be sure that the order is right confirmed when the "thank you" page is displayed.
If the order is not confirmed, HikaSerial might not have create the serial, or assign it.
We have to be sure that the order is confirmed in this page if we want to add some code to load the serial and display it, otherwise we won't find any data to display.
I hope my explanations are clear enough.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
thank you for your quick answer.
I'm planning to display the coupon after the sale has been completed via credit card.
Is it easy to implement , pls?
Thanks
Lucio
Please Log in or Create an account to join the conversation.
In the "hikashop | front-end | your_frontend_template | checkout | after_end" view.
You can use the code below to retrieve the serials for the order:
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
i'm assuming when you say:
"In the "hikashop | front-end | your_frontend_template | checkout | after_end" view"
For me to go to:
Login as admin to Joomla
Go to the HikaShop Component
Displays
Views
Filter by my template "rt_lumiere'
Find the CheckOut then edit the after_end file.
If thats correct, i do not have the Checkout to after_end file.
How can i get that pls?
Thanks
Lucio
Please Log in or Create an account to join the conversation.
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
i'm pasting the code before the line:
$app = JFactory::getApplication();
$app->enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') );
And will use the $serials
Hope thats ok
Thanks
Lucio
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
I have added the following code to the after_end.php
Thanks
Lucio
Please Log in or Create an account to join the conversation.
You can use a
If the is nothing in the order, HikaSerial won't be able to display anything because there is no validated order when the page "after_end" is displayed.
Without order, it is not possible to display the serials.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
I've pasted the code var_dump($this->order);
And it didn't print anything!
Why is that pls? Is it possible to fix pls?
Thanks
Lucio
Please Log in or Create an account to join the conversation.
Anything or "null" ?
If you had anything, are you sure you edited the view for the right template ?
If you had "null", it means that the order is not confirmed or accessible while displaying the page.
At this moment I don't have specific idea for a patch and I guess that I will ask to the rest of the HikaShop team.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
Please Log in or Create an account to join the conversation.
The "after_end" is called when the customer have completed his order and return to the website.
It is the page where you see the "thank you for your order".
The other solution will be to redirect the user to another page, like the order page (in his user control panel).
And in this page, the serial will be displayed. You can edit the way that the serials are display using the HikaSerial views.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
I'm using the HkaShop Credit card payment option, could that be the problem?
The order is marked as shipped when the transaction is done.
thanks
Lucio
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
var dump Start: object(stdClass)#954 (40) { ["order_id"]=> string(2) "17" ["order_billing_address_id"]=> string(1) "1" ["order_shipping_address_id"]=> string(1) "1" ["order_user_id"]=> string(1) "6" ["order_status"]=> string(9) "confirmed" ["order_type"]=> string(4) "sale" ["order_number"]=> string(3) "T17" ["order_created"]=> string(10) "1400862269" ["order_modified"]=> string(10) "1400862319" ["order_invoice_id"]=> string(2) "16" ["order_invoice_number"]=> string(3) "S16" ["order_invoice_created"]=> string(10) "1400862319" ["order_currency_id"]=> string(1) "4" ["order_full_price"]=> string(7) "0.01000" ["order_tax_info"]=> array(1) { ["VAT"]=> object(stdClass)#951 (3) { ["tax_namekey"]=> string(3) "VAT" ["tax_rate"]=> string(7) "0.20000" ["tax_amount"]=> float(0) } } ["order_discount_code"]=> string(0) "" ["order_discount_price"]=> string(7) "0.00000" ["order_discount_tax"]=> string(7) "0.00000" ["order_payment_id"]=> string(1) "2" ["order_payment_method"]=> string(6) "paypal" ["order_payment_price"]=> string(7) "0.00000" ["order_payment_params"]=> string(0) "" ["order_shipping_id"]=> string(0) "" ["order_shipping_method"]=> string(0) "" ["order_shipping_price"]=> string(7) "0.00000" ["order_shipping_tax"]=> string(7) "0.00000" ["order_shipping_params"]=> string(0) "" ["order_partner_id"]=> string(1) "0" ["order_partner_price"]=> string(7) "0.00000" ["order_partner_paid"]=> string(1) "0" ["order_partner_currency_id"]=> string(1) "0" ["order_ip"]=> string(12) "10.70.25.101" ["customer"]=> object(stdClass)#950 (29) { ["user_id"]=> string(1) "6" ["user_cms_id"]=> string(3) "586" ["user_email"]=> string(24) "xxxx@hotmail.com" ["user_partner_email"]=> string(0) "" ["user_params"]=> object(stdClass)#949 (0) { } ["user_partner_id"]=> string(1) "0" ["user_partner_price"]=> string(7) "0.00000" ["user_partner_paid"]=> string(1) "0" ["user_created_ip"]=> string(12) "10.70.34.185" ["user_unpaid_amount"]=> string(7) "0.00000" ["user_partner_currency_id"]=> string(1) "0" ["user_created"]=> string(10) "1399911993" ["user_currency_id"]=> string(1) "0" ["user_partner_activated"]=> string(1) "0" ["id"]=> string(3) "586" ["name"]=> string(14) "xxxxxxx" ["username"]=> string(5) "xxxxx" ["email"]=> string(24) "xxxxx@hotmail.com" ["password"]=> string(34) "xxxxx" ["user type"]=> string(0) "" ["block"]=> string(1) "0" ["sendEmail"]=> string(1) "0" ["registerDate"]=> string(19) "2014-05-12 16:26:32" ["lastvisitDate"]=> string(19) "2014-05-23 16:22:53" ["activation"]=> string(0) "" ["params"]=> string(44) "{"site_language":"en-GB","language":"en-GB"}" ["lastResetTime"]=> string(19) "0000-00-00 00:00:00" ["resetCount"]=> string(1) "0" ["user agent"]=> string(0) "" } ["order_subtotal"]=> float(0.01) ["shipping_address"]=> object(stdClass)#947 (19) { ["address_id"]=> string(1) "1" ["address_user_id"]=> string(1) "6" ["address_title"]=> string(2) "Mr" ["address_firstname"]=> string(5) "xxxx" ["address_middle_name"]=> NULL ["address_lastname"]=> string(
Please Log in or Create an account to join the conversation.
- luciogodoy
-
Topic Author
- Offline
- Posts: 10
- Thank you received: 0
i've created the following code:
$voucher_number = $serials->serial_data;
Perhaps it would be nice (for people like me) to supply this code with the code you have supplied me perviously
Many thanks
Lucio
Please Log in or Create an account to join the conversation.
I have to admit that I can't understand your request.
Can you re-explain it ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.