Jump to content

kNife77

Members
  • Posts

    20
  • Joined

  • Last visited

2 Followers

Contact Methods

Profile Information

  • First Name
    George
  • Last Name
    R

Recent Profile Visitors

266 profile views

kNife77's Achievements

Newbie

Newbie (1/14)

5

Reputation

1

Community Answers

  1. I also had this problem and after giving chmod -R 777 to img, and then chown daemon:daemon -R img/ the problem was still present. Then I've manually checked the regeneration templates and the problem was there. You need to be careful at the templates name in the BO->pref->img have the exact names with the list of templates in the folder public_html/img/p (/p for products) So as you see, my problem was that after migrating data from an older prestashop, the templates were renamed and added an 2x at the end.
  2. UPDATE breadcrumb.tpl should look like this: <!-- Breadcrumb --> {if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if} <div class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"> <!-- <div class="container" > --> <meta itemprop="name" content="{$meta_title|escape:'html':'UTF-8'}"/> <a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}"><i class="icon-home"></i></a> {if isset($path) AND $path} <span class="navigation-pipe" {if isset($category) && isset($category->id_category) && $category->id_category == (int)Configuration::get('PS_ROOT_CATEGORY')} style="display:none;"{/if}>{$navigationPipe|escape:'html':'UTF-8'}</span> {if $path|strpos:'span' !== false} <span class="navigation_page" > {$path|@replace:'<a ': '<span > <span > <a itemprop="item" '|@replace:'data-gg="">': '> <span >'|@replace:'</a>': '</span></a></span>'}</span> </span> {else} {$path} {/if} {/if} </div>
  3. Hello, So, first of all, this solution is for prestashop 1.6.0.9 but can easily be addapted for 1.6.X.X. If you want to have Google Breadcrumb markup here is what you need to do: First: Go to themeFolder/breadcrumb.tpl and paste this: <!-- Breadcrumb --> {if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if} <div class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"> <!-- <div class="container" > --> <meta itemprop="name" content="{$meta_title|escape:'html':'UTF-8'}"/> <a class="home" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{l s='Return to Home'}"><i class="icon-home"></i></a> {if isset($path) AND $path} <span class="navigation-pipe" {if isset($category) && isset($category->id_category) && $category->id_category == (int)Configuration::get('PS_ROOT_CATEGORY')} style="display:none;"{/if}>{$navigationPipe|escape:'html':'UTF-8'}</span> {if $path|strpos:'span' !== false} <span class="navigation_page" > {$path|@replace:'<a ': '<span > <span > <a '|@replace:'data-gg="">': '> <span >'|@replace:'</a>': '</span></a></span>'}</span> </span> {else} {$path} {/if} {/if} </div> Then go to public_html/override/classes/ and create Tools.php We need to alter function getPath In override Tools.php write this: class Tools extends ToolsCore{ public static function getPath($id_category, $path = '', $link_on_the_item = false, $category_type = 'products', Context $context = null) { if (!$context) $context = Context::getContext(); $id_category = (int)$id_category; if ($id_category == 1) return '<span class="navigation_end">'.$path.'</span>'; $pipe = Configuration::get('PS_NAVIGATION_PIPE'); if (empty($pipe)) $pipe = '>'; $full_path = ''; if ($category_type === 'products') { $interval = Category::getInterval($id_category); $id_root_category = $context->shop->getCategory(); $interval_root = Category::getInterval($id_root_category); if ($interval) { $sql = 'SELECT c.id_category, cl.name, cl.link_rewrite, cl.meta_title FROM '._DB_PREFIX_.'category c LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category'.Shop::addSqlRestrictionOnLang('cl').') '.Shop::addSqlAssociation('category', 'c').' WHERE c.nleft <= '.$interval['nleft'].' AND c.nright >= '.$interval['nright'].' AND c.nleft >= '.$interval_root['nleft'].' AND c.nright <= '.$interval_root['nright'].' AND cl.id_lang = '.(int)$context->language->id.' AND c.active = 1 AND c.level_depth > '.(int)$interval_root['level_depth'].' ORDER BY c.level_depth ASC'; $categories = Db::getInstance()->executeS($sql); $n = 1; $n_categories = count($categories); foreach ($categories as $category) { $full_path .='<span itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem" >'. (($n < $n_categories || $link_on_the_item) ? '<a itemprop="url" href="'.Tools::safeOutput($context->link->getCategoryLink((int)$category['id_category'], $category['link_rewrite'])).'" title="'.htmlentities($category['meta_title'], ENT_NOQUOTES, 'UTF-8').'">' : '').'<span itemprop="name" style="display:none;">'.htmlentities($category['meta_title'], ENT_NOQUOTES, 'UTF-8').'</span>'. htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8'). (($n < $n_categories || $link_on_the_item) ? '</a>' : ''). (($n++ != $n_categories || !empty($path)) ? '<span class="navigation-pipe">'.$pipe.'</span>' : '').'</span>'; } return $full_path.$path; } } else if ($category_type === 'CMS') { $category = new CMSCategory($id_category, $context->language->id); if (!Validate::isLoadedObject($category)) die(Tools::displayError()); $category_link = $context->link->getCMSCategoryLink($category); if ($path != $category->name) $full_path .= '<a href="'.Tools::safeOutput($category_link).'">'.htmlentities($category->name, ENT_NOQUOTES, 'UTF-8').'</a><span class="navigation-pipe">'.$pipe.'</span>'.$path; else $full_path = ($link_on_the_item ? '<a href="'.Tools::safeOutput($category_link).'">' : '').htmlentities($path, ENT_NOQUOTES, 'UTF-8').($link_on_the_item ? '</a>' : ''); return Tools::getPath($category->id_parent, $full_path, $link_on_the_item, $category_type); } } } You are all set
  4. Hi, I can implement anything you need for facebook using facebook pixel with events and parameters for that events. You can write me at retegan.georgeATgmailDOTcom Thank you!
  5. Ca you help me to invert the order steps please? Now it is summary-> address-> shipping -> payment and I need it to be summary -> address -> payment -> shipping Please, it will help us a lot for generating different awbs for card payment or cod payment.
  6. This is another solution that works for us (Prestashop 1.6.x): 1 - Go to theme/shopping-cart.tpl and find {if !$opc} <center> <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')|escape:'html':'UTF-8'}{else}{$link->getPageLink('order', true, NULL, 'step=1')|escape:'html':'UTF-8'}{/if}" class="button-exclusive btn btn-default btn-warning" title="{l s='Proceed to checkout'}" > <span>{l s='Proceed to checkout'}<i class="icon-chevron-right right"></i></span> </a></center> {/if} change it to: {if !$opc} {if $conditions} <p class="carrier_title">{l s='Terms of service'}</p> <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv1" value="1" /> <label for="cgv1">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions|escape:'html':'UTF-8'}" class="iframe" rel="nofollow">{l s='(Read the Terms of Service)'}</a> </p> {/if} <center> <a href="{if $back}{$link->getPageLink('order', true, NULL, 'step=1&back={$back}')|escape:'html':'UTF-8'}{else}{$link->getPageLink('order', true, NULL, 'step=1')|escape:'html':'UTF-8'}{/if}" class="button-exclusive btn btn-default btn-warning" id="butonProceed" title="{l s='Proceed to checkout'}" > <span>{l s='Proceed to checkout'}<i class="icon-chevron-right right"></i></span> </a></center> {/if} so now you will ask for TermsAndConditions on the step1. For that condition to work, go to global.js and add this: $('#butonProceed').on('click',function(e) { if( $('#cgv1').prop('checked') == false ){ alert("You must agree to the terms of service before continuing"); e.stopPropagation(); e.preventDefault(); return false;} }); Good. Now go to theme/order-address.tpl and find the proceed to checkout button: <button type="submit" name="processAddress" class="btn btn-warning btn-default"> <span>{l s='Proceed to checkout'}<i class="icon-chevron-right right"></i></span> </button> And change it to this: <button type="submit" name="processAddress" id="clickSingur" class="btn btn-warning btn-default"> <span>{l s='Proceed to checkout'}<i class="icon-chevron-right right"></i></span> </button> And at the end of the code, add this: <script>{literal} window.setInterval(clickSingur(), 1); function clickSingur(){ $('#clickSingur').click(); } {/literal}</script> Good. Now the address step will be skipped. Go to theme/order-carrier.tpl and find this {if $conditions AND $cms_id} <p class="carrier_title">{l s='Terms of service'}</p> <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv" value="1" {if ...} /> <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions|escape:'html':'UTF-8'}" class="iframe" rel="nofollow">{l s='(Read the Terms of Service)'}</a> </p> {/if} and change it to this: {if $conditions AND $cms_id} <p class="carrier_title">{l s='Terms of service'}</p> <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv" value="1" checked /> <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions|escape:'html':'UTF-8'}" class="iframe" rel="nofollow">{l s='(Read the Terms of Service)'}</a> </p> {/if} now find this: <button type="submit" name="processCarrier" class="btn btn-warning" > {l s='Proceed to checkout'} <i class="icon-chevron-right right"></i> </button> and change it to this: <button type="submit" id = "apasaSingur" name="processCarrier" class="btn btn-warning" > {l s='Proceed to checkout'} <i class="icon-chevron-right right"></i> </button> and at the end of the code add this: <script>{literal} window.setInterval(clickSingur(), 1); function clickSingur(){ $('#apasaSingur').click(); } {/literal}</script> Now the carrier step will be completed automaticly. Now go to theme/modules/cashondelivery/views/templates/front/validation.tpl and find: <button type="submit" class="btn btn-warning button " > <span>{l s='I confirm my order' mod='cashondelivery'} </span> </button> and change it to this: <button id="confirmaAutomat" type="submit" class="btn btn-warning button "> <span>{l s='I confirm my order' mod='cashondelivery'} </span> </button> And now at the end of the code add this: <script>{literal} window.setInterval(clickSingur(), 1); function clickSingur(){ $('#confirmaAutomat').click(); } {/literal}</script> And now the order will be confirmed automaticly. You can do that on any payment method validation tpl as well. Tested and working perfect;)
  7. Found a solution on other topic. In controllers/admin/ find the file AdminOrdersController.php On line 956 (depending on version - else search for 'credit_slip') remove this piece of code: @Mail::Send( (int)$order->id_lang, 'credit_slip', Mail::l('New credit slip regarding your order', (int)$order->id_lang), $params, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop ); And also check /override/controllers/admin for AdminOrdersController.php
  8. I have solved 1 of the problems, The .pdf attachment to the Refund status change is in /public_html/classes/order/OrderHistory.php this code if (Validate::isLoadedObject($order)) { // Join PDF invoice if order status is "payment accepted" if ((int)$result['id_order_state'] === 2 && (int)Configuration::get('PS_INVOICE') && $order->invoice_number) { $context = Context::getContext(); $pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $context->smarty); $file_attachement['content'] = $pdf->render(false); $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; $file_attachement['mime'] = 'application/pdf'; } else $file_attachement = null; 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); } and I added this code with status_id==7 becouse in my prestashop the Refund status has the ID==7, rest of the code is general and it works : if (Validate::isLoadedObject($order)) { // Join PDF invoice if order status is "payment accepted" if ((int)$result['id_order_state'] === 2 && (int)Configuration::get('PS_INVOICE') && $order->invoice_number) { $context = Context::getContext(); $pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $context->smarty); $file_attachement['content'] = $pdf->render(false); $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; $file_attachement['mime'] = 'application/pdf'; } // test refund elseif((int)$result['id_order_state'] === 7 && (int)Configuration::get('PS_INVOICE') && $order->invoice_number) { $context = Context::getContext(); $pdf = new PDF($order->getOrderSlipsCollection(), PDF::TEMPLATE_ORDER_SLIP, $context->smarty); $file_attachement['content'] = $pdf->render(false); $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; $file_attachement['mime'] = 'application/pdf'; } else $file_attachement = null; 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); } Now I just need to make the order_slip generator stop sending email.. Any ideas?
  9. Hi, We have this system for invoicing the customers: First an order is on preparation Then is on shipped Then is on payment_accepted when the customer pays the courier (and this status allow us to attach the invoice.pdf to the payment e-mail template) Now we need the Refund status to attach the order-slip.pdf to the refund email. We also need to stop the mail that is sent when we create an order-slip (credit slip). Please, some help...
  10. For us it doesn't When I press for the first time it doesn't. It just add a # after the link. When I press the next button again, then it adds the /page-2
  11. Can you help me with a quick fix please ? When I am on a category or subcategory (anywhere where block layered is present), the next button for pagination won't work in the first time. The link is http://bigiotto.ro/ro/incaltaminte-femei-piele-naturala-12 After I press next, then the link become http://bigiotto.ro/ro/incaltaminte-femei-piele-naturala-12#/ And then it works. I tried some fixes. I replaced the blocklayered.js from theme/js with the one from public/modules/blocklayered . Works the pagination but then attributes selection is destroyed. I tried to take only the pagination code from public/blocklayered module js and put it into theme/js/blocklayered but then it gives me 404 on pressing NEXT button. Didn't find anything else on the net. If you have fix this bug, please tell me how. Thank you !
  12. Hi, How can I add a custom cms page to Customer Service block in footer ? Thank you !
  13. Hi, Simple hack for 1.6.0.9 Go to Location -> translations -> translate email template core translations ! and select language. Then, go to shipping template, you'll find edit html where you have source code : copy all that code and paste it to payment email template ! Then, go to Orders->status->payment and check mark as shipped, mark as paid etc. And now when you have a new order, just change the status to payment accepted and they will recive the shipped email template and the pdf invoice. Do not forget to edit the loiality module if installed ! Change the loiality points validate to payment status instead of shipped.
  14. Hi, Had the same problem, didn't found an answer on the net and I modified the core. So go to the controllers/admin/AdminOrdersController.php and around line 109 you should find and just add this line (note, replace 'phone_mobile' with 'phone' if needed) And here is the result Hope it helps This fix is for prestashop 1.6.0.9
×
×
  • Create New...