woocommerce / woocommerce-subscriptions-custom-price-string

Customize the price displayed to your customers for subscription products (or non-subscription product).
GNU General Public License v3.0
61 stars 9 forks source link

Setting a Value in Custom String Disables Subtotal Calculating #18

Open plapeyre opened 3 years ago

plapeyre commented 3 years ago

The products that I am attempting to sell have a Subscription Price ($12.00 / year), and a Sign-up Fee ($14.00) to make the total price of the product $26.00 & $12.00 Ongoing per Year. I have set the Custom Price String as $26.00 to represent that.

When you go to the Cart & Checkout, if you add more than one product, the subtotal remains as $26.00 whereas other products which do not have custom query strings update accordingly (product_2 = $10, quantity = 2, subtotal = $20).

If I take out the custom string, the default text populated by subscriptions calculates properly (quantity: 2 = "24$ per year and $28 sign up fee")... So I can only assume it's an issue with this plugin and where it gets its information from. Is there any way that we can possibly get the values or the subscription per day/month/year + sign up fee etc rather than just printing the custom string..?

Untitled-2

bernattorras commented 3 years ago

Thanks for sharing this!

This certainly seems like an issue as it may appear confusing for the customer. The problem is that it's quite difficult to treat this custom price string as a value for cart calculations, as it can contain different values and strings (for example "Pay $10 now and then $20 for the next 12 months").

In order to prevent this kind of confusing scenarios, we decided to leave the original product price in the Checkout page. Maybe it would be worth to remove it from the Cart page as well (or add an option for this)...

plapeyre commented 3 years ago

Hello,

This is true. My coding ability is not as good as those who create these plugins. My string is a 'simple string' eg: ($26.00). Furthermore, I disabled the 'subtotal' in the cart as it was not multiplying the 'custom string' because it has the $ sign in it etc...

My only suggestion is to add a "simple string" option which only allows a number value (eg: 26.00) and you could wrap it in a wc_price(). That way it overrides the trial, sign-up and price etc into a single value to be calculated?

On Thu, Apr 8, 2021 at 7:28 AM Bernat @.***> wrote:

Thanks for sharing this!

This certainly seems like an issue as it may appear confusing for the customer. The problem is that it's quite difficult to treat this custom price string as a value for cart calculations, as it can contain different values and strings (for example "Pay $10 now and then $20 for the next 12 months").

In order to prevent this kind of confusing scenarios, we decided to leave the original product price in the Checkout page. Maybe it would be worth to remove it from the Cart page as well (or add an option for this)...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/woocommerce/woocommerce-subscriptions-custom-price-string/issues/18#issuecomment-815276842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOZYDHRA2NXGTXVXQGOWNW3THTFATANCNFSM4ZYVE5JA .