I'm trying to setup woocommerce subscriptions so that all paypal standard payments fall on the same day by using the free trial feature.
But the problem I'm having is changing the text when this feature is used so the customer doesn't get confused.
At the moment on the product page is says "£24.95 / month with a 2-day free trial" when ideally it needs to say "£24.95 / month starting in 2 days" or similar
In the cart is says "A 2-day free trial then £24.95 / month" when I would like it to say "A £24.95 / month starting in 2 days" or similar
And lastly when the customer gets taken to PayPal's secure servers is says under terms "Free for the first 2 days. Then £24.95 GBP for each month" when I would like this changed to "£24.95 GBP for each month starting in 2 days time" or similar
Would anyone know if there are any filter hooks I can use to get the desired effect, or if there is anything else I can do?
The site only has one product so I hope it's going to be straight forward.
Thanks in advance.
The 'woocommerce_subscriptions_product_price_string' filter can be used to customise the price displayed for a product.
The 'woocommerce_subscription_price_string' filter can be used to customise the cart/order prices displayed in the cart and on an order.
For examples of how to build your price strings and details of the parameters passed to each filter, view the source of the WC_Subscriptions_Product::get_price_string() and WC_Subscriptions_Manager::get_subscription_price_string() functions. I always try to write self-documenting code & include PHPDoc for anything that is not self evident.
Hope that helps. :)
Related
I am trying to implement seat based pricing but the documentation doesn't cover scenarios for changing plan mid subscription.
For reference these are the docs I am following: https://developer.paypal.com/docs/api/subscriptions/v1/
Let me give you an example. Lets say I have this pricing:
1-10 seats $5 each per month
11+ seats $3 each per month
To mimic this in PayPal I create 2 quantity based subscription plans. One with a quantity price of $5, the other for $3. Both plans are on the same product and have term set to monthly.
There are a few situations I am unsure how to handle and cannot find this information in the docs. They are as follows:
1) User signs up for 1 seat on the 1st June. On the 15th June they decide to change to 5 seats. The docs say this will be adjusted in the "next billing cycle" but I am unclear what that means. Their next billing cycle is in 15 days so does that mean they get access to 4 seats for free that month? What I would want to happen is the difference is calculated. The user has paid $5 so far and is halfway through the month so half a month cost is $2.50. The new subscription price is $25. So the remainder of the month would cost $12.50. So the difference to pay is $10 to cover them to the end of the month with the additional seats until they will then be billed $25 for a full month. Is this in anyway possible?
2) User signs ups for 5 seats. They then upgrade to 20 seats halfway through the month which moves them onto a different plan to get discounted pricing. How does situation 1 play out again in this regard when changing plans? How are the differences calculated and billed?
It seems in the old billings API you could override the setup cost when creating the subscription but that no longer seems possible. It is not possible to add the setup cost to a plan because this needs to be added dynamically based on the elapsed time in billing cycle, change in seat quantity and change in plan cost.
Have PayPal really removed all possible ways of dealing with package upgrades?
To have new arbitrary costs, setup or otherwise, you would need to dynamically create a bespoke package/plan for that particular checkout.
has anyone ever implemented a holiday calendar in kdb?
it's pretty easy to exclude weekends or to create a function to get nextweekday or previous weekday, but what if you want to also take into account public holidays / bank holidays?
What have people done in order to account for this?
A rudimentary way is to create a file with known bank holidays across LDN & NY let's say - but is there a more automated way?
You may want to take a look at holiday.q on Github. Note that NYSE rules change from time to time so you may need to make some adjustments to bring that code up to date.
Most places will have purchased some form of calendar data product (.e.g Copp Clark). From that you'd build a suite of functions for getPrevBizDay etc, and you'd do it for all regions. It will also have future holidays.
Alternatively I'm sure there are some open source holiday data downloads you could scrape from the web and from them you could manually put together a table (perhaps it would be an annual once-off process to update it for the next year).
I'm trying to get Dialogflow to report sales in different time periods. When I ask things like
what's the sale last month
what's the sale in march 2011
They work fine. However, if I didn't specify "last" or year, Dialogflow always think I'm asking about the upcoming period (which I guess works great for restaurant booking, etc.). For example, "what was our sale in april" would guess that I mean April of next year.
Should I write a fulfillment to deal with this or is there a way to specify only historical periods only?
Another related question is it has trouble understanding notations like 2010q1 or q2/2015 which is quite common in economics and finance. "q1/2000" would extract only q1 (correctly, but with the upcoming q1). "2000q1" wouldn't be recognized at all.
Thanks!
I have here a Websphere commerce 7 Fp 5 Aurora B2B which is using Orgs, contracts and price lists maximum order quantity that we limit each "Store" Org to buy 3 each so that there is enough to go around. We have 3 sets of entitlements to that most guys Max is 3, better stores max is 5 and a few really good ones max qty is 10.
So we don't have to worry about allocation, these rules let every store buy based on their entitlement. When they try to put more in the cart then they should, they get a message "You are requesting to order more than your allocation limit. Please change your requested quantity." I don't know where this comes from.
Some users buy for 5 or more stores which is selected at checkout during payment. This keeps those store owners from having to have a bunch of log ins to keep track of.
We recently openned up Order Management, we call it multi-cart because this enables a store owner to create more than 1 cart by going to order management and create a new order. This makes it much easier for our store owners to manage what they are buying and paying and receiving with out having to call and email our CSR teams.
But now we noticed that some stores are taking advantage of the Multi-cart to buy more that the MAX qty they are allowed. It wouldn't be so bad, but they are buying all the 1 per customer stuff and all the other stores are calling and complaining because they didn't get their share. It really isn't fair.
I was thinking of all the different places to add a SQL check of order history and pending orders. Here is what I cam up with.
ATP - Inventory check
Pro- best place since customer, sku, entitlement, and everything else pretty much happens here. It is right up front.
Con- It doens't have ship-to, so the guys with more than 1 store need to be added as an exception leading sloppy business logic that could change regularly
OrderItemAddCmdImpl and overloading ExtendOrderItemProcessCmd
Pro - Bring ship-to selection up to the front and control everything here.
Con - Not certain overhead will like it.
At checkout
Pro - this also will have everything
Con - I kind of want to reserve this for all payment handling. It is a little dirty to read throught the order lines and to kick back error with SKU.
Have the ERP handle the exception-
Con - I realized we are setup that all Orders ship complete, we would have to change this and don't really want to because there are additional credit card penalties for charges less then amount held on credit.
So, the questions are what are your thoughts on additional pros and cons?
Are there other places that I'm missing that would make more sense?
We might need to create a new CommandTask and then append it to all existing flows.
OR
As the WebSphere Commerce team to build this new logic into the next release of WebSphere Commerce.
So, for this scenario the answer was creating a JDBC Query that will be called when items are added to cart that sums the Qty by sku of pending orders.
When orderitems are added to the cart, the query will return the item in error if exceeded and not add item.
The query will again run at checkout if all orderitems being paid for exceed total qty max by SKU by shipping address on payment page allowing chance for customer to change billing address if we are limiting item max qty by shipping address.
I want to make a Paypal button for buy 1 year, get 6 months free
It's rather easy to setup a free trial period, but in that case the first billing doesn't hit until the trial period is finished. That sucks.
We want to run a promotion where the free trial period comes at the END. So they pay for a full year today, and aren't billed again for another 18 months, at which point they are billed for another year of service, and the yearly billing cycle continues from there.
Billing for the trial period of 18 months won't solve my problem because there are 3 different checkout options and the trial period applies to all of them as a whole (they are different prices).
We have 3 subscription types, and 3 promotions. So it seems like I have to make 9 different buttons to solve my problem?? How can it be done a better way?
Solved this. I just had to make a separate buttons for each. For example:
I wanted the first subscription type to pay 1 year, get 6 months free.... In Paypal I selected yearly billing for X dollars, then chose an 18 months promotion (and the cost of the promotion was set to the same cost as the regular yearly billing).
This way, we get paid from the first second, the customer still gets their "free trial" which I guess isn't technically a free trial. It's more like a 50% discount for the first 1.5 years.