Dec 9 2009

Magento Commerce Error Reporting Tip

Whoops, our bad…
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.

What can you do?

Well, you can start by looking in /var/report/ and view the file that corresponds with the error ID on the web address. ;)

This is just a merely nice page to display to end users as not to display any nasty php errors to them. However looking at these reports can lead useful if your needing to find out more details on whats causing the issues.

Didn’t realize this until tonight, I must be slow… :? but thought I would share. :wink:

Possibly Related Posts:



Dec 7 2009

Android SDK 2.01 Emu WebKit User Agent

user agent 2.01 android emu 300x211 Android SDK 2.01 Emu WebKit User Agent

I got curious what the Android 2.01 SDK User Agent was returning after toying around with the iPhone theme for Magento.  It appears Apple has standardized the UserAgent and “Mobile Safari” as a condition should enable future detection of Webkit on any device without conditioning more. Here’s the full user agent being returned

1
Mozilla/5.0 (Linux; U; Android 2.0.1; en-us;sdk Build/ES54) AppleWebKit/530.17+ (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17

Possibly Related Posts:



Dec 6 2009

Eclipse + ZendStudio + ZendServer + Android SDK = Awesome IDE

zend android Eclipse + ZendStudio + ZendServer + Android SDK = Awesome IDE

Recently installed the Zend Studio for Eclipse and took it upon myself to get Android Development setup as well.  I also found Magento works best with ZendServer, although it does require a few work arounds to get Magento to work with ZendServer.

However with that being said I’m pretty much happy to have one IDE that I can do both Web Development, and Android Development in one IDE!

Now if only I can setup C# development, and Eclipse not be such a resource/memory hog.

ZendServer Community Edition
:arrow: http://www.zend.com/en/products/server-ce/index

Zend Studio for Eclipse
:arrow: http://www.zend.com/community/pdt

Installing Android SDK
:arrow: http://developer.android.com/sdk/installing.html

Setting up Android SDK in Eclipse
:arrow: http://developer.android.com/sdk/eclipse-adt.html

If anyone desires I can write up a more detailed step by step guide, however at this point I think its pretty easy to figure out, with the links I provided. :mrgreen:

Possibly Related Posts:



Dec 5 2009

Farbrausch: debris

177 kilobytes of awesomeness! I’d highly recommend the link in full HD than my embed to enjoy, or better yet if you’ve got a good graphics card like an late model NVIDIA or ATI then download the tiny executable.

:arrow: YouTube – Farbrausch – fr-041: debris. [HD].

The secret behind all this is procedural content generation. in a nutshell, instead of storing a movie as-is we’re storing a certain number of mathematical formulas for image and audio manipulation as well as the “recipe” how to apply those small bits of code in a way that what you see comes out. And while it’s running your computer’s graphics card cares for the actual displaying ot the world, just like in modern 3D games. Formulas+recipe are of course way smaller than the end result, and with a few additional sprinkles of magic compression fairy dust we get down to under 200 kilobytes, which is way less than one single high quality image of this show would take.

Possibly Related Posts:



Dec 4 2009

Magento: Paypal Standard IPN Double Totals Bug 1.3.2.3 + fix

:!: This fix didn’t work for me after further testing on 1.3.2.4 another recommended fix has however worked. :!:

Untitled 1 Magento: Paypal Standard IPN Double Totals Bug 1.3.2.3 + fix

Does the above look familiar for Paypal Standard Orders, Note the Grand Total and Total Paid…

Running into this issue myself I thought I would post it up to let everyone else know the issue with the Standard Paypal IPN and Magento version 1.3.2.3.  It appears double Order totals are showing up under “Total Paid” and can cause a lot of customer confusion.

Here is the quick temporary fix:

:!: NOTE: This modifies the base code of Magento and recommended you save a backup of the original file, as it may cause issues upgrading later on.

app/code/core/Mage/Paypal/Model/Standard.php as follows: 

- $invoice->register()->capture();
+ $invoice->register()->pay(); 

The above modification fixed IPN problems but now the Total Paid amount is wrong. 

Also the above modification introduced another bug: paid orders are shown as COMPLETE instead of PROCESSING. This can be fixed by changing app/code/core/Mage/Paypal/Model/Standard.php as follows: 

- Mage_Sales_Model_Order::STATE_COMPLETE, true,
+ Mage_Sales_Model_Order::STATE_PROCESSING, $newOrderStatus, 

This change will fix the status problem so that paid orers now appear as PROCESSING.

This fix was not mine and I would like to thank those whom are responsible for finding the bug and providing a fix! Kudos to them. :D

:arrow: Magento – Issue List – eCommerce Software for Growth.

Possibly Related Posts:



Dec 3 2009

iPhone Magento theme compatible with Android

After installing the iPhone Theme for Magento via Magento Connect do the following:

Simply configure the exceptions under “System”->”Configuration”->”Design”

Expand “Themes” see the screenshot and use the values “Mobile Safari|iPhone|iPod” for Matched expression, and “iphone” for value. Since both iPhone and Android use WebKit they will both return the user agent as “Mobile Safari”. Be sure and realize it IS case sensitive for all values.

However after some further testing with some iPhones won’t return “Mobile Safari” so the condition for iPhone or iPod needs to be added as well.

Cheers! ;)

