Thanks in advance for the help!
I have a WooCommerce product that I turned into a donation form via the Gravity Forms WooCommerce add-on.
The goal here is to have a one-page process for the donation form --where all the fields, billing information and credit card information is collected all on one page.
The One Page Checkout WooCommerce extension has helped a lot in doing this, but the form is still not perfect: https://dev.sanma.org/sponsor-a-project/
What I want to do is remove the "Add to cart" button all together and make it so that when people select a price, it will trigger that amount to be added to the cart.
I think the following code is close, but I can't get it to work:
<script type="text/javascript">
jQuery( document ).ready( function () {
$('#input_4_2 input').on('change', function() {
$(this).closest("form").submit();
});
});
</script>
The code above triggers the checkout itself, not the add to cart button.
Can you help with this?
Thanks mucho,
Roselle
Related
I created a page using a combination of Woocommerce and Advanced Custom Fields ACF to achieve a product list with a very complex layout. Products might appear more than once but can only be bought once and other weird stuff. The products are pulled in using ACF post objects within a repeater field.
I also managed to display an add to cart button for each product using the [products] shortcode provided by woocommerce.
What I would love to have now is a an "Add all products to cart"-button to buy all products on this page instead of adding them to the cart individually.
I already tested woocommerce grouped and bundled products, but I need much more flexibility in terms of layout. The hooks provided to adjust the layout are not flexible enough.
Any help is appreciated! Thanks!
You could use some jQuery. Have a custom button that when clicked it triggers the 'add to cart button' on all the products?
Something like
$('.addall').on('click', function() {
$('.product').each(function(){
$(".addToCart", this).trigger( "click" );
});
});
Simple fiddle to show trigger working.
Hi I want to add checkbox on my Cart page of woocommerce when user check the box it will automatically subscribe them for my product. I have bought woocommerce subcriber plugin but I don't know how to add checkbox which will have this functionality in cart page.
I will try to answer to the best of my knowledge given that I am not proficient with woocommerce. But the general idea is that, you add your checkbox on the cart page of the theme and pass the the value via form data(like name="subscribe" value="True/false") to the data handler(most probably the next page in the checkout cycle which would be delivery or payment options page), which will then call the plugin and pass the subscriber info to it. I would say that it would make sense to put the checkbox where you collect customer info but hey your site, your choice.
Sorry if this is a very generic answer and not a detailed one. I am very new to this myself. Best of luck.
I am new on Wordpress and I want to add new payment method on wooCommerce so I added new payment method to checkout options on admin side.
Here is my all addition under woocommerce/wp-content/plugins/myplugin:
http://paste.ubuntu.com/23159841/
On the client side, I created new template for displaying credit card form. I want to see this form on new page after "checkout now" button clicked.
How can I integrate my template with WooCommerce? I didn't find any example like that.
When you click "Proceed To Checkout" button in next page you automatically got credit card payment option (If you enable it). You don't need to create any extra page.
In woocommerce on checkout page after filling complete billing and shipping information, goes to cart page or any other and return to the checkout page all information get wanished only zip code remains, how to clear zip code also?
You need to use Javascript/jQuery to reset the value of the zipcode.
document.getElementById('zipcode').reset();
If you are using any click event then you must try the following code also.
onClick="window.location.reload()"
Sorry for the really bad title but wasn't sure how to describe my problem in 10 words.
I have drupal commerce and have made a view that displays the cart contents on top of the checkout page.
Quantity is a text field so it is editable and I have an update button. Unfortunately when I press the update button, naturally the whole checkout page tries to submit. Is there a way to intercept the update button and just refresh the cart with ajax?
Moreover, if I can do that, I want a number of text fields (as many as the quantity number entered) to appear underneath the cart so the user can enter different values on each of them (each referring to the products about to be bought).
Drupal Commerce Cart does this - sort of.. http://drupal.org/project/dc_cart_ajax
It works fine on the cart page, though I too am trying to combine these pages to cut down on the 'checkout steps'. Though it is the same view as the /cart page and I get an ajax refresh indicator it doesn't actually update the cart on the checkout page.
There is a issue related to that, you can subscribe: http://drupal.org/node/1443470
You can disable the Shopping cart contents using the checkout settings. Modify the Shopping Cart View to add a block display and add modify the contextual filter by providing default value using PHP:
if (arg(0) == 'checkout') return arg(1);
else return null;
Add the new Shopping cart block dispplay only on the checkout page and here you go.