What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi there — I have a question regarding the b2c demoshop: I installed it and realized that all prices

Posts: 14 🧑🏻‍🚀 - Cadet

Hi there — I have a question regarding the b2c demoshop: I installed it and realized that all prices on listing and product pages are NET prices. Is it possible to switch to GROSS prices or ideally show both prices? thanks!

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Posts: 14 🧑🏻‍🚀 - Cadet

    Thanks. i have tried to add $config[PriceProductConstants::DEFAULT_PRICE_TYPE] = 'DEFAULT'; config_default.php, but cannot resolve the PriceProductConstants class. where ist this located?

  • Posts: 393 🧑🏻‍🚀 - Cadet

    ok, documentation needs an update: @deprecated Use \Spryker\Shared\PriceProduct\PriceProductConfig instead.

  • Posts: 14 🧑🏻‍🚀 - Cadet
    edited July 2019

    OK. I have added ```
    $config[\Spryker\Shared\PriceProduct\PriceProductConstants::PRICE_DIMENSION_DEFAULT] = Spryker\Shared\PriceProduct\PriceProductConfig::PRICE_GROSS_MODE;

    ``` to my config_default.php and now it works.
    However, if I remove it again gross price stays.
    If I now change the return value in Spryker\Shared\Price\PriceConfig::getDefaultPriceMode() from PriceConfig::PRICE_MODE_GROSS to PriceConfig::PRICE_MODE_NET prices change back to net prices again. This is, what I have tried before, but without success.

  • Posts: 393 🧑🏻‍🚀 - Cadet

    hmm, I am not sure if I understand. Did you manage to switch to gross prices? Displaying both at the same time is not supported out of the box as far as I know.

  • Posts: 14 🧑🏻‍🚀 - Cadet

    yes i managed to display gross prices. weirdly though not by changing the config variable, but by changing the return value of the method mentioned above. However, that was what I tried earlier without any effect.

  • Posts: 393 🧑🏻‍🚀 - Cadet

    hmm, strange

  • Posts: 14 🧑🏻‍🚀 - Cadet

    yeah indeed. however, seems to work now as expected.
    since i am pretty new to spryker — if I wanted to show both prices in the catalog/pdp — how would I approach such a change? Do you have some keywords for me I could use starting my research?

Welcome!

It looks like you're new here. Sign in or register to get started.