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:

Blank page after modifying the shipping rules 10 Mar 2015 20:21 #1

  • maria_pascual
  • maria_pascual's Avatar Topic Author
Hello,

I have VM Shipping by Rules Plugin, version 5.1

The shipping costs are based on the products weight. However, the products from category 10 and 11 cannot be sent, and thereby cannot been considered in the shipping. So, I had thought to create a rule that makes that if all products in the cart belong to category 10 or 11, the shipping costs are 0. Then, for those cases in which there are products from category 10 and/or 11 as well as from other categories, I have used the evaluate_for_categories method. The result is:

Variable=FreeShippingCount; Value=evaluate_for_categories(Articles, 10, 11)
Name=Free shipping for products from categories 10 and 11, but nothing else; FreeShippingCount==Articles; Shipping=0
Name=de 0 a 2Kg; 0<Weight-evaluate_for_categories(Weight, 470)<=2; 08000<=ZIP<08999; shipping=4.5
Name=de 2,1 a 5Kg; 2<Weight<=5; 08000<=ZIP<08999; shipping=5
Name=de 5,1 a 10Kg; 5<Weight<=10; 08000<=ZIP<08999; shipping=5.5
Name=Nacional - Superior a 10Kg; 10<Weight;08000<=ZIP<08999; shipping=5.50+(weight-10)*0.25

After applying these rules, the cart page is in blank and I get a 500 Internal error message in the console. What's the problem with these rules?

Blank page after modifying the shipping rules 11 Mar 2015 15:19 #2

  • maria_pascual
  • maria_pascual's Avatar Topic Author
Hello again,

I have continued working on the error for 3 hours but I can't find the solution.

The rules that cause the problem are:

Name=de 0 a 2Kg; 0<(Weight-evaluate_for_categories(Weight, 470))<=2; 08000<=ZIP<08999; shipping=4.5

Name=Free shipping for products from categories 10 and 11, but nothing else; evaluate_for_categories(Articles,10,11)==Articles; Shipping=0


When I use any of these rules there is a recursive loop. Please, help me with this problem. It is vital for my web since I cann't send some products for reasons related to the law, althogh the law allows me sell them through Internet.

I feel frustrated and the fact that I am not receiving any answer from you make the situation worse. I wrote a post for this in another thread, then I decided to open this topic just for this. I have not received any answer in any case. Very bad support :(

Blank page after modifying the shipping rules 14 Mar 2015 00:52 #3

Dear Maria Pascual,
I'm very sorry that you are frustrated and that things don't just work for you. Which versions of VirtueMart and Joomla and PHP do you use on your server?

I have tried those rules with VirtueMart 2.x on Joomla 2 as well as with VirtueMart 3.x on Joomla 3, and both rules that you say make problems work just fine (check it out at demo.open-tools.net/, user demo987, pw demo987, Select "Anguilla" as the country; Product demo.open-tools.net/index.php?option=com...ory_id=15&Itemid=104 is from the category with your ID 470 (my category ID 15) ).

As a side note, I think in your third rule you want 0<=Weight-evaluate... rather than a strict <. Apart from that, I'm really impressed by your rule set!

Regaring the 500 Internal error message, I don't see any reason why that error should come from the rules, given that they work just fine for me. Do you have any PHP warnings or error message in your webserver's error log file?

Best regards,
Reinhold

Blank page after modifying the shipping rules 27 Mar 2015 12:28 #4

  • maria_pascual
  • maria_pascual's Avatar Topic Author
Hello again,

I am using Joomla 2.5 and Virtuemart 2.0.20b. I have checked again my rules and still get the white page.

Checking the logs was the first thing I did but there is no error related to this :( For example, I have tried the rules again and I have got the same blank page (500 error), but the only error from today are the following ones (and were produced before the test):

[Fri Mar 27 09:56:46 2015] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/administrator, referer: http://localhost/shop/administrator/index.php

[Fri Mar 27 11:48:45 2015] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/administrator, referer: http://localhost/shop/administrator/index.php

Why is not working yet?


I have tried your demo page but I do not see how it works. I have selected the product "Testcategory 13,5Kg", I can see that the billing address is from Anguilla as you said. However, there are two shipping methods: the first one costs 4.50 and the second one costs 0. I have added the product "10kg Product" too, which is from another category. Anyway, the price costs are always the same. In your case, with my rules, what should happen is that products from category Test15 are not considered for shipping, but only products for category Test.

Are you sure you have applied my shipping rules?

Thank you again for your time,

Blank page after modifying the shipping rules 30 Mar 2015 10:59 #5

  • maria_pascual
  • maria_pascual's Avatar Topic Author
Hello Reinhold,

any help, please?? I am quite desperate with this issue... :(

Blank page after modifying the shipping rules 30 Mar 2015 23:13 #6

Dear Maria Pascual,
Thank you for your resonse, in particular the VirtueMart version. You are using a terribly outdated version of VirtueMart. That old version is probably also the reason why the plugin produces a white screen (because it probably calls some functionality that was introduced in later versions).

Please also notice that VM versions before 2.6.10 contain **critical security issues**, which basically allow any attacker to become administrator and have full access to your whole shop! You should really upgrade as soon as possible.

If you really cannot upgrade (at your own risk!!!), I can send you an earlier version of the plugin. However, those older versions do not provide the evaluate_for_categories.

Best regards,
Reinhold

Blank page after modifying the shipping rules 02 Apr 2015 15:11 #7

BTW, to get nice error reporting direcly on the html page (usually even on blank pages), could you please try and enable full error reporting in Joomla (Menu "System" => "Global Configuration" => Tab "Server" => set "Error Reporting" to "Development"). This will print out the php errors with a nice table (with backtrace information) into the html page rather than only into the webserver log. That error message should then give use more hints what's wrong.

Best regards,
Reinhold
  • Page:
  • 1