Jump to content

Nick A

Members
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

1 Neutral

1 Follower

About Nick A

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Just curious - what is your Friendly URLs setting? Do you see the same error if you change it to "Friendly index.php" ?
  2. Nick A

    Limit Product to 1 Per Account

    <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); function nodupepids($vars) { $nodupepids = array('<product ID>'); foreach ($_SESSION['cart']['products'] as $key => $value) { if (in_array($value[pid], $pidsfound)) { header('Location: cart.php?a=remove&r=p&i=' . $key); } if (in_array($value[pid], $nodupepids)) { $pidsfound[] = $value[pid]; } } } add_hook("PreCalculateCartTotals", 1, "nodupepids");
  3. Nick A

    Limit Product to 1 Per Account

    Tried the marketplace module. It won't let an existing customer checkout with a second product XYZ if they already have one on their account, but it doesn't prevent someone from ordering 2 x product XYZ initially. I'm assuming a hook could handle the other half the equation: "prevent adding more than 1 XYZ per cart" ? Edit: never mind - we figured out a hook to silently block adding multiple of XYZ to the cart. Works well in combination with the paid add-on.
  4. I've been searching for a solution for a while, but most of the threads about this topic seem outdated. What would be the best way to prevent customers from ordering more than one of product XYZ? If they're a new customer/not logged in, I'd like to prevent them from adding more than one XYZ to the cart. If they're an existing customer, I'd like to prevent them from ordering another XYZ if one is already on their account. Does anyone have a similar v7 compatible hook for this already?
  5. Doesn't seem to be working for me for some reason. Tried it for AfterShoppingCartCheckout and ShoppingCartCheckoutCompletePage as well.
  6. Or rather, skip the order complete page if they were not invoiced (ordered a free product) and were not marked fraud.
  7. What's the best way to accomplish this if they added only a specific product to the cart? And how would you skip the Order Complete page if they checked out with only that specific (free) product? Just want to direct them to clientarea.php instead.
  8. Thanks! Ironically, WHMCS support told me they couldn't help and to create one myself... Think I'll let them know about their own solution.
  9. WHMCS removed the Cancellation Request option for Free products. I'm trying to restore it to the PrimarySidebar with a hook. I'm stuck trying to get the serviceID for the setURI line. Could someone point me in the right direction? <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $primarySidebar->getChild('Service Details Actions') ->getChild('Cancel') ->setLabel('Request Cancellation') ->setUri('/clientarea.php?action=cancel&id=?????'); });
  10. We would like this option.
  11. Nick A

    paypal turning off sslv3 support due to POODLE

    We have also had IPN issues over the past few days after disabling SSLv3. However, it seems to only be affecting Asian clients
  12. Is the delete button in the right place for you?
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated