Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Custom Price Feature – Please specify a minimum amount of XX

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Custom Price Feature – Please specify a minimum amount of XX

Tagged: custom price, product variations

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 3 months ago by admin.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • April 2, 2014 at 7:01 pm #10595
    sorro
    Member

    Hi. I am looking to setup a product with 6 donation variations AND an option for people to specify their own donation amount (using “Allow Customers to Specify a Price”). However, if the custom price is empty, a Javascript error pops up saying: “Please specify a minimum amount of $0.00”

    Basically, I think the plugin should ignore the custom price when a variation is chosen.

    I have looked in a few places here and even tried to identify the code line that would need to be changed, but couldn’t find a working solution:

    http://www.tipsandtricks-hq.com/ecommerce/how-to-allow-customers-to-specify-a-price-for-a-product-994

    Please help.

    Thanks.

    April 3, 2014 at 6:54 am #62045
    admin
    Keymaster

    Using variation with custom price option is fine. Your customers can still specify a custom amount and choose a variation. They just can’t leave that custom amount field empty.

    Have you tried entering an amount in the custom price field then selecting a variation and see what happens?

    April 3, 2014 at 11:08 am #62046
    sorro
    Member

    Thanks for your reply. Yes, I have tried that and when they enter an amount in the custom price is works.

    However, entering something it an annoying restriction for my customers. If they choose a variation (which already has a price associated), they should NOT have to enter anything as custom price! In other words, I want them to either be able to choose a variation (without a custom price) OR enter a custom price and then the variation should be ignored.

    It is basically for making a donation, where customers can choose between fixed donation amounts OR specify their own amount.

    How can this be achieved?

    Btw, if this involves PHP coding, that’s fine. I’d just need to know where exactly to edit. For my project, I am perfectly happy with turning off the error message (minimum amount) completely. Where would I go to turn it off?

    Thanks.

    April 3, 2014 at 1:09 pm #62047
    admin
    Keymaster

    okay. That check comes from a JavaScript file. Do the following:

    1) Open the “lib/eStore_read_form.js” file.

    2) Search for the following function in that file:

    function eStore_custom_price_validated(object1,custom_price)

    3) Always return true from that function.

    That will do the job.

    April 3, 2014 at 2:47 pm #62048
    sorro
    Member

    Thanks a lot, that is a huge help. :)

    Now that I know where this is coming from, I have a slightly different idea re. changing the eStore_custom_price_validated function. Would it be possible to rewrite line 145 of “lib/eStore_read_form.js” to integrate/take into account price variations with custom price?

    Something like:

    if(isset(price_variation)) {

    if (price_variation < min_amt) {

    alert(JS_WP_ESTORE_MINIMUM_PRICE_YOU_CAN_ENTER + min_amt);

    return false;

    }

    else {

    return true;

    }

    elseif (isNaN(custom_price) || custom_price < min_amt) {

    alert(JS_WP_ESTORE_MINIMUM_PRICE_YOU_CAN_ENTER + min_amt);

    return false;

    }

    else {

    return true;

    }

    }

    Does object1 passed to this function contain any information about the *price_variation* selected? (Something like object1.selected_price_variation)

    Thanks a lot again for all your help.

    April 4, 2014 at 5:42 am #62049
    admin
    Keymaster

    Your idea is very good but it won’t be possible to do because the variation price is actually not available there. The issue mainly comes from trying to use the custom price feature for a different purpose than intended. When you enable the custom price feature, the plugin assumes the following:

    The customer always have to specify an amount (for that product or for a variation of that product).

    I am going to suggest an alternative way to what you are after.

    Create two eStore products with the following:

    1) Has fixed variations for users to choose/select

    2) Just has the custom price option

    Now, on your donations page, you can place two buttons for these two products. Your customers will choose one or the other.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