
Originally Posted by
nigelt74
yep get an error
1048 Column 'configuration_group_id' cannot be null
in:
[REPLACE INTO zen_configuration (configuration_id ,configuration_title ,configuration_key ,configuration_value ,configuration_description ,configuration_group_id ,sort_order ,last_modified ,date_added ,use_function ,set_function) VALUES (NULL , 'Allow Redeem of Reward Points on Order Total or Subtotal', 'REWARD_POINTS_ALLOW_TOTAL', '0', 'Allow points to be redeemed against the full order (including shipping) or only against the subtotal.
0= Against the subtotal.
1= Against the full order.', @group_id, '9', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), ');]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Ah sorry, forgot to retrieve the @group_id. Try this:
Code:
SET @group_id = '';
SELECT (@group_id := `configuration_group_id`) FROM `configuration_group` WHERE `configuration_group_title` LIKE 'Reward Points';
REPLACE INTO `configuration`
(`configuration_id` ,`configuration_title` ,`configuration_key` ,`configuration_value` ,`configuration_description` ,`configuration_group_id` ,`sort_order` ,`last_modified` ,`date_added` ,`use_function` ,`set_function`)
VALUES (NULL , 'Allow Redeem of Reward Points on Order Total or Subtotal', 'REWARD_POINTS_ALLOW_TOTAL', '0', 'Allow points to be redeemed against the full order (including shipping) or only against the subtotal.<br />0= Against the subtotal.<br />1= Against the full order.', @group_id, '9', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), ');