Tuesday, November 1, 2016

Change Magento Admin Domain (on Local)

Version: Magento 1.x

Problem:
Change the admin domain. e.g. admin.mydomain.com

Solution:

1. Add entry to hosts file e.g. 127.0.0.1 admin.mydomain.com

2. Add entry to httpd-vhosts e.g.

<VirtualHost *:81>
    ServerAdmin admin@admin.com
    DocumentRoot "c:\mywebsite"
    ServerName admin.mydomain.com
    ErrorLog "logs/error.log"
    CustomLog "logs/access.log" common
<directory "c:\mywebsite">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</directory>
</VirtualHost>

3. Update Magento config as follows:

System->Configuration->General->Web->URL Options->Auto-redirect to Base URL = No

System->Configuration->Advanced->Admin->Admin Base URL->Use Custom Admin Path = Yes

System->Configuration->Advanced->Admin->Admin Base URL->Custom Admin Path = http://admin.mydomain.com/
*This is the full URL with “http://”, admin domain, slash at the end “/”.

4. Clear Magento cache.

5. Admin site is accessible here: http://admin.mydomain.com/admin/

Wednesday, October 5, 2016

Add Custom Attribute to Admin Create New Order Form

Magento version 1.14.x

Problem:
Create a custom order attribute and display it on the admin new order form (and view order). Display the attribute in an existing fieldset/box.

Solution:
Create custom extension. However, consider not displaying the attribute in an existing fieldset to avoid template override (display in separate fieldset/box instead) as explained here: http://www.webspeaks.in/2015/12/magento-add-custom-block-in-admin-sales-order-page.html.

Use code below as reference only. Code is incomplete.

Wednesday, August 3, 2016

A/B Test: Email Overlay All Pages

Premise: Email signup overlay displayed across all pages will increase email signups.

Site: LZX
Days Running: 6

Result: 148% email signup conversion rate increase in email signups. No statistical difference in revenue.

Outcome: Display overlay across all pages.

Wednesday, July 20, 2016

A/B Test: Email Signup Overlay Timing

Premise: By default, email signup overlay shows immediately across all site pages. Adding a delay (6, 15, or 30 secs) will result in an increase in email signups. Visitors will be able to browse more of the page (or multiple pages) before being asked to subscribe and be more willing to subscribe.

Site: LZX
Days Running: 36

Result: No statistical difference in email signups. Test abandoned. However, there was a consistent downward email signup trend during testing (15 = ~20%, 30 = ~40%). Site engagement dipped across all tests (11-23%).

Outcome: Set the email signup overlay delay = 6 secs.

Friday, July 15, 2016

Angular2 fromPromise Does Not Exist On Type 'typeof Observable'

Problem:
In VS2015, using Angluar 2, getting the following error: fromPromise Does Not Exist On Type 'typeof Observable'

Solution:
Explicitly import fromPromise operator e.g.

import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/fromPromise';

Thursday, July 14, 2016

Desktop PC Sounds High/Low Beeping and Turns Off During Boot

Problem:
After turning on desktop PC, it makes a high/low beeping sound and then a few seconds later during boot up turns itself off.

Solution:
In this specific case, the warning was an overheat warning. The CPU was overheating and shutting itself down for safety. The CPU heat sink was found to be slightly loose. Removing the CPU heat sink and removing/reapplying thermal grease resolve the issue.

Friday, July 1, 2016

Magento2 Enterprise Composer Install Error: Could not find package magento/project-enterprise-edition with Stability Stable

Problem:
Creating a new Magento Enterprise setup via the command line using composer results in error: Could not find package magento/project-enterprise-edition with Stability Stable

 composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition <installation directory name>  

Solution:
Magento support must enable downloading of M2 EE on your Magento.com account. Generate secure keys on the Connect tab in your Magento.com account (as needed).

Thursday, June 30, 2016

Upgrade To Latest Composer Version (Windows)

Problem:
How to upgrade to the latest composer version on Windows.
e.g. Warning: This development build of composer is over 60 days old. It is recommend
ed to update it by running "C:\ProgramData\ComposerSetup\bin\composer.phar self-
update" to get the latest version.

Solution:
Run the following on the command line (assumed composer is in path):
composer self-update

Upgrade Composer Version (Windows)

Problem:
How to upgrade the composer version on Windows.
e.g. Warning: This development build of composer is over 60 days old. It is recommend
ed to update it by running "C:\ProgramData\ComposerSetup\bin\composer.phar self-
update" to get the latest version.

Solution:
Run the following on the command line (assumed composer is in path):
composer self- update

Thursday, June 9, 2016

A/B Test: Mini Cart vs No Mini Cart

Premise: Removing mini cart will result in increase in site revenue. People must click twice. First click to drop down mini cart. Second click to choose cart/checkout. E-commerce sites are trending away from mini carts in responsive designs.

Site: LZX
Days Running: 25

Result: No statistical difference in revenue. Test abandoned. 

Outcome: Mini cart removed.


A/B Test: Rotating vs. Non-Rotating Home Page Banner

Premise: Non-rotating banner will result in greater engagement and revenue due to rotation distraction.

Site: LZX
Days Running: 13

Result: No statistical difference in either page engagement or revenue. Test abandoned. GA event tracking showed greater number of clicks on banner positions 2 & 3.

Outcome: Home page banner rotation left as-is.

Friday, June 3, 2016

Magento Table Rates Shipping Method Ignores Discounts

Magento 1.x

Problem:
Magento's table rate shipping method uses order total to calculate shipping rate and NOT the discounted order total (e.g. ignores coupon code discounts).

Solution:
Detailed discussion here:
http://www.devproblems.com/table-rates-shipping-based-on-price-after-discount-magento/

Friday, March 25, 2016

Magento Frontend Login Submit Fails and Clears Fields

Magento Enterprise 1.x

Problem:
Logging in to the Magento frontend customer login page (/customer/account/login/) fails. The form submits, but the page simply reloads and clears email/password fields. This is common when copying a site from one domain to another e.g. production domain to development domain.

Solution:
Check config value web/cookie/cookie_domain in core_config_data table. Update to match current domain or set to NULL (as needed).

Thursday, January 14, 2016

Magento Fatal error: Call to a member function getCode() on a non-object in app\code\core\Mage\Customer\Model\Session.php

Magento Enterprise 1.14.x

Problem:Magento fails with error:
Fatal error: Call to a member function getCode() on a non-object in \app\code\core\Mage\Customer\Model\Session.php on line 71

Solution:
Make sure file \app\etc\local.xml exists and is valid.