Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Forum

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:

Cost per category or manufacturer 19 Mar 2015 11:18 #1

  • jef
  • jef's Avatar Topic Author
Hello, how can I calculate the shipping cost per category or manufacturer of many different products in the same order.
For example I have an order that has 1 product from manufacturer 5 with free shipping, in the same order there are products from category 4 (1 product) with shipping calculated by m3 (MaxLength*MaxWidth*MaxHeight) and from category 6 (1 product) with shipping calculated by articles
I want separate shipping cost calculation for each product and then the total cost to be shown to customer

Name=free; Condition=contains_any(Manufacturers,5,);Shipping=0
Name=courier;Condition=contains_any(Categories,4);0.5>=MaxLength*MaxWidth*MaxHeight *Articles;Amount<100;Shipping=7
Name=courier;Condition=contains_any(Categories,6);articles==1;Amount<100;Shipping=5;
Name=courier;Condition=contains_any(Categories,6);articles==2;Amount<100;Shipping=8;

For these products I want the shipping cost to be 12 but it is 0 because it stops at the first rule (I tried only instead of any but without any luck)

Cost per category or manufacturer 29 Mar 2015 17:19 #2

  • jef
  • jef's Avatar Topic Author
Hello again, any solution for my problem?

Cost per category or manufacturer 29 Mar 2015 22:18 #3

Dear Jef,
My shipping plugin is not designed to calculate per-product shipping costs. The shipping costs that you assign in the rule are the shipping costs for the whole order, nor for one particular product.

If you have a small, fixed number of categories/manufacturers, you might find some workarounds (by manually handling each category and storing the result in a variable, which you in the end then add up to the final shipping cost), but that approach is not very flexible. Your description could be implemented roughly as:
Variable=ShipTemp; Value=0
Comment=Manufacurer5; Variable=ShipTemp; Value=ShipTemp+0*evaluate_for_manufacturers(Articles, 5)
Comment=Category4; Variable=ShipTemp; Value=ShipTemp + evaluate_for_categories(MaxHeight, 4) * evaluate_for_categories(MaxWeight, 4) * evaluate_for_categories(MaxLength, 4)*7
Comment=Category5; Variable=ShipTemp; Condition=evaluate_for_categories(Articles, 6) == 1; Value=ShipTemp+5
Comment=Category5; Variable=ShipTemp; Condition=evaluate_for_categories(Articles, 6) == 2; Value=ShipTemp+8
   ...
Shipping=ShipTemp

The rules above probably don't fully describe what you want, but I think you get the idea that things get really, really messy and that you'll have to handle each category, manufacturer and further condition manually in a separate line.
The final problem will be to determine under which circumstances you don't want to offer shipping at all, because a rule structure like the above will always return a shipping rate...


So, in short this is not how my shipping plugin is intended to be used. You might find a solution, but that will be messy and not very flexible or easy to handle and maintain.

Sorry,
Reinhold

Cost per category or manufacturer 29 Mar 2015 23:59 #4

  • jef
  • jef's Avatar Topic Author
Thank you,
I will try to use the rules you suggest, and I will be back if I need help, if this not a problem. :)

Cost per category or manufacturer 31 Mar 2015 08:24 #5

  • jef
  • jef's Avatar Topic Author
Hello again, I started making my roules based on your example but the result is white page when I go to my cart for paying
I have VirtueMart 2.6.14 and these are the rules I tested

Variable=ShipTemp; Value=0
Comment=ManufacurerEL; Variable=ShipTemp; Value=ShipTemp+0*evaluate_for_manufacturers(Articles, 60)
Comment=ManufacurerL; Variable=ShipTemp; Value=ShipTemp+0*evaluate_for_manufacturers(Articles, 45)
Comment=ManufacurerB; Variable=ShipTemp; Value=ShipTemp+0*evaluate_for_manufacturers(Articles, 48)
Comment=ManufacurerA; Variable=ShipTemp; Value=ShipTemp+0*evaluate_for_manufacturers(Articles, 62)
Comment=Category_Mav; Variable=ShipTemp; Condition=evaluate_for_categories(Articles, 54) == 1; Value=ShipTemp+10
Comment=Category_Mav; Variable=ShipTemp; Condition=evaluate_for_categories(Articles, 54) == 2; Value=ShipTemp+12
Comment=Category_Mav; Variable=ShipTemp; Condition=evaluate_for_categories(Articles, 54) == 3; Value=ShipTemp+15
Comment=Category_Mav; Variable=ShipTemp; Value=ShipTemp+0*evaluate_for_manufacturers(Articles, 54)

