Skip to content

Instantly share code, notes, and snippets.

@Uriel29
Created May 29, 2017 02:43
Show Gist options
  • Save Uriel29/4027d020517c79cf53748acc8df4b334 to your computer and use it in GitHub Desktop.
Save Uriel29/4027d020517c79cf53748acc8df4b334 to your computer and use it in GitHub Desktop.
1) gift/tmpl/added_items.php
Mudanca para aparecer o botão somente para um grupo de usuários
<?php
$user = JFactory::getUser();
$groups = JUserHelper::getUserGroups($user->id);
if(!in_array('64', $groups))
{
}
else
{
// echo 'condition matched';
// the above echo is just for testing
?>
<script type='text/javascript'>
jQuery( document ).ready(function() {
document.getElementById("plg-gift-items").style.display = "none";
});
</script>
<?php
}
?>
2) Mudanca para reduzir o valor da assinatura inicial e ficar o valor correto para compra de créditos
/gift/gift.php
$price = $plan->getPrice() * $item_quantity;
$price=$price-$plan->getPrice();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment