Home › Support › Image Store › Is it possible to remove the window size selection and quantity?
Tagged: default price, remove popup
-
AuthorPosts
-
February 6, 2014 at 2:16 am #56850irisydavidMember
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!
February 8, 2014 at 9:40 am #56856Xpark MediaKeymasterYou 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.February 13, 2014 at 1:50 pm #56894jcharrisParticipantWhich particular hook would you use to do this?
TIA,
—JC
February 14, 2014 at 12:41 am #56896Xpark MediaKeymasterdid you try using the setting above?
February 17, 2014 at 2:15 am #56909irisydavidMemberHi!,
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.
February 18, 2014 at 9:51 pm #56913Xpark MediaKeymasteryou can use the “ims_before_order_form” to completely modify the form.
February 19, 2014 at 2:27 pm #56937jcharrisParticipantOK, 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?
February 20, 2014 at 10:21 pm #56903jcharrisParticipantYes, 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
February 22, 2014 at 10:15 am #56954Xpark MediaKeymasterThe 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
March 4, 2014 at 12:39 pm #57029jcharrisParticipantWhich ‘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
March 7, 2014 at 12:51 am #57044Xpark MediaKeymasterThe 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
March 10, 2014 at 12:50 pm #57064jcharrisParticipantWhen 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?
March 10, 2014 at 2:20 pm #57066jcharrisParticipantJust 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
March 13, 2014 at 12:48 am #57084Xpark MediaKeymasterdon’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’);
March 14, 2014 at 10:41 am #57098jcharrisParticipantThanks. 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.
I basically want to -replace- the entire order-form.php.
Can you help?
TIA,
—JC
-
AuthorPosts
- You must be logged in to reply to this topic.