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 would like to know how to write the code for this scenario: My client has several products called upstands and splashbacks and the shipping on these products is chargeable along with all the other products. But my client would like to offer free delivery on these upstands and splashbacks if they are purchased along with any other product NOT called an upstand or a splashback. Is this possible in the advanced shipping by rules? Perhaps this could be done a different way with category id numbers rather than product names? The category id's for the upstands is 12 and for the splashbacks it is 11 and there are two other categories that are for all the other products that need to be purchased to get the upstands and splashbacks delivered free these are category 10 and 13 Hope this makes sense. |
|
Dear Chris,
To exclude products of one or more particular categories from the calculation of the quantities (like weight, amount, etc.) on which you base your shipping costs, please see: open-tools.net/forum/shipping-by-rules-p...t-of-a-category.html Is this what you want? Best regards, Reinhold |
|
Hi Reinhold,
Thanks for getting back to me. What I need is a code for the following: If a customer purchases any product from category 10 or 13 and then puts a product from category 11 or 12 into the same cart, the delivery charge on the products from category 11 or 12 will be free. The delivery charge calculated for the products from category 10 or 13 remains the same. If the customer just purchases any product from category 11 or 12 on their own then the delivery charge will be as normal for all products Thanks Chris |
|
Hi Reinhold,
I have had a look at the link you send me but I still can't get my head around how to write this code. All the shipping costs are calculated via UK postcode which work brilliantly so I can't put a price in this coding as delivery price depends on postcode area. Some help on this would be appreciated. Regards Chris |
|
Dear Chris,
This scenario (if a product from category 10 or 13 is bought, then shipping for all products from category 11 and 12 is free) is not really what this plugin is meant for. In particular, this plugin was never designed to calculate shipping costs per article. There are ways to achieve what you want with that plugin, though they heavily depend on your exact shipping cost structure. To be able to write a rule (or rather modify your existing rules) for you free shipping case, I need to know your whole set of rules. For example, if you calculate shipping based on the weight of the order, I would write the set of rules like: Variable=WeightMod; Value=Weight
Variable=WeightMod; Condition=contains_any(Categories, 10, 13); Value=Weight-evaluate_for_categories(Weight, 11, 12)
Name="Shipping is 10€ per kg"; Shipping=10*ceil(WeightMod) Instead of using the Weight variable for the shipping cost, we define a new variable WeightMod, which will be the total weight by default. Only if at least one product from categories 10 or 13 is in the cart (the Condition= in the second rule), then we reduce the weight by the weight of all products from categories 11 and 12. If no product from cateoris 10 or 13 is in the cart, the WeightMod still contains the full weight, including the weight from categories 11 and 12. Best regards, Reinhold |