19 March 2011

Altering Year Buttons For Financial Year Dates (Australian Stores) v1.0

Instead of the year being from 01-01 to 31-12 this will alter it to 01-07 to 30-06 (Australian financial year).
#
#----------[ OPEN ]----------
#
admin/tabs/AdminStatsTab.php

#
#----------[ FIND ]----------
#
            $from = date('Y-01-01');
            $to = date('Y-12-31');
        }
        if (Tools::isSubmit('submitDateYearPrev'))
        {
            $from = (date('Y') - 1).date('-01-01');
            $to = (date('Y') - 1).date('-12-31');

#
#----------[ REPLACE WITH ]----------
#
            $from = date('Y-07-01');
            $to = (date('Y') + 1).date('-06-30');
        }
        if (Tools::isSubmit('submitDateYearPrev'))
        {
            $from = (date('Y') - 1).date('-07-01');
            $to = date('Y-06-30');
#
#----------[ OPEN ]----------
#
classes/ModuleGraph.php

#
#----------[ FIND ]----------
#
                $employee->stats_date_from = date('Y').'-01-01';
            if (empty($employee->stats_date_to)  OR $employee->stats_date_to == '0000-00-00')
                $employee->stats_date_to = date('Y').'-12-31';

#
#----------[ REPLACE WITH ]----------
#
           $employee->stats_date_from = date('Y').'-07-01';
            if (empty($employee->stats_date_to)  OR $employee->stats_date_to == '0000-00-00')
                $employee->stats_date_to = (date('Y') + 1).'-06-30';

Next / Previous Links for Carts Tab v1.0

Adds Next / Previous images to the cart page to allow easy navigation between carts.
#
#----------[ OPEN ]----------
#
admin/tabs/AdminCarts.php

#
#----------[ FIND ]----------
#
// display cart header
  echo '<h2>'.(($customer->id) ? $customer->firstname.' '.$customer->lastname : $this->l('Guest')).' - '.$this->l('Cart #').sprintf('%06d', $cart->id).' '.$this->l('from').' '.$cart->date_upd.'</h2>';

#
#----------[ REPLACE WITH ]----------
#
if ($prevCart = Db::getInstance()->getValue('SELECT `id_cart` FROM `'._DB_PREFIX_.'cart` WHERE `id_cart` < '.(int)$cart->id.' ORDER BY `id_cart` DESC'))
   $prevCart = '<a href="'.$currentIndex.'&id_cart='.$prevCart.'&viewcart&token='.Tools::getValue('token').'"><img style="width: 24px; height: 24px" src="../img/admin/arrow-left.png" /></a>';
  if ($nextCart = Db::getInstance()->getValue('SELECT `id_cart` FROM `'._DB_PREFIX_.'cart` WHERE `id_cart` > '.(int)$cart->id.' ORDER BY `id_cart` ASC'))
   $nextCart = '<a href="'.$currentIndex.'&id_cart='.$nextCart.'&viewcart&token='.Tools::getValue('token').'"><img style="width: 24px; height: 24px" src="../img/admin/arrow-right.png" /></a>';

  // display cart header
  echo '<h2>'.$prevCart.' '.(($customer->id) ? $customer->firstname.' '.$customer->lastname : $this->l('Guest')).' - '.$this->l('Cart #').sprintf('%06d', $cart->id).' '.$this->l('from').' '.$cart->date_upd.' '.$nextCart.'</h2>';

17 March 2011

Enhanced Stats On BO Index v2.2

Adds number of carts and visitors on the BO index page and makes all links clickable.
FREE Download
CHANGELOG:
v2.2 (2011-03-17)
[*] Fixed language strings in install files.
v2.1 (2011-03-10)
[*] Updated for new 1.4 AdminHome file.
v2.0 (2011-01-30)
[*] Updated for PrestaShop 1.4 code.
v1.1 (2010-07-20)
[+] Include clickable links, adjusted width.
v1.0 (2009-10-22)
[+] First release to the PrestaShop community.

Tracking Number In Transit E-mail v1.0

Adds the courier tracking number to the "In Transit" e-mail sent to the customer.
#
#----------[ OPEN ]----------
#
admin/tabs/AdminOrders.pp

#
#----------[ FIND ]----------
#
'{followup}' => str_replace('@', $order->shipping_number, $carrier->url),

#
#----------[ AFTER, ADD ]----------
#
'{shippingnumber}' => $order->shipping_number,
#
#----------[ OPEN ]----------
#
mails/(your language)/in_transit.html
mails/(your language)/in_transit.txt

#
#----------[ ADD, WHERE YOU WANT ]----------
#
{shippingnumber}

10 March 2011

Admin Customer Ranks Tab v1.1

Adds a BO tab showing the best ranked customers, how much they have spent and how many orders they have made.
FREE Download
CHANGELOG:
v1.1 (2011-03-10)
[+] Added customer last login in days "xx days ago".
[*] Fixed customer name on Delete popup.
v1.0 (2011-02-05)
[+] First release to the PrestaShop community.