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

How to display merchant portal on yves?

Options
pratiksha.lihinar
pratiksha.lihinar Posts: 4 🧑🏻‍🚀 - Cadet

Hello everyone,
I want to display merchant portal url http://mp.de.spryker.local/ on yves in controller
$merchantPortalHost = Config::get(MerchantPortalConstants::BASE_URL_MP);

output is "http://"

please help me.

Comments

  • profuel
    profuel SSA Sprykee Posts: 37 ✨ - Novice
    Options

    Hi, @pratiksha.lihinar !

    The Merchant Portal URL is built from the environment variable SPRYKER_MP_HOST .

    Since Merchant Portal URL is pure Back Office specific, we do not provide by default this value to the Yves container, thus the output you see is the correct one.

    I can help you achieve desired result:

    Locally, you have to update the config_default.php where there's a call to getenv('SPRYKER_MP_HOST'), and replace it with (getenv('SPRYKER_MP_HOST') ?: sprinf('mp.%s.spryker.local', strtolower(APPLICATION_STORE))).

    In the Spryker PaaS+, you have to create a support ticket and ask to add this variable into the Yves container as well.

    AndriyT

  • pratiksha.lihinar
    pratiksha.lihinar Posts: 4 🧑🏻‍🚀 - Cadet
    edited February 12
    Options

    Thanks for replying!

    updating config_default.php file and run

    docker/sdk bootstrap deploy.dev.yml command then docker/sdk up but facing some issues can you please help me

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

    the function is sprintf, not sprinf