Welcome,
Guest
|
TOPIC:
Shipping Cost by State and Categories 19 Dec 2016 15:01 #1
|
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!
Welcome,
Guest
|
|
Hi,
I have 2 categories and 2 difference state. Category Abalone is charge by weight in both Sate A and B. Example: 0.01KG to 1KG = 10 and 1.01KH to 2KG = 20 ect.. until 30KG Category Hamper is free of charge at State A, but not available in State B. May I know how to I set the rules for above statement. Thanks, Sam |
|
Dear Sam,
Let's first rephrase your shipping cost structure in a way that can be directly implemented as a ruleset: 1. If an order from State B contains a product from category Hamper, no shipping is possible 2. In all other cases, shipping depends only on the weight of all products from category abalone and the cost is $10 for each kg (rounded up to the next full kg), irrespective of the state. Products from category Hamper are ignored. In the following ruleset I'm assuming category Hamper to have category ID 123 and Abalone ID 222. I'm also assuming that you identify State A and B by the selected state entry from the dropdown box. Let's say State B has a 2-letter code "XY" configured in the VM backend's country => states section. If you identify the state within your country by postal code range, you can simply replace the State2 check by something like 12345<=ZIP<2000. The corresponding ruleset is (requires the advanced, i.e. paid, version of the plugin): Name="Hampers cannot be shipped to state A"; 123 in Categories; State2=="XY"; NoShipping
Name="Shipping cost depend only on category abalone"; Shipping=10*ceil(evaluate_for_categories(Weight, 222)) In these rules I have ignored you "until 30kg" restriction. Do you mean 30kg for the whole order (including hamper in state A) or only for products of category Abalone. In the first case, the additional condition in the second line would be `Weight<=30', in the second case the condition would be `evaluate_for_categories(Weight, 222)<=30' Best regards, Reinhold |