My client would like to have two types payment methods one is COD another is PayPal. When the customer clicks the delivery button this will disable COD option and if the customer clicks the takeaway button the PayPal option will be disabled in the checkout page in Woocommerce. Please help me fix this?
Both buttons will be set top of the check out page.
By the type of delivery/takeout button click, adding/removing disabled attribute from payment radio option can help like this way.
$("#btnDelivery").on('click', function(){
$('#payment_method_cod').attr("disabled", "true");
$('#payment_method_paypal').removeAttr("disabled");
});
$("#btnTakeout").on('click', function(){
$('#payment_method_paypal').attr("disabled", "true");
$('#payment_method_cod').removeAttr("disabled");
});
Related
By default when we are at the cart page and click the button "Checkout", we are redirected to the "Order information" page, then we click "Continue to review" and we are redirected to the "Review" page and then we can click the last button to complete the process and we are redirected to the "Complete" page.
Is it possible and how to simplify the process so that if we click "Checkout" we are redirected to the "Complete" page with automatic choosing only one payment method by default?
I don't see the answer in their docs
Ok, the answer is simple: to disable unnecessary panes in the default checkout flow
I need to have the check out process done by the vendor himself not by the customer and that is how :
I need to make the coupon code mandatory ( to be added by the vendor) so the
"proceed to check out " button is not active unless the coupon code is added, and after the vendor adds the code, the order is completed.
Would recommend the use of javascript to prevent the user from clicking the checkout button.
Each button has a "disabled" state, at which the button is greyed out (by default) and cannot be clicked on (similar to the update cart button when no changes have been made). Simply add the disabled state to the checkout button onLoad, then remove that state when a coupon has been applied (button click event on the apply coupon button).
Im using Paypal Standard shopping cart - Add to cart button (with options)
Can i use a text link instead of the Paypal provided button image while the button code is still securely hosted on paypal ?
I want to use a text link and style the button that way instead of the standard add to cart buttons.
I see in Paypal button generator that you can make a text link for email, but that doesnt work for add to cart buttons with options, which is sometimes necessary.
Thanks for any advice.
Whenever you check "Save button at PayPal" option , your buttons are hosted and secured by PayPal.
Unfortunately, any button with "drop-down" options generated via Paypal button generator will not have the email tab generated. This is because it is highly impossible to have drop-down options in an email link.This is intended behavior.
To use a link for add to cart which is non-hosted :
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_cart&business=S4X5XW328WAYY&item_name=tests¤cy_code=USD&amount=10.00&add=1
where business is your paypal account email address or business ID.
I'm using Website Payments Standard.
I've created 2 Add to Cart buttons using the manager and they work fine.
If my buyer clicks the Continue Shopping button, he's returned to the catalogue page and can't see the cart.
How do I create a View Cart button, please ?
It doesn't appear in the Button factory.
After you create your Add to Cart button, scroll down past the box where PayPal gives you your HTML code. There's a section that says Create more buttons, and one of the options says Create a View Cart button.
I am using NopCommerce version 3.0. I want the users to get redirected to the login page before they can add products to the cart. I also want to disable the AJAXCart (I want full postback and the products to get added to the cart.).
Please guide me as to how to achieve it.
Thanks.
I have done something similar here: http://clinidirect.co.uk/c-20/continence-care if you add an item to the bag, a popup appears, if you click on "Go to bag" it asks you to login.
This is very rough, but should give you an idea:
First, in _ProductVariantAddToCart.cshtml remove the onclick javascript event from the button, so that the button actually posts the form to AddProductVariantToCart in CatalogController. This should remove the AjaxCart.
This will also add the item to the cart and redirect you to the shoppingcart page.
When the ShoppingCart page loads in action Cart. Add the following:
if(_workContext.CurrentCustomer.IsGuest())
return new HttpUnauthorizedResult("Cart requires the user to have an account");
This will send the user to the login page giving the impression that the user needs to login to add items to the cart.
Hope this helps