Skip to content

Instantly share code, notes, and snippets.

@Jmayhak
Created July 17, 2018 19:31
Show Gist options
  • Save Jmayhak/5acf8fb0537e8eb3ffc6609d5b6abed8 to your computer and use it in GitHub Desktop.
Save Jmayhak/5acf8fb0537e8eb3ffc6609d5b6abed8 to your computer and use it in GitHub Desktop.
value on invoice
case ($invoice->hasSilverMembership() && $invoice->hasSpouseProduct()) :
$content_name = 'Silver + Spouse';
$value = 194;
break;
case ($invoice->hasGoldMembership() && $invoice->hasSpouseProduct()) :
$content_name = 'Gold + Spouse';
$value = 294;
break;
case ($invoice->hasPlatinumMembership() && $invoice->hasSpouseProduct()) :
$content_name = 'Platinum + Spouse';
$value = 394;
break;
case ($invoice->hasEliteMembership() && $invoice->hasSpouseProduct()) :
$content_name = 'Elite + Spouse';
$value = 544;
break;
case ($invoice->hasSilverMembership()) :
$content_name = 'Silver';
$value = 147;
break;
case ($invoice->hasGoldMembership()) :
$content_name = 'Gold';
$value = 247;
break;
case ($invoice->hasPlatinumMembership()) :
$content_name = 'Platinum';
$value = 347;
break;
case ($invoice->hasEliteMembership()) :
$content_name = 'Elite';
$value = 497;
break;
case ($invoice->hasCCM()) :
$content_name = 'CCM';
$value = 47;
break;
case ($invoice->hasSpouseProduct()) :
$content_name = 'Spouse';
$value = 47;
break;
default:
$content_name = 'Product';
$value = $invoice->getSubTotalAmount();
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment