Calling Developers!
We are reenergizing our code contribution process! Learn More

Net Price don't show on frontend

Options
hau.nguyen
hau.nguyen Spryker job Posts: 23 🧑🏻‍🚀 - Cadet

Hi guys,

We have price entry at Net Price.

But it doesn't show the price on storefront. Am I missing some config?

https://pasteboard.co/ij7ged8YAcCY.png

https://pasteboard.co/EFxy6ZVUVD3M.png

Thanks

Hau Nguyen

Tagged:

Answers

  • Hari Vijayakumar
    Hari Vijayakumar Sprykee Posts: 27 🏛 - Council (mod)
    Options

    Hi Hau,

    Could you please specify which course you're referring to?

    Thanks!

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 71 🏛 - Council (mod)
    Options

    There is the PriceConfig class where you can set how prices are shown: net or gross. That class can be overridden at project level and by code bucket. By default is GROSS_MODE . That's why it's shown empty in your case.
    Here is an example on how to override it at project level:


    namespace Pyz\Shared\Price;

    use Spryker\Shared\Price\PriceConfig as SprykerPriceConfig;

    class PriceConfig extends SprykerPriceConfig

    {

    public function getDefaultPriceMode(): string

    {

    return static::PRICE_MODE_NET;

    }

    }

  • hau.nguyen
    hau.nguyen Spryker job Posts: 23 🧑🏻‍🚀 - Cadet
    Options

    hi Hidran Arias,

    It works fine for me, but is there no config support for this in backOffice?

    Thanks

    Hau Nguyen