Created
June 4, 2018 18:40
-
-
Save tiagomatos/801a48f70a2ff31da55e291b83976f78 to your computer and use it in GitHub Desktop.
Hide/Show Jumpseller Shipping Methods according to the Order Amount.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shipping_methods_ids = []; // 10441, 19855, 26703, 26704, 27216, 63580 | |
// select usable shipping methods | |
switch(event.target.value){ | |
case "75995": | |
if({{order.total}} >= 50000) | |
shipping_methods_ids = ['10441', '19855', '27216']; | |
else | |
shipping_methods_ids = ['79142', '19855', '27216']; | |
break; | |
case "75976": | |
if({{order.total}} >= 50000) | |
shipping_methods_ids = ['10441', '19855', '27216']; | |
else | |
shipping_methods_ids = ['79142', '19855', '27216']; | |
break; | |
case "75977": | |
shipping_methods_ids = ['27216']; | |
break; | |
case "75978": | |
if({{order.total}} >= 50000) | |
shipping_methods_ids = ['10441', '19855', '27216']; | |
else | |
shipping_methods_ids = ['79142', '19855', '27216']; | |
break; | |
case "75979": | |
shipping_methods_ids = ['27216']; | |
break; | |
case "83526": | |
if({{order.total}} >= 50000) | |
shipping_methods_ids = ['10441', '19855', '27216']; | |
else | |
shipping_methods_ids = ['79142', '19855', '27216']; | |
break; | |
case "89799": | |
if({{order.total}} >= 50000) | |
shipping_methods_ids = ['10441', '19855', '27216']; | |
else | |
shipping_methods_ids = ['79142', '19855', '27216']; | |
break; | |
case "93773": | |
if({{order.total}} >= 50000) | |
shipping_methods_ids = ['10441', '19855', '27216']; | |
else | |
shipping_methods_ids = ['79142', '19855', '27216']; | |
break; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment