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:

Add extra cost depending on category 24 Nov 2015 14:39 #1

  • oysterrgirl
  • oysterrgirl's Avatar Topic Author
Hi, we sell bottles of wine and liquor. We use the plugin so that it adds the cost of the package, which is:

box for 3 bottles: 2,55 €
box for 6 bottles: 4 €
box for 12 bottles: 8 €

There's a couple categories that include products that would add the package in a different way ( these are beer, cider, etc- sold in packs of 12 and 24 and Demijohns).

Type of category 1 (articles sold in packs)

24 bottles - i'd need to add the cost 1 box of 6 bottles (4 €) instead of 4 boxes of 6
So each 24 bottles would add the cost of 1 box of 6 bottles


Type of category 2 - Demijohns
Each article would add 1 box of 6 bottles (4 €)

How can i calculate the cost of the shipping for orders that would include products from these categories? providing the rest of the products in the shopping cart would need to have the packaging added as usual. This is my current set of rules:

Variable=Bottles; Value=Articles-evaluate_for_categories(Articles, 78, 83, 90) <-- i need to change this to add the cost of the box
Variable=Box12; Value=round(Bottles/12-0.0001)
Variable=Box6; Value=round((Bottles-12*Box12)/6-0.0001)
Variable=Box3; Value=ceil((Bottles-12*Box12-6*Box6)/3)
ExtraShippingCharge=8*Box12+4*Box6+2.55*Box3

Name=Express Delivery; 0<Weight<=3; shipping=14.83
Name=Express Delivery; 3<Weight<=5; shipping=15.98
etc

I use Virtuemart 2.6, Joomla 2.5 and Advanced Shipping by Rules

Thank you so much and regards

Add extra cost depending on category 28 Nov 2015 19:44 #2

Dear oysterrgirl,
I would simply add another variable for the number of 12- and 24-packs and the demijohns. Something along the lines of:
Variable=Bottles; Value=Articles-evaluate_for_categories(Articles, 78, 83, 90)
Variable=Box12; Value=round(Bottles/12-0.0001)
Variable=Box6; Value=round((Bottles-12*Box12)/6-0.0001)
Variable=Box3; Value=ceil((Bottles-12*Box12-6*Box6)/3)
Variable=Pack12; Value=ceil(evaluate_for_categories(Articles, .......)/12)
Variable=Pack24; Value=ceil(evaluate_for_categories(Articles, .......)/24)
Variable=Demijohns; Value=evaluate_for_categories(Articles, .......)
ExtraShippingCharge=8*Box12+4*Box6+2.55*Box3+4*Pack12+4*Pack24+4*Demijohns

Best regards,
Reinhold

Add extra cost depending on category 30 Nov 2015 14:41 #3

  • oysterrgirl
  • oysterrgirl's Avatar Topic Author
Thanks a lot Reinhold, it works great for the category of Demijohns, but the other two categories have12 and 24 packs mixed, so it doesn't work completely for them. Is it possible to add a box of 6 for 24 packs and a box of 3 for 12 packs? This would be fro categories 78 and 83.

Thanks again for your excellent support.

Add extra cost depending on category 03 Dec 2015 14:23 #4

Dear oysterrgirl,
Do I understand you correctly that some products from the two categories 78 and 83 have some articles that are shipped as 12-packs and some that are shipped as 24-packs? How do you distinguish those products?

Or do you mean that if the customer buys 12 bottles, it will be a 12-pack, but if he buys 24-bottles it will be a 24-pack, and if he buyes 36 bottles, it will be a 12- plus a 24-pack? That later case would actually be very similar to your 3/6/12 Boxes.

Best regards,
Reinhold

Add extra cost depending on category 04 Dec 2015 12:04 #5

  • oysterrgirl
  • oysterrgirl's Avatar Topic Author
Hello Reinhold, thank you so much for your reply. The customer buys 12 or 24 bottles with the "Purchase Quantity Steps" and "minimum quantity" depending on the product. This happens only with productos in two categories. So certain products have just the option to be purchased in packs of 12 or 24. How can i add the cost of the box in this case?

Add extra cost depending on category 13 Dec 2015 13:09 #6

Dear oysterrgirl,
Do I understand you correctly that the only way to distinguish which products have only packs of 12 or only of 24 is the 'Purchase Quantity Steps" setting of the products? In this case, I don't think there is any easy way to achieve what you want.

One possible workaround would be to assign a further (unpublished) category to those products (one for 12-packs, another for 24-packs). This would make it possible to handle those products differently... Apart from that, I don't really know any other solution.

Best regards,
Reinhold

Add extra cost depending on category 14 Dec 2015 15:01 #7

  • oysterrgirl
  • oysterrgirl's Avatar Topic Author
Your 'unpublished' categories solution works wonderfully, thank you so much again Reinhold!

[SOLVED] Add extra cost depending on category 14 Dec 2015 15:02 #8

  • oysterrgirl
  • oysterrgirl's Avatar Topic Author
Problem solved.
  • Page:
  • 1