woothemes

show woocommerce messages in overlay div or tooltip without page refresh

不羁岁月 提交于 2019-12-04 16:56:38
I am trying to get rid of the redirect/reload when the user is adding a product or gets a info message in my woocommerce shop. I just want to show the "added to cart" message in a tooltip or overlay div and let them continue shopping without renavigate to the shop. AJAX add to cart is enabled so my question is: what can I do to display this messages without refreshing the whole page? EDIT: maybe useful for anyone, heres my FINAL CODE: $('.add_to_cart_button, .single_add_to_cart_button').click(function(e) { var produkt_id; if ($(this).attr('data-product_id') == undefined) { produkt_id = $(

add additional button on product page for woocommerce

我们两清 提交于 2019-12-03 17:24:24
I have spent the majority of the day trying to figure out how to adjust the single product page using woocommerce. I would like to add a custom button next to the "Add to cart" button that would be a custom link that says "Next". I am working on an invitation website where there are numerous components to an invitation, so after a user adds a product to their cart, I want there to be an option that says "Next" so they can go ahead and customize the next piece of the invitation. (I will have custom fields for each). The next button won't be on all products, and the link will be different for

How to hide images until AFTER jquery flexslider finishes loading

依然范特西╮ 提交于 2019-12-03 12:34:29
问题 I tried to integrate wootheme's Flexslider on my site and it looks/works great except for when it is loading. When you refresh the page with the slider, before flexslider loads (about 1 second) the first slide appears very big and flashes to black then dissapears and then the carousel appears. I think the image is loading faster than the jquery? How can I hide the image unti jquery loads (like on the demo website, even if i refresh 3 billion times, the problem is never repeated on their

Wordpress (Woocommerce extension) - Create new order programmatically

假装没事ソ 提交于 2019-12-02 17:18:07
I want to create a new order programmatically. Workflow is simple: After submitting simple form, user will be created and along with that, a new order. I managed to create a new user and user_id is returned, now I need to assign a new order all in one step. How can I accomplish this? Here's how I programmatically create my orders. I largely followed WC_Checkout::create_order() from @pavel's suggestion above. This is directly from a plugin I'm writing so you'll have to adjust where the source data comes form. // build order data $order_data = array( 'post_name' => 'order-' . date_format($order

Woocommerce - External/Affiliate Product Image and title to External Link (New tab)

两盒软妹~` 提交于 2019-12-01 08:28:50
问题 I'm starting with programming with wordpress and woocommerce. I need help after searching for Stack. I need the images and titles of the products of my store to point to the affiliate link without going through the single post page. And that everything opens in a new tab. Been following this thread: Woocommerce - External/Affiliate Product Image to External Link (Buy url) I have used the Edit # 2 code from Sadoo and it works perfectly for me. remove_action('woocommerce_before_shop_loop_item',

How to filter WooCommerce products by custom attribute

依然范特西╮ 提交于 2019-11-29 21:26:16
I'm trying to filter WooCommerce product archive by custom attributes. For example, there are 5 products with attribute "color" containing "red", and another 3 with attribute "color" containing "blue". How can I apply a filter to the products loop, so only the products containing "red" will be shown? Thanks On one of my sites I had to make a custom search by a lot of data some of it from custom fields here is how my $args look like for one of the options: $args=array('meta_query'=>$meta_query,'tax_query'=>array($query_tax),'posts_per_page' => 10,'post_type' => 'ad_listing','orderby'=>$orderby,

How to get the stock quantity of an article from woocommerce?

落爺英雄遲暮 提交于 2019-11-29 19:20:01
问题 i got a little problem with displaying the stock quantity correctly. heres the loop: <?php /** * Loop Price * * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly global $product; ?> <?php if ( $price_html = $product->get_price_html() ) : ?> <span class="price">PREIS:<span class="amount"><?php echo $price_html; ?></span></span><p class="stock-m13"><?php get_sku(get_the_ID()); ?></p> <?php endif; ?> i want to

How to filter WooCommerce products by custom attribute

家住魔仙堡 提交于 2019-11-28 17:28:40
问题 I'm trying to filter WooCommerce product archive by custom attributes. For example, there are 5 products with attribute "color" containing "red", and another 3 with attribute "color" containing "blue". How can I apply a filter to the products loop, so only the products containing "red" will be shown? Thanks 回答1: On one of my sites I had to make a custom search by a lot of data some of it from custom fields here is how my $args look like for one of the options: $args=array('meta_query'=>$meta

Add custom css class to WooCommerce checkout fields

浪尽此生 提交于 2019-11-28 17:20:07
I would like to be able to add a custom CSS class to my WooCommerce checkout fields. I'm using twitter Bootstrap and I would like to be able to use their .form-control class. I looked in the woocommerce templates folder in form-billing.php but I'm not sure where to add the .form-control class to each text field. Here is the code for form-billing.php <?php /** * Checkout billing information form * * @author WooThemes * @package WooCommerce/Templates * @version 2.1.2 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> <div class="woocommerce-billing-fields"> <?php if ( WC()-

Add custom css class to WooCommerce checkout fields

南笙酒味 提交于 2019-11-27 10:11:17
问题 I would like to be able to add a custom CSS class to my WooCommerce checkout fields. I'm using twitter Bootstrap and I would like to be able to use their .form-control class. I looked in the woocommerce templates folder in form-billing.php but I'm not sure where to add the .form-control class to each text field. Here is the code for form-billing.php <?php /** * Checkout billing information form * * @author WooThemes * @package WooCommerce/Templates * @version 2.1.2 */ if ( ! defined( 'ABSPATH