Jump to content

matracon

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by matracon

  1. Hi: Other solution: Go to /admin/themes/default/template/controllers/orders/helpers/view/view.tpl Change this: <select id="id_order_state" class="chosen form-control" name="id_order_state"> {foreach from=$states item=state} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/foreach} </select> to <select id="id_order_state" class="chosen form-control" name="id_order_state"> <!-- {foreach from=$states item=state} <option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option> {/foreach} --> <option value="6">Cancelado</option> <option value="2">Pago aceptado</option> <option value="7">Reembolso</option> </select> And Voila!!! In Spanish: http://wmotion.net/blog/10_eliminar-de-prestashop-estados-de-pedidos-que-no-se-usan.html
  2. Hi Vekia: I did this, but it does not work , please help!!! , PS 1.6.1.6 Thanks
  3. Hi Thank you for this information. I have made some modifications to the original code and has served me as it works, I would like to share it with those who need it This is the complete function: public function sendEmail($order, $template_vars = false) { $result = Db::getInstance()->getRow(' SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name`, os.`id_order_state`, os.`pdf_invoice`, os.`pdf_delivery` FROM `'._DB_PREFIX_.'order_history` oh LEFT JOIN `'._DB_PREFIX_.'orders` o ON oh.`id_order` = o.`id_order` LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer` LEFT JOIN `'._DB_PREFIX_.'order_state` os ON oh.`id_order_state` = os.`id_order_state` LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = o.`id_lang`) WHERE oh.`id_order_history` = '.(int)$this->id.' AND os.`send_email` = 1'); // add {products} to 'shipped.html' mail template if ($result['template'] == 'shipped') { $order = new Order((int)$this->id_order); $products = $order->getProductsDetail(); foreach ($products as $product) { $price = Product::getPriceStatic((int) $product['id_product'], false, ($product['id_product_attribute'] ? (int) $product['id_product_attribute'] : null), 6, null, false, true, $product['cart_quantity'], false, (int) $order->id_customer, (int) $order->id_cart, (int) $order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $price_wt = Product::getPriceStatic((int) $product['id_product'], true, ($product['id_product_attribute'] ? (int) $product['id_product_attribute'] : null), 2, null, false, true, $product['cart_quantity'], false, (int) $order->id_customer, (int) $order->id_cart, (int) $order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $product_price = Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt; $product_var_tpl = array( 'reference' => $product['reference'], 'name' => $product['product_name'] . (isset($product['attributes']) ? ' - ' . $product['attributes'] : ''), 'unit_price' => Tools::displayPrice($product_price, $this->context->currency, false), 'price' => Tools::displayPrice($product_price * $product['product_quantity'], $this->context->currency, false), 'quantity' => $product['product_quantity'], 'customization' => array() ); $customized_datas = Product::getAllCustomizedDatas((int) $order->id_cart); if (isset($customized_datas[$product['id_product']][$product['id_product_attribute']])) { $product_var_tpl['customization'] = array(); foreach ($customized_datas[$product['id_product']][$product['id_product_attribute']][$order->id_address_delivery] as $customization) { $customization_text = ''; if (isset($customization['datas'][Product::CUSTOMIZE_TEXTFIELD])) { foreach ($customization['datas'][Product::CUSTOMIZE_TEXTFIELD] as $text) { $customization_text .= $text['name'] . ': ' . $text['value'] . '<br />'; } } if (isset($customization['datas'][Product::CUSTOMIZE_FILE])) { $customization_text .= sprintf(Tools::displayError('%d image(s)'), count($customization['datas'][Product::CUSTOMIZE_FILE])) . '<br />'; } $customization_quantity = (int) $product['customization_quantity']; $product_var_tpl['customization'][] = array( 'customization_text' => $customization_text, 'customization_quantity' => $customization_quantity, 'quantity' => Tools::displayPrice($customization_quantity * $product_price, $this->context->currency, false) ); } } $product_var_tpl_list[] = $product_var_tpl; // Check if is not a virutal product for the displaying of shipping if (!$product['is_virtual']) { $virtual_product &= false; } } // end foreach ($products) $product_list_html = ''; if (count($product_var_tpl_list) > 0) { foreach ($product_var_tpl_list as $product){ $product_list_html ='<tr> <td style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td> <font size="2" face="Open-sans, sans-serif" color="#555454">'.$product['reference'].' </font> </td> <td width="10"> </td> </tr> </table> </td> <td style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td> <font size="2" face="Open-sans, sans-serif" color="#555454"> <strong>'.$product['name'].'</strong> </font> </td> <td width="10"> </td> </tr> </table> </td> <td style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td align="right"> <font size="2" face="Open-sans, sans-serif" color="#555454">'.$product['unit_price'].' </font> </td> <td width="10"> </td> </tr> </table> </td> <td style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td align="right"> <font size="2" face="Open-sans, sans-serif" color="#555454">'.$product['quantity'].' </font> </td> <td width="10"> </td> </tr> </table> </td> <td style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td align="right"> <font size="2" face="Open-sans, sans-serif" color="#555454">'.$product['price'].' </font> </td> <td width="10"> </td> </tr> </table> </td> </tr>';} foreach ($product_var_tpl_list['customization'] as $customization){ $product_list_html .='<tr> <td colspan="2" style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td> <font size="2" face="Open-sans, sans-serif" color="#555454"> <strong>'.$product['name'].'</strong><br>'.$customization['customization_text'].' </font> </td> <td width="10"> </td> </tr> </table> </td> <td style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td align="right"> <font size="2" face="Open-sans, sans-serif" color="#555454">'.$product['unit_price'].' </font> </td> <td width="10"> </td> </tr> </table> </td> <td style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td align="right"> <font size="2" face="Open-sans, sans-serif" color="#555454">'.$customization['customization_quantity'].' </font> </td> <td width="10"> </td> </tr> </table> </td> <td style="border:1px solid #EEEEEE;"> <table class="table"> <tr> <td width="10"> </td> <td align="right"> <font size="2" face="Open-sans, sans-serif" color="#555454">'.$customization['quantity'].' </font> </td> <td width="10"> </td> </tr> </table> </td> </tr>'; } } // $template_vars['products'] = $product_list_html; } if (isset($result['template']) && Validate::isEmail($result['email'])) { ShopUrl::cacheMainDomainForShop($order->id_shop); $newDate = date("d-m-Y", strtotime($order->date_add)); $topic = $result['osname']; $data = array( '{lastname}' => $customer->lastname, '{firstname}' => $customer->firstname, '{id_order}' => (int)$this->id_order, '{payment}' => $order->payment, '{date}' => $newDate, '{products}' => $product_list_html, '{order_name}' => $order->getUniqReference() ); if ($result['module_name']) { $module = Module::getInstanceByName($result['module_name']); if (Validate::isLoadedObject($module) && isset($module->extra_mail_vars) && is_array($module->extra_mail_vars)) { $data = array_merge($data, $module->extra_mail_vars); } } if ($template_vars) { $data = array_merge($data, $template_vars); } $data['{total_paid}'] = Tools::displayPrice((float)$order->total_paid, new Currency((int)$order->id_currency), false); $data['{total_products}'] = Tools::displayPrice((float)$order->total_products_wt, new Currency((int)$order->id_currency), false); $data['{total_discounts}'] = Tools::displayPrice((float)$order->total_discounts, new Currency((int)$order->id_currency), false); if (Validate::isLoadedObject($order)) { // Attach invoice and / or delivery-slip if they exists and status is set to attach them if (($result['pdf_invoice'] || $result['pdf_delivery'])) { $context = Context::getContext(); $invoice = $order->getInvoicesCollection(); $file_attachement = array(); if ($result['pdf_invoice'] && (int)Configuration::get('PS_INVOICE') && $order->invoice_number) { Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => $invoice)); $pdf = new PDF($invoice, PDF::TEMPLATE_INVOICE, $context->smarty); $file_attachement['invoice']['content'] = $pdf->render(false); $file_attachement['invoice']['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; $file_attachement['invoice']['mime'] = 'application/pdf'; } if ($result['pdf_delivery'] && $order->delivery_number) { $pdf = new PDF($invoice, PDF::TEMPLATE_DELIVERY_SLIP, $context->smarty); $file_attachement['delivery']['content'] = $pdf->render(false); $file_attachement['delivery']['name'] = Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id, null, $order->id_shop).sprintf('%06d', $order->delivery_number).'.pdf'; $file_attachement['delivery']['mime'] = 'application/pdf'; } } else { $file_attachement = null; } if (!Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'], null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop)) { return false; } } ShopUrl::resetMainDomainCache(); } return true; }
  4. No hace falta que compres ningún módulo, con atributos lo puedes hacer perfectamente pero tienes que tener conocimientos y modificar la plantilla product.tpl Un saludo
  5. Hi Knowband Plugins Thanks for the script but has a little problem, when you refresh the page where you place this script (without pressing the button "add to cart"), automatically adds the product to the cart.
  6. In my case the problem was detected change in location -> Location Settings, then turn off Set the default browser language from the country and solved! En mi caso el problema lo detecte cambiando en localización -> localización luego en configuración desactivar la opción Establece el país predeterminado desde el idioma del navegador y solucionado!
  7. Hola MPeiro , has podido hacerlo? , cuentame por favor que necesito hacer algo similar. Un saludo
  8. Hola Monray: Supongo que ya lo has solucionado después de algunos meses , nosotros acabamos de tener un problema similar en una de nuestras tiendas que gestionamos y queríamos compratirlo por si alguno le pasa, en nuestro caso era un módulo llamado avalara que no se porque motivo hacía que se muestre el mismo precio tachado sin haber descuentos, lo hemos desinstalado y luego debes de volver a poner el precio al producto y presionar guardar y con eso se ha corregido. Cualquier duda me comentáis.
  9. Hola a todos: Por si alguno le sirve mi problema estaba en la configuración del módulo de paypal en el nombre de usuario (Nombre de usuario de API que no lo había cambiado , un saludo
  10. Hi Eolia: I do not agree with your opinion, I think that if possible block all cookies, I found a module that apparently do , http://addons.prestashop.com/en/administration-tools-prestashop-modules/8734-eu-cookie-law-notification-banner-cookie-blocker.html I will contact the developer to learn more about this module and get information. Thank You
  11. Tx KevinNash , uhmm , is a big problem if not block , Ps cookies is not need to block it, but yes of google and facebook, do you test a cookie block module? , Thanks for your help.
  12. Hi: I installed this module but does not block all cookies, attached an image, can be corrected? How? , Thx
  13. Thanks Nemo for this solution. In this post http://worldtecmotion.blogspot.com.es/2014/11/bloque-de-carro-de-prestashop-muestra.html (in spanish I'm sorry) , improved the Nemo proposal and adapt to 1.6.0.9.
  14. Hi Uddhava , I have the same problem as you mention, you could find a solution? Thanks for sharing.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More