Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Shipping by Rules for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Rule names not translatable 17 Jan 2017 15:03 #1

  • gba
  • gba's Avatar Topic Author
Hi!
I want to use your language overrides to translate rule names.
Unfortunately this does not work.
Did you, maybe, not update to the current translation system of Joomla?
Kind regards,
Gerald

Rule names not translatable 24 Jan 2017 22:11 #2

Dear Gerald,
The rule names are automatically translated. I just checked (e.g. at demo.open-tools.net) and verified that it really works.

Please note that Joomla's translation system does not properly handle human-readable identifier, so you need to use an all-uppercase identifier with no spaces or special characters. E.g.
Name=SHIPPING_FREE; Amount>10; Shipping=0
You can then add a language override in Joomla's backend (Extensions -> Language(s) -> Overrides) for the SHIPPING_FREE language constant. Of course you can also define the translation of the SHIPPING_FREE constant in an .ini file, but then you need to make sure that the translation file is really loaded. The Joomla backend method makes sure that the translation is stored in a translation file that is always loaded.

Best regards,
Reinhold

Rule names not translatable 24 Jan 2017 22:56 #3

  • gba
  • gba's Avatar Topic Author
Hi!

I think, I did what you described:
Definition=myLabel; Value="SHIPPING_RULE_INFO_FREE"
Definition=myLabel; 61 in Categories; Value="SHIPPING_RULE_INFO_SMALL"
Definition=myLabel; 62 in Categories; Value="SHIPPING_RULE_INFO_MIDDLE"
Definition=myLabel; Amount >= 30; Value="SHIPPING_RULE_INFO_FREE"
Definition=myShipping; Value=NoShipping
Definition=myShipping; 61 in Categories; Value=4.083333333333333
Definition=myShipping; 62 in Categories; Value=6.583333333333333
Definition=myShipping; Amount >= 30; Value=NoShipping
Name="{myLabel}"; Shipping=myShipping
Didn't I?

Kind regards,
Gerald

Rule names not translatable 25 Jan 2017 00:43 #4

Dear Gerald,
Ah, thanks for giving this example. Rule names are translated before variable substitution. The reason is that this allows translated rule names to contain variables.
Your case would need the rule names to be translated after variable substitution, which would prevent including other variables (like ZIP or city or the weight or dimensions) in the rule names.

There is a workaround, though: Instead of conditionally defining the label in a custom variable, you can also include the the conditions and the label directly into the final rule(s):
Definition=myShipping; Value=NoShipping
Definition=myShipping; 61 in Categories; Value=4.083333333333333
Definition=myShipping; 62 in Categories; Value=6.583333333333333
Definition=myShipping; Amount >= 30; Value=NoShipping
Name="SHIPPING_RULE_INFO_SMALL"; 61 in Categories; Shipping=myShipping
Name="SHIPPING_RULE_INFO_MIDDLE"; 62 in Categories; Shipping=myShipping
Name="SHIPPING_RULE_INFO_FREE";Amount >= 30; Shipping=myShipping
Name="SHIPPING_RULE_INFO_FREE"; Shipping=myShipping

Best regards,
Reinhold

Rule names not translatable 04 Feb 2017 13:59 #5

  • gba
  • gba's Avatar Topic Author
Hi!

Thank you for your workaround.
What do I need the definition of variable 'myShipping' for anymore then?
I just could use
Name="SHIPPING_RULE_INFO_SMALL"; 61 in Categories; Shipping=NoShipping
Name="SHIPPING_RULE_INFO_MIDDLE"; 62 in Categories; Shipping=4.083333333333333
Name="SHIPPING_RULE_INFO_FREE";Amount >= 30; Shipping=6.583333333333333
Name="SHIPPING_RULE_INFO_FREE"; Shipping=NoShipping
Right?

Kind regards,
Gerald

Rule names not translatable 07 Feb 2017 11:02 #6

Dear Gerald,
You are absolute right, in your case you don't need that custom variable any more.

Best regards,
Reinhold

[SOLVED] Rule names not translatable 07 Feb 2017 11:02 #7

Problem solved.
  • Page:
  • 1