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:

No Shipping on Certain Items depending on Category 07 Apr 2014 19:27 #1

  • lily64
  • lily64's Avatar Topic Author
I want to buy the advanced version of this but need to know if it can do what I need first. Thank you in advance for assistance.

I have one category of items that is virtual - a membership. The rest of the items and categories in the cart are shippable. I have yet to be able to find any example of rules that allows me to put all of the items in the cart from both shippable and non-shippable categories and have it calculate correctly. Is it possible to do this with this plugin?

Thanks very much.

Sue

No Shipping on Certain Items depending on Category 10 Apr 2014 15:28 #2

How exactly do you calculate your shipping costs?

I suppose:
-) Membership only => free shipping
-) only real products => shipping calculated depending on what exactly???
-) Membership + real product(s) => same shipping cost as real products only (i.e. membership does not have any influence)


The first case can be handled by a condition "SKUs==list(1234)", where 1234 is the ID of you membership product(s). E.g.:
Name=No shipping for memberships; SKUs==list(1234); Shipping=0
The second case can be handled by a condition "not(1234 in SKUs)", i.e. none of the products in the cart has category 1234.

The exact rules depend on the specifics of you shipping cost structure.

No Shipping on Certain Items depending on Category 13 Apr 2014 21:31 #3

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
Hi Reinhold. I have a similar situation. I want to see wine and memberships through my site. Wine shipping is based on the number of items but memberships should incur no shipping cost. I have a category set up for the memberships but have been unable to get it working. Here's an example of what I have tried:

Name=Memberships;Categories=="Memberships";Shipping=0
Name=1 to 3 items;Categories!=9;Articles<=3;Shipping=6.95
Name=4 to 11 items;4<=Articles<=11;Shipping=9.95
Name=Free shipping;Articles>=12;Shipping=0

The shipping is always 6.95 when I select a membership. I've tried using the Membership category ID (9) too but that didn't work. I even got rid of the other rules and just tried the membership one but couldn't get it to work. If I had hair, I'd be pulling it out now.

Can you help please?

Thanks

Paul

No Shipping on Certain Items depending on Category 14 Apr 2014 19:02 #4

  • lily64
  • lily64's Avatar Topic Author
Condition 1 - Memberships have no shipping
Condition 2 - tangible products that need to be shipped - calculated on pricing (i.e., $0-$100 = $5.00; $100 - $200 = $7.00, etc.)

Thank you.

This is what I currently have and the cart says to choose a shipping method, but no shipping is added no matter what the items added or the amount added are. Thanks for any assistance.

Name="Under $50"; Amount<50; Shipping=5
Name="$50 - $100"; Amount<100; Shipping=7
Name="$100 - $150"; Amount<150; Shipping=9
Name="$150 - $200"; Amount<200; Shipping=11
Name="$200 - $300"; Amount<300; Shipping=13
Name="$300 - $400"; Amount<400; Shipping=15
Name="$400 - $500"; Amount<500; Shipping=17
Name="$500 - $600"; Amount<600; Shipping=19
Name="$600 - $700"; Amount<700; Shipping=21
Name="$700 - $800"; Amount<800; Shipping=23
Name="$800 - $900"; Amount<900; Shipping=25
Name="$900 - $1000"; Amount<1000; Shipping=27
Name="Dues"; Categories==list(2); Shipping=0

Note that shipping is enabled in VM and the free version of this was working ok, but wouldn't do what I needed with the category for the Dues, so I upgraded to the pro version, which now I cannot get to work. I appreciate any help.

No Shipping on Certain Items depending on Category 14 Apr 2014 20:31 #5

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
Hi. I am having a similar issue and cannot get the Categories variable to work. I do the following:

Name=0 items;Articles==0;Shipping=0
Name=1 to 3 items;Articles<=3;Shipping=6.95
Name=4 to 11 items;4<=Articles<=11;Shipping=9.95
Name=Free shipping;Articles>=12;Shipping=0
Name=Memberships;Categories=="Memberships";Shipping=1

However, when I add a product from the Memberships category and there is only a single item in the basket, the shipping cost is 6.95. I have tried taking out the other rules and experimenting with the Categories item to no effect.

Thanks

Paul

No Shipping on Certain Items depending on Category 14 Apr 2014 20:34 #6

  • lily64
  • lily64's Avatar Topic Author
