Is it possible to remove the window size selection and quantity?

HomeSupportImage StoreIs it possible to remove the window size selection and quantity?

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #56850
    irisydavid
    Member

    Hi!

    I need to know if you can remove the popup that comes when you click add to cart that lets you select the size and quantity of photos and always take the default quantity = 1 and the size and price = 0 when you press first time to add to cart.

    the aim is that a client accesses the secure imge area and you can make a selection of photos and send them to me by e-mail for your report, but you dont have any money or anything and simply select the add to cart and when finished send me the order by the selected mail.

    Sorry for my english! (I’m spanish and use google translator).

    Thanks!

    #56856
    Xpark Media
    Keymaster

    @irisydavid,

    You could do it using Image Store Hook’s. But if you want a way to do it just by modifying the settings this is what you can do.

    Create a new price list. Add one image size with the $0 cost.
    For the payment gateway use email notification only.
    All new galleries be sure to use the $0 cost price list.

    #56894
    jcharris
    Participant

    Which particular hook would you use to do this?

    TIA,

    —JC

    #56896
    Xpark Media
    Keymaster

    @jcharris,

    did you try using the setting above?

    #56909
    irisydavid
    Member

    Hi!,

    I tried putting the price to $ 0 but I still departing popup, what I want is that the popup does not appear.

    I’ll try to hook.

    Thank you very much, and will comment as gone.

    #56913
    Xpark Media
    Keymaster

    @irisydavid,

    you can use the “ims_before_order_form” to completely modify the form.

    #56937
    jcharris
    Participant

    OK, I see the hook “ims_before_order_form” but forgive me if this is stupid, it still seems like you still need to display at least one price in order for the form to validate no matter how you alter the form.

    Can you give a (brief) example?

    #56903
    jcharris
    Participant

    Yes, I wrote a reply to this topic yesterday which appears to have gotten lost. I think there is a bug in this forum. If you reply to a specific post the reply seems to get lost. Fortunately I kept a copy:

    “I want to do exactly the same thing. I just tried creating a Price List with no prices and the form will not validate. It seems that you -must- have at least 1 price in a price list and there is no way to hide it from the visitor.

    Or if I create a dummy pricelist with one 0 price, the visitor sees -2- prices—both zero.

    The point is that we don’t want users to have to check -anything- or see prices. We don’t want this because the image people will download will -never- have multiple sizes or prices and that will confuse visitors.

    How do we simply -hide- the entire pricelist window/form?

    OR, can we force the pricelist checkbox to TRUE and hide the controls on screen? If so, what is the easiest way to do this?”

    Please advise,

    —JC

    #56954
    Xpark Media
    Keymaster

    @jcharris,

    The hook page has an example in how to modify or completely change the form. after you change the form you also need to change the validation function to allow submissions with no price.

    You can use ims_before_post_actions or ims_before_add_to_cart

    #57029
    jcharris
    Participant

    Which ‘hook page’ do you mean?

    I only see the docs page, which has no working ‘examples’.

    Could you -please- flesh your answer out a little more. I may be dumber than a bag of hammers but I’m not seeing how those two filters allow me to swap out the order form… which is really what I want to do.

    TIA,

    —JC

    #57044
    Xpark Media
    Keymaster

    @jcharris,

    The ims_before_order_form will allow you to create your own form all you have to do is return the entire HTML in the function.

    The ims_before_add_to_cart hook will allow you to save all the data that you add to your custom form by obtaining the POST values from the form.

    How much php or WordPress programing experience do you have? This code if for interlevel to experienced programmers

    #57064
    jcharris
    Participant

    When I use the code in your docs example:

    // Apply filter
    function add_ims_before_order_form( $output, $ImStore ) {
    return $output . “<p>my message</p>”;
    }
    add_filter(‘ims_before_order_form’, ‘add_ims_before_order_form’);

    I’m not sure this is correctly documented.

    I can append text to the form, but it doesn’t -replace- the html. IOW: regardless of what the filter returns it doesn’t overwrite the order_form, which is what I want to do.

    Can you help?

    #57066
    jcharris
    Participant

    Just to expand on this, your reply indicated that I could replace the entire html form. I can’t figure out how to do this with the currently documented filter.

    Perhaps you could provide a (short) example of how to REPLACE the form?

    As Always, Thanks!

    —JC

    #57084
    Xpark Media
    Keymaster

    @jcharris,

    don’t add the $output variable to your form, if you do it you are just adding to the html markup you want to replace the entire $output. like this:

    function add_ims_before_order_form( $output, $ImStore ) {
        return “<form> my form </form>”;
    }
    add_filter(‘ims_before_order_form’, ‘add_ims_before_order_form’);
    #57098
    jcharris
    Participant

    Thanks. I did as you indicated. There are two problems

    1. The 2nd parameter throws a non-fatal error.

    “Warning: Missing argument 2 for add_ims_before_order_form() in…”

    function add_ims_before_order_form( $output, $ImStore )

    2. You can add your own form code to that function BUT it does not stop the order_form code from being rendered. IOW: I can add my own form code, GOOD, but on the gallery page all the php from order-form.php still gets printed outside the form code. The result is ugly.

    Order Form code bleeding onto gallery page

    I basically want to -replace- the entire order-form.php.

    Can you help?

    TIA,

    —JC

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.