From 3d614ca8ea8d267f04ac3d6a9b820d8314600699 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Fri, 7 Jun 2013 16:41:33 +0200 Subject: [PATCH] [-] CORE : fixed bug #PSCFV-9121 - virtual product does not have link after upgrade - part 2 --- .../fix_download_product_feature_active.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 install-dev/upgrade/php/fix_download_product_feature_active.php diff --git a/install-dev/upgrade/php/fix_download_product_feature_active.php b/install-dev/upgrade/php/fix_download_product_feature_active.php new file mode 100644 index 000000000..354b3e5f5 --- /dev/null +++ b/install-dev/upgrade/php/fix_download_product_feature_active.php @@ -0,0 +1,31 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function fix_download_product_feature_active() +{ + if (Db::getInstance()->getValue('SELECT COUNT(id_product_download) FROM `'._DB_PREFIX_.'product_download` WHERE `active` = 1 ;') > 0) + Configuration::updateGlobaleValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE'); +} \ No newline at end of file