Telephone in Address

  • Posts: 433
  • Thank you received: 17
  • Hikashop Business Hikashop Multisite
1 week 5 days ago #319330

-- HikaShop version -- : 4.3.0

Hi Hikashop,

Is it possible to change this code in the address format so that it wil only used when a telephone number has been provided by the customer.
Because we don't have this field required.

<?php echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?>

Kind regards,
Lumiga


Kind regards,
Lumiga

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

  • Posts: 69451
  • Thank you received: 10401
  • MODERATOR
1 week 4 days ago #319339

Hi,

Yes. You want to do it like that:

<?php $address = $this->params->get('address');
if(!empty($address->address_telephone)) {
 echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');
} ?>

The following user(s) said Thank You: Lumiga

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

Time to create page: 0.052 seconds
Powered by Kunena Forum