Vilas Posted September 3, 2011 Share Posted September 3, 2011 Hello, I want to create alert pay for prestashop. I found 2 files. 1 is alertpay.tpl and 2nd one is alertpay.php. Below are source codes of those files. Can anyone help me while creating modules through these files? alertpay.tpl <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php echo $header; ?><br /> <?php if ($error_warning) { ?><br /> <div class="warning"><?php echo $error_warning; ?></div><br /> <?php } ?><br /> <div class="box"><br /> <div class="left"></div><br /> <div class="right"></div><br /> <div class="heading"><br /> <h1 style="background-image: url('view/image/payment.png');"><?php echo $heading_title; ?></h1><br /> <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div><br /> </div><br /> <div class="content"><br /> <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form"><br /> <table class="form"><br /> <tr><br /> <td><span class="required">*</span> <?php echo $entry_merchant; ?></td><br /> <td><input type="text" name="alertpay_merchant" value="<?php echo $alertpay_merchant; ?>" /><br /> <?php if ($error_merchant) { ?><br /> <span class="error"><?php echo $error_merchant; ?></span><br /> <?php } ?></td><br /> </tr><br /> <tr><br /> <td><span class="required">*</span> <?php echo $entry_security; ?></td><br /> <td><input type="text" name="alertpay_security" value="<?php echo $alertpay_security; ?>" /><br /> <?php if ($error_security) { ?><br /> <span class="error"><?php echo $error_security; ?></span><br /> <?php } ?></td><br /> </tr><br /> <tr><br /> <td><?php echo $entry_callback; ?></td><br /> <td><textarea cols="40" rows="5"><?php echo $callback; ?></textarea></td><br /> </tr><br /> <tr><br /> <td><?php echo $entry_order_status; ?></td><br /> <td><select name="alertpay_order_status_id"><br /> <?php foreach ($order_statuses as $order_status) { ?><br /> <?php if ($order_status['order_status_id'] == $alertpay_order_status_id) { ?><br /> <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option><br /> <?php } else { ?><br /> <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option><br /> <?php } ?><br /> <?php } ?><br /> </select></td><br /> </tr><br /> <tr><br /> <td><?php echo $entry_geo_zone; ?></td><br /> <td><select name="alertpay_geo_zone_id"><br /> <option value="0"><?php echo $text_all_zones; ?></option><br /> <?php foreach ($geo_zones as $geo_zone) { ?><br /> <?php if ($geo_zone['geo_zone_id'] == $alertpay_geo_zone_id) { ?><br /> <option value="<?php echo $geo_zone['geo_zone_id']; ?>" selected="selected"><?php echo $geo_zone['name']; ?></option><br /> <?php } else { ?><br /> <option value="<?php echo $geo_zone['geo_zone_id']; ?>"><?php echo $geo_zone['name']; ?></option><br /> <?php } ?><br /> <?php } ?><br /> </select></td><br /> </tr><br /> <tr><br /> <td><?php echo $entry_status; ?></td><br /> <td><select name="alertpay_status"><br /> <?php if ($alertpay_status) { ?><br /> <option value="1" selected="selected"><?php echo $text_enabled; ?></option><br /> <option value="0"><?php echo $text_disabled; ?></option><br /> <?php } else { ?><br /> <option value="1"><?php echo $text_enabled; ?></option><br /> <option value="0" selected="selected"><?php echo $text_disabled; ?></option><br /><?php } ?><br /></select></td><br /> </tr><br /><tr><br /><td><?php echo $entry_sort_order; ?></td><br /> <td><input type="text" name="alertpay_sort_order" value="<?php echo $alertpay_sort_order; ?>" size="1" /></td><br /> </tr><br /> </table><br /> </form><br /> </div><br /> </div><br /> <?php echo $footer; ?> </body> </html> & alertpay.php <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <pre><tr id="sl_svn503_1"><td><?php<br /></td></tr><tr id="sl_svn503_2"><td>// Heading<br /></td></tr><tr id="sl_svn503_3"><td>$_['heading_title'] = 'AlertPay';<br /></td></tr><tr id="sl_svn503_4"><td><br /></td></tr><tr id="sl_svn503_5"><td>// Text <br /></td></tr><tr id="sl_svn503_6"><td>$_['text_payment'] = 'Payment';<br /></td></tr><tr id="sl_svn503_7"><td>$_['text_success'] = 'Success: You have modified AlertPay account details!';<br /></td></tr><tr id="sl_svn503_8"><td> <br /></td></tr><tr id="sl_svn503_9"><td>// Entry<br /></td></tr><tr id="sl_svn503_10"><td>$_['entry_merchant'] = 'Alertpay Email:';<br /></td></tr><tr id="sl_svn503_11"><td>$_['entry_security'] = 'IPN Security Code:';<br /></td></tr><tr id="sl_svn503_12"><td>$_['entry_callback'] = 'Alert URL:<br /><span class="help">This has to be set in the AlertPay control panel. You will also need to check the "IPN Status" to enabled.</span>';<br /></td></tr><tr id="sl_svn503_13"><td>$_['entry_order_status'] = 'Confirmed Order Status:';<br /></td></tr><tr id="sl_svn503_14"><td>$_['entry_geo_zone'] = 'Geo Zone:';<br /></td></tr><tr id="sl_svn503_15"><td>$_['entry_status'] = 'Status:';<br /></td></tr><tr id="sl_svn503_16"><td>$_['entry_sort_order'] = 'Sort Order:';<br /></td></tr><tr id="sl_svn503_17"><td><br /></td></tr><tr id="sl_svn503_18"><td>// Error<br /></td></tr><tr id="sl_svn503_19"><td>$_['error_permission'] = 'Warning: You do not have permission to modify payment AlertPay!';<br /></td></tr><tr id="sl_svn503_20"><td>$_['error_merchant'] = 'Merchant ID Required!';<br /></td></tr><tr id="sl_svn503_21"><td>$_['error_security'] = 'Security Code Required!';<br /></td></tr><tr id="sl_svn503_22"><td>?><br /></td></tr> </pre> </body> </html> Please suggest how to make module for alertpay. Thanks Vilas Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now