Skip to content

Commit

Permalink
blocks: fix variables $nv_Cache
Browse files Browse the repository at this point in the history
  • Loading branch information
vuthao committed Jan 20, 2016
1 parent 3f81e18 commit bae6a4f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
8 changes: 3 additions & 5 deletions modules/shops/blocks/global.block_bxproduct_center.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,13 @@ function nv_block_config_bxproduct_center_blocks_submit($module, $lang_block)
if (!nv_function_exists('nv_get_price_tmp')) {
function nv_get_price_tmp($module_name, $module_data, $module_file, $pro_id)
{
global $db, $db_config, $module_config, $discounts_config;
global $nv_Cache, $db, $db_config, $module_config, $discounts_config;

$price = array();
$pro_config = $module_config[$module_name];

if (file_exists(NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php')) {
require_once NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php';
$price = nv_get_price($pro_id, $pro_config['money_unit'], 1, false, $module_name);
}
require_once NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php';
$price = nv_get_price($pro_id, $pro_config['money_unit'], 1, false, $module_name);

return $price;
}
Expand Down
8 changes: 3 additions & 5 deletions modules/shops/blocks/global.block_product_center.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ function nv_block_config_product_center_blocks_submit($module, $lang_block)
if (!nv_function_exists('nv_get_price_tmp')) {
function nv_get_price_tmp($module_name, $module_data, $module_file, $pro_id)
{
global $db, $db_config, $module_config, $discounts_config;
global $nv_Cache, $db, $db_config, $module_config, $discounts_config;

$price = array();
$pro_config = $module_config[$module_name];

if (file_exists(NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php')) {
require_once NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php';
$price = nv_get_price($pro_id, $pro_config['money_unit'], 1, false, $module_name);
}
require_once NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php';
$price = nv_get_price($pro_id, $pro_config['money_unit'], 1, false, $module_name);

return $price;
}
Expand Down
8 changes: 3 additions & 5 deletions modules/shops/blocks/global.block_relates_product.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,13 @@ function nv_block_config_relates_blocks_submit($module, $lang_block)
if (!nv_function_exists('nv_get_price_tmp')) {
function nv_get_price_tmp($module_name, $module_data, $module_file, $pro_id)
{
global $db, $db_config, $module_config, $discounts_config;
global $nv_Cache, $db, $db_config, $module_config, $discounts_config;

$price = array();
$pro_config = $module_config[$module_name];

if (file_exists(NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php')) {
require_once NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php';
$price = nv_get_price($pro_id, $pro_config['money_unit'], 1, false, $module_name);
}
require_once NV_ROOTDIR . '/modules/' . $module_file . '/site.functions.php';
$price = nv_get_price($pro_id, $pro_config['money_unit'], 1, false, $module_name);

return $price;
}
Expand Down

0 comments on commit bae6a4f

Please sign in to comment.