Search the Community
Showing results for tags 'Db class'.
Hi, I tried to add one raw to cart rule table by using db class. Here is the code, but not working. This is just a part of what i will do. But I am really curious about this part, why this code can not inject any row into cart rule table? PS version 1.6 Thanks, include 'config/config.inc.php'; Db::getInstance()->insert('". _DB_PREFIX_."cart_rule', array( 'id_customer' => 1, 'date_from' => '2014-12-01 15:11:45', 'date_to' => '2014-12-31 23:59:00', 'description' => 'Some campaign', 'quantity' => 0 , 'quantity_per_user' => 1, 'priority' => 1, 'partial_use' => 0, 'code' => 'code123', 'minimum_amount' => '20.00', 'minimum_amount_tax' => 1, 'minimum_amount_currency' => 1, 'minimum_amount_shipping' => 0, 'country_restriction' => 0, 'carrier_restriction' => 0, 'group_restriction' => 0, 'cart_rule_restriction' => 0, 'product_restriction' => 0 , 'shop_restriction' => 0, 'free_shipping' => 0 , 'reduction_percent' => '15.00', 'reduction_amount' => '0.00', 'reduction_tax' => 0, 'reduction_currency' => 1, 'reduction_product' => 0, 'gift_product' => 0, 'gift_product_attribute' => 0, 'highlight' => 1, 'active' => 1, ));
Hello everyone, I have a question: does anybody know if the Db class (PS v126.96.36.199) manages the mysql transaction? I created a module that manages a commercial network and I need to make several select and insert in a single operation. I would like to avoid that, in case one of the operations goes wrong, let me pending other.