discount

Paypal Express Checkout provide full items discount

若如初见. 提交于 2019-12-08 03:14:00
问题 I'm using Express Checkout in Paypal and trying to pass discount as a separate item (according to manual this is supported). I pass the following part (full discount on the item, but require to pay shipping): &NOSHIPPING=0 &PAYMENTREQUEST_0_SHIPPINGAMT=2.00 &PAYMENTREQUEST_0_SHIPDISCAMT=0.00 &L_PAYMENTREQUEST_0_NAME0=Item1 &L_PAYMENTREQUEST_0_QTY0=1 &L_PAYMENTREQUEST_0_AMT0=25.90 &L_PAYMENTREQUEST_0_NAME1=Discount &L_PAYMENTREQUEST_0_QTY1=1 &L_PAYMENTREQUEST_0_AMT1=-25.90 &PAYMENTREQUEST_0

Add a percentage discount based on customer total purchases sum in Woocommerce

旧城冷巷雨未停 提交于 2019-12-07 11:02:26
问题 In Woocommerce, I would like to set a percentage discount based on customer total purchases sum. For example if the total purchase sum greater or equal to 200$ , customer get 5% discount . So, I have first part of code for showing the total sum: function get_customer_total_order() { $customer_orders = get_posts( array( 'numberposts' => - 1, 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => array( 'shop_order' ), 'post_status' => array( 'wc-completed' ) ) );

What does /usr/sbin/install really do?

血红的双手。 提交于 2019-12-07 04:58:47
问题 I'm trying to install discount on my VPS which is based on Solaris and compiling works great after setting some environment variables but the install fails. So I thought I'd do the install manually, but what does install really do? Is it simply a mv followed by a chmod ? Is it magic? That error seems to show that it attempts to do a lot of searching for files all over? Can I just copy the binary, library and header files as usual? Googling "install" doesn't give me much relevant information

Paypal Express Checkout provide full items discount

心不动则不痛 提交于 2019-12-06 20:27:40
I'm using Express Checkout in Paypal and trying to pass discount as a separate item (according to manual this is supported). I pass the following part (full discount on the item, but require to pay shipping): &NOSHIPPING=0 &PAYMENTREQUEST_0_SHIPPINGAMT=2.00 &PAYMENTREQUEST_0_SHIPDISCAMT=0.00 &L_PAYMENTREQUEST_0_NAME0=Item1 &L_PAYMENTREQUEST_0_QTY0=1 &L_PAYMENTREQUEST_0_AMT0=25.90 &L_PAYMENTREQUEST_0_NAME1=Discount &L_PAYMENTREQUEST_0_QTY1=1 &L_PAYMENTREQUEST_0_AMT1=-25.90 &PAYMENTREQUEST_0_ITEMAMT=0.00 &PAYMENTREQUEST_0_AMT=2.00 But I get "The totals of the cart item amounts do not match order

WooCommerce: Add a discount based on individual items quantity

安稳与你 提交于 2019-12-06 07:55:29
问题 In my WooCommerce website I have a few products with the same price of 80$ . I want to add a Discount by the products quantity. The logic is like that: if (Products Quantity is 2){ // the original product price change from 80$ to 75$ each. } if(Products Quantity is 3 or more){ //the original product price change from 80$ to 70$ each. } for example, if a customer pick 2 products, the original price will be (80$ x 2) => 160$ . But after the discount, it will be: (75$ x 2) => 150$ . And… if

Add a percentage discount based on customer total purchases sum in Woocommerce

不打扰是莪最后的温柔 提交于 2019-12-05 17:27:50
In Woocommerce, I would like to set a percentage discount based on customer total purchases sum. For example if the total purchase sum greater or equal to 200$ , customer get 5% discount . So, I have first part of code for showing the total sum: function get_customer_total_order() { $customer_orders = get_posts( array( 'numberposts' => - 1, 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => array( 'shop_order' ), 'post_status' => array( 'wc-completed' ) ) ); $total = 0; foreach ( $customer_orders as $customer_order ) { $order = wc_get_order( $customer_order )

WooCommerce: Add a discount based on individual items quantity

点点圈 提交于 2019-12-04 15:56:56
In my WooCommerce website I have a few products with the same price of 80$ . I want to add a Discount by the products quantity. The logic is like that: if (Products Quantity is 2){ // the original product price change from 80$ to 75$ each. } if(Products Quantity is 3 or more){ //the original product price change from 80$ to 70$ each. } for example, if a customer pick 2 products, the original price will be (80$ x 2) => 160$ . But after the discount, it will be: (75$ x 2) => 150$ . And… if visitor pick 3 products, the original price will be (80$ x 3) => 240$ . But after the fee, it will be: (70$

Fix maximum coupon Discount On Cart percentage in WooCommerce

我的未来我决定 提交于 2019-12-03 20:21:31
I have a coupon code (XYZ25) in woocommerce which include 25% off and maximum discount is Rs.250. How can i restrict user's to not get more than Rs.250 Discount if they apply coupon code XYZ25 for 25% discount. Since Woocommerce 3.2 or 3.3, this code doesn't work anymore You could set an additional coupon FIX250 code based on a fixed cart discount of ** RS.250 (without tax) and with a Minimun spend of (4 x 250) = RS.1000 . Then with the help of the script below, if customer apply your XYZ25 coupon code and if the cart total is up to Rs.1000, it will replace XYZ25 coupon by FIX250 displaying at

Shipping cost discount based on a shipping classes in Woocommerce

一曲冷凌霜 提交于 2019-12-02 09:15:49
I'm trying to apply a discount to one shipping class for products currently in a cart. This is applied on the checkout view. In Woocommerce backend, the option is set to charge each shipping class individually. Also, I use only one shipping method named "flat rate". Based on Override all shipping costs for a specific shipping class in Woocommerce , the following code that should apply the discount: add_filter('woocommerce_package_rates', 'shipping_class_null_shipping_costs', 10, 2); function shipping_class_null_shipping_costs( $rates, $package ){ if ( is_admin() && ! defined( 'DOING_AJAX' ) )

Apply a discount for a specific user role in Woocommerce

不想你离开。 提交于 2019-12-02 09:04:57
问题 I have a woocommerce store, with 3 user roles, I want to provide a 10% discount on the cart total only for a user role 'company'. I found "Percentage discount based on user role and payment method in Woocommerce" answer that is very neer of what I need, but don't know how to modify the code to feet my needs, as it contains also a condition based on payment method and displaying the discount only at checkout, but I need it to display in cart as well. 回答1: The following code will apply a 10%