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 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

Magento: CMS Blocks in Static Pages

Just to follow up on my post: Magento: CMS Blocks in Templates, here is how you can call a CMS Block within a Static Page:

1
{{block type="cms/block" block_id="your_block_id_here" template="cms/content.phtml"}}

Happy Magento’ing! :mrgreen:

Possibly Related Posts:



Sep 27 2009

Magento Version 1.3.2.4 Security Update XSS fix on registration page

If you are running a lower version than 1.3.2.4 of Magento, I’d highly recommend upgrading for security purposes as in the change log, a Cross Site Scripting attack was found in the customer registration page.

:arrow: Magento – Blog – Magento Version 1.3.2.4 Security Update – eCommerce Software for Growth.

Possibly Related Posts:



Apr 15 2009

Magento version 1.3.1 imminent

It appears Varien is has completed the list of items in the 1.3.1 branch.  Which includes fixes for the previous bugs I had previously posted about.  I’ve tried pulling down the alpha version with CVS to get a sneak peak at the upcoming changes but haven’t been successful, as March 30th seems to be the last commit change for 1.3.0.  There hasn’t been any news about when this release will be available publicly in a “official” form.  

A lot of users whom tried my fix for the add to cart issue with options reported getting an error such as getSKU() was undefined. This is in the list of items to be fixed in 1.3.1.

:!: Anyone who applied my “jerry rigged” fix, please remember to uncomment the line mentioned in the article BEFORE attempting to upgrade.

I have also been fighting with Magento and Google base always returning “Expected response code 200, got 404″, although it appears to be on a Google API change that has caused the issue, and I’m hoping 1.3.1 will have this issue fixed for me as well.

I will post up my findings once I’m able to get my hands dirty with the changes in 1.3.1.

:arrow: Magento – Roadmap – eCommerce Software for Growth.

Possibly Related Posts:



Apr 7 2009

Magento v1.3.0: Option validation failed to add product to cart

After upgrading a clients Magento site from 1.2.1.2 to version 1.3.0, they reported an issue not being able to add products with required selectable options, as it would always return “Option validation failed to add product to cart” Message even though all requirements are met.

The issue I’ve found to be is in a newly created file in 1.3.0: /app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php

1
2
3
4
5
6
7
8
9
10
11
12
13
    /**
     * Prepare option value for cart
     *
     * @throws Mage_Core_Exception
     * @return mixed Prepared option value
     */
    public function prepareForCart()
    {
        if ($this-&gt;getIsValid()) {
            return is_array($this-&gt;getUserValue()) ? implode(',', $this-&gt;getUserValue()) : $this-&gt;getUserValue();
        }
        #Mage::throwException(Mage::helper('catalog')-&gt;__('Option validation failed to add product to cart'));
    }

Apply a comment to the Mage::throwException … and it will fix the issue.

Note the use of a shorthand if statement within the return for the function, which in all honesty is bad coding practice. I say Magento makes the developer go onto code review for the next week for punishment. I’ve known some shops to do this when they get lazy. :lol:

However, $this->getIsValid() will return true, for a few cycles through but ultimately seems to come back to the exception and return false, which leads me to thing there is more to bug than just a simple conditional return statement.

Keep in mind this is by no means a official fix but will tie you over until the bug fix is released, which has already been reported and assigned. Also if you do make this change you may want to keep a copy of the original file as modifying app/core/ can lead to upgrade issues in the future, and you’ll need to restore the original file upon upgrading.

:!: It appears this also has fixed another issue I noticed, within the Admin, attempting to Create a New Order, upon attempting to add products to the order, nothing would be returned and no error presented. After my fix above this now working properly as well. This other issue has also been reported already and assigned as well.

According the 1.2.1.2 to 1.3.0 .diff file, this file is a newly created file.

Here is a forum thread discussing the issue:
:arrow: Magento – Option validation failed to add product to cart – Magento 1.3.0 Upgrade Issues – eCommerce Software for Growth.

Possibly Related Posts: