privilegedemarque/modules/referralprogram/referralprogram_ajax.php
Serveur preprod f0c0c48223 first push
2016-04-14 16:14:31 +02:00

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']);
}
*/