[Skip to main content](#vessel-content)

#   Is there a way to see which variable exist? SOLVED

##

- **[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")**
- [![1fcb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/337-1fcb "View 1fcb's Profile") Topic Author
- [ Offline](/forum/user/337-1fcb)

Less More

- Posts: 137
- Thank you received: 2
-
-

14 years 11 months ago -  14 years 11 months ago [\#30381](#30381) by [1fcb](/forum/user/337-1fcb "View 1fcb's Profile")  *[Is there a way to see which variable exist? SOLVED](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30381 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")* was created by *[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")*

Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address_title but have not been successful. Can you please tell me the correct name of the var. Also... is there a list of variable name,s so I can easily customize front-end or e-mails?

Thanks (as always) in advance!

Last edit: 14 years 11 months ago by [1fcb](/forum/user/337-1fcb "View 1fcb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

14 years 11 months ago [\#30406](#30406) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Is there a way to see which variable exist?](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30406 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")*

Hi,

It should be like that:

$address =&amp; $data-&gt;order_addresses[$data-&gt;cart-&gt;billing_address-&gt;address_id];
echo $address-&gt;address_title;

You can use the code:
var_dump($data);

to get a dump of all the variables you can use.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")**
- [![1fcb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/337-1fcb "View 1fcb's Profile") Topic Author
- [ Offline](/forum/user/337-1fcb)

Less More

- Posts: 137
- Thank you received: 2
-
-

14 years 11 months ago [\#30476](#30476) by [1fcb](/forum/user/337-1fcb "View 1fcb's Profile")  Replied by *[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")* on topic *[Re: Is there a way to see which variable exist?](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30476 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")*

**nicolas wrote:**

> Hi,
>
> It should be like that:
>
> $address =&amp; $data-&gt;order\_addresses\[$data-&gt;cart-&gt;billing\_address-&gt;address\_id\];
> echo $address-&gt;address\_title;

hmm... unfortunately it does not work. No output...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

14 years 11 months ago [\#30489](#30489) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Is there a way to see which variable exist?](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30489 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")*

What about:

echo $data-&gt;cart-&gt;billing_address-&gt;address_title;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")**
- [![1fcb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/337-1fcb "View 1fcb's Profile") Topic Author
- [ Offline](/forum/user/337-1fcb)

Less More

- Posts: 137
- Thank you received: 2
-
-

14 years 11 months ago [\#30541](#30541) by [1fcb](/forum/user/337-1fcb "View 1fcb's Profile")  Replied by *[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")* on topic *[Re: Is there a way to see which variable exist?](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30541 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")*

still not working. Wouldn't be be title (Mr or Mrs) not a standard attribute of the object customer like first name or last name? It is a standard field filled out during registration. What I am missing is the data model or a similar description to know how to access the information of the registration fields.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

14 years 11 months ago [\#30549](#30549) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Is there a way to see which variable exist?](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30549 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")*

The address information is not part of the customer object.

As I said, the address information is available in $data-&gt;cart-&gt;billing_address in the emails sent by HikaShop. The system itself use it display display the billing address on the email so there is no way it's not working...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")**
- [![1fcb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/337-1fcb "View 1fcb's Profile") Topic Author
- [ Offline](/forum/user/337-1fcb)

Less More

- Posts: 137
- Thank you received: 2
-
-

14 years 11 months ago [\#30563](#30563) by [1fcb](/forum/user/337-1fcb "View 1fcb's Profile")  Replied by *[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")* on topic *[Re: Is there a way to see which variable exist?](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30563 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")*

Ok, I think I narrowed it down a bit. In some areas of the confirmation status change e-mail (the lower part) the information would dhow up, in the part, where I address my customers (the very top part), it wold not show p. I guess I need to alloate/get the correct claass first and then be able to display the infrormation thereafter. Can you share the php code to get the class?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

14 years 11 months ago [\#30575](#30575) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Is there a way to see which variable exist?](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30575 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")*

Then, you need to move the block of code which loads the $data object before where you want to use it.

I'm talking about that big block of code:

&lt;?php
$order_url = $data-&gt;order_url;

$mail_status = $data-&gt;mail_status;
$customer = $data-&gt;customer;
$order_status = $data-&gt;order_status;
$class = hikashop_get('class.order');
$data = $class-&gt;get($data-&gt;order_id);
$url = $data-&gt;order_number;
$data-&gt;order_url = $order_url;
$data-&gt;order_status = $order_status;
$data-&gt;mail_status = $mail_status;
$config =&amp; hikashop_config();
if($config-&gt;get('simplified_registration',0)!=2){
$url = '&lt;a href="'.$order_url.'"&gt;'. $url.'&lt;/a&gt;';
}
echo JText::sprintf('ORDER_STATUS_CHANGED_TO',$url,$data-&gt;mail_status);

$data-&gt;cart = $class-&gt;loadFullOrder($data-&gt;order_id,true,false);
$data-&gt;cart-&gt;coupon = null;
$price = null;
$tax = $data-&gt;cart-&gt;order_subtotal - $data-&gt;cart-&gt;order_subtotal_no_vat + $data-&gt;order_discount_tax + $data-&gt;order_shipping_tax;
//$tax = $data-&gt;cart-&gt;order_subtotal - $data-&gt;cart-&gt;order_subtotal_no_vat;
$price-&gt;price_value = $data-&gt;order_full_price-$tax;
$price-&gt;price_value_with_tax = $data-&gt;order_full_price;
$data-&gt;cart-&gt;full_total = null;
$data-&gt;cart-&gt;full_total-&gt;prices = array($price);
$data-&gt;cart-&gt;coupon-&gt;discount_value =&amp; $data-&gt;order_discount_price;
$app=&amp;JFactory::getApplication();
if($app-&gt;isAdmin()){
$view = 'order';
}else{
$view = 'address';
}
?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")**
- [![1fcb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/337-1fcb "View 1fcb's Profile") Topic Author
- [ Offline](/forum/user/337-1fcb)

Less More

- Posts: 137
- Thank you received: 2
-
-

14 years 11 months ago [\#30583](#30583) by [1fcb](/forum/user/337-1fcb "View 1fcb's Profile")  Replied by *[1fcb](/forum/user/337-1fcb "View 1fcb's Profile")* on topic *[Re: Is there a way to see which variable exist?](/forum/4-how-to/30381-is-there-a-way-to-see-which-variable-exist-solved#30583 "Hi, I would like to include the title (Mr or Mrs) in the greeting of an e-mail. this would be easy to implemnt, if I would know, how this variable is named. I have tried with $title and $address&#95;title...")*

works! Thanks so much.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzMwMzgxLWlzLXRoZXJlLWEtd2F5LXRvLXNlZS13aGljaC12YXJpYWJsZS1leGlzdC1zb2x2ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.293 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
