Jump to content

Matti

Members
  • Posts

    18
  • Joined

  • Last visited

Profile Information

  • Location
    UK
  • Activity
    User/Merchant

Recent Profile Visitors

4,787,065 profile views

Matti's Achievements

Newbie

Newbie (1/14)

7

Reputation

  1. Prestashop cron tasks manager module seems to be buggy. I use the original crontab module by Samdha. http://www.prestatoolbox.com/free-modules/115-crontab.html
  2. Prestashop cron tasks manager module seems to be buggy. I use the original crontab module by Samdha. http://www.prestatoolbox.com/free-modules/115-crontab.html
  3. there is a minor bug in modrefchange.php. "else" is missing in line 852. This doesn't allow to handle strftime time variables in orderid settings.
  4. No, not thanks anyway. Change this one (lines 65-83): <div class="button-command"> {if (count($invoices_collection))} <a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank"> <img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'} </a> {else} <img src="../img/admin/charged_ko.gif" alt="{l s='No invoice'}" /> {l s='No invoice'} {/if} | {if (($currentState && $currentState->delivery) || $order->delivery_number)} <a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank"> <img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'} </a> {else} <img src="../img/admin/delivery_ko.gif" alt="{l s='No delivery slip'}" /> {l s='No delivery slip'} {/if} | <a class="button" href="javascript:window.print()"><img src="../img/admin/printer.gif" alt="{l s='Print order'}" title="{l s='Print order'}" /> {l s='Print order'}</a> </div> to: {if ((int)Context::getContext()->employee->id_profile) == 3} {else} <div class="button-command"> {if (count($invoices_collection))} <a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank"> <img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'} </a> {else} <img src="../img/admin/charged_ko.gif" alt="{l s='No invoice'}" /> {l s='No invoice'} {/if} | {if (($currentState && $currentState->delivery) || $order->delivery_number)} <a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank"> <img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'} </a> {else} <img src="../img/admin/delivery_ko.gif" alt="{l s='No delivery slip'}" /> {l s='No delivery slip'} {/if} | <a class="button" href="javascript:window.print()"><img src="../img/admin/printer.gif" alt="{l s='Print order'}" title="{l s='Print order'}" /> {l s='Print order'}</a> </div> {/if}
  5. You can easily hide it for specific profile using the code. Like so: {if ((int)Context::getContext()->employee->id_profile) == 3} {else} WHATEVER YOU WANT TO HIDE FOR PROFILE 3 (just locate the code string) {/if} Give it ago, and let me know if it worked for you.
  6. This is what worked for me. 1. Create a profile with desired permissions for Orders page. Lets say this profile ID is 3. 2. Create an employee belonging to this profile. 3. Edit this file /public_html/tds747/themes/default/template/controllers/orders/helpers/view/view.tpl by using this code {if ((int)Context::getContext()->employee->id_profile) == 3} {else} {/if} Lets say you don't want the employee to see the sectioned called Customer information in BO Orders page. In Line 165 change from {if $customer->id} <!-- Customer informations --> <br /> <fieldset> <legend><img src="../img/admin/tab-customers.gif" /> {l s='Customer information'}</legend> <span style="font-weight: bold; font-size: 14px;"><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a></span> ({l s='#'}{$customer->id})<br /> (<a href="mailto:{$customer->email}">{$customer->email}</a>)<br /><br /> {if ($customer->isGuest())} {l s='This order has been placed by a guest.'} {if (!Customer::customerExists($customer->email))} <form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}"> <input type="hidden" name="id_lang" value="{$order->id_lang}" /> <p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform guest into customer'}" /></p> {l s='This feature will generate a random password and send an e-mail to the customer'} </form> {else} <div><b style="color:red;">{l s='A registered customer account already exists with this e-mail address'}</b></div> {/if} {else} {l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br /> {l s='Valid orders placed:'} <b>{$customerStats['nb_orders']}</b><br /> {l s='Total spent since registration:'} <b>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b><br /> </fieldset> {/if} {/if} to {if ((int)Context::getContext()->employee->id_profile) == 3} {else} {if $customer->id} <!-- Customer informations --> <br /> <fieldset> <legend><img src="../img/admin/tab-customers.gif" /> {l s='Customer information'}</legend> <span style="font-weight: bold; font-size: 14px;"><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a></span> ({l s='#'}{$customer->id})<br /> (<a href="mailto:{$customer->email}">{$customer->email}</a>)<br /><br /> {if ($customer->isGuest())} {l s='This order has been placed by a guest.'} {if (!Customer::customerExists($customer->email))} <form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}"> <input type="hidden" name="id_lang" value="{$order->id_lang}" /> <p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform guest into customer'}" /></p> {l s='This feature will generate a random password and send an e-mail to the customer'} </form> {else} <div><b style="color:red;">{l s='A registered customer account already exists with this e-mail address'}</b></div> {/if} {else} {l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br /> {l s='Valid orders placed:'} <b>{$customerStats['nb_orders']}</b><br /> {l s='Total spent since registration:'} <b>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b><br /> </fieldset> {/if} {/if} {/if} Voila! Employees belonging to profile ID 3 do not see this section anymore.
  7. I believe you belive wrong. Your previous fix does not work on newer versions, however, the one I posetd does. Tried and true. Have you tried it?
  8. make sure that reply_msg.html and reply_msg.txt do exist there or if permissions are ok to access it.
  9. The crude way of fixing relay issues is to edit ContactController.php. Find this string $contact->email, $contact->name, $from and replace it with: $contact->email, $contact->name, '[email protected]'
  10. The crude way of fixing relay issues is to edit ContactController.php. Find this string $contact->email, $contact->name, $from and replace it with: $contact->email, $contact->name, '[email protected]'
  11. yes, that reason was to avoid duplicates as they use random letter password generator for their new order reference. Most of the users just want the old 6 digit sequential order reference back.
  12. We do need 000 in front but not so many. Just like in previous versions 6 total digits would be enough. Say order number 16, Order reference 000016.
  13. Great module. However, It would be nice to see an option to set a total order reference digit length. 9 is a bit an overkill for me.
  14. This is not to be used on its own, but with the new order.php override. Guest tracking and back office works fine to me (it will only work for new orders of course). Don't knock it till you try it. Well you don't have to now, but others may still need the fix. @Badolina make sure you create the file Order.php in /override/classes/order/ and paste the override code there. Do not change anything in /classes/order/Order.php and it will work fine. Alternatively, you can paste this one to /override/classes/order/Order.php and this one to /classes/order/ Order.php I use 1.5.3.1 as well. Make sure to test only with the new orders as only new orders after code has been overriden will have sequencial 6 digit order reference in database.
  15. Ok, here is the solution. I improved Stanislavs override. Back office is working now. Place this code in /override/classes/order/Order.php: <?php class Order extends OrderCore { public function getUniqReference() { $query = new DbQuery(); $query->select('MIN(id_order) as min, MAX(id_order) as max'); $query->from('orders'); $query->where('id_cart = '.(int)$this->id_cart); $query->orderBy('id_order'); $order = Db::getInstance()->getRow($query); /*if ($order['min'] == $order['max']) return $this->reference; else return $this->reference.'#'.($this->id + 1 - $order['min']);*/ return sprintf('%06d', $this->id); } public static function getUniqReferenceOf($id_order) { $order = new Order($id_order); return $order->getUniqReference(); } public static function generateReference() { $order_results = Db::getInstance()->getValue('SELECT MAX(id_order) FROM '._DB_PREFIX_.'orders WHERE id_order'); $id_setreturn = ($order_results + 1); $formated = sprintf("%06d", $id_setreturn); return $formated; } } To make guest tracking compatible change line 103 in /themes/default/guest-tracking.tpl from: <i>{l s='For example: QIIXJXNUI or QIIXJXNUI#1'}</i> to: <i>{l s='For example: 000123'}</i>
×
×
  • Create New...