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
|
|
Hello,
Joomla 3.7 VM 3.2.1 At moment I use free plugin. For example Product A
|
|
Dear Jaak69,
If I understand you correctly, you want to have different shipping cost calculations for each product. I.e. Product A has shipping costs depending on the quantity of product A, product B has shipping costs depending on quantity of Product B, etc. The total shipping costs should then be the aggregated costs. Unfortunately, our plugin does not provide any simple way to do calculations at product-level. The only situation where it can work is if you have a limited number of products. You'll then have to handle each product separately (store the result in a custom variable) and add those variables up: Variable=MyShipping; Value=0
Variable=MyShipping; evaluate_for_skus(Articles, "skuA")<60; Value=MyShipping+evaluate_for_skus(Weight, "skuA")*12.34
Variable=MyShipping; evaluate_for_skus(Articles, "skuA")>=60; Value=MyShipping+8.88
Variable=MyShipping; evaluate_for_skus(Articles, "skuB")<60; Value=MyShipping+evaluate_for_skus(Weight, "skuA")*23.45
Variable=MyShipping; evaluate_for_skus(Articles, "skuB")>=60; Value=MyShipping+7.77
[...]
Shipping=MyShipping As you can see, for each product, you'll have to explicitly check the threshold of 60 articles and then add the shipping cost for that product to the MyShipping variable. The numbers 12.34, 23.45, 8.88 etc. are fantasy numbers that you'll have to replace with your own shipping cost structure values, of course. Best regards, Reinhold |
|
Hello
Can such a code be used to create rules if shipping should be calculated due to articles from different categories? Now my rules look like Condition=contains_any(Categories, 2,3,4,5,23,35,26,27,28,29,30,31,32,33,34,36,37); Shipping=13+12*evaluate_for_categories(articles, 2,3,4,5,23,35,26,27,28,29,30,31,32,33,34,36,37) BUT I would need this rule to work for each 4 items from those categories. I mean 1st item =25, 2nd=25+12, 3rd= 37+12, 4th= 49+12 and begining from 5th 61+25, 6th= 86+12... beginning from 9th = x+25 and then (x+25)+12... I'd need this this because each parcel containes 4 items I tried to use rule sample from "Box with beer bottles" but it doesnt work Thanks in advance |
|
Dear Trickybug,
If I understand your description correctly, each first bottle after a full box of 4 (in mathematical term, each bottle that is 1 modulo 4, i.e. the 1st, 4th, 9th, 13th, etc.) costs 25 shipping costs while all other bottles cost 12 shipping costs. Or in other words, each bottle costs 12 and each box of up to four bottles costs an additional 13. The particular category of the bottles does not matter. If this is the case, then you can use a rule like the following: Variable=Bottles; Value=evaluate_for_categories(articles, evaluate_for_categories(articles, 2,3,4,5,23,35,26,27,28,29,30,31,32,33,34,36,37))
Variable=Boxes; Value=ceil(Bottles/4)
Bottles>0; Shipping=12*Bottles+13*Boxes Calculating the number of boxes uses the ceil function to charge one full box even when only one bottle is contained in the last box. E.g. if bottles=5, then bottles/4 will be 1.25, which needs to be rounded UP to 2. Thus the ceil function to round up to the next full number. Best regards, Reinhold |