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:

Pricing for two type of product 12 Nov 2015 13:43 #1

  • James990
  • James990's Avatar Topic Author
I have a number of items on my site but only need two different shipping prices.

Mugs £3.00
and
Coasters £0.75
But for the life of me cannot get it to work! What syntax should I be using?

James

Pricing for two type of product 14 Nov 2015 13:07 #2

Dear James,
Do you mean that each mug costs £3 to ship? So if you buy two mugs and three coasters, you have shipping costs of 3+3+0.75+0.75+0.75=8.25£ ?

Assuming that all mugs belong to category 123 and all coasters to category 456 (those are the category IDs that you can see in Virtuemart's categories section; you'll have to adjust those values to your VM setup), one possible rule set to achieve this would be:
Shipping=3*evaluate_for_categories(articles, 123)+0.75*evaluate_for_categories(articles, 456)
Basically, you get the number or articles ordered from category 123 (i.e. the number of mugs) and mutiply it with 3, and then do the same for the coasters.

If, on the other hand, the £3 is the whole shipping cost if the order contains at least one mug, and the £0.75 is the shipping cost for the whole order if there are only coasters in the order, then the rule set could be:
Comment="At least one mug"; 123 in Categories; Shipping=3
Comment="No mugs"; Shipping=0.75

Best regards,
Reinhold
  • Page:
  • 1