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:

Shipping by Category 05 Sep 2015 20:38 #1

  • Teramus
  • Teramus's Avatar Topic Author
Hi,
i try to resolve the following cas:
- Free Shipping from € 15
- Before it cost € 5
- Only for some Categories (books)
- If a product which is not in one of this categories is in the cart, the rules should be not available

Is this possible?

Have a great Weekend

Kevin

Shipping by Category 12 Sep 2015 14:19 #2

Dear Kevin,
This shipping cost structure can be easily implemented by a ruleset like the following (there are many ways, this is just one suggestion). Here I assume that the books categories are 123, 124, 125 and 126:
Comment=Only available for books; Condition=not(contains_only(categories, 123, 124, 125, 126)); NoShipping
Name=Free shipping above 15€; Amount>=15; Shipping=0
Name=Normal Shipping; Amount<15; Shipping=5

Explanation: The first rule checks if there are any other categories in the order. If that is the case, no shipping is offered by this method. Otherwise (i.e. only the books categories are in the cart), then the second and third rule are considered, which specify shipping cost based on the order total.

The ruleset above works if each book is assigned only one of the books category. If you use additional (hidden) categories for other things like taxing etc. then you need to replace the first rule by some other check:
Comment=Only available for books; evaluate_for_categories(Articles, 123, 124, 125, 126)==Articles; NoShipping
Name=Free shipping above 15€; Amount>=15; Shipping=0
Name=Normal Shipping; Amount<15; Shipping=5
Explanation: Evaluate_for_categories returns the number of articles from categories 123, 124, 125 and 126. If only books are ordered, this number is equal to the total number of articles ordered.

Best regards,
Reinhold
  • Page:
  • 1