Last active
June 11, 2021 12:32
-
-
Save PululuK/1b0e5d16ec05e2ea1eb3b33b39c6fccc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require(dirname(__FILE__).'/config/config.inc.php'); | |
use PrestaShop\PrestaShop\Adapter\LegacyContext as Context; | |
$product_id = 2318; | |
$id_shop = 1; | |
$id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); | |
$shopObject = new Shop($id_shop); | |
Context::getContext()->employee = new Employee(1); | |
Shop::setContext(Shop::CONTEXT_SHOP,$shopObject->id); | |
$product_shop = new Product($product_id, true, $id_lang, $shopObject->id); | |
dump($product_shop->price); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment