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:

Mandatory use Insurance 24 Nov 2014 05:22 #1

  • ruhanda
  • ruhanda's Avatar Topic Author
Hi,
In my country some freight company regulations is mandatory to use insurance for categories of electronic products or the price is 10 times the shipping cost

I still cannot find the good script for this need, below is temporary solution.


I'm use conditions "2 in Categories OR Amount>1000000" for temporary, it should be "2 in Categories OR Amount>10*Shipping" but it's not work.

I need your suggestion and support.

Thanks,
Ruhanda

Complete script:
================
(translate for some variable: BeratPengiriman is Weight, Asuransi is Insurance)

Name=Masukan KODE POS (ZIP) yang benar untuk mendapatkan biaya pengiriman ; ZIP<=0; NoShipping
Name=Pembelian masih kosong Anda belum Memiliki/Memilih Produk ; Products<=0; NoShipping
Variable=Volumetrik;value=0
Variable=Asuransi;value=0
Variable=yesno;value="No"
Variable=Volumetrik;Volume!=0;value=ceil(Volume/6000)
Variable=BeratPengiriman;Volumetrik<=Weight;value=Weight
Variable=BeratPengiriman;Volumetrik>Weight;value=Volumetrik
Variable=Asuransi;2 in Categories OR Amount>1000000;value=(0.002*Amount)+5000
Variable=yesno;2 in Categories OR Amount>1000000;value="Yes"
Name= {City} Zona-8,1-2 Hari, Asuransi:{yesno}, {BeratPengiriman}Kg; 10001<=ZIP<=17435; Shipping=Asuransi+ceil(BeratPengiriman)*8000

Mandatory use Insurance 15 Dec 2014 19:31 #2

The problem is that when the conditions and variable definitions are evaluated, the shipping cost is not yet determined, so you can't base your condition or variable on the resulting shipping costs.

Unfortunately, I don't have any suggestion for how to properly implement this...

Sorry,
Reinhold
  • Page:
  • 1