To create a custom shipping method that only applies when one or more gift vouchers are ordered, follow these steps:
Insert extended SQL query
Go to Settings → Basic Settings → Storefront → Shipping costs module. Insert the following text after the last character of the line Extended SQL query:
,MIN(IFNULL(at.viison_coupon, 0)) AS allviisoncoupon
Edit all existing shipping methods
Next, all existing shipping methods under Settings → Shipping costs need to be edited. To do this, insert the following text in the Custom conditions field on the Advanced settings tab of each shipping method:
!allviisoncoupon
Create new voucher shipping method
Finally, create a shipping method that only applies when exclusively one or more vouchers are ordered. For this one, insert the following text in the Custom conditions field on the Advanced settings tab:
allviisoncoupon
