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:

Can I change Error display to Notice display? 06 Dec 2016 15:19 #1

  • jeremy
  • jeremy's Avatar Topic Author
HI:

I used the latest version advanced shipping rule, My code is as below:

Name=溫馨提醒!您購買的某些商品可能無法使用超商取貨付款,可能是長度過長、體積太大或是無法通過超商的寄送規範,六入玻璃杯、Perlini鐵盒、手搖碎冰機、地墊等大型產品可能會是原因,如果您是要使用超商取貨付款請正常結帳,經過我們確認您的訂單之後,如果無法使用超商取貨付款會再跟您連絡更改寄送方式,如果您不會使用超商取貨付款請忽略這則提醒,造成不便敬請見諒; country2 in list("TW");Condition=contains_any(Categories, "111", "108"); NoShipping

The display in front is red error, can it be NOTICE DISPLAY without red color?

THANK YOU!

Jeremy
Attachments:

Can I change Error display to Notice display? 08 Dec 2016 01:40 #2

Dear Jeremy,
Unfortunately, it is currently hardcoded to display the message as an error. Short of manually modifying the plugin code (in rules_shipping_framework_joomla.php, function printWarning, you can change 'error' to 'notice' in the enqueueMessage call), I can't think of a way to change this easily yourself. The only way would be to modify the CSS to display all errors as notices. But that might cause other, more severe problems.

Sorry,
Reinhold

Can I change Error display to Notice display? 08 Dec 2016 06:49 #3

  • jeremy
  • jeremy's Avatar Topic Author
OK, Got it!

THANK YOU!

Can I change Error display to Notice display? 08 Dec 2016 22:41 #4

Dear Jeremy,
We have now extended our plugin in version 6.2 (just released a few moments ago) to allow arbitrary messages (errors in red, warnings in yellow, notices in blue and all other messages in green). Instead of using Name=..., you can now use e.g. Notice="Message to be shown to the user..." in any rule you like. If all conditions match, the message will be displayed to the user.

Best regards,
Reinhold

Can I change Error display to Notice display? 09 Dec 2016 12:22 #5

  • jeremy
  • jeremy's Avatar Topic Author
HI Reinhold:

It work after updating to latest 6.2. Thank you!

By the way, when the code will support the language override? Like below:

Notice=TWO_CASH_ON_DELIVERY_VALUE; country2 in list("HK", "MO", "CN",);Condition=contains_any(SKUs, "SKP20901", "KWM20505", "KWM20504", "KWT20701", "PRM30202", "kcaek6", "saeb9", "KWP20502", "SKP20502", "WAP20501"); NoShipping

In front, it still display TWO_CASH_ON_DELIVERY_VALUE rather than the replaced sentence.

THANK YOU!

Jeremy

Can I change Error display to Notice display? 09 Dec 2016 18:01 #6

Dear Jeremy,
In our test installations, the name is properly run through the language overrides. Are you sure that you defined a translation for the TWO_CASH_ON_DELIVERY_VALUE value for the displayed language in a language override file, that is really loaded?

Are you translating these strings wiht the language overrides section in the Joomla backend or manually in a language file?
I typically use the Joomla backend, because that automatically uses the correct file. You just need to make sure to select the correct language and the "Site" area, not the adminitrator.

What does not yet work is variable substitutions in the translated langauges, because the plugin currently tries to replace variables like {Articles} in the messages before translation rather than after translation. We'll fix this in a future version.

Best regards,
Reinhold
  • Page:
  • 1