Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › eStore – allow only one product in cart?
- This topic has 23 replies, 5 voices, and was last updated 4 years ago by pocket.
-
AuthorPosts
-
July 26, 2012 at 1:36 pm #6995streidlMember
Hello,
is it possible to allow only one product in the shopping cart? Or is there a shortcode that I can add, so that the cart is emptied, everytime someone goes back and chooses a different membership? Maybe something like:
[wp_eStore_add_to_cart id=7 emptycart=true]
I am offering a membership that needs to be paid via the shopping cart (because we need to offer debit as payment instead of the paypal recurring payment)
EDIT: can I use the
reset_eStore_cart
function at any place for this? Best would be in combination with pressing the add-to-cart-ButtonThanks and kind regards,
Streidl
July 27, 2012 at 4:10 am #47790adminKeymasterCan there be more than 1 quantity of the same item in the cart? To clarify… do you want to reset the cart even if someone ads multiple quantity of the same item?
July 27, 2012 at 11:45 am #47791streidlMemberSince it is a membership site, it should be only one item to buy… If the user choses a different membership, the cart shouldn’t contain two memberships.
July 28, 2012 at 12:02 am #47792adminKeymasterThank you for the explanation. There is an option to what you are after.
Please open the “eStore_advanced_configs.php” file and search for the following line of code:
define('WP_ESTORE_CART_CHECKOUT_ITEM_LIMIT', 0);
Once you find it, change it to the following:
define('WP_ESTORE_CART_CHECKOUT_ITEM_LIMIT', 1);
That should prevent anyone from adding more than 1 item to the shopping cart. Customers will need to remove the current item from the cart before they can add another one.
August 2, 2012 at 9:04 am #47793streidlMemberWell, the idea was not bad… but it didn’t really do what I wanted.
Now my customers would need to 1) realize that the wrong item is in the cart, even though they clicked another one, 2) click “empty the cart”, 3) click “go back” and 4) chose the right membership option again.
From experience, every click loses a customer, so I would like to reduce that if possible.
Is there a way to empty the cart automatically with a click?
Right now, I use
[wp_eStore_add_to_cart id=1]
. Is it possible to combine this click with clearing the cart before adding that item?That would be perfect.
August 3, 2012 at 4:04 am #47794adminKeymasterI don’t quite follow you… why would they have to realize that it is the wrong item in the cart if they added the correct item in the first place?
You asked if you can make sure that the customer cannot add more than 1 item in the cart and the option I explained does exactly that.
August 3, 2012 at 6:30 am #47795streidlMemberReally that tough to understand? Damn, gotta work on my explanation skills.
Ok, here we go:
Some customers tend to click on one membership item (item “A”) on the “choose your membership” site, but then they change their mind. Right before they have to enter their accouting number on the manual checkout – they think about it again, and leave the page before checkout (item “A” still in cart) and click some other pages on our site.
After some time they realize “Damn, I really want this membership – but the one I chose was too expensive / too long / not right for me / whatever. I will choose a different one”.
So they go back to “Choose your membership” (item “A” still in cart, but they don’t see that, since this appears to be a membership site, not an estore) and click on “Buy Membership B”.
On the second page they see: Item “A” is in the cart, not the one they just clicked – together with “Only one item allowed!”… Confusion.
-> We have just destroyed the momentum of their willingness to finally buy our membership “B”. This I would like to avoid.
So it would be great if I could empty the cart once a membership item is chosen – to make sure that no “older” item is still in the cart.
Does this make sense now? Would be great if you had a solution for this.
Thanks in advance. All the best,
Streidl
August 4, 2012 at 1:30 am #47796adminKeymasterThank you for the explanation. I understand what you are trying to do now. No, there is no option to do exactly what you described.
This is how it normally works:
You add an item to the cart and then while checking out you feel that you made a mistake. You simply remove the item from the cart and then add the new item to the cart.
August 6, 2012 at 10:53 am #47797streidlMemberHow about creating a shortcode for the “empty cart” button that you already have? That might do the job… Where do I find the function and how could I add a shortcode for that? I guess I am not the only one who would be interested in that…
Thanks again for your support.
August 6, 2012 at 11:06 am #47798ZainParticipantHi streidl,
Not sure if this helps, but the way I avoid unnecessary steps in the payment process for Membership sign-ups is simply to use an “Buy Now” button instead of the “Add to Cart”. This completely bypasses the cart portion and takes them straight to PayPal.
For how you do this, see this page:
The way I figure it is the details are already listed and the customer has their wallet out already – why put them through a cart page/widget as well?
If they do make an error when signing up, then it’s always possible to refund them. I tend to find that usually people check before buying things, so it’s rare that refunds are required…
Anyway, hope that helps.
Cheers,
Zain
August 6, 2012 at 11:16 am #47799ZainParticipantOh… as an additional thought – remember that with WP eMember/eStore it’s also possible to “upsell” a Member using some useful shortcodes. All that’s required is some pre-planning and thinking it through a bit…
What I tend to do is to use the following:
[emember_protected for=2 do_not_show_restricted_msg=1]
[wp_eStore_buy_now_button id=1]
[/emember_protected](see http://www.tipsandtricks-hq.com/wordpress-membership/how-to-protect-a-section-of-a-post-or-page-88 and the wp-estore_shortcode.pdf)
What this does is to show a message to users of Level 2 to buy the next level (without alerting any other level of this message – i.e. no “content protected” message!).
This way, you can show users a buy button for the next level.
Hope that’s useful to you.
Cheers,
Zain
August 6, 2012 at 4:14 pm #47800streidlMemberHello Zain,
thanks for your thoughts. I already tried that option before, looks like a nice way to use eMember, but unfortunately not for me: it excludes bonuscodes and/or coupons and we absolutely need that. Coupons are only usable with a cart, not with subscriptions or one-click-payments like you mentioned.
So we are basically back to we started I suppose. Any way to clear the cart via a shortcode? Maybe create a custom one? there should be a function for that, I guess…
August 6, 2012 at 6:34 pm #47801ZainParticipantHi streidl,
I see what you mean, and you’re right – the coupons codes are only usable with the cart.
Well, thinking a way around the problem (rather than hacking the plugin – trust me, you don’t want to do that!), one interesting idea I saw very recently is to offer a “Cashback *After* Purchase”. Funnily enough, it was an advert on a site that offered money back on WP eMember if you bought through their link…
Anyway, I thought it was interesting because in order for the user to get the cashback, they had fill out a form after they made a purchase (including PayPal transaction ID).
The thing about this is that quite a lot of people can’t be bothered to fill out a form to get their cashback! Quite a sneaky marketing idea, I thought – either way, the site owner would win (especially if people didn’t make a claim).
I realise this isn’t what you’re looking for, however I’m just adding it as a suggestion and a way of looking at other alternatives. Maybe it’s something you might want to consider (or not) as an alternative.
I suppose the real question to consider is “How important is it that users can only select 1 membership level?”. Personally, I trust my site readers are intelligent enough not to order something twice… saying that, I did have someone do just that recently (I offered a refund and they said “keep it”. Winner! ).
Good luck with it!
August 10, 2012 at 10:24 am #47802streidlMemberWell I tried your solution Zain, but still… don’t really like this “workaround”.
Nobody else knows how to empty the cart via shortcode? I also might use the function itself via the “Shortcode Exec PHP” plugin.
Just need a little hint – please
Thanks
August 11, 2012 at 2:21 am #47803adminKeymasterTry the following tweak to see if that works.
Open the “wp_eStore1.php” file and search for the following line of code:
if (isset($_POST['addcart_eStore']))
Once you find it, add the following function call just inside this “if” statement:
reset_eStore_cart();
This will always empty the cart and then add the new item.
-
AuthorPosts
- You must be logged in to reply to this topic.