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:

5 lines of simple code - where did I go wrong? 04 Mar 2015 09:48 #1

  • bruce
  • bruce's Avatar Topic Author
Sorry to be a queue jumper here .. but it seems that this is the best place to ask these questions.

Using the documentation I have put in the following. On testing various test user postcodes and weights I can safely say that I got it wrong - but there was no error when I saved the code.

Can anyone explain what I might be doing wrong (what code I need to correct)?

I sell Products from Melbourne to the whole of Australia.

Thank you, Bruce




Name=FREE LOCAL SHIPPING; ZIP==3015; ZIP==3016; ZIP==3025; Shipping=0
Name=FREE BULK SHIPPING; Amount>200; Shipping=0
Name=Melbourne Special; 3000<=ZIP<=3200; Shipping=5
Name=3kg Fixed Satchel; Weight<3; Shipping=9.99
Name=5kg Fixed Satchel; Weight<5; Shipping=11.99

5 lines of simple code - where did I go wrong? 05 Mar 2015 04:24 #2

  • bruce
  • bruce's Avatar Topic Author
Hi,

Is there any other help available besides the manual?

Cheers, B

5 lines of simple code - where did I go wrong? 05 Mar 2015 19:28 #3

Sorry to be a queue jumper here .. but it seems that this is the best place to ask these questions.


Yes, this is the best place to look for answers and ask questions.

Using the documentation I have put in the following. On testing various test user postcodes and weights I can safely say that I got it wrong - but there was no error when I saved the code.

Can anyone explain what I might be doing wrong (what code I need to correct)?


You are not completely wrong, just a few small misunderstandings:


Name=FREE LOCAL SHIPPING; ZIP==3015; ZIP==3016; ZIP==3025; Shipping=0


For a rule to match, all conditions must be fulfilled. Since ZIP can not be 3015 and 3016 and 3025 at the same time, this rule will never match. If you have the advanced version of the plugin, you can use OR:
Name=FREE LOCAL SHIPPING; ZIP==3015 OR ZIP==3016 OR ZIP==3025; Shipping=0

If you use the free version of the plugin, you have to use three separate rules instead:

Name=FREE LOCAL SHIPPING; ZIP==3015; Shipping=0
Name=FREE LOCAL SHIPPING; ZIP==3016; Shipping=0
Name=FREE LOCAL SHIPPING; ZIP==3025; Shipping=0


Your other rules have the following logic:
Name=Melbourne Special;  3000<=ZIP<=3200; Shipping=5
Name=3kg Fixed Satchel;  Weight<3; Shipping=9.99
Name=5kg Fixed Satchel;  Weight<5; Shipping=11.99

First, Melbourne will be checked: Shiping will be 5 for all weights.

Then, all order not for Melbourne will be 9.99 if the weight is below 3kg and 11.99 if hte weight is below 5. Orders of more than 5kg outside Melbourne will not offer a shipping rate.

Is this what you have in mind?

Best regards,
Reinhold

5 lines of simple code - where did I go wrong? 09 Mar 2015 11:33 #4

  • bruce
  • bruce's Avatar Topic Author
Hi Reinhold,

Thank you so much or replying. I have considered getting the advanced version, but wanted to make sure I could do the logic, or that I would need it.

I am now trying to sort through the mass of courier 'cherry picked' post codes (in excel) that are supposed to define each city's metro regions, and work out if I can apply that, or if it would be easier to simplify the apps code and postal charges returned.

Thank you again for this ! I will reply is I get stumped on a complexity ...

[SOLVED] 5 lines of simple code - where did I go wrong? 10 Mar 2015 17:44 #5

Problem solved.
  • Page:
  • 1