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:

Wildcard in SKU test? What about negative test? 16 Sep 2013 13:23 #1

  • SusieP
  • SusieP's Avatar Topic Author
Hi
Here is how I would like my shipping rules to work:
If the customer is purchasing only a gift card/s, then shipping is free.
If the customer is purchasing any product which is not a gift card (even if they are also purchasing a gift card) then we have a flat rate of shipping at AUD 9.

The difficulty is with the identification of when a gift card is present but so are other products, there is also the complicating factor of gift cards of different values being sold on the store and hence the SKU check for a gift card product would not be a single check (unless a wild card character is supported in the 'in' comparison??).

Just wondering if someone has some tips on whether:
A wildcard is supported at all?
Does the SKU test have to be 'in' or can it work similar to a 'like'?
Can I use 'not in'? for example "...AND 'GiftCard1' not in SKUs AND 'GiftCard2' not in SKUs AND 'GiftCard3' not in SKUs"? (I know this doesnt solve when they have a gift card and other items, but at least understanding what of these is possible will help...

If anyone has ideas on how to write my rules, I'd love to hear them!!

Susie

Wildcard in SKU test? What about negative test? 17 Sep 2013 02:39 #2

The possible solutions mainly depend on how you decide what a gift card is?
Do you use the SKU or categories to distinguish them from other products?
Do you use the item weights? If not, a workaround could be to set the weight to a value >0 for all non-giftcards. If an order only contains giftcards, its total weight will be 0. If the total weight is larger than 0, then at least one non-giftcard item was bought.

Regarding your questions:
-) Unfortunatly, wildcards are not supported at all in the rules
-) List operations (the in operator) only check for exact matches
-) You are right, there is no "not in" operator. There is not even a not(..) function (shame on me! I simply didn't think of it). I'll at least add a not(...) function in one of the next versions.

Reinhold

Wildcard in SKU test? What about negative test? 18 Sep 2013 02:00 #3

  • SusieP
  • SusieP's Avatar Topic Author
Thanks Reinhold.
That's brilliant - I think I can do something with the item weights approach. Thanks for giving me an alternative way to do it!
Susie

Wildcard in SKU test? What about negative test? 20 Sep 2013 22:38 #4

BTW, the next version 3.3 will have a not(...) function, so you can use conditions like "not('GiftCart1' in SKUs)"...
  • Page:
  • 1