configuration

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Magento: add proceed to checkout button to message

--- ./app/code/core/Mage/Checkout/controllers/CartController.php.org	2011-02-01 15:31:03.000000000 +0100
+++ ./app/code/core/Mage/Checkout/controllers/CartController.php	2011-02-01 16:32:48.000000000 +0100
@@ -185,6 +185,13 @@
                 array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse())
             );
             $message = $this->__('%s was successfully added to your shopping cart.', Mage::helper('core')->htmlEscape($product->getName()));
+            $message .= '
'; + $message .= ' getCheckoutUrl() . '\'" class="button" type="button">'; + $message .= ' '; + $message .= ' ' . $this->__('Proceed to Checkout') . ''; + $message .= ' '; + $message .= ' '; + $message .= '
'; if (!$this->_getSession()->getNoCartRedirect(true)) { $this->_getSession()->addSuccess($message); $this->_goBack(); 1

Optional: fix CSS
add to ./skin/frontend/default/default/css/styles.css
.proceed-to-checkout {
padding-top:8px;
}

Magento: formal customer name

http://www.panticz.de/sites/default/files/magento/formal/Customer.php.formal.diff

--- ./app/code/core/Mage/Customer/Model/Customer.php.org	2011-01-19 16:39:12.000000000 +0100
+++ ./app/code/core/Mage/Customer/Model/Customer.php	2011-01-28 17:14:57.000000000 +0100
@@ -193,6 +193,26 @@
         return $name;
     }
 
+    public function getNameFormal()
+    {
+        $name = '';
+        if ($this->getPrefix()) {
+            if ($this->getPrefix() == 'Herr') {
+                $name .= 'Sehr geehrter ';
+            } else if ($this->getPrefix() == 'Frau') {
+                $name .= 'Sehr geehrte ';
+            }
+            $name .= $this->getPrefix();
+            if ($this->getSuffix()) {
+                $name .= ' ' . $this->getSuffix();
+            }
+        } else {
+            $name .= $this->getFirstname();
+        }
+        $name .=  ' ' . $this->getLastname();
+        return $name;
+    }
+
     /**
      * Add address to address collection
      *
1

http://www.panticz.de/sites/default/files/magento/formal/Hello.php.formal.diff

--- ./app/code/core/Mage/Customer/Block/Account/Dashboard/Hello.php.org	2011-01-25 16:49:53.000000000 +0100
+++ ./app/code/core/Mage/Customer/Block/Account/Dashboard/Hello.php	2011-01-25 16:50:40.000000000 +0100
@@ -33,4 +33,9 @@
         return Mage::getSingleton('customer/session')->getCustomer()->getName();
     }
 
+    public function getCustomerNameFormal()
+    {
+        return Mage::getSingleton('customer/session')->getCustomer()->getNameFormal();
+    }
+
 }
1

http://www.panticz.de/sites/default/files/magento/formal/Order.php.diff

--- ./app/code/core/Mage/Sales/Model/Order.php.org	2011-01-25 17:59:53.000000000 +0100
+++ ./app/code/core/Mage/Sales/Model/Order.php	2011-01-28 17:00:52.000000000 +0100
@@ -1511,6 +1511,26 @@
         return $customerName;
     }
 
+    public function getCustomerNameFormal()
+    {
+        $name = '';
+        if ($this->getCustomerPrefix()) {
+            if ($this->getCustomerPrefix() == 'Herr') {
+                $name .= 'Sehr geehrter ';
+            } else if ($this->getCustomerPrefix() == 'Frau') {
+                $name .= 'Sehr geehrte ';
+            }
+            $name .= $this->getCustomerPrefix();
+            if ($this->getCustomerSuffix()) {
+                $name .= ' ' . $this->getCustomerSuffix();
+            }
+        } else {
+            $name .= $this->getCustomerFirstname();
+        }
+        $name .=  ' ' . $this->getCustomerLastname();
+        return $name;
+    }
+
     /**
      * Add New object to related array
      *
1

http://www.panticz.de/sites/default/files/magento/formal/hello.phtml.formal.diff

--- ./app/design/frontend/base/default/template/customer/account/dashboard/hello.phtml.org	2011-01-25 16:44:10.000000000 +0100
+++ ./app/design/frontend/base/default/template/customer/account/dashboard/hello.phtml	2011-01-25 16:56:55.000000000 +0100
@@ -25,6 +25,6 @@
  */
 ?>
 
