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:

Cost for every extra 0.5kilo 30 Nov 2016 19:36 #1

  • dkaneloglou
  • dkaneloglou's Avatar Topic Author
Hello,
sorry to bother, I send another post because the first one is a little bit old,
open-tools.net/forum/shipping-by-rules-p...-shipping-rules.html
and we are in a hurry and expecting to work the shipments, in order to publish the eshop..

To charge 1 Euro for every 0.5kg, you can simply multiply the weight by 2 and handle it similarly to the 1 Euro/kg case. Or you can first round up to the next 0.5kg and then multiply by 2:
Name=1 Euro per 1/2 kg above 3kg; Shipping=ceil(2*(Weight-3))
or equivalently:
Name=1 Euro per 1/2 kg above 3kg; Shipping=2*ceil(Weight, 0.5)-6


I used and changed the above code so I wrote this:
Name= - Zone 2 - Delivery 2-4 days. Weight: {weight}kg. ; Weight<=0.5; Shipping=39.60
Name= - Zone 2 - Delivery 2-4 days. Weight: {weight}kg. ; 0.5<Weight;
Shipping=39.60+10*2*(ceil(Weight,0.5)-0.5)

I am almost sure it was working for less than 0.5 kilo and for more than 0.5 also..!
Now I updated to 6.1.7 and I get an error:
when I have more than 500gr in the cart
Unknown rule type '' encountered for rule 'Name= - Zone 2 - Delivery 2-4 days. Weight: {weight}kg. ; 0.5
What am I doing wrong??

what I need is 39,60euro for the first 0.5kilo
and for every 0.5kilo extra charge 10euro.

Joomla version 3.6.4
Advanced Open Tools 6.1.7

You can test here: please make an order from Iceland in example:
shop.nutritionglobaltrading.com/en/

Thank you!

Cost for every extra 0.5kilo 01 Dec 2016 11:46 #2

  • dkaneloglou
  • dkaneloglou's Avatar Topic Author
Solved..!

I modified the code like this which made more sense to me, and worked!
Name= - Zone 2 - Delivery 2-4 days. Weight: {weight}kg. ; Weight<=0.5; Shipping=30.47
Name= - Zone 2 - Delivery 2-4 days. Weight: {weight}kg. ; 0.5<Weight; Shipping=30.47+12.5*ceil(2*(Weight-0.5))

Finally we are getting to air!
Thank you Advanced Shipping Rules!

[SOLVED] Cost for every extra 0.5kilo 01 Dec 2016 11:46 #3

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