android iphone1 iPhone Magento theme compatible with Android

:idea: Update: More details about Which Browser is used in Android

Possibly Related Posts:



Nov 13 2009

Magento Tutorial Video: Display Product Images in Blocks and Pages

Thanks to Yireo for creating a video based off my posting: Magento: Display a product image within Static Pages and Blocks. Being a visual person myself, this should really help people understand how to do such with ease. Kudos to Yireo!

Possibly Related Posts:



Oct 20 2009

Magento: Phoning home to Big Brother/Varien?

It appears some have claimed there Magento installation has been making calls back to IP’s owned by Varien/Magento, The thread is initially a year old, and more recent discussions have claimed they haven’t found anything of such nature.  I know X-Cart used to use a javascript blank 1×1 gif image to track installations of X-Cart but it was only on the backend/admin side, and not the front end.  Has anyone else run into similar instances?  Also this may not pertain to 3rd party modules installed as that may a whole other can of worms you could be opening up your store up to, most modules are free, but nothing is really free in this world. 8O  Here is the original thread: Magento Phone Home?

Possibly Related Posts:



Oct 15 2009

Magento: Display a product image within Static Pages and Blocks

In this particular instance I needed to add product thumbnails for reference on a front page.

First create a new .phtml file with the following under catalog/product/view/your_new_page.phtml

1
2
3
4
5
<?php
$productId = $this->getProduct_id(); 
$_product = Mage::getModel('catalog/product')->load($productId); //load the product
?>
<img src="<? echo Mage::helper('catalog/image')->init($_product, 'thumbnail')->resize(75, 75); ?>" alt="<?php echo $this->htmlEscape($_product['name']); ?>" border="0" width="75" />

Now simply add the following to your CMS Page or Block and adjust the product ID to the product Image you wish to view:

1
{{block type="catalog/product_new" product_id="1" template="catalog/product/view/your_new_page.phtml"}}

Possibly Related Posts:



Oct 8 2009

Selecting 30 days or older entries using MySQL DateTime field

I’ve been doing quite a bit of Date and Time manipulations lately, and have grown to enjoy MySQL’s DateTime fields just as much as UNIX timestamps. Particularly its built-in functions for selecting any range of fields based on a time frame.

Needing to remove all entries from a table that are older than 30 days, at first I thought I would need to iterate over the very large table (90+k) rows of data and convert each MySQL DateTime field to a UNIX time stamp to do the calculations myself with PHP. However after a bit of research I’ve learned of a few things with MySQL DateTime that make this a lot easier.

1
SELECT fields FROM table WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) >= timestamp;

The “timestamp” field is the MySQL DateTime field. Using the DATE_SUB, CURDATE and INTERVAL one can easily grab all records that are 30 days old without the headache of converting to UNIX timestamps in PHP and doing the grunt work yourself.

:idea: Also as a side note, if you wish to convert a MySQL DateTime field to a UNIX timestamp you can easily do this by:

1
$mysql_timestamp = gmdate("Y-m-d H:i:s",$mysql_timestamp_value);

If anyone has any better more efficient means to accomplish this please feel free to leave a comment. :D

Possibly Related Posts: