Magento

Magento and Zend Server checkout redirect to cart [solved]

Magento and Zend Server checkout redirect to cart [solved]

IMG_3623.JPG

I installed Zend Server CE on one of my machines. The next day I noticed that you could not checkout from the website. It would bring you to the to the Billing Address, then after you hit "continue" it would redirect you back to the checkout page. No errors that I could see.

Then I remember a problem I had many moons ago that was very similar and a forum comment jogged my memory. Magento is looking for a Com.php file buried deep in the bowls of Zend Framework.

Did you know that Zend Server includes the latest copy of the Zend Framework? Yes and therein lies the problem, the Zend Framework version of Zend Server was overriding the built in Zend Framework of Magento.

Easy solution

Open up your .htaccess file and add this section in there somewhere. This will reset your include path, Magento will build this for you anyway so it shouldn't cause a problem.

###########################################
## Reset Include path
 
   php_value include_path  "."

Resources:
http://www.magentocommerce.com/boards/viewthread/28231/#t200692

Magento Upload HTTP Error [SOLVED]

Magento Upload HTTP Error [SOLVED]

This was a strange error with Magento. I was in a product, trying to upload an image. The image would upload find, but then error out with "Upload HTTP Error". I changed permissions up and down the /media and /var directories and made them as loose with permissions as I could.

Still no change.

Then I happened upon this comment in the forums.

To anyone that has a HTTP upload error AND has a password protected store directory (for under construction reasons):
remove the directory password protection and you’ll be able to upload your files again! That was what happened to me.

BINGO!

I removed the password protection for the admin (not the Magento password, but Apache basic password protection).

Reference:
http://www.magentocommerce.com/boards/viewreply/154831/

Lessons in Magento Today

Lessons in Magento Today

Printing the SKU in the cart Simple or Configurable

To print the sku in the shopping cart, even for Configurable (it will print the underlying simple product sku).

Place this code somewhere in:
app/design/frontend/default/default/template/checkout/cart/item/default.phtml

if (is_object($this->getChildProduct())): 
            echo $this->getChildProduct()->getSku();
        else: 
            echo $_item->getSku();
        endif; 

This will now print the sku... onto more work.

Reference:
http://www.magentocommerce.com/boards/viewthread/56728/#t214381

Google Optimizer for a Magento CMS Home Page

Google Optimizer for a Magento CMS Home Page

This will guide you on how to set up Google Optimizer in Magento for the Home page. It's a little confusing, but isn't everything when you first encounter it?

Enable Google Website Optimizer in the Magento Configuration

This is located under System > Configuration > Google API > Google Website Optimizer. Change "Enable" to Yes, then click "Save Config"
Screen shot 2010-04-09 at 9.39.15 AM.png

Create Variant of your Home Page

In Magento go to:
CMS > Manage Pages

Select Your Home Page

Copy the content.

Go Back to the list of CMS pages, and now you'll want to create a new page. Give it the same title, a different SEF URL ID (e.g. home2), change status to Enabled, then paste in your original's code.

Change the home page variant any way that you like, this is the variant that Magento and Google will alternate between.

The Catch22

While you're in the Variant Home Page click on the "Page View Optimization" tab. For the conversion page select 'One Page Checkout'. This will give you the 'Conversion Page URL' that you'll need to copy and paste into the Google Website Optimizer during setup.

Sign up for Google Website Optimizer

Go to the URL:
https://www.google.com/analytics/siteopt/splash?hl=en

Sign in with your Google Account.

Get started with an experiment. Name the experiment, place your two different home page URLs to test, paste in the 'Conversion Page URL'
Screen shot 2010-04-09 at 9.51.23 AM.png

Click Continue. You want to select 'Your webmaster will install and validate JavaScript tags.' and copy the URL it gives you.
Screen shot 2010-04-09 at 9.59.22 AM.png

Back in Magento

Now back in Magento, for the Variant page you want to be on the Page View Optimization tab and paste in the Scrips Install URL. Select the Page Type to be Variant Page. Then click 'Install Scripts'. Some javascript will fill in below. Save this page.

Now go to the Original CMS Home Page.
Paste the Scripts Install URL, select Original Page for type and then click 'Install Scripts'

Flip Back to Google Website Optimizer

Now in Google Website Optimizer click 'Check Status'. It should work and now can click 'Continue' and then enable that test.

Test the pages to make sure they look like, if you're like me I forgot to set the Layout for the variation page and it really looked bad. From here you can enable the test.

Hey, you're done. Now go do something useful for a change :)

Resources:
http://www.google.com/support/forum/p/websiteoptimizer/thread?tid=50461d...

Magento broken USPS shipping rates after January 4, 2010

Magento broken USPS shipping rates after January 4, 2010

Our great USPS decided to make some slight name changes to their delivery methods.

Magento and Memcache with some weird bugs

Magento and Memcache with some weird bugs

When I launched some larger sites on Magento in August 2009 I was sold on the slight performance increase that memcache provided the cart. However, I ran into a few bugs and other anomalies that have caused me to abandon the use of memcache with Magento.

Getting the Secure (HTTPS) url for Magento

Getting the Secure (HTTPS) url for Magento

Say you want to redirect a customer to a URL. In Magento you'd invoke this little bit of code to produce the URL.

Mage::getUrl('<em>/</em>/post') 

This will produce a url like http://www.example.com/<module>/<controller>/post. The '*' just inserts the current module and controller.

Now you want to redirect to the secure version. Easy. Just simply say so

Mage::getUrl('<em>/</em>/post', array('_secure'=>true)) 

Now that was simple.

Magento and setroubleshoot causing certain pages to die.

Magento and setroubleshoot causing certain pages to die.

Some pages in Magento were giving just a white page, with no indication of errors in Zend Server console or log files. This was apparently a memory issue, so I restarted the web server and all was fine.

One issue I noticed was the server "setroubleshoot" was taking 12% of the systems memory. This program just logs issues with SELinux and it seems SELinux doesn't like my Magento install. I have SELinux just set to 'warn', but I may want to disable it all together. I stopped the 'setroubleshoot' program and turned it off with chkconfig.

Magento Search Results

Magento Search Results

Search seems so simple on the surface, but inside it's a very complex thing (just ask Microsoft why they still haven't beaten Google at this game). Magento offeres some search options for products, but it's search is not 'awesome', but just OK.

Here are some options I've found that return a small set of products that are most accurate.

System > Config > Catalog > Catalog Search
1. Search Type = Combine (Like and Fulltext)
- This will catch plurals pretty good as well as slight spelling variants

2. Disable quicksearch for 'Descriptions'

After a Magento upgrade, refreshing the Magento cache gives a blank white error screen.

After a Magento upgrade, refreshing the Magento cache gives a blank white error screen.

So you've successfully upgraded Magento and now you're rolling live on the new code and db.... You did remember to save a copy DB incase you have to back track?

You go to the Cache Management page and try to refresh the cache (just because you want to cover all your bases). After clicking the button with confidence you get a white screen, no alerts, no friendly exception report, just white.

Checklist.
1. Is your var/ directory writable by the web server?
2. Is your app/etc/use_cache.ser file writable by the web server?

Syndicate content