INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`,`message`, `custom`, `disabled`) SELECT 'product', 'ModulesGarden Hosting Renewals - Last Day Notification', 'Last Day Notification',
                                                                                                   '<p>Dear {$client_name},</p>

                                                                                                   <p>This is a notification that your service is about to expire tomorrow!</p>
                                                                                                   <p>The details:</p>

                                                                                                   <p>Product/Service: {$service_product_name}</p>
                                                                                                   {if $service_domain}<p>Domain: {$service_domain}</p>{/if}
                                                                                                   <p>Amount: {$service_recurring_amount}</p>
                                                                                                   <p>Due Date: {$service_next_due_date}</p>

                                                                                                   <p>Please contact us as soon as possible to get more information.</p>

                                                                                                   {$signature}', 1, 0
FROM DUAL
WHERE NOT EXISTS (SELECT * FROM `tblemailtemplates` WHERE `tblemailtemplates`.`type` LIKE 'product' AND `tblemailtemplates`.`name` LIKE 'ModulesGarden Hosting Renewals - Last Day Notification')
    LIMIT 1 ;