- This topic has 2 replies, 3 voices, and was last updated 10 years, 1 month ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › How to display the checkout button only if x items added
Hi,
I would like to display, the Paypal checkout button only if 6 items added in the cart. Here is what i’m trying to code in the “eStore_cart.php” (at the end of the file):
if ($item >= 6) {
return $output;
} else {
echo(“not enough items”);
}
Thanks in advance for your help,
Jérôme
So, what happened when you tried it? Did you add your code to the eStore_cart_display_checkout_button_form_part() function definition? You want to add your code after the “//Check if minimum and maximum cart checkout amount restriction apply” section, but before the “ //Create the checkout button form” section.
Why not use the following option from estore?
Enable Checkout Amount Limitations
You can enable it from the settings and it will probably give you something close to what you are trying to achieve.
That feature allows you to impose a checkout amount limitation in the shopping cart. For example: only allow a customer to checkout if the minimum amount in the cart is more than $20.00