[-] BO : BugFix : #PSCFV-3235 : Multistore : unable to duplicate a product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16552 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -431,6 +431,16 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
|
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
|
||||||
{
|
{
|
||||||
$id_product_old = $product->id;
|
$id_product_old = $product->id;
|
||||||
|
if (empty($product->price) && Shop::getContext() == Shop::CONTEXT_GROUP)
|
||||||
|
{
|
||||||
|
$shops = ShopGroup::getShopsFromGroup(Shop::getContextShopGroupID());
|
||||||
|
foreach ($shops as $shop)
|
||||||
|
if ($product->isAssociatedToShop($shop['id_shop']))
|
||||||
|
{
|
||||||
|
$product_price = new Product($id_product_old, false, null, $shop['id_shop']);
|
||||||
|
$product->price = $product_price->price;
|
||||||
|
}
|
||||||
|
}
|
||||||
unset($product->id);
|
unset($product->id);
|
||||||
unset($product->id_product);
|
unset($product->id_product);
|
||||||
$product->indexed = 0;
|
$product->indexed = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user