Comment=Category_Kab; Variable=ShipTemp; Value=ShipTemp + evaluate_for_categories(MaxHeight, 2) * evaluate_for_categories(MaxWeight, 50) * evaluate_for_categories(MaxLength, 1)*15
Shipping=ShipTemp

I found that if I delete the first roule
Variable=ShipTemp; Value=0
it goes to the next page (without calculating shipping cost) and it has a msg
Evaluation yields unknown value while evaluating rule part ShipTemp
if i put the roule then I have a blank page when I go to my cart for paying

Cost per category or manufacturer 02 Apr 2015 15:11 #6

Sent an updated test version via private mail. Please let me know whether that version fixes your issue.


If it does not fix the issue, 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

Cost per category or manufacturer 02 Apr 2015 15:38 #7

  • jef
  • jef's Avatar Topic Author
Thank you very much, you are very helpful, I will try it and I 'll let you know

Cost per category or manufacturer 02 Apr 2015 18:27 #8

  • jef
  • jef's Avatar Topic Author
Unfortunately the problem remains, my web developer told me that this is the error in the firebug
"The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. cart"

If there is a special folder containing more info useful for you please ask me
Thank you

Cost per category or manufacturer 11 Apr 2015 12:49 #9

Dear Jef,

Sorry for the problems. The warning printed out by firebug has actually nothing to do with this issue and is merere a small warning that Joomla produces pages that might not be 100% strict-HTML compliant if you use foreign letters like the Russian Alphabet or Chinese etc.

If you enable full error reporting in Joomla as I wrote above (in the Joomla backend go to the Menu "System" => "Global Configuration" => Tab "Server" => set "Error Reporting" to "Development"), what is the exact error message that is printed out to the white page? This is really the only way to find out where the issue lies.

The updated plugin version that I sent you was supposed to fix the white page issue...

Best regards,
Reinhold

Cost per category or manufacturer 14 Apr 2015 10:35 #10

  • jef
  • jef's Avatar Topic Author
Dear Reinhold,
My web developer will continue the conversation, I hope he can be more helpful and you will find the solution
Thank you

Cost per category or manufacturer 21 Apr 2015 23:55 #11

  • jef
  • jef's Avatar Topic Author
Hello again my web developer told me that you are talking since last week with him and you are trying to find a solution, tell if there is something I can do to help.
Thank you

Cost per category or manufacturer 08 May 2015 19:43 #12

  • jef
  • jef's Avatar Topic Author
Hello, in my case as you know 5.4 version did not solve the blank page problem, did you find any solution?

Cost per category or manufacturer 14 May 2015 15:54 #13

Dear Jef,
As I wrote in Comment #10 above, do you get any php error messages when you enable full debugging (error reporting set to "Development")?

Apart from that, I really don't have any idea without actually looking at the installation. It might have to do with your outdated VM vesion 2.6.14, or it might be an issue with your php version, or it might also be something completely different, or maybe some interference with some other extension you have installed...

Best regards,
Reinhold

PS: Who is your developer? We got several support requests, but I can't really link anyone to your issue at first look... Probablly I'm just missing the connection between a seemingly unrelated request and this issue.

Cost per category or manufacturer 14 May 2015 16:29 #14

  • jef
  • jef's Avatar Topic Author
Dear Reinhold
There is no php error just a blank page when I use the rules you suggested in comment #5.
(my developer told me this). If I use other rules everything is ok.
My developer told me that he contacted you by Skype and email, and he gave you admin and pass for my site (stospiti) to see the problem. I will ask him what his id was when he contacted you.
Thanks again

Cost per category or manufacturer 15 May 2015 08:11 #15

  • jef
  • jef's Avatar Topic Author
Good morning
My developer nickname here is barracuda69 and his email is dgouzoulis@gmail.com

Cost per category or manufacturer 28 May 2015 01:03 #16

Dear jef,
Your developer posted here once (open-tools.net/forum/shipping-by-rules-p...nufacturer.html#6222), but after that he never responded again. I am also not aware that he contacted me by skype or email with server access..

Best regards,
Reinhold
  • Page:
  • 1