Update - The shipping is now showing, and working properly for the amounts set, but is still including the category that is supposed to be excluded from shipping. :-( I have to get this shipping working as this is a live cart. Clearly I'm doing something wrong.

No Shipping on Certain Items depending on Category 17 Apr 2014 02:29 #7

  • lily64
  • lily64's Avatar Topic Author
So apparently this cannot be done. I have tried every single variable to get this to work. Sadly another plugin paid for that I cannot use.

No Shipping on Certain Items depending on Category 18 Apr 2014 15:45 #8

Dear paulb,

The Categories variable is a list of category IDs. So if you want to check wheter only products from the memberships category are in the order (and no other products), you have to use a condition like
Categories==list(9)

To check whether only non-memberships are in the order, simply check whether the ID 9 is in the Categories list. If it is, then at lease one membership was ordered, if not, then only wines were ordered:
not(contains_any(Categories, 9))

Notice, however, that the tricky orders are those, where both a membership and wines were ordered.
Unfortunately, it is currently NOT possible to get e.g. the number of all articles except those from the memberships category. Currently, you can only check whether memberships or wines are ordered, but you cannot find out in the plugin how many wines and how many memberships were actually ordered...

Best regards,
Reinhold

No Shipping on Certain Items depending on Category 18 Apr 2014 15:50 #9

Dear lily64,
REgarding your rules, you need to be aware that the rules are evaluated one after the other and the first matching rule will be used. So you need to place your "Dues" rule FIRST, otherwise one of the earlier rules will match and free shipping will never be granted.

Second, as I mentioned above, in my reply to paulb, there is currently no way in the plugin to get e.g. the order amount of all articles except those from a given category. Similarly, it is currently not possible to get the order amount/weight/count of all articles of a certain category, manufacturer or product. I have some ideas for the next version, but I'm running into some practical problems that would lead to inconsistent/counter-intuitive results...

No Shipping on Certain Items depending on Category 21 Apr 2014 19:03 #10

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
Thank you for responding Reinhold. I had worked out that list(n) was the way to do it from Lily's post. I have spent some time experimenting with this now and still can't get it to work though. I had it working for the items that were in the Memberships category (ID=9) but needed to include other categories too and that's where the wheels came off.

When I tried to add other category IDs things stopped working. I tried a number of different combinations and have now resorted to stripping out everything else and just having a singe line for testing:

Name=Tester; Categories==list(4); Shipping=2

I have a Product Category called "White Wine" (ID=4) which is a child of the Product Category "Wines" (ID=1). There are 52 products in the "White Wine" category. There are 63 Product Categories in total.

When I try to check out, I get the message:

No shipment selected
Select shipment

I am happy to provide you with access to my site if required.

Thanks

Paul

No Shipping on Certain Items depending on Category 26 Apr 2014 09:53 #11

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
Hi Reinhold. Did you have any thoughts on this? I can get the shipping fee to only work when I use category ID 9. It doesn't work with any other category I have tried. This is now causing a problem with site purchases and is resulting in us having to speak to customers on the phone and refund part of the payment.

Thanks

Paul

No Shipping on Certain Items depending on Category 26 Apr 2014 19:47 #12

Dear Paul,
The condition "Categories==list(4)" means that the list of categories in the order is EXACTLY list(4), i.e. none of the articles in the cart has any other category assigned.


My guess would be that the white wine that you ordered in your test order is assigned not only to the white wine category (ID=4), but also to some other category...

Do you have a test site available?

Best regards,
Reinhold

No Shipping on Certain Items depending on Category 26 Apr 2014 19:58 #13

PS: I forgot to mention that it can be very helpful to let the plugin print out the values of all available variables (including the Categories variable) for debugging:
As described in open-tools.net/documentation/shipping-by...emart.html#debugging you can simply create a new shipping method and add one rule
Name=All variables: <pre>{Values_Debug}</pre>; NoShipping

This will print out a lengthy list of all available variables in the plugin. Search for "Categories" on the webpage and I can assure you that it will be much easier understanding why things don't work as you expect them.

Reinhold

No Shipping on Certain Items depending on Category 26 Apr 2014 21:26 #14

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
You hit the nail on the head. The problem was because the vouchers are in multiple categories. I comma delimited the categories and it worked. I had not realised that all categories were required and thought it would work if just one of the categories matched.

The challenge I have now is to create a series of ANDs and ORs to only charge £1.50 if vouchers or memberships are selected and higher amounts if bottles of wines / spirits are selected.

I am happy to give you access to my site to aid with the guidance.

Cheers

Paul

No Shipping on Certain Items depending on Category 02 May 2014 14:19 #15

Do I understand you correctly that you want £1.50 if ONLY vouchers or memberships are selected, and a different amount otherwise (i.e. if only wines or if wines and memberships etc. are selected)?

You say that your voucers are in different categories. Are those categories reserved for vouchers only?
The thing is that if you have:
Wine A: Category X
Voucher B: Categories X and Y
Then if you order Voucher B, the categories variable will be list(X, Y). And if you order Wine A and Voucher B, the categories list will also be list(X, Y). So in this case, it is simply not possible currently to check whether only vouchers are in the cart...

You can send the access credentials to your site to office@open-tools.net, but I can't guarantee that I find the time this weekend to look at it.

Best regards,
Reinhold

No Shipping on Certain Items depending on Category 02 May 2014 22:12 #16

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
You are correct in your understanding. The cost of posting a voucher is much lower than the cost of posting a bottle of wine. If a customer buys any number of vouchers we will only charge £1.50 postage. If a customer buys a bottle of wine we will charge £6.95 postage. However, if a customer buys a bottle and any number of vouchers, we will put the voucher(s) in with the bottle and charge £6.95.

As we charge different postage depending on the quantity of bottles, we use different rules for the different quantities. I did think that one way would be to deduct the number of vouchers in the basket from the total number of articles but then read your previous post where you said it wasn't possible to determine the number of articles in a list.

As an aside, I was using categories but ended up using the same manufacturer for all voucher and membership products. I then used the manufacturer list rather than the categories list to simplify the formula.

Thanks


Paul

No Shipping on Certain Items depending on Category 03 May 2014 23:06 #17

Yes, using the manufacturers list to distinguish whether an order contains only vouchers or also bottles is probably the best/easiest approach.

With the plugin, it is currently not possible to access the number of articles ordered from a given manufacturer (or in a given category), so I'm afraid it is currently not possible with the plugin to get the number of bottles in an order.

Sorry,
Reinhold

No Shipping on Certain Items depending on Category 20 Nov 2015 07:22 #18

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
Hi Reinhold,

Resurrecting an old query...

If we only have vouchers (defined either by category or manufacturer) in the shopping cart, I would like to charge 1.50 shipping. That shipping cost is the same no matter how many vouchers there are.
However, the following should apply if there are any non voucher items in the cart:
1 to 3 items = 6.95 shipping.
4 to 11 items = 9.95 shipping,
12 items or more = free shipping.

Is it now possible to achieve my goal using the latest version?

Thanks

Paul

No Shipping on Certain Items depending on Category 21 Nov 2015 16:04 #19

Dear Paulb,
Do I understand you correctly that if there is any non-voucher in the cart, then the vouchers also count towards the number of item? E.g. if you order 3 vouchers and one other item, then the shipping would still be 9.95?
Also, the shipping costs for vouchers are always 1.50, even if a customer buyes more than 12 vouchers?

In that case, the rule set would be:
Comment="Only vouchers"; evaluate_for_categories(Articles, 1234)==Articles; Shipping=1.50
Articles<=3; Shipping=6.95
Articles<=11; Shipping=9.95
Articles>=12; Shipping=0

Best regards,
Reinhold

No Shipping on Certain Items depending on Category 22 Nov 2015 12:45 #20

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
Thank you for your response Reinhold.

Not quite... if you order 3 vouchers and one other item, then the shipping would be 6.95.
Also, the shipping costs for vouchers is always 1.50, even if a customer buys more than 12 vouchers.

In short, if you only buy vouchers (of any amount) it will only cost you 1.50 shipping. However, as soon as you add a non voucher item, the following shipping rules apply:

1 to 3 items = 6.95 shipping.
4 to 11 items = 9.95 shipping.
12 items or more = free shipping.


Thanks


Paul

No Shipping on Certain Items depending on Category 22 Nov 2015 13:18 #21

Dear Paul,
Thanks for the clarification that vouchers are completely separate and "items" don't include vouchers. In that case, the rule set would be:
Variable=Vouchers; Value=evaluate_for_categories(Articles, 1234)
Variable=OtherItems; Value=Articles-Vouchers
Comment="Only vouchers"; Vouchers==Articles; Shipping=1.50
OtherItems<=3; Shipping=6.95
OtherItems<=11; Shipping=9.95
OtherItems>=12; Shipping=0

Best regards,
Reinhold

No Shipping on Certain Items depending on Category 22 Nov 2015 15:24 #22

  • paul@cnetc.com
  • paul@cnetc.com's Avatar
You are a superstar Reinhold! That works a treat. I couldn't get my head around the logic required and your solution was what I needed.

Cheers

Paul

[SOLVED] No Shipping on Certain Items depending on Category 29 Nov 2015 13:16 #23

Problem solved.
  • Page:
  • 1