17 lines
680 B
PHP
17 lines
680 B
PHP
<?php
|
|
/*
|
|
require_once(dirname(__FILE__).'/../../config/config.inc.php');
|
|
require_once(dirname(__FILE__).'/../../init.php');
|
|
|
|
|
|
Db::getInstance()->update('referralprogram', array('id_cart_rule' => 0));
|
|
$sql = "SELECT DISTINCT(id_cart_rule_sponsor) FROM "._DB_PREFIX_."referralprogram";
|
|
$results = Db::getInstance()->ExecuteS($sql);
|
|
foreach($results as $row)
|
|
{
|
|
//PS_cart_rule
|
|
Db::getInstance()->update('cart_rule', array('cart_rule_restriction' => 1),'id_cart_rule='.$row['id_cart_rule_sponsor']);
|
|
//PS_cart_rule_combination
|
|
Db::getInstance()->delete('cart_rule_combination','id_cart_rule_1='.$row['id_cart_rule_sponsor'].' OR id_cart_rule_2='.$row['id_cart_rule_sponsor']);
|
|
}
|
|
*/ |