Posts tagged ‘Magento’

I ran into a recent problem with Magento on a Windows/IIS install. From the admin, the I couldn’t navigate to the ConnectManager; instead it bounced me to the 404 page.

Confident that a fresh install can’t be quirky, I paused and thought it had to be a permissions issue. I opened the folder, checked the permissions, and IUSR_<> had the right permissions. So i kept snooping around and found that, on this particular box, CREATOR/OWNER had no permissions, so I applied them according to the Magento Permissions guide, and voila, everything worked as expected.

If your having problems with Magento ConnectManger, double-check the permissions on everything. And remember, if it’s a remote host, FTP may not be setting it as you expect.

I’ve found a great new website that has some quick and easy snippits of code.  Snippi.net has a good base of code that allows you to integrate Magento into non-Magento pages, and even can be used to write your own module.

Cheat sheets are blessed invention; a handy reference for those times when your code calls for something common, but for the life of you, you can’t remember the details.  Usually I just Google whatever I need, but I’ve came across these cheat sheets and have them handy.

Magento Events:

http://activecodeline.com/wp-content/uploads/2009/03/magento-events-cheat-sheet.pdf

PHP Cheat Sheet:

http://www.gosquared.com/images/help_sheets/PHP%20Help%20Sheet%2001.pdf

WordPress Cheat Sheet:

http://www.gosquared.com/images/help_sheets/WordPress-Help-Sheet.pdf

…and a whole crapload more can be found on GoSquared’s site.

Two of the most popular open-source packages available are WordPress and Magento, and tying them together isn’t an impossible task, but it’s not exactly straightforward either. I found this link on the Magento twitter, and thought I’d repost it.

http://www.magjournal.com/2009/05/wordpress-and-magento/

So, your setting up Magento and need to use the UPS rates.  By default, Magento comes with it’s own UPS “estimator”, but that won’t match a prenegotiated rate.  Magento “hides” this behind a special dropdown named “United Parcel Service XML” in the UPS section of the “Shipping Settings” Here’s the steps to setting up the UPS login:

  1. Verify you have a UPS.com “XML Access Key”, which is NOT a “Developers Key”.  If not, you’ll have to have one (contact your UPS rep to generate this…bummer, I know).
  2. In the Magento Admin, click System → Configuration → Shipping Methods → UPS
  3. Key Settings:
    1. Enabled: Yes
    2. UPS type: United Parcel Service XML
    3. Access license number: YOUR ACCESS KEY
    4. Password: Your UPS Account Password
    5. UserId: Your UPS User ID
    6. Gateway XML URL: https://onlinetools.ups.com/ups.app/xml/Rate
    7. Shipper Number: Your Shipping Number (6 Digits)
    8. Tracking XML URL: https://onlinetools.ups.com/ups.app/xml/Track

Once all the required info is in place, you should have your custom UPS rates.

**Update**

After working in this, it appears that there may be an issue with the SSL UPS uses, and thusly, the curl option will fail.  Never fear, here is the solution (though I do not like it b/c it’s going against SSL philosophy, and you’ll have to remember this change for future upgrades)

Copy the file “/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php” to “/app/code/local/Mage/Usa/Model/Shipping/Carrier/Ups.php” and find the following code (there should be two instances):

$xmlResponse = curl_exec ($ch);

And add this right before it:

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

**Update 2**

Also, be sure to actually select which services you wish to be allowed for shipping. Having no shipping methods available while having correct information entered will cause the same error described above.