shipping/payment name and description translation

  • Posts: 141
  • Thank you received: 3
  • Hikashop Business
1 year 10 months ago #307548

-- HikaShop version -- : 4.1
-- Joomla version -- : 3.9.6
-- PHP version -- : 7.2.14

Hi, Is it possible to translate shipping method / payment methods names and descriptions without using external components/plugins ?
Regards,
Greg

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

  • Posts: 72525
  • Thank you received: 11030
  • MODERATOR
1 year 10 months ago #307551

Hi,

There is no option to be able to do that without Falang.

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

  • Posts: 141
  • Thank you received: 3
  • Hikashop Business
1 year 10 months ago #307583

Hi Nicolas,
It is a pity that it is not possible to use language override in this case as in the case of custom fields or characteristics.
Regards,
Greg

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

  • Posts: 141
  • Thank you received: 3
  • Hikashop Business
1 year 10 months ago #307586

Hi Nicolas, I have implemented following change in the show_block_shipping.php in the line 115

Before change:

<span class="hikashop_checkout_shipping_name"><?php echo $shipping->shipping_name;?></span>

After change:
<span class="hikashop_checkout_shipping_name"><?php echo JText::_( $shipping->shipping_name);?></span>

Above change caused that shipping name is now translatable using language override in the same way as for example characteristic name.
I understand same change might be implemented to make translatable payment method in show_block_payment.php

Regards,
Greg

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

  • Posts: 141
  • Thank you received: 3
  • Hikashop Business
1 year 10 months ago #307592

Hi Nicolas, Additionally to have also translation on checkout summary for shipping/delivery I made following changes in show_block_status.php:

Before:

<?php
	$cart = $this->checkoutHelper->getCart();

	$array = array();
	if(!empty($cart->shipping)) {
		$names = array();
		foreach($cart->shipping as $shipping) {
			$names[] = $shipping->shipping_name;
		}


		$array[] = JText::sprintf('HIKASHOP_SHIPPING_METHOD_CHOSEN', '<span class="label label-info">'.implode('</span> <span class="label label-info">', $names).'</span>');
	}

	if(!empty($cart->payment))
		$array[] = JText::sprintf('HIKASHOP_PAYMENT_METHOD_CHOSEN', '<span class="label label-info">'.$cart->payment->payment_name.'</span>');


	echo implode('<br/>', $array);

	if(empty($this->ajax)) { ?>
</div>

After:
<?php
	$cart = $this->checkoutHelper->getCart();

	$array = array();
	if(!empty($cart->shipping)) {
		$names = array();
		foreach($cart->shipping as $shipping) {
			$names[] = JText::_($shipping->shipping_name);
		}


		$array[] = JText::sprintf('HIKASHOP_SHIPPING_METHOD_CHOSEN', '<span class="label label-info">'.implode('</span> <span class="label label-info">', $names).'</span>');
	}

	if(!empty($cart->payment))
		$array[] = JText::sprintf('HIKASHOP_PAYMENT_METHOD_CHOSEN', '<span class="label label-info">'. JText::_($cart->payment->payment_name).'</span>');

	echo implode('<br/>', $array);

	if(empty($this->ajax)) { ?>
</div>

Regards,
Greg

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

  • Posts: 72525
  • Thank you received: 11030
  • MODERATOR
1 year 10 months ago #307585

Hi,

It could indeed be interesting to handle that. I've noted it for future improvements on my end.

Regarding your modification, you can do it with a view override on your end in the mean time. However, we'll implement that capability differently as we want the payment / shipping method name to be translated everywhere (email notifications, orders listing, checkout, etc).

Last edit: 1 year 10 months ago by nicolas.

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

  • Posts: 141
  • Thank you received: 3
  • Hikashop Business
1 year 10 months ago #307615

Hi Nicolas, great !
I hope that the change will be implemented soon :)
I think that the full multilingualism of the store would be great and build additional added value
Regards,
Greg

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

  • Posts: 285
  • Thank you received: 4
  • Hikashop Business
4 months 1 week ago #326747

Has this been implemented?
Not obvious from a quick look at payment / shipping name / description in checkout view in 4.4.0

What I would like the see..

Shipping Name
MYORG_FREEDELIVERY

On back-end shipping listing display translation (from override) in language of the logged-in administrator.

On front-end checkout display translation (from override) in language of customer.

Template overrides would do that nicely ... gets a bit more involved translating emails and other places where order information appears.

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

  • Posts: 72525
  • Thank you received: 11030
  • MODERATOR
4 months 1 week ago #326748

Hi,

We made a big push in 2019/2020 to add translations to HikaShop.
So yes it's been implemented.
We didn't do it with code change in the view files but directly when the data is loaded from the database.
The advantage is that you can benefit from translation overrides even if you update from an old HikaShop with view overrides or if your template has old view overrides.
So now, you can turn on the "Activate the edition of content in multiple languages" setting of the Hikashop configuration and you'll have the translation interface displayed. Before that option would be available only when Falang was detected on the website and translations would be stored in Falang when using the translation interface.
Now it's always available and the translations you make are automatically stored in the translation override files.

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

  • Posts: 77
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
1 month 2 weeks ago #330090

Hi,
Joomla 3.9.24
Hikashop Business 4.4.0
Multilangual site. No falang. The "Activate the edition of content in multiple languages" turned on.

Shipping and payment method name /descriptions are translated (in the same form) but do not understand why on the front end these translations do not appear...the systems load the text I enter in shipping/payment MAIN INFO window. All other content, hika terms is ok by switching languages.

Site default language is Lithuanian, the backend default language English. I tested when both default English, but no difference.
Where could be the issue?

Thank you

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

  • Posts: 72525
  • Thank you received: 11030
  • MODERATOR
1 month 1 week ago #330209

Hi,

If the translation system works for everything else, then I don't see why it wouldn't for the payment/shipping methods name and description.
We would need a backend access to check the situation directly.

Could you provide that along with a link to this thread via our contact form ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 72525
  • Thank you received: 11030
  • MODERATOR
1 month 1 week ago #330345

Hi,

I checked the situation on your website but I don't see the translations  for your shipping and payment methods in the translation override:https://i.imgur.com/ZXYpKOo.png
So I think that the issue is that you had Falang before and you removed it, but you still have the falang tables in your website database.
Because of that, HikaShop found them and is storing the translations there but since you don't have the falang plugin anymore to modify the text with the translations, they don't appear on the frontend.
So supposing that what I'm speculating is correct, the solution is to go in your PHPMyAdmin and delete / rename the falang tables and then redo your translations in HikaShop and it should then work fine.

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

Time to create page: 0.090 seconds
Powered by Kunena Forum