Timeline for Craft Commerce: Hard code different product prices based on currency?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 25, 2017 at 9:28 | comment | added | Clive Portman | I created a plugin for this exact same thing: github.com/cliveportman/priceswitcher | |
Feb 21, 2017 at 14:50 | history | bounty ended | Mike | ||
Feb 15, 2017 at 23:18 | comment | added | Jeremy Daalder | Yep I just did a quick plugin here to check and it's working fine, with totals etc as they should be. Good night! | |
Feb 15, 2017 at 23:14 | comment | added | Mike | Cool - thanks for all the input - much appreciated. Signing off for the night here but will try tomorrow. | |
Feb 15, 2017 at 23:08 | history | edited | Jeremy Daalder | CC BY-SA 3.0 |
added 153 characters in body
|
Feb 15, 2017 at 23:07 | comment | added | Jeremy Daalder | Actually, this changed along the way with a new event being offered - it's probably best to use craftcommerce.com/docs/… ...there is an example there to show you how to do it. I'll update my answer. | |
Feb 15, 2017 at 23:02 | comment | added | Mike | One last question Jeremy. See my update on the original post. I'm updating the lineItem value but when the Cart page loads is does not reflect that new price. Thoughts? Is there a lineItem or cart update method that needs to be called? | |
Feb 15, 2017 at 22:34 | vote | accept | Mike | ||
Feb 15, 2017 at 21:28 | comment | added | Jeremy Daalder |
Yes, the cart is made of of the linteitem data structures and all cart operations, calculations etc are done on those - they're entirely separate to the actual products (although there's reference back to the product of course, in case you need to get at fields etc. When the order is finalised, snapshots of all the data at the time are taken as well. So yes, barring any bugs, if you change the lineitem price all should work as you expect with the adjusted price.
|
|
Feb 15, 2017 at 13:30 | comment | added | Mike | Thanks Jeremy. I'm guessing then that modifying the lineItem value will also preserve other Commerce logic around things like applying discounts, etc? And what about cart actions (changing quantity)... those will use the updated lineItem value also? | |
Feb 15, 2017 at 2:23 | history | answered | Jeremy Daalder | CC BY-SA 3.0 |