klubas
Members-
Posts
17 -
Joined
-
Last visited
Profile Information
-
Location
Lithuania
-
Activity
User/Merchant
klubas's Achievements
Newbie (1/14)
0
Reputation
-
Send to a friend module - sending copy to another email
klubas replied to klubas's topic in Core developers
Hello Richard, If I do like you say "[email protected], [email protected]" l got popup with error at front-end: Your e-mail could not be sent. Please check the e-mail address and try again. I found that this error coming from sendtoafriend-extra.tpl. What is the next step to make it work? <script type="text/javascript"> {literal} $('document').ready(function(){ $('#send_friend_button').fancybox({ 'hideOnContentClick': false }); $('#sendEmail').click(function(){ var name = $('#friend_name').val(); var email = $('#friend_email').val(); var id_product = $('#id_product_comment_send').val(); if (name && email && !isNaN(id_product)) { $.ajax({ {/literal}url: "{$module_dir}sendtoafriend_ajax.php",{literal} type: "POST", headers: {"cache-control": "no-cache"}, data: {action: 'sendToMyFriend', secure_key: '{/literal}{$stf_secure_key}{literal}', name: name, email: email, id_product: id_product},{/literal}{literal} dataType: "json", success: function(result) { $.fancybox.close(); var msg = result ? "{/literal}{l s='Your e-mail has been sent successfully' mod='sendtoafriend'}{literal}" : "{/literal}{l s='Your e-mail could not be sent. Please check the e-mail address and try again.' mod='sendtoafriend'}{literal}"; var title = "{/literal}{l s='Send to a friend' mod='sendtoafriend'}{literal}"; fancyMsgBox(msg, title); } }); }else -
Send to a friend module - sending copy to another email
klubas replied to klubas's topic in Core developers
Hello, this solution works with one email address /* Admin email sending - modified */ if (!Mail::Send((int)$module->context->cookie->id_lang, 'send_to_a_friend', sprintf(Mail::l('%1$s sent you a link to %2$s', (int)$module->context->cookie->id_lang), $customer, $product->name), $templateVars, "[email protected]", null, ... if I want to send copy to another email, it doesnt work, something is missing in the code I think /* Admin email sending - modified */ if (!Mail::Send((int)$module->context->cookie->id_lang, 'send_to_a_friend', sprintf(Mail::l('%1$s sent you a link to %2$s', (int)$module->context->cookie->id_lang), $customer, $product->name), $templateVars, "[email protected]", "[email protected]", null, null, ($module->context->cookie->email ? $module->context->cookie->email : null), ($module->context->cookie->customer_firstname ? $module->context->cookie->customer_firstname.' '.$module->context->cookie->customer_lastname : null), null, null, dirname(__FILE__).'/mails/')) die('0'); die('1'); } die('0'); -
Send to a friend module - sending copy to another email
klubas replied to klubas's topic in Core developers
Hello Richard, Thank you for replay but I need example I'm just at the begining of programing. -
Hello, What to change in the code of module "Send to a Friend 1.7.2" that it could also send a copy of same email to the shop administrator. in the file sendtoafriend_ajax.php I found part that propably responsible for email sending..but I dont what to change there... ... /* Email sending */ if (!Mail::Send((int)$module->context->cookie->id_lang, 'send_to_a_friend', sprintf(Mail::l('%1$s sent you a link to %2$s', (int)$module->context->cookie->id_lang), $customer, $product->name), $templateVars, $friendMail, null, ... Thank you.
-
Category page. Display sub & sub sub categories
klubas replied to player.c64's topic in Core developers
Hello, I replaced all content in: ..\controllers\front\CategoryController.php with: <?php class CategoryController extends CategoryControllerCore { public function setMedia() { $this->context->controller->addJs(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); $this->context->controller->addJqueryUi('ui.accordion'); } protected function assignSubcategories() { if ($subCategories = $this->category->getSubCategories($this->context->language->id)) { foreach ($subCategories as $key => $subcat) { $subcatObj = new Category($subcat['id_category']); $subCategories[$key]['subcategories'] = $subcatObj->getSubCategories($this->context->language->id); } $this->context->smarty->assign(array( 'subcategories' => $subCategories, 'subcategories_nb_total' => count($subCategories), 'subcategories_nb_half' => ceil(count($subCategories) / 2) )); } } } and in category.tpl replaced this: {foreach from=$subcategories item=subcategory} <li class="clearfix"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" class="img"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} </li> {/foreach} with this: {foreach from=$subcategories item=subcategory} <h3>{$subcategory.name|escape:'htmlall':'UTF-8'}</h3> <div> <ul class="sub-menu"> {foreach from=$subcategory['subcategories'] item=subcategories} <li> <a href="{$link->getCategoryLink($subcategories.id_category, $subcategories.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategories.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> </div> {/foreach} Please correct me if this is wrong. Thank you. -
Category page. Display sub & sub sub categories
klubas replied to player.c64's topic in Core developers
Not working on v.1.5 or I'm not doing it correctly. Need more explanation -
mail order confirmation without tax
klubas replied to MaartenPol's topic in Configuring and using PrestaShop
I did not found the solution -
mail order confirmation without tax
klubas replied to MaartenPol's topic in Configuring and using PrestaShop
No this did not worked. It it is still showing 28,69eur.... -
mail order confirmation without tax
klubas replied to MaartenPol's topic in Configuring and using PrestaShop
Dear rocky, one problem in Total price at (order_conf): now if product price (without tx) is 14,35eur and quantity is 2pcs. then total price is shown 28,69eur (not 28,70eur as should) one cent is mising... I think problem is with this line: '.Tools::displayPrice((intval($product['cart_quantity']) - $customizationQuantity) * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt), $currency, false, false).' -
mail order confirmation without tax
klubas replied to MaartenPol's topic in Configuring and using PrestaShop
Thank you, rocky Code editing solution helped realy much! Now I can show both unit price+tx, and price-tx in same mail. -
mail order confirmation without tax
klubas replied to MaartenPol's topic in Configuring and using PrestaShop
dear rocky, How to make Unit price to show without tax in products table (order_conf.html) ? -
My situation is a little bit different from "paranoiac" mentioned in first message. I have two groups and i need to send different Design emails (order_conf) after order complete. Maybe in PaymentModule.php we can change below "'// Send an e-mail to customer"" , then we can have two templates for different groups?