Additional information on address

  • Posts: 719
  • Thank you received: 3
11 years 6 months ago #99484

Hi,
via "custom fields" i added a text area field on registration form, table address.
How can i have this field on customer shipping address?
Thanks


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
11 years 6 months ago #99505

Hi,

You need to edit the address_template view files via the menu Display->Views and add the tag for that field.

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

  • Posts: 719
  • Thank you received: 3
11 years 6 months ago #99521

Perfect!
Thanks a lot!

But How can i have it on the invoice printed?


my site with Hikashop
www.lacasettabio.it
Last edit: 11 years 6 months ago by lacasetta.

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
11 years 6 months ago #99529

Same. You probably didn't edit the address_template view file for your backend template.

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

  • Posts: 719
  • Thank you received: 3
11 years 6 months ago #99546

Yes, you're right!
I edited the frontend template.
Now it is like i like!

But you did not say me what kind of templete!!! ;) ;)

Thank you
my best


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 719
  • Thank you received: 3
8 years 10 months ago #224827

Hi,
i open again this post just to improve the print of the invoice.
I have this address_template

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.6.0
 * @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');
?>{address_company}
{address_title} {address_firstname} {address_lastname}
{address_street}
{address_street2}
{ulterioriinfo}
{address_post_code} {address_city} {address_state}
{address_country}
<?php echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?><br />
<?php echo JText::sprintf('ADDRESS_VAT','{address_vat}');?><br />
<?php echo JText::sprintf('COD_FISC','{cod_fisc}');?><br />
I'd like to avoid the stamp if a custom fild is empty.
I mean that sometimes i don't have the "addreess_vat" and the "cod_fis" fields.
So when i print the invoice i'd like to jump them and to do not print the line empty.
How can i change the code to fix that?
Thanks a lot
Best regards


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
8 years 10 months ago #224852

Hi,

You can do like that:

<?php
$address = $this->params->get('address');
if(!empty($address->address_vat)) echo JText::sprintf('ADDRESS_VAT','{address_vat}').'<br />'; 
?>

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

  • Posts: 719
  • Thank you received: 3
8 years 10 months ago #224948

Yes, perfect!
Thanks a lot.

I post the new code for me, to remember on future:

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.6.0
 * @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');
?>{address_company}
{address_title} {address_firstname} {address_lastname}
{address_street}
{address_street2}
{ulterioriinfo}
{address_post_code} {address_city} {address_state}
{address_country}
<?php
echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}').'<br />';
$address = $this->params->get('address');
if(!empty($address->address_vat)) echo JText::sprintf('VAT_IN_ADDRESS','{address_vat}').'<br />';
if(!empty($address->cod_fisc)) echo JText::sprintf('COD_FISC_IN_ADDRESS','{cod_fisc}').'<br />'; 
?>


my site with Hikashop
www.lacasettabio.it

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

Time to create page: 0.068 seconds
Powered by Kunena Forum