magento

Magento customized "Shop by" Navigation

<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/local.xml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/layer_view.css";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/my.view.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/filter.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/filter.select.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/state.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/state.select.phtml";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

OPTIONAL: state.phtml with filter
ToDo: HowTo get avaiable options in a category for a filter?
<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customized-shop-by/state.phtml.with.filter.dev";
echo "$URL";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

other files
./app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php
./app/design/frontend/default/default/layout/catalogsearch.xml

Links
http://classyllama.com/development/magento-development/the-better-way-to-modify-magento-layout/
http://docs.magentocommerce.com/Mage_Catalog/Mage_Catalog_Block_Layer_Filter_Attribute.html
http://www.mageintern.de/magento-shop-design/magento-navigation/filternavigation-layered-nav-mit-drop-down-auswahl.html
http://www.magentocommerce.com/boards/viewthread/28220/

Magento product back button

<?php
$URL="http://www.panticz.de/sites/default/files/magento/back-button/styles.css";
echo $URL;
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";

$URL="http://www.panticz.de/sites/default/files/magento/back-button/back-button.view.phtml";
echo $URL;
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

mkdir -p ./app/design/frontend/default/default/template/catalogsearch/
cp ./app/design/frontend/base/default/template/catalogsearch/result.phtml ./app/design/frontend/default/default/template/catalogsearch/result.phtml
<?php
$URL="http://www.panticz.de/sites/default/files/magento/back-button/result.phtml.diff";
echo $URL;
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

mkdir -p ./app/design/frontend/default/default/template/page/
cp ./app/design/frontend/base/default/template/page/1column.phtml ./app/design/frontend/default/default/template/page/
<?php
$URL="http://www.panticz.de/sites/default/files/magento/back-button/1column.phtml.diff";
echo $URL;
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

Links
http://www.mxperts.de/zuruck-button-fur-die-produktansicht/

Increase session timeout to one day (API and SESSION)

Session SQL
INSERT INTO core_config_data(path, value)
VALUES ('web/cookie/cookie_lifetime', 86400)
ON DUPLICATE KEY UPDATE value = 86400;

or manual:
System -> Configuration
General > Web
Session Cookie management
Cookie Lifetime: 86400

API SQL
INSERT INTO core_config_data(path, value)
VALUES ('api/config/session_timeout', 86400)
ON DUPLICATE KEY UPDATE value = 86400;

or manual:
System -> Configuration
General > Services
Magento Core Api
General Settings
Client Session timeout (sec.): 86400

NoRegion

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

Disable telephone as required in customer/address
<?php
$URL="http://" . $_SERVER['SERVER_NAME'] . "/sites/default/files/magento/customer_address/edit.phtml.diff";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

Links
http://www.magentocommerce.com/boards/viewthread/9081/P45/

Change Magento Default Theme

# Modern
cd /var/www
/var/www/pear mage-setup /var/www
/var/www/pear install magento-core/Interface_Frontend_Default_Modern

System > Configuration > Design > Themes
Default: modern

# Blank
cd /var/www
/var/www/pear mage-setup /var/www
/var/www/pear install magento-core/Interface_Frontend_Default_Modern

System > Configuration
General > Design > Themes
Default: blank

# Links
http://www.magentocommerce.com/design_guide/articles/working-with-magento-themes#head-say-hello-to-multiple

Magento configuration

Error loging
set_core_config_data "dev/log/active" "0"
/var/www/var/log/exception.log
/var/www/var/log/system.log

Disable review
System > Configuration > Advanced
Mage_Review: Disabled

Disable wishlist
vi /var/www/magento/app/design/frontend/default/modern/template/catalog/product/list.phtml
helper('wishlist')->isAllow()) : ?>

Disable compare
vi /var/www/magento/app/design/frontend/default/modern/template/catalog/product/list.phtml

Create Magento SOAP account

command line

wget http://www.panticz.de/sites/default/files/soap.txt -O /tmp/soap.sql
mysql -u magento -pmagento magento < /tmp/soap.sql

Create soap role
System > Web Services > Roles
[Add New Role]
Role name: API Full Access

Roles Resources
Resource Access: All

[Save Role]

Create soap user
System > Web Services > Users
[Add New User]
User Name: soap
First Name: soap
Last Name: soap
Email: soap@soap.com
Api Key: test123
Api Key Confirmation: test123
This account is: Active

User Role

Install Magento

Installation
<?php
$URL="https://raw.githubusercontent.com/panticz/magento/master/scripts/install_magento.sh";
echo "wget $URL -O - | bash -";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

LINKS
https://linoxide.com/tools/install-magento-ubuntu/
http://YOUR_SERVER_IP/magento/index.php/ - store frontend
http://YOUR_SERVER_IP/magento/index.php/admin/dashboard/ - admin menu
http://YOUR_SERVER_IP/magento/downloader/index.php - connect manager
http://www.magentocommerce.com/wiki/groups/227/installing_magento_via_shell_ssh
http://www.magentocommerce.com/wiki/general/installing-magento-on-slicehost-with-ubuntu
http://www.magentocommerce.com/wiki/groups/227/command_line_installation_wizard
http://svn.magentocommerce.com/source/branches/1.1-trunk/install.php
http://blog.magentomagik.com/how-to-install-magento-extensions-magento-extension-installation-guide/ - How to install magento extensions

Language

Install languages
cd /var/www

# German: http://www.magentocommerce.com/extension/413/
./pear install magento-community/Locale_Mage_community_de_DE

# French: http://www.magentocommerce.com/extension/414/
./pear install magento-community/Locale_Mage_community_fr_FR

# Russian: http://www.magentocommerce.com/extension/391/
./pear install magento-community/Locale_Mage_community_ru_RU

Configure language (Store View)
Admin Panel > System > Manage Stores

[ Create Store view ]
Store: Main Website Store
Name: German
Code: de
[ Save Store view ]