Skip to main content

Display content of customfield on checkout

11 years 8 months ago #192084 by cobi
-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6

okay it's a simple thing, but I don't know how?

my goal: Give Customer manual a customer ID and show this ID at the checkout page at the status section.

Here is what I've done:

1) I setup a custom-field called "kundennummer" (in english customer-id) see the screenshot

2) I put into the customer field manualy a number like: 123456789

3) To get it to the status section I tried to edit the "checkout / status.php" but I do not know what code i have to use to display the customer-id (custom-field)????

here is the code of the checkout / status.php where do I have to put wich code?
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.3.5 * @author hikashop.com * @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><br/> <span id="hikashop_checkout_status"> <?php $array = array(); if(!empty($this->shipping_data)) { $names = array(); foreach($this->shipping_data as $shipping) { $names[] = $shipping->shipping_name; } $array[] = JText::sprintf('HIKASHOP_SHIPPING_METHOD_CHOSEN', '<span class="label label-info">'.implode(', ', $names).'</span>'); } if(!empty($this->payment_data)) { $array[]= JText::sprintf('HIKASHOP_PAYMENT_METHOD_CHOSEN', '<span class="label label-info">'.$this->payment_data->payment_name.'</span>'); } echo implode('<br/>', $array); ?> </span> <div class="clear_both"></div>

Please Log in or Create an account to join the conversation.

11 years 8 months ago #192090 by Xavier
Hi,

You can use such kind of code:
Code:
$user = hikashop_loadUser(true); if($user != null) echo $user->kundennummer;
The following user(s) said Thank You: cobi

Please Log in or Create an account to join the conversation.

11 years 8 months ago #192182 by cobi
Hey Xavier,

i knew we met again. This time everything works like a charme from the begining.

Thx again for your fast support.

You guys rocks - realy!

Please Log in or Create an account to join the conversation.

11 years 8 months ago #192213 by cobi
Hey Xavier,

one more question. I need the the custom field "kundennummer" even inside the order email. How do i make this happen? Any ideas?

Greetings
Cobi

Please Log in or Create an account to join the conversation.

11 years 8 months ago #192221 by Xavier
Hi,

You can edit the emails via the menu System > Emails, for business edition or via FTP in the folder "media/com_hikashop/mail".
Be careful, if you do the modifications via FTP, when updating the changes will be lost.

Then in the html part of the email you can use this kind of code to display the value:
Code:
<?php if(isset($data->customer->kundennummer)){ echo $data->customer->kundennummer; } ?>

In the next release you will be able to simply use the tag:
Code:
{VAR:user.kundennummer}
The following user(s) said Thank You: cobi

Please Log in or Create an account to join the conversation.

11 years 8 months ago - 11 years 8 months ago #192331 by cobi
Hey Xavier,

if i could I would give you a big hug. everything is working like us said. thx so much

I appreciate your awesome support
Last edit: 11 years 8 months ago by cobi.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum