Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore General Questions › pre populate squeeze form for login users
Tagged: pre-populate, squeeze form
- This topic has 10 replies, 2 voices, and was last updated 10 years, 6 months ago by totalwebdesign.
-
AuthorPosts
-
April 29, 2014 at 5:44 pm #10739totalwebdesignMember
Hello
My client need to send an ebook stamped only for a unique level membership. Other users with differents membership levels must pay to download it.
I use another plugin call php snippet to include a conditionnal on “my account” page
/*<?php if ( wp_emember_is_member_logged_in(’11’) ) : ?>
<?php echo eStore_free_download_form(40); ?>
<?php endif; ?>*/
This way only members with level 11 can see the squeeze form and will received the pdf stamped. At this point no problem.
First question: I need to know how i can modify the squeeze form addon to pre populate the name and email of the member. My plan is to hide this 2 values with CSS, this way the member will just have to validate by pushing the button and not enter another email address . Is it possible? I think i must interact with eStore_misc_functions.php?
Second question: After the member validate the squeeze form, is it possible to hide it completly? The member can just download one time the ebook this way.
Thank for your time
April 29, 2014 at 7:13 pm #62601wzpModeratorSince you’re already detecting if someone is a member, just use the [wp_eStore_download_now_button_with_stamping id=NNN] shortcode.
https://support.tipsandtricks-hq.com/forums/topic/pdf-stamper-with-a-membership-site#post-25269
April 29, 2014 at 8:03 pm #62602totalwebdesignMemberGreat thank you!
However, is it possible to have a shortcode to work with php code? Like <?php echo eStore_free_download_form(40); ?> for exemple?
Do you know if and how i can hide this button after the member click on it?
Many many thank
April 29, 2014 at 11:53 pm #62603wzpModeratorHow about:
eStore_show_download_now_button_with_stamping($id);
Do you know if and how i can hide this button after the member click on it?
To what end?
April 30, 2014 at 12:07 am #62604totalwebdesignMemberPerfect thank you
To what end? I don’t want the user to overclick on this link and generate 100 copies as my client want to stamped the pdf. As you mention on a previous thread, stamped and encrypt an ebook need lots of server’s ressources and there are plenty of members
So if there is an easy tweak to do that it can be interesting
April 30, 2014 at 12:36 am #62605wzpModeratorWell… if this is the ONLY ebook, and since you’ve decided to do your best imitation of a PHP ninja… what you could do, after the member does his download is “auto upgrade” him to another membership level that does not have any further access to that button.
April 30, 2014 at 8:48 am #62606totalwebdesignMemberHello
Thank you for the tip this one can be an elegant solution but the system has been tweak with custom addons and my client sell differents things: Ebooks, vidéos, services, membership etc.. so i don’t think this one will solve my problem
If there are others solutions…
Anyway thank you (again!) for your quick and effectives answers
April 30, 2014 at 3:04 pm #62607wzpModeratorYou can try this… but it requires custom programming and may have unknown consequences.
Create a new WP database table, wp_1strike with 2 index columns; member_id and product_id.
As members either purchase or download products, that you only want them to purchase or download only once (hence 1 strike), check if there is a matching index of member_id and product_id in the table. If FALSE, create a new index pair and proceed with download or purchase. If TRUE, prohibit any further action.
The adverse side effect, if you use this approach, is if the Download Now fails on the first attempt, you’ll have unhappy members.
April 30, 2014 at 3:45 pm #62608totalwebdesignMemberThis solution is for sure the one i am after , unfortunatly maybe a bit to hard to install correctly as my php knowledges are poor.
However it give a good start if i hire a freelancer.
The adverse side you mention can be a problem you’re right.
I will think about it, in any case the system clean all stamped pdf after 7 days so maybe my client will be happy without this option of download’s limitations.
Great support
Thank you WZP!
May 1, 2014 at 1:11 am #62609wzpModeratorIf you require custom work, please consider asking for a quote; as we are already familiar with our own code:
May 10, 2014 at 9:43 pm #62610totalwebdesignMemberThank you Wzp i will ask my client if he is interesting for custom work
-
AuthorPosts
- You must be logged in to reply to this topic.