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:

Maximum field size for rules? 17 Mar 2015 08:40 #1

  • bmm01
  • bmm01's Avatar Topic Author
I am creating a rule in Advanced Shipping by Rules (paid version) on J3 / VM3.

The rule is up to 173 lines now and when I save it, the field is blank.

Is there a maximum size?

Am I able to use the other fields if this is the case (Rule 1, then rule 2 etc).

Thanks in advance.
Brett

Maximum field size for rules? 17 Mar 2015 11:56 #2

Dear bmm01,
VirtueMart has a restriction of ~19 000 characters for the configuration of each shipping method. That restriction is directly in VirtueMart's database table structure and cannot be worked around in a shipping plugin.
If your rules are longer, you can either split it into multiple separate methods, or you can try to simplify / combine your rules or try to move repeating code into custom definitions to shorten the rules...

Best regards,
Reinhold

Maximum field size for rules? 17 Mar 2015 12:14 #3

  • bmm01
  • bmm01's Avatar Topic Author
Hi Reinhold

Thanks for that clarification - that will be the reason it's not saving then.

I have the following list of postcodes and for each of the following ranges, I use a separate rule so that's why I have so many lines. Maybe you can suggest a way to simplify for me:

2000 to 2077
2079 to 2310
2314 to 2327
2431 only
2440 only
2444 to 2490
2555 to 2567
2745 only
2747 to 2756
2759 to 2770
2775 only

Or maybe I will have to create multiple Shipping Methods for each of the groups.

Regards
Brett

Maximum field size for rules? 17 Mar 2015 13:50 #4

Dear Brett,
From your description, it sounds like you should have 11 rules (one for each range). Or do you have several different cases for each of the postcode ranges?

Best regards,
Reinhold

Maximum field size for rules? 17 Mar 2015 13:53 #5

  • bmm01
  • bmm01's Avatar Topic Author
Hi Reinhold

I have discovered the OR operator so I think I can use that to simplify my formula. I think it will get me under the 19000 limit.

Thanks for your help.
Regards
Brett

[SOLVED] Maximum field size for rules? 22 Mar 2015 13:15 #6

Problem solved.
  • Page:
  • 1