- <?php echo $this->__('Hello, %s!', $this->htmlEscape($this->getCustomerName())) ?> + <?php echo $this->htmlEscape($this->getCustomerNameFormal()) . "," ?> <?php echo $this->__('From your My Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. Select a link below to view or edit information.') ?>
1

http://www.panticz.de/sites/default/files/magento/formal/order_new.html




Hallo {{htmlescape var=$order.getCustomerName()}},vielen Dank für Ihre Bestellung bei {{block type="imprint/field" value="shop_name"}}. Sie können den aktuellen Status Ihrer Bestellung jederzeit in Ihrem Kundenbereich einsehen. Sollten Sie Fragen zu Ihrem Kundenkonto oder Ihrer Bestellung haben, senden Sie uns eine E-Mail an {{block type="imprint/field" value="email"}}. Diese Bestellung wird von uns noch bestätigt, da Münzen zwischenzeitlich vergriffen sein können. Eine Rechnung der lieferbaren Münzen mit Bankdaten senden wir Ihnen separat zu. Ihre Bestellung Nr. {{var order.increment_id}} ({{var order.getCreatedAtFormated(''long'')}}) Rechnungsadresse: Zahlungsmethode: {{var order.getBillingAddress().format(''html'')}}   {{var payment_html}} {{depend order.getIsNotVirtual()}} Versandadresse: Versandart: {{var order.getShippingAddress().format(''html'')}}   {{var order.getShippingDescription()}} {{/depend}} {{layout handle="sales_email_order_items" order=$order}} {{var order.getEmailCustomerNote()}} {{block type="imprint/content" template="symmetrics/imprint/email/footer.phtml"}}   {{block type="cms/block" block_id="mrg_revocation"}}   {{block type="cms/block" block_id="mrg_business_terms"}}
1

ToDo
file: formal.sql.txt ?
fix other "Hallo"s / "Hello"s
cd ./app
grep "getCustomerName()" * -R | grep Hallo

Links
http://www.magentocommerce.com/boards/v../viewthread/37850/P0/

Google Analytics

# Google Analytics
http://drupal.org/project/google_analytics

download
http://ftp.drupal.org/files/projects/google_analytics-6.x-2.2.tar.gz
extract
copy to /sites/all/modules/

# enable module
Administer > Site building > Modules
/admin/build/modules
check: Google Analytics

# add tracking for anonymous user only
Administer > Site configuration > Google Analytics
/admin/settings/googleanalytics

General settings
Google Analytics account number: add UA-XXX nubmer

Role specific tracking settings > Add tracking for specific roles
check: anonymous user

URL rewrite (Clean URLs)

# enable path module (Allows users to rename URLs)
Administer > Site building > Modules
/admin/build/modules
check "Path"

# This option makes Drupal emit "clean" URLs (i.e. without ?q= in the URL).
Home > Administer > Site configuration > Clean URLs
admin/settings/clean-urls
Clean URLs: Enabled

NoRegion

http://www.magentocommerce.com/extension/1826/mxperts--noregion
/var/www/pear install magento-community/Mxperts_NoRegion

Disable telephone as required in customer/address

--- app/design/frontend/default/default/template/noregion/customer/address/edit.phtml.org	2011-03-16 12:07:11.000000000 +0100
+++ app/design/frontend/default/default/template/noregion/customer/address/edit.phtml	2011-03-16 12:06:40.000000000 +0100
@@ -210,9 +210,9 @@
             
             
  • - *<?php echo $this->__('Telephone') ?> + <?php echo $this->__('Telephone') ?>
    - htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="telephone" /> + htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text" id="telephone" />
    1
  • Links
    http://www.magentocommerce.com/boards/viewthread/9081/P45/

    Enable Cache

    /admin/settings/performance
    Seitencache
    Caching-Modus: Normal
     
    Block-Cache
    Block-Cache: Aktiviert (empfohlen)
    [Save]
    Syndicate content