# Getting WebSite and Currency

**URL:** <https://forum.litium.com/t/getting-website-and-currency/75>\
**Category:** Questions\
**Created:** [May 14, 2018, 10:29am UTC](https://forum.litium.com/t/getting-website-and-currency/75 "2018-05-14T10:29:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan.gross](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@stefan.gross](https://forum.litium.com/u/stefan.gross)\
**Post date:** [May 14, 2018, 10:29am UTC](https://forum.litium.com/t/getting-website-and-currency/75/1 "2018-05-14T10:29:12Z")

</div>

What is the best way to get the current website and currency without access to CurrentPageDefinition or CurrentPage ?

Litium version: 5.6.2

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [May 14, 2018, 10:41am UTC](https://forum.litium.com/t/getting-website-and-currency/75/2 "2018-05-14T10:41:32Z")

</div>

In what context do you want to get that information?

---

<div class="post-metadata">

**Author:** ![stefan.gross](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@stefan.gross](https://forum.litium.com/u/stefan.gross)\
**Post date:** [May 14, 2018, 10:46am UTC](https://forum.litium.com/t/getting-website-and-currency/75/3 "2018-05-14T10:46:36Z")

</div>

Im calling a static method in my productscontroller from a partial view that should collect some products based on its category and i want to use the method “\_productItemViewModelBuilder.Build”

What i did i injected ICartService into the products controller since i can get the currency and website from there, however i don’t know if that is the best approach.

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [May 14, 2018, 10:58am UTC](https://forum.litium.com/t/getting-website-and-currency/75/4 "2018-05-14T10:58:55Z")

</div>

Can you pass the values from your partial view?

---

<div class="post-metadata">

**Author:** ![stefan.gross](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@stefan.gross](https://forum.litium.com/u/stefan.gross)\
**Post date:** [May 14, 2018, 11:09am UTC](https://forum.litium.com/t/getting-website-and-currency/75/5 "2018-05-14T11:09:19Z")

</div>

The only thing i have access to in that partial view is an object of type ProductItemViewModel and from what I can see it doesnt hold on anything related to what Im looking for. (and yes, i know it holds a ref. to Currency but i need WebsiteId as well)

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [May 14, 2018, 11:25am UTC](https://forum.litium.com/t/getting-website-and-currency/75/6 "2018-05-14T11:25:52Z")

</div>

Both `ProductItemViewModel` and `ProductItemViewModelBuilder` are part of the accelerator that you can modify the source code for to add the website id.

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [June 7, 2018, 1:43pm UTC](https://forum.litium.com/t/getting-website-and-currency/75/7 "2018-06-07T13:43:47Z")

</div>

@stefan.gross did the answer resolve your issue or is this still an open question?

---

<div class="post-metadata">

**Author:** ![stefan.gross](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@stefan.gross](https://forum.litium.com/u/stefan.gross)\
**Post date:** [June 7, 2018, 2:17pm UTC](https://forum.litium.com/t/getting-website-and-currency/75/8 "2018-06-07T14:17:40Z")

</div>

I dont think your answer is suitable for the question i answered. I totally forgot that I could use CurrentState, and maybe that is the best approach ?

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [June 8, 2018, 9:10am UTC](https://forum.litium.com/t/getting-website-and-currency/75/9 "2018-06-08T09:10:56Z")

</div>

CurrentState or modify the classes in my previous answer to pass the values you need in ProductItemViewModel
