CAPTCHA challenge issued by server in magento

If you’re getting the error message “CAPTCHA challenge issued by server” when using Magento while trying to add products to Google Base, here’s the solution we found. As always, BACK UP!

In the file: /app/code/core/Mage/GoogleBase/Model/Service.php

Find this line:

// Create an authenticated HTTP client

$errorMsg = Mage::helper(’googlebase’)->__(’Unable to connect to Google Base. Please, check Account settings in configuration.’);

try {

$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, Zend_Gdata_Gbase::AUTH_SERVICE_NAME, null, ”,

$loginToken, $loginCaptcha,

Zend_Gdata_ClientLogin::CLIENTLOGIN_URI,

$type

);

} catch (Zend_Gdata_App_CaptchaRequiredException $e) {

Change it to read this:

// Create an authenticated HTTP client

$errorMsg = Mage::helper(’googlebase’)->__(’Unable to connect to Google Base. Please, check Account settings in configuration.’);

try {

if (!Mage::registry(’GAPI_CLIENT’)) {

$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, Zend_Gdata_Gbase::AUTH_SERVICE_NAME, null, ”,

$loginToken, $loginCaptcha,

Zend_Gdata_ClientLogin::CLIENTLOGIN_URI,

$type

);

Mage::register(’GAPI_CLIENT’, $client);

} else {

$client = Mage::registry(’GAPI_CLIENT’);

}

} catch (Zend_Gdata_App_CaptchaRequiredException $e) {

That should take care of the problem “CAPTCHA challenge issued by server” using Google Base in Magento

Expected response code 200, got 404. Type: request. Reason: Cannot find item.

If you’re working in Magento with Google Base items, trying to delete items from Google Base and you get this error message “Expected response code 200, got 404. Type: request. Reason: Cannot find item“, here is the fix:

Instead of trying to “Delete” the item from Google Base, select “Synchronize” instead. This will delete the items from the Google Base list.

Kind of goofy, but anyway, that’s what you have to do if you are having problems deleting items from Google Base in Magento and getting that dreaded error – Expected response code 200, got 404. Type: request. Reason: Cannot find item

How to Add Status Levels to Customers Orders in Magento

Here’s another one that should be easier, but we know Magento wants you to buy the enterprise edition.

One of our clients using Magento wanted to be able to add different order statuses to their customers orders from the admin section. So instead of order status going from Pending to Processing to Complete, they wanted to add in Shipped. Here’s how to add different order statuses to Magento:

As always, BACKUP!

Navigate to \app\code\core\Mage\Sales\etc\config.xml

Find the <states> section which should have some code similar to the following:

<processing translate=”label”>

<label>Processing</label>

<statuses>

<pending/>

<processing/>

<shipped/>

<holded/>

<complete/>

<closed/>

<canceled/>

</statuses>

<visible_on_front/>

</processing>

Next, you’re going to add in the status you want, basically duplicating this code, but adding the new status to all states as well, so each state includes the new status. You’ll note in the code above, there is a new status called <shipped/>, which is how you would add it to each order status.

Next, go to the <statuses> section and add in:

<shipped translate=”label”><label>Shipped</label></shipped>

for our example of adding Shipped as a status.

Refresh your cache in Magento Admin.

That should do it. That’s how you add different status levels to orders in Magento.

You Have Placed No Orders in Magento

We were recently informed by one of our clients that had a customer of theirs complain that when they went into the “My Account” section of their Magento Commerce store, and logged in, when checking on their orders, they get a message that says “You have placed no orders“. We did some research and found this fix:

As always, ALWAYS BACKUP!

First, go to file: \app\code\core\Mage\Sales\Block\Order\History.php

Approximately line 49, find this code:

->addAttributeToFilter(’state’, array(’in’ => Mage::getSingleton(’sales/order_config’)->getVisibleOnFrontStates()))

Comment that line out so it looks like this:

/** ->addAttributeToFilter(’state’, array(’in’ => Mage::getSingleton(’sales/order_config’)->getVisibleOnFrontStates())) */

Save the file.

Next, go to: app/code/core/Mage/Sales/etc/config.xml

and add <visible_on_front/> to the states you want to see in the frontend, like this:

<new translate=”label”>

<label>New</label>

<statuses>

<pending/>

<processing/>

<holded/>

<complete/>

<closed/>

<canceled/>

</statuses>

<visible_on_front/>

</new>

<pending translate=”label”>

<label>Pending</label>

<statuses>

<pending/>

<processing/>

<holded/>

<complete/>

<closed/>

<canceled/>

</statuses>

<visible_on_front/>

</pending>

Save that file.

Go to your cache in admin and refresh.

Your customers should now be able to see their orders when they log in to their account of your Magento Store.