- Posts: 35
- Thank you received: 0
Change payment output message
13 years 8 months ago #91204
by LoonyTune
Change payment output message was created by LoonyTune
Hi.
I have searched this forum and have found how to change the message that appears once the order has been made (and this includes an order number), however, what I'd like to do is to address it to the customer.
So, what I would like to show is:
Hi (member name), thanks for your order. Please include you name (member name) and order number ( ** ) in the comments of the bank transfer so that we can match it to your order.
Cheers
LT
I have searched this forum and have found how to change the message that appears once the order has been made (and this includes an order number), however, what I'd like to do is to address it to the customer.
So, what I would like to show is:
Hi (member name), thanks for your order. Please include you name (member name) and order number ( ** ) in the comments of the bank transfer so that we can match it to your order.
Cheers
LT
Please Log in or Create an account to join the conversation.
13 years 8 months ago #91335
by Xavier
Replied by Xavier on topic Change payment output message
Hi,
To display the name, you can use: echo $order->cart->customer->name;
For the order number: echo $order_number;
To display the name, you can use: echo $order->cart->customer->name;
For the order number: echo $order_number;
Please Log in or Create an account to join the conversation.
13 years 8 months ago #91362
by LoonyTune
Replied by LoonyTune on topic Change payment output message
Thanks Xavier, I'll try that. The order number automatically outputs, but it's good to have another reference.
Thanks again
LT
Thanks again
LT
Please Log in or Create an account to join the conversation.
13 years 8 months ago #91363
by LoonyTune
Replied by LoonyTune on topic Change payment output message
Hi Xavier.
Excuse my ignorance, but how does echo $order->cart->customer->name need to formatted in the file?
Cheers
Excuse my ignorance, but how does echo $order->cart->customer->name need to formatted in the file?
Cheers
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 14
- Thank you received: 4
13 years 8 months ago - 13 years 8 months ago #91377
by winchester
Replied by winchester on topic Change payment output message
You will need to add it to the space where you want the information to show within PHP tags.
It should look like this:
In HikaShop, go to Display > Views
Set the dropdown filters at top right to [YourTempalte_Name] and "Front end".
The file you want to edit is the after_end file under the Checkout view. Click on it to edit it.
Now you can edit it to say what you want it to.
It should look something like this:
Actually, the above codes won't may not work as the information is not stored after the order is submitted. I'm not sure how to get HikaShop to take information from the previous order as yet though. However, this is how you would use it and this is the file you would place it into.
It should look like this:
Code:
<?php echo $order->cart->customer->name; ?>
In HikaShop, go to Display > Views
Set the dropdown filters at top right to [YourTempalte_Name] and "Front end".
The file you want to edit is the after_end file under the Checkout view. Click on it to edit it.
Now you can edit it to say what you want it to.
It should look something like this:
Code:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.0.0
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div id="hikashop_after_end">
<h1>Your order was successfully submitted!</h1>
<p>Hi <?php echo $order->cart->customer->name; ?>, thanks for your order. Please include you name <?php echo $order->cart->customer->name; ?> and order number <?php echo $order_number; ?> in the comments of the bank transfer so that we can match it to your order.</p>
</div>
Actually, the above codes won't may not work as the information is not stored after the order is submitted. I'm not sure how to get HikaShop to take information from the previous order as yet though. However, this is how you would use it and this is the file you would place it into.
Last edit: 13 years 8 months ago by winchester.
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
13 years 8 months ago #91559
by LoonyTune
Replied by LoonyTune on topic Change payment output message
Winchester, once again, thanks for your input.
I think I may have not myself too well, or what I have done.
I have a message that I have edited in the language file (System>Language). Under the heading of ;bank transfer and ;check, I have changed the "INCLUDE_ORDER_NUMBER_TO_TRANSFER" and "INCLUDE_ORDER_NUMBER_TO_CHECK" messages to what I want, except, I would also like the customer's name to appear.
I tried the method described above, but got no message including the user/customer name.
I only have 2 methods of payment (bank transfer and on pick up) and would like to see the message to include their user/customer name.
Cheers
I think I may have not myself too well, or what I have done.
I have a message that I have edited in the language file (System>Language). Under the heading of ;bank transfer and ;check, I have changed the "INCLUDE_ORDER_NUMBER_TO_TRANSFER" and "INCLUDE_ORDER_NUMBER_TO_CHECK" messages to what I want, except, I would also like the customer's name to appear.
I tried the method described above, but got no message including the user/customer name.
I only have 2 methods of payment (bank transfer and on pick up) and would like to see the message to include their user/customer name.
Cheers
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 14
- Thank you received: 4
13 years 8 months ago - 13 years 8 months ago #91560
by winchester
Replied by winchester on topic Change payment output message
It would be nice if HikaShop would allow the variables to be carried over into the after_end page. Perhaps, include the after_end page in the checkout flow so that it can be apart of the checkout process.
I don't know how to get the name from HikaShop, but I know how to get it from Joomla. Also, this will work for the after_end page, but not in the language files.
Using Joomla, open checkout > after_end in HikaShop and look for this line of code:
Add these lines just below it:
Now to get the user info from Joomla, use the line code where you want them to show.
The only problem is that these user information may be different from the information the user entered for their HikaShop Billing and/or Shipping addresses.
I'm also looking for a simpler way to handle this. These that's I've posted here are really just my findings and may not be the best or easiest way to handle it. However, I'm hoping someone from HikaShop will shed some light on this.
I don't know how to get the name from HikaShop, but I know how to get it from Joomla. Also, this will work for the after_end page, but not in the language files.
Using Joomla, open checkout > after_end in HikaShop and look for this line of code:
Code:
defined('_JEXEC') or die('Restricted access');
Add these lines just below it:
Code:
// Get Joomla! framework
define( 'JPATH_BASE', realpath(dirname(__FILE__) ));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
//get user information from the Joomla database
$user =& JFactory::getUser();
$session =& JFactory::getSession();
Now to get the user info from Joomla, use the line code where you want them to show.
Code:
<?php echo $user->username; // Joomla Username ?>
<?php echo $user->name; // Joomla User's Name (first & last) ?>
<?php echo $user->id; // Joomla User's ID ?>
<?php echo $user->email; // Joomla User's email ?>
The only problem is that these user information may be different from the information the user entered for their HikaShop Billing and/or Shipping addresses.
I'm also looking for a simpler way to handle this. These that's I've posted here are really just my findings and may not be the best or easiest way to handle it. However, I'm hoping someone from HikaShop will shed some light on this.
Last edit: 13 years 8 months ago by winchester.
The following user(s) said Thank You: LoonyTune
Please Log in or Create an account to join the conversation.
13 years 8 months ago #91608
by LoonyTune
Replied by LoonyTune on topic Change payment output message
Thanks for all of that Winchester. I'll try that out a little later and report back
Again, thanks for your input, it has been great
Cheers
Again, thanks for your input, it has been great
Cheers
Please Log in or Create an account to join the conversation.
13 years 7 months ago #94449
by LoonyTune
Replied by LoonyTune on topic Change payment output message
Hi
This is what I entered:
"<?php
/**
* @package HikaShop for Joomla!
* @version 2.0.0
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
// Get Joomla! framework
define( 'JPATH_BASE', realpath(dirname(__FILE__) ));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
//get user information from the Joomla database
$user =& JFactory::getUser();
$session =& JFactory::getSession();
<?php echo $user->name; // Joomla User's Name (first & last) ?>"
Obviously I removed the "" marks.
The message I got back was from the System>Languages file though.
I am not a coder, so maybe either I have entreed something wrong (very possible) or what I am after is not available.
Thanks all for your help.
Any more ideas???
LT
This is what I entered:
"<?php
/**
* @package HikaShop for Joomla!
* @version 2.0.0
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
// Get Joomla! framework
define( 'JPATH_BASE', realpath(dirname(__FILE__) ));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
//get user information from the Joomla database
$user =& JFactory::getUser();
$session =& JFactory::getSession();
<?php echo $user->name; // Joomla User's Name (first & last) ?>"
Obviously I removed the "" marks.
The message I got back was from the System>Languages file though.
I am not a coder, so maybe either I have entreed something wrong (very possible) or what I am after is not available.
Thanks all for your help.
Any more ideas???
LT
Please Log in or Create an account to join the conversation.
13 years 7 months ago #94462
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Change payment output message
Hi,
I made some modification in your code in order to fix it:
Regards,
I made some modification in your code in order to fix it:
Code:
<?php
defined('_JEXEC') or die('Restricted access');
// Get Joomla! framework
// (not required)
define( 'JPATH_BASE', realpath(dirname(__FILE__) ));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
//get user information from the Joomla database
$user =& JFactory::getUser();
$session =& JFactory::getSession();
echo $user->name; // Joomla User's Name (first & last)
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 14
- Thank you received: 4
13 years 7 months ago #94474
by winchester
Replied by winchester on topic Change payment output message
Sorry.. I should've mentioned that.. Remember though that this will only show the name entered into Joomla user and not the name from HikaShop.
Please Log in or Create an account to join the conversation.
Time to create page: 0.147 seconds