Skip to content

Instantly share code, notes, and snippets.

@unlocomqx
Created November 11, 2024 11:43
Show Gist options
  • Save unlocomqx/565f6511613b6cda76e2bd74276891d0 to your computer and use it in GitHub Desktop.
Save unlocomqx/565f6511613b6cda76e2bd74276891d0 to your computer and use it in GitHub Desktop.
<?php
// reverse group discount
if (isset($reverse_discount)) {
$reverse_discount = 1;
$group_reduction = (float)\Group::getReduction(Context::getContext()->customer->id);
if ($group_reduction > 0) {
$reverse_discount = 1 / (1 - $group_reduction / 100);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment