Skip to content

Instantly share code, notes, and snippets.

@PululuK
Last active June 11, 2021 12:32
Show Gist options
  • Save PululuK/1b0e5d16ec05e2ea1eb3b33b39c6fccc to your computer and use it in GitHub Desktop.
Save PululuK/1b0e5d16ec05e2ea1eb3b33b39c6fccc to your computer and use it in GitHub Desktop.
<?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