Changeset 2943728
- Timestamp:
- 07/26/2023 02:00:36 PM (12 months ago)
- Location:
- libro-de-reclamaciones-y-quejas
- Files:
-
- 748 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libro-de-reclamaciones-y-quejas/trunk/README.txt
r2829501 r2943728 1 1 === Libro de Reclamaciones y Quejas === 2 Contributors: renzotejada , drplugins2 Contributors: renzotejada 3 3 Tags: libro de reclamaciones, libro de reclamaciones peru, libro de reclamaciones wordpress, libro de reclamaciones plugin 4 4 Requires at least: 5.2 5 Tested up to: 6. 1.15 Tested up to: 6. 6 6 Stable tag: trunk 7 7 Requires PHP: 5.6 … … 79 79 == Changelog == 80 80 81 82 83 84 85 86 81 87 = 0.1.7 (06/12/2022) = 82 88 Fix: validando versión WC 7.1.0 -
libro-de-reclamaciones-y-quejas/trunk/libro_admin.php
r2500273 r2943728 45 45 <?php 46 46 $listado = rt_libro_lrq_get_all_reclamos(1); 47 48 49 47 50 48 51 if ($listado) { … … 60 63 print "<th style='text-align:center'>".__('Clients order', 'rt-libro')."</th>"; 61 64 print "<th style='text-align:center'>".__('Reclaimed amount', 'rt-libro')."</th>"; 65 62 66 print "</tr>"; 63 67 print "</thead>"; … … 76 80 print "<td style='text-align:center'><button class='button button-primary' onclick=\"jQuery('#detallesolicitud_texto').val('" . str_replace("\r", "", str_replace("\n", '\n', str_replace('"', '"', str_replace("'", '\x27', $row['pedido_cliente'])))) . "');jQuery('#detallesolicitud').show();\">Ver</button></td>"; 77 81 print "<td style='text-align:center'>" . $row['monto_reclamado'] . "</td>"; 82 83 84 85 86 78 87 print "</tr>"; 79 88 } … … 437 446 438 447 <h2 class="nav-tab-wrapper"> 439 <a href="?page=libro_settings &tab=home" class="nav-tab <?php448 <a href="?page=libro_settings" class="nav-tab <?php 440 449 if ((!isset($_REQUEST['tab'])) || ($_REQUEST['tab'] == "home")) { 441 450 print " nav-tab-active"; -
libro-de-reclamaciones-y-quejas/trunk/libro_shortcode.php
r2815410 r2943728 1 1 <?php 2 3 4 5 6 7 8 2 9 add_filter('template_include', 'rt_libro_lrq_reclamacion_template'); 3 10 … … 25 32 26 33 if ($libro_id) { 27 rt_libro_lrq_enviar_mail_libro_reclamacion($libro_data); 34 $filepath = rt_libro_lrq_crear_pdf_libro_reclamacion($libro_data, $libro_id); 35 rt_libro_lrq_enviar_mail_libro_reclamacion($libro_data, $libro_id, $filepath); 28 36 } else { 29 37 $libro_id = 0; … … 52 60 } 53 61 54 function rt_libro_lrq_enviar_mail_libro_reclamacion($libro_data) 55 { 56 // Email para el administradora 57 $subject = __('Claim sent from', 'rt-libro') .' ' . get_option('blogname'); 58 $subject = __('Claims Book Registry', 'rt-libro'); 59 $message = __('A new complaint / complaint was registered.', 'rt-libro'); 60 $headers = __('From: ', 'rt-libro') .' '. $libro_data['nombre'] . ' <' . $libro_data['email'] . '>' . "\r\n"; 61 $mailResult = wp_mail(get_option('admin_email'), $subject, $message, $headers); 62 // Email para el usuario 62 function rt_libro_lrq_crear_pdf_libro_reclamacion($libro_data, $libro_id) 63 { 64 $dompdf = new Dompdf(); 65 $wp_upload_dir = wp_upload_dir() ; 66 $upload_dir = $wp_upload_dir['basedir'] . '/libro-pdfs'; 67 ob_start(); 68 include ( WP_PLUGIN_DIR . '/libro-de-reclamaciones-y-quejas/template/rt-libro-pdf.php'); 69 $view = ob_get_contents(); 70 ob_get_clean(); 71 $dompdf->loadHtml($view); 72 $dompdf->render(); 73 $pdf = $dompdf->output(); 74 wp_mkdir_p($upload_dir); 75 $filename = $upload_dir . '/libro-' . $libro_id . ".pdf"; 76 file_put_contents($filename, $pdf); 77 return $filename; 78 } 79 80 function rt_libro_lrq_enviar_mail_libro_reclamacion($libro_data, $libro_id, $filename) 81 { 82 // Email para el usuario y admin 63 83 $message_user = __('Dear:', 'rt-libro') . " " ." {$libro_data['nombre']} {$libro_data['apellido_paterno']} ,\r\n\r\n".__('Thank you very much for leaving us your opinion about our services.', 'rt-libro')."\r\n\r\n".__('Your claim has been successfully received.', 'rt-libro'); 84 64 85 $message_user .= "\r\n\r\n".__('Name', 'rt-libro') .": ". $libro_data['nombre']; 65 86 $message_user .= "\r\n\r\n".__('First Lastname', 'rt-libro') .": ". $libro_data['apellido_paterno']; … … 95 116 96 117 $message_user .= "\r\n\r\n".__('Atte.', 'rt-libro')." \r\n\r\n". get_option('blogname'); 97 $headers = __('From: ', 'rt-libro') .' '. get_option('blogname') . ' <'.get_option('admin_email').'>' . "\r\n"; 98 wp_mail($libro_data['email'], __('We have received your claim', 'rt-libro'), $message_user, $headers); 118 $headers[] = __('From: ', 'rt-libro') .' '. get_option('blogname') . ' <'.get_option('admin_email').'>' . "\r\n"; 119 $headers[] = 'Cc: <'.get_option('admin_email').'>' . "\r\n"; 120 wp_mail($libro_data['email'], __('We have received your claim', 'rt-libro'), $message_user, $headers,$filename); 99 121 } 100 122 -
libro-de-reclamaciones-y-quejas/trunk/rt-libro-reclamaciones.php
r2829501 r2943728 10 10 * Plugin URI: https://renzotejada.com/libro-de-reclamaciones-y-quejas/ 11 11 * Description: Online complaints book is a document through which a consumer can record a complaint regarding a product or service that he has purchased. 12 * Version: 0.1. 712 * Version: 0.1. 13 13 * Author: Renzo Tejada 14 14 * Author URI: https://renzotejada.com/ … … 19 19 * Requires at least: 5.6 20 20 * Requires PHP: 5.6.20 21 * WC tested up to: 7. 1.021 * WC tested up to: 7. 22 22 * WC requires at least: 2.6 23 23 */ … … 74 74 * ADMIN 75 75 */ 76 77 76 require dirname(__FILE__) . "/libro_admin.php"; 78 77 … … 80 79 * SHORTCODE 81 80 */ 82 83 81 require dirname(__FILE__) . "/libro_shortcode.php"; 84 82
Note: See TracChangeset
for help on using the changeset viewer.