question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle multiple prices per item

See original GitHub issue

I have a use case where I am implementing a localised cart where cart items may have a different prices per currency/locale.

Currently items are require to have a single price: number, which limits the possibility of offering multiple prices on cart items.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
taniaholstcommented, Aug 31, 2021

Yes, the first option worked perfectly! Thank you very much for your patience and help!!

1reaction
ynnojcommented, Feb 23, 2021

@notrab Happy to add a PR that implements prices: ItemPrice[].

interface ItemPrice {
  amount: number,
  [key: string]: any
}

My concern is then how to we calculate totals on a per currency basis, unless we make currency required.

I guess those total functions need to be updated to also reflect multiple price support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Set Multiple Prices Per Product in WooCommerce ...
You can multiple prices per product by creating and adding global or custom attributes, which are available in WooCommerce by default. For that, ......
Read more >
WooCommerce How To Set Multiple Prices Per Product
Using WooCommerce you can easily set multiple prices per product by creating variable products and setting the price for each variant.
Read more >
How To Give Multiple Prices Per Product In WooCommerce
To get started, navigate to Products > Attributes from your WordPress dashboard: You can enter a title for the attribute. For example, you...
Read more >
Set multiple prices per product on your WooCommerce store
Find out how to set WooCommerce multiple prices per product based on user role and sell the same product at different prices.
Read more >
How to Set Multiple Prices Per Product in WooCommerce
You are probably aware that a single item can have numerous variations if you manage an online business. And they are not just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found