• Resolved Imran Siddiq

    (@flickimp)


    Hi

    Great Plugin ??
    If you you have set up a Group where the user can select Single Ticket or Two Tickets, but the entire Product can only be 12 tickets as a total – how can you ensure that if a user selects Two Tickets – then that will use up 2 of the 12 available?

    Currently, if they select Two Tickets, it only reduces the stock by 1.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us.

    If you you have set up a Group where the user can select Single Ticket or Two Tickets, but the entire Product can only be 12 tickets as a total – how can you ensure that if a user selects Two Tickets – then that will use up 2 of the 12 available?

    Unfortunately that is not currently possible in our plugin.

    Kind regards.

    Thread Starter Imran Siddiq

    (@flickimp)

    Understood ??
    What if we thought out of the box and used a Code Snippet that reduces the total by 15% each time you increase the quantity?

    Is there a hook we can use to make that happen?

    function modify_stripe_payment_amount($price, $post_id, $quantity) {
    if ($quantity > 1) {
    // Apply a 15% discount when more than one item is purchased
    $price *= 0.85;
    }
    return $price;
    }
    add_filter(‘asp_ng_product_price’, ‘modify_stripe_payment_amount’, 10, 3);

    Plugin Author mra13

    (@mra13)

    Hi, this will require a thorough investigation, as this plugin also performs price validation checks at several stages to verify if the amount values have been altered. It does amount checks at the following stages which will need to be overridden if you customize the amount:

    • Pre-api submission
    • After success response from the API

    From the top of my head I can’t really say for sure all the places where it needs to be updated to make sure nothing breaks.

    We are generally very receptive to incorporating new action or filter hooks into our plugins. If you have specific suggestions, please feel free to indicate the exact file and line number where you believe a hook would be beneficial. Alternatively, you are welcome to submit a pull request with your proposed hook to our plugin’s GitHub repository.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Stock for Groups’ is closed to new replies.