discount

Magento coupon discount translation

。_饼干妹妹 提交于 2019-12-12 01:34:14
问题 I like to change "Discount" to "Promotion" in cart and onepage checkout. However, I can't find any file location. I have turn on the Template Path Hints from Configuration. Can anyone help me out ? 回答1: I think you'd do that in your translation file here: app/locale/en_US/Mage_Checkout.csv Just change "Discount Codes","Discount Codes" to "Discount Codes","Promotion Codes" or whatever. But the coupon phtml is here: app/design/frontend/default/default/template/checkout/cart/coupon.phtml 来源:

Discount on specific products based on a daily time range in Woocommerce

时光总嘲笑我的痴心妄想 提交于 2019-12-12 01:15:51
问题 On my WooCommerce website, I am trying to make have a "Lunch Special" daily event. This means that from 11h00 to 15h00, specific products would be discounted due to this "Lunch Special" daily event. I would like this "Lunch Special" event to reoccur every day of the week. How could this be achieved? I have searched this online and I only found plugins that could restrict items per day, not during a specific time period. Any help is appreciated. 回答1: The code below will make a price discount

How to get the actual value after subtracting discount(%)

对着背影说爱祢 提交于 2019-12-11 18:52:18
问题 I want to get the total amount with the help of Final amount and Discount rate. For Example. Grand total = 100 Discount = 15% Final Amount =100*.15=85 if I have only two variables Final amount = 85 Discount = 15% Grand total = ? Now I can get back Grand total with the help of "Final Amount" and "Discount rate"? 回答1: Let Grand Total = X X-(X * 15 %) = 85 then if you find the value of X then your Grand total can e found. X - 3X/20 = 85 17X= 85*20 X = (85/17)*20 X =100 Put it .. You will find

Cart discount for product that cost less in Woocommerce

﹥>﹥吖頭↗ 提交于 2019-12-11 12:07:30
问题 How can I apply a discount in products cart for product that costs less? For example: I have two product in cart: one cost 150$ and one 200$. I would like to apply a 10 percent discount only for product that cost less, in this case the first one. I have this code but it works only for the second product in cart: add_filter( 'woocommerce_before_calculate_totals', 'discount_on_2nd_cart_item', 10, 1 ); function discount_on_2nd_cart_item( $cart_object ) { if ( is_admin() && ! defined( 'DOING_AJAX

How to offer discount in auto renewable subscription

╄→尐↘猪︶ㄣ 提交于 2019-12-11 08:44:23
问题 Hi Apart from introductory discount is there some way by which we can offer discount to users? Example : Say he has cancelled the subscription and his subscription is about to expire then offer him 45% discount on prices? Solution : We can create another discounted subscription group that would have same subscription but for a lesser price. The only issue with this plan is that it may happen that a user get subscribed to two subscription gp. Also the original transaction Id changes so it will

WooCommerce discount: buy one get one 50% off

半腔热情 提交于 2019-12-10 23:55:45
问题 I wish to set up a specific discount on a particular variable products, if customer buys one product they get the another(same) on 50% discount(Buy one get another for 50% off). I've tried many discount plugins buy the closest that I have found are: Pricing Deals for WooCommerce WooCommerce All Discounts Lite WooCommerce Extended Coupon Features By using these plugins I was able to setup discount on subtotal or discount on a each product but not exactly what I am looking for(Buy 1 get 1 off).

Progressive percent discount based on cart amount

﹥>﹥吖頭↗ 提交于 2019-12-10 23:14:47
问题 I am trying to make a simple discount code for WooCommerce that gives you a percent discount before buying. Lets say that if you add products worth $100 you get 2% discount and if you add products worth $250 you get 4%, etc. The only thing I found was this: // Hook before calculate fees add_action('woocommerce_cart_calculate_fees' , 'add_custom_fees'); /** * Add custom fee if more than three article * @param WC_Cart $cart */ function add_custom_fees( WC_Cart $cart ){ if( $cart->cart_contents

Custom cart notice based on user total purchased amount in Woocommerce

假如想象 提交于 2019-12-10 18:13:28
问题 I am trying to display a custom cart notice based on user total purchased amount in Woocommerce, based on this answer code: Add a percentage discount based on customer total purchases sum in Woocommerce It does not work as I would like. For example if a customer has made 2 orders: First order is 200 Second order is 122 So the total sum is 200 + 122 = 322. But I get a total of 200. What I am doing wrong? This is the code that I use: add_action( 'woocommerce_before_cart', 'vc' ); function vc( )

Apply a discount only on the second cart item in Woocommerce

喜你入骨 提交于 2019-12-08 07:51:18
问题 How to get and modify price of the second item in my cart ? I want to made discount -3% on the second product (items in cart already sorted by the price, highest top). I think it must calculate in woocommerce_before_calculate_totals or like discount in woocommerce_cart_calculate_fees ? Thanks 回答1: Updated (Added compatibility with Woocommerce 3+) For a product item is better to use woocommerce_before_calculate_totals action hook: add_action( 'woocommerce_before_calculate_totals', 'discount_on

WooCommerce Student Discount

时光总嘲笑我的痴心妄想 提交于 2019-12-08 03:30:19
问题 I need to create a coupon in WooCommerce that will only work if the user has an email which ends in .ac.uk . For example student.name@uwl.ac.uk or teacher@kings.ac.uk . The discount would be 10% off the total shopping basket. I can't find any solutions online or any plugins which could help. Any ideas? Thanks. 回答1: You can use this Auto apply Discount Coupon to Customer’s Purchase function with the right conditionals (user email finishing by ac.uk ): add_action('woocommerce_before_cart_table'