Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by perusi

  1. Hello, I need to configure the MailAlerts module to send custom text email (just plain text, not multipart or html). So, i tried modifying the mailalerts.php Now my question for you is this (newbie question btw): What do i need to edit so the module wont take the text from inside the .txt file or .html file. All i want the module to do with the New Order is to take the delivery phone and send it as the Subject and the body of the email to be one that i preset (even in the php file). So the code from mailalerts.php is this: // Filling-in vars for email $template = 'new_order'; $subjectnou = 'Testing'; $template_vars = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_block_txt}' => MailAlert::getFormatedAddress($delivery, "\n"), '{invoice_block_txt}' => MailAlert::getFormatedAddress($invoice, "\n"), '{delivery_block_html}' => MailAlert::getFormatedAddress($delivery, '<br />', array( 'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>')), '{invoice_block_html}' => MailAlert::getFormatedAddress($invoice, '<br />', array( 'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>')), '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => $delivery->phone, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => $invoice->phone, '{invoice_other}' => $invoice->other, '{order_name}' => sprintf('%06d', $order->id), '{shop_name}' => Configuration::get('PS_SHOP_NAME'), '{date}' => $order_date_text, '{carrier}' => (($carrier->name == '0') ? Configuration::get('PS_SHOP_NAME') : $carrier->name), '{payment}' => Tools::substr($order->payment, 0, 32), '{items}' => $items_table, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency), '{total_products}' => Tools::displayPrice($order->getTotalProductsWithTaxes(), $currency), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency), '{currency}' => $currency->sign, '{message}' => $message ); $iso = Language::getIsoById($id_lang); if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') && file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html')) Mail::Send( $id_lang, $template, sprintf(Mail::l('{delivery_phone}', $id_lang), $order->id), $template_vars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), null, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], null, null, dirname(__FILE__).'/mails/' ); } Any ideas? I really need that the email sent to have the DELIVERY Phone as Subject and the "WE RECEIVED YOUR EMAIL" as the text from the email body. Hope you`ll help. Thanks
  2. Hello, I`m asking for your advice as i`m unable to solve this Swiftmailer problem. So... here is what i need. When an email is sent via the prestashop (new order, order confirmation, etc) the email is sent using toos/swift (swiftmailer). Now this swiftmailer interprets emails based on their content, but even when the body has only plain text and even when you set the emails to be sent as TEXT ONLY, the swiftmailer sends out this emails as content-type:multipart/alternative. Now, this is a problem, as i want the emails to be sent as content-type:text/plain and not as content-type:multipart/alternative I tried changing the line of codes inside swift, but no luck so far. I will be waiting for your messages. Thanks a lot.
  3. Prestashop is my PS version. What i need: A second cover image, well the name sound strange, but i want to be able to set from the backend another image to be as SECOND COVER. This way i want to be able to tell Prestashop that if i am on the category X than to get the cover2, and if i am in category Y to get cover1 (the original cover). Do you have any idea?
  4. I„m using PS I want in product listing to show another image than the cover id. Do you have any idea? Thanks
  5. Hi, I have a list of products IDs and i want to move them all to another category or categories. How can i mass move them to other categories? I tried to list them by search and then mass edit them, but the search only accept 2 total words. I think it's easier this way to mass move products from one category to another. I think its good if you want to move your product in an archive, etc. Can this be done with this actual version? Thanks Also... i think something that it's important and it's missing... -> AVAILABLE FOR ORDER field...
  6. ok. one more question. does this affect the classes for all the products? I want the online only just to be excluded from the carousel. Thanks
  7. could you please explain me how? i`m a newbie and some of the php functions are way above me
  8. Hi, I have a product carousel that displays the latest added products (new products). How can i exclude from these new products the products that are online only...? I`m newbie in php...so i need your help guys. I want to display the latest added products but with p.online_only = 0 Here is my code, maybe you will help me out: This is the function that calls for new products. private function _getNewProducts(){ $number_of_products = 10; //(int)(Configuration::get('AUT_SHOWCASE_NEWCOUNT')); $new_products = Product::getNewProducts((int)Context::getContext()->language->id, 0, $number_of_products); $this->smarty->assign(array( 'new_products' => $new_products, 'new_prices' => Configuration::get('AUT_SHOWCASE_NEWPRICES'), 'new_cart' => Configuration::get('AUT_SHOWCASE_NEWCART'), 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); } and the products are called within a .tpl file with this code: {foreach $new_products as $new} .... {/foreach} Thank you!
  9. okay, but what if we go on your first proposed solution? The one that displays each combination as a separate product? Do you have a fast solution for this? Thanks again
  10. No, there is a solution to replace those accented characters with a character you want like (ș - s, ț - t, ă - a, î - a, â - a)
  11. Hi, I need to allow customers to sort products by IN STORE (this means to show only the products that are sold in the physical store and not online). Now i have two types of products, one that is sold online only and one that is sold only in the physical store. I want my customers to be able to sort/show products that are only available in STORE and not online. THanks
  12. Hello, I`m using accented characters like (ș, Ș, ț, Ț, ă, Ă, Î, î, â, Â) in my product names. Now these characters are striped away in the seo friendly url name, so if i have a product named "ȘORȚURI", then it`s friendly url name is "ORURI" I tried some suggestions from this forum but none of them worked. Do you have a solution? Thanks
  13. Hi, Do you know a solution to display/show the product combinations in the BackOffice Product listings? Let's say i have a product (Ipod shuttle) and it have 2 colors (red & white), i want to show that combinations in the product listings. Also i`m interested if i can show only the last 9 characters of the combination name. Thanks a lot
  14. Hi, How can i hide my prices for a specific group of customers? Thanks
  • Create New...

Important Information

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