I am utilizing CartThrob to collect invoice payments, since several of my clients have been requesting it. The invoices can be up to $20,000. If my clients want to pay by CC, then I want them to pay the CC charges, loosing $300 on a $10,000 invoice hurts just a little bit. So I am trying to get CartThrob to calculate the convenience fee. I have tried several things…

Using CartThrobs shipping function

This works quite well. I can set the shipping fee to be a percentage of the total fees and CartThrob automatically adds it to the total to be processed. But then in the future, if I ever need to charge shipping fees, I can't.

Using add_to_cart function

I began to test this. First I added a product and used the add_to_cart function to add it to the cart. But parameters from the add_to_cart_form such as allow_user_price and price do not work, they don't override the price set in the product entry.

This was quite promising because I would use the delete_from_cart function just before the add_to_cart function so I could always reset the price., not in

1 Answer 1


I see no reason why add_to_cart_form with allow_user_price and price would not work. Could you post the code you have? I use this in many of the products I've created to allow for dynamically created prices. You could try placing a price input field within the form rather than it being a parameter. I have an example of this below where I use it for adding additional charges on a separate page when customers are requested to pay a little more:

    {!-- return="{template_group}/basket" --}

    title="Nominal charge"




            <select name="item_options[type]">
                <option value="">-- Select --</option>
                <option value="Additional delivery charge">Additional delivery charge</option>
                <option value="Additional product cost">Additional product cost</option>
                <option value="Other separate payment">Separate payment</option>
                <option value="Returns">Returns</option>
                <option value="Other">Other</option>
        <p><label>Description:</label> <input name="item_options[description]" value="" class="input" /></p>
        <p><label>Order ref:</label> <input name="item_options[order_ref]" value="" class="input" placeholder="Order number if applicable" /></p>
        <p><label>Amount:</label> <span class="price_field"><span class="prefix">{exp:cartthrob:view_setting prefix="yes"}</span><input name="price" value="" class="input small" /></span> <small>(excl VAT)</small></p>
    <input type="submit" value="Add to cart" class="button purple r" />

Of course you could place this anywhere, say at the bottom of the cart area before.

I hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.