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:

Some Categories is no shipping to some country 17 Jun 2015 21:49 #1

  • jeremy
  • jeremy's Avatar Topic Author
HI:

I want make the product of some Categories cannot ship to some country, so I take as below:

Name=No shipping to xxx; Categories==list(114, 109); country2 in list("BG", "CY","EE", "GR", "LT", "LV", "RO", "RU", "SK", "SI", "TR", "UK"); NoShipping

But it not work, how to make it work?


THANK YOU!

Some Categories is no shipping to some country 18 Jun 2015 23:05 #2

Dear Jeremy,
Do I understand you correctly that if any product from category 114 OR from category 109 is in the cart, then you don't want to ship to eastern Europe and UK?

In that case, your categories check is wrong. In particular, your check "Categories==list(114,109)" means that this rule only applies if the customer purchases products from both categories, and from no other categories. What you rather want is:
Name=No shipping to xxx; Condition=contains_any(Categories, 114, 109); country2 in list("BG", "CY","EE", "GR", "LT", "LV", "RO", "RU", "SK", "SI", "TR", "UK"); NoShipping

That condition (please notice the important "Condition="!) means that the rule will apply if category 114 or 109 is among the categories of all products in the order.
Best regards,
Reinhold

Some Categories is no shipping to some country 20 Jun 2015 11:07 #3

  • jeremy
  • jeremy's Avatar Topic Author
Dear Reinhold:

It WORKs! Thank you!

But If I want to make one product of these categories which is no NoShipping can be shipped, how I set the rule?

For example:

According to the rule you apply,

Name=No shipping to xxx; Condition=contains_any(Categories, 114, 109); country2 in list("BG", "CY","EE", "GR", "LT", "LV", "RO", "RU", "SK", "SI", "TR", "UK"); NoShipping

One product <A>which belong to category 114, depend on the rule, it will show msg(No shipping to xxx) if customer add <A> into cart, But I want this <A> to be a exception, customer CAN put <A> into cart and no warning msg shows.


THANK YOU!

Jeremy

Some Categories is no shipping to some country 26 Jun 2015 22:18 #4

Dear Jeremy,
Adding an exception to a NoShipping category is a bit more complicated, but not too hard. You just have to rephrase your condition. Currently, your NoShipping condition is "If categories 114 or 109 are among the products' categories, there is no shipping". With your exception, it's probably best to rephrase this as:
- If the list list of products from categories 114 and 109 in the order contains anything else than product A (SKU "sku-a"), there is no shipping.

This can be implemented for example, as the following condition:
Name=No shipping to xxx, except product A; Condition=not(contains_only(evaluate_for_categories(SKUs, 114, 109), "sku-a")); country2 in list(.....); NoShipping

Best regards,
Reinhold

Some Categories is no shipping to some country 12 Jul 2015 18:04 #5

  • jeremy
  • jeremy's Avatar Topic Author
HI:

I paste your code, it works! But have some problem:

After I set up the exception, in front, the shipping rule display properly but still show the error message(I dont want to show the error msg)

I try to use comment but not work..

'Comment=No shipping to xxx, except product A'; Condition=not(contains_only(evaluate_for_categories(SKUs, 114, 109, 106, 113, 115, 108,111,110, 107, 112), "GWB11202")); country2 in list("HK", "MO", "CN"); NoShipping
Attachments:

Some Categories is no shipping to some country 13 Jul 2015 19:47 #6

Dear Jeremy,
You need to use Comment=..., but notice that the quotation mark must not be placed before the Comment, but before the actual comment, i.e.:
Comment='No shipping to xxx, except product A'; Condition=.......

Best regards,
Reinhold

Some Categories is no shipping to some country 13 Jul 2015 21:16 #7

  • jeremy
  • jeremy's Avatar Topic Author
Hi:

same problem, the code I paste is

Comment='No shipping to xxx, except product A'; Condition=not(contains_only(evaluate_for_categories(SKUs, 114, 109, 106, 113, 115, 108,111,110, 107, 112), "GWB11202")); country2 in list(.....); NoShipping

But in front, still display the error msg, old one msg......
Attachments:

Some Categories is no shipping to some country 16 Jul 2015 22:12 #8

Dear Jeremy,
I'm unable to reproduce the problem. Can you please tell me which versions you are using:
-) Plugin version (in the Joomla extension manager => "Manage")
-) VirtueMart version
-) Joomla version
-) PHP version of your server.

What I notice, though, is that the displayed message is different from the rule that you paste here. Are you sure you are editing the proper rule and method?
In particular, if you modify the comment, does the message change accordingly?

Best regards.
Reinhold

Some Categories is no shipping to some country 19 Jul 2015 18:46 #9

  • jeremy
  • jeremy's Avatar Topic Author
HI:

-) Plugin version <5.4>
-) VirtueMart version <3.0.9.4>
-) Joomla version <3.3.6>
-) PHP version of your server. <5.4.37>

When I put the item can ship global in cart, Its weird that I do change the error msg but still display the msg<Some product not for global shipping 您購買的部分產品不支援國際運送> which should be for not global shipping issue

Some Categories is no shipping to some country 25 Jul 2015 23:17 #10

Der Jeremy,
Thanks for the versions. Those versions should definitely work just fine.
If you change the error message, but the old message is still always shown, then I would suspect that you have multiple shipping methods set up, and that error message is actually coming from a different shipping method than the one you are currently editing...

Best regards,
Reinhold
  • Page:
  • 1