Hello , how can I insert a new promotion on the database.
Example:
Type : Catalog
Name: Example 1
ToDate: 05/26/2014
FromDate: 05/26/2014
Status: Active.
Conditions:
Products then I add 5 products
Bonuses:
Product Descount: 25%
Hi @ComputoGessacr,
Please follow [url=“http://www.screencast.com/users/HungryWeb/folders/CS-Cart%20Forum/media/67e07d4a-8933-46e9-89fb-e520ec227833”]http://www.screencast.com/users/HungryWeb/folders/CS-Cart%20Forum/media/67e07d4a-8933-46e9-89fb-e520ec227833[/url]
I hope that helps,
—
Valentin
[color=#808080][size=2]part of hungryweb.net[/size][/color]
[quote name='Vali' timestamp='1401853937' post='185006']
Hi @ComputoGessacr,
Please follow http://www.screencas…fb-e520ec227833
I hope that helps,
—
Valentin
[color=#808080][size=2]part of hungryweb.net[/size][/color]
[/quote]
Thanks Vali.
But i want to do it in a php file and then insert it to the databse
#on file desc
app/controllers/backend/promotions.php
#you can find
function fn_update_promotion($data, $promotion_id, $lang_code = DESCR_SL)
#call it with $data
Array
(
[zone] => catalog
[name] => New Promotion
[detailed_description] =>
[short_description] =>
[company_id] => 1
[from_date] => 06/01/2014
[to_date] => 06/26/2014
[priority] => 0
[stop] => N
[status] => A
[conditions] => Array
(
[set] => all
[set_value] => 1
[conditions] => Array
(
[1] => Array
(
[operator] => in
[condition] => products
[value] => 12,17,148,180,187
)
)
)
[bonuses] => Array
(
[1] => Array
(
[bonus] => product_discount
[discount_bonus] => by_percentage
[discount_value] => 25
)
)
)
I hope that helps,
—
Valentin
[color=#808080][size=2]part of hungryweb.net[/size][/color]
i have to insert it to another table and the it works.
Thanks
[quote name='Vali' timestamp='1402038410' post='185204'] desc
#on file
app/controllers/backend/promotions.php
#you can find
function fn_update_promotion($data, $promotion_id, $lang_code = DESCR_SL)
#call it with $data
Array
(
[zone] => catalog
[name] => New Promotion
[detailed_description] =>
[short_description] =>
[company_id] => 1
[from_date] => 06/01/2014
[to_date] => 06/26/2014
[priority] => 0
[stop] => N
[status] => A
[conditions] => Array
(
[set] => all
[set_value] => 1
[conditions] => Array
(
[1] => Array
(
[operator] => in
[condition] => products
[value] => 12,17,148,180,187
)
)
)
[bonuses] => Array
(
[1] => Array
(
[bonus] => product_discount
[discount_bonus] => by_percentage
[discount_value] => 25
)
)
)
I hope that helps,
—
Valentin
[color=#808080][size=2]part of hungryweb.net[/size][/color]
[/quote]