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:

Advanced Shipping by ruled Limited? 07 Nov 2016 02:00 #1

  • dkaneloglou
  • dkaneloglou's Avatar Topic Author
Hello,
I wonder if there is a limit in lines in rules I can have in Advanced shipping by rules.
I have many many, Zip codes, thousents lines, and the field gets empty every time I save the shipment method.
I tried to sepperate them in different field Zones, I got until the 6th and also have the same error..
Is there a limit?
What can I do?

Advanced Shipping by ruled Limited? 07 Nov 2016 13:45 #2

  • eliotrayner
  • eliotrayner's Avatar
Hi Reinhold,

Joomla: 3.6.4, VM: 3.0.16

I also have the same problem. I have hundreds of lines of rules for each Zone. When I setup the Zones I can only add rules for the first zone any subsequent saves and the contents of Zone 2 are emptied.

regards
Eliot

Advanced Shipping by ruled Limited? 07 Nov 2016 14:10 #3

  • dkaneloglou
  • dkaneloglou's Avatar Topic Author
Oh yes, I forgot to include, me too:
Joomla: 3.6.4, VM: 3.0.16

Advanced Shipping by rules - Limited? 08 Nov 2016 10:40 #4

  • dkaneloglou
  • dkaneloglou's Avatar Topic Author
I have a project paused because of this problem.
Is there a way to continue somehow?
Please help!

Advanced Shipping by rules - Limited? 08 Nov 2016 10:47 #5

  • eliotrayner
  • eliotrayner's Avatar
Hi dkaneloglou

What I've done to allow me to move on is to clone the shipment methods and add one zone and one set of rules to each individual shipping method.

I would still prefer I could put them in one method.

regards
Eliot

Advanced Shipping by rules - Limited? 08 Nov 2016 14:12 #6

  • dkaneloglou
  • dkaneloglou's Avatar Topic Author
This way two shippment methods are shown in the front end. In my case I have hundreds of ZIP code, when the user is from those ZIP´s I want to show him a Contact us message, and NO shipping cost. For the rest of the users I want to show shipping cost 3.5€ until 2kilos and +1€ for every extra kilo.
I also have to include both types of ZIP code, (with and without a space, as in my country is very commun to write Zip code with a space), so the lines are many more. The rules I have is like this:

Name=Contact us for shipping cost; ZIP==85200; 0
Name=Contact us for shipping cost; ZIP=="852 00"; 0
...
Name=Contact us for shipping cost; 85301<=ZIP<=85303; 0
Name=Contact us for shipping cost; "853 01"<=ZIP<="853 03"; 0
........
Name=Contact us for shipping cost; ZIP==85500; 0
Name=Contact us for shipping cost; ZIP=="855 00"; 0
Name=Contact us for shipping cost; ZIP==85600; 0
Name=Contact us for shipping cost; ZIP=="856 00"; 0
Name=Contact us for shipping cost; ZIP==85700; 0
Name=Contact us for shipping cost; ZIP=="857 00"; 0
Name=Contact us for shipping cost; ZIP==85800; 0
Name=Contact us for shipping cost; ZIP=="858 00"; 0
Name=Contact us for shipping cost; ZIP==85900; 0
Name=Contact us for shipping cost; ZIP=="859 00"; 0
Name= - ACS STANDARD - Delivery 1-2 days. Your order is {weight}kg. ; Weight<=2; Shipping=3.5
Name= - ACS STANDARD - Delivery 1-2 days. Your order is {weight}kg. ; 2<Weight; Shipping=3.5+ceil(Weight-1)*1


I suppose I have to include all lines in one shippment method in order not to appear two shippment methods in the front end??

I have the txt file with all the ZIP code if someone webmaster of the plugin wants to make tests..
Any help??
Thank you!

Advanced Shipping by rules - Limited? 10 Nov 2016 17:40 #7

Dear Dkaneloglou,
Instead of testing each ZIP code separately, you can check whether it is in a list of excluded ZIP codes, i.e.
Name=Contact us for shipping cost; Condition=ZIP in list(85200, "842 00", 85500, "855 00", 85600, "856 00", 85700, "857 00"; NoShipping

Best regards,
Reinhold

Advanced Shipping by ruled Limited? 10 Nov 2016 17:47 #8

Dear Dkaneloglou,
There is a VM-imposed limit of ~19.000 characters of configuration data for each shipping method. The issue is that the database that VM uses to store the method's configuration data has allocated a field of that size for the configuration data. If a shipping method tries to save a configuration (in this case rule sets) of larger size, the database will simply refuse to save it at all, effectively clearing all fields.

As this is a core VM issue, there is nothing that you can do in the shipping plugin (the shipping method configuration page and the settings loading is handled by VirtueMart, not by the plugin!).

However, as Eliot already noticed, one can try to split the rulesets into multiple sets and use multiple shipping methods for them.
As you correctly notice, though, one has to take care that only one of the sets matches. In particular, fall-through / catch-all rules are very problematic in these circumstances, as one shipping method has no way of finding out whether another shipping method already offers a rate.
One typical factor to assure mutual exclusive rules is the countries setting (e.g. use one method for each country set).

The other approach to the issue is to try to minimize the size of the ruleset by combining multiple similar conditions into one method.

Best regards,
Reinhold

Advanced Shipping by ruled Limited? 10 Nov 2016 17:52 #9

  • eliotrayner
  • eliotrayner's Avatar
Hi Reinhold
That answers my question then, I split my rules up into separate zones. I was creating fedex International zones with rules defining the bands

Problem solved

Regards
Eliot

[SOLVED] Advanced Shipping by ruled Limited? 13 Nov 2016 20:17 #10

Problem solved.
  • Page:
  • 1