Website design Packages.

Affordable Website Designs.

Ecommerce - Content Management.

SEO - Consultancy.

Hosting - Email.

http://www.magentocommerce.com/magento-connect/Magento+Core/extension/6887/mage_googleshopping

Well we all know that the upgrade of the magento system must be the worsed job to be handed,

Well there is a way and it seems to work!!

This is the most comprehensive description of the Magento 1.4 (1.4.1.1), 1.5 (1.5.1.0), 1.6 (1.6.0.0) upgrade process. It contains step-by-step instructions and troubleshooting information. Hope this information will help you to upgrade your Magento store up to the latest version with no troubles.

Prepare for Magento upgrade

Lets imaging that you have Magento 1.4.1.1. web store and you need to upgrade it to 1.5. or 1.6 version. First of all it is highly recommended to backup your live store files and database.

Next you need to get SSH access from your hosting provider and connect to your server via SSH protocol. After connection via SSH go to your store folder and execute these commands:

1 – Change permissions on lib/pear folder to writable (recursively):

chmod -R 777 lib/PEAR

2 – Execute this command to prepare Magento for upgrade:

./pear mage-setup

Most likely you will see this result after command execution:

Channel “connect.magentocommerce.com/core” is already initialized

Upgrade from Magento 1.4.1.x to Magento 1.4.2.0

This step is necessary even if you upgrade your Magento store to 1.5 or 1.6 versions.

3 – Execute Magento upgrade command:

./pear upgrade -f magento-core/Mage_All_Latest-stable

Output of the command will show you what core packages were upgraded:


upgrade ok: channel://connect.magentocommerce.com/core/Mage_Centinel-1.4.2.0
upgrade ok: channel://connect.magentocommerce.com/core/Interface_Frontend_Base_Default-1.4.2.0
upgrade ok: channel://connect.magentocommerce.com/core/Phoenix_Moneybookers-1.2.3
upgrade ok: channel://connect.magentocommerce.com/core/Find_Feed-1.0.7
upgrade ok: channel://connect.magentocommerce.com/core/Interface_Adminhtml_Default-1.4.2.0

4 – When this part of the upgrade will be complete, enter these commands:

chmod 550 ./mage
./mage mage-setup .

You will see this result after command execution:

Successfully added: http://connect20.magentocommerce.com/community

It means that Magento connect 2.0 channel was added to the channels list successfully.

5 – Next, enter this command:

./mage sync

The result will be:


Successfully added: community/Mage_Locale_en_US-1.4.2.0
Successfully added: community/Interface_Install_Default-1.4.2.0
Successfully added: community/Phoenix_Moneybookers-1.2.3
Successfully added: community/Mage_Downloader-1.5.0.0
Successfully added: community/Lib_Google_Checkout-1.4.2.0

Upgrade to Magento 1.4.2.0 is complete and now you can proceed with upgrade to Magento 1.5.1.0 or 1.6.0.0 version.

Upgrade from Magento 1.4.2.0 to Magento 1.5.10 or Magento 1.6.0.0

Now you can upgrade your store to version 1.5 or 1.6.

Before proceeding with this part of Magento upgrade, it is very important to see to what version Magento upgrade scripts will upgrade your store. Enter this command to check this:

./mage list-upgrades

If you will see this result:

Updates for community:
Mage_All_Latest: 1.4.2.1 => 1.6.0.0
Lib_Js_Mage: 1.4.2.0 => 1.6.0.0
Lib_Varien: 1.4.2.0 => 1.6.0.0
Lib_Phpseclib: 1.4.2.0 => 1.5.0.0

It means that your Magento will be upgraded to version 1.6.0.0. If it is not what you need you can change upgrade channel to “stable” and upgrade your Magento to version 1.5.1.0.

6 – Enter this command to change the upgrade channel to stable:

./mage config-set preferred_state stable

After this the “./mage list-upgrades” command will show you this result:

Updates for community:
Mage_All_Latest: 1.4.2.1 => 1.5.1.0.1
Lib_Js_Mage: 1.4.2.0 => 1.5.1.0
Lib_Varien: 1.4.2.0 => 1.5.1.0
Lib_Phpseclib: 1.4.2.0 => 1.5.0.0
Mage_Core_Adminhtml: 1.4.2.0 => 1.5.1.0
Mage_Core_Modules: 1.4.2.0 => 1.5.1.0

7 – After channel selection you can upgrade your Magento to 1.5.1.0 (or to Magento 1.6.0.0) using this command:

./mage upgrade-all –force

You will see upgraded packages on your screen:


Package upgraded: community/Mage_Locale_en_US 1.6.0.0
Package upgraded: community/Lib_Mage 1.6.0.0
Package upgraded: community/Lib_ZF 1.11.1.0
Package upgraded: community/Lib_Js_Prototype 1.7.0.0.1
Package upgraded: community/Lib_ZF_Locale 1.11.1.0

Now the upgrade is complete and you can execute database upgrade visiting your Magento store in your browser. If everything was upgraded correctly, you will see upgraded store in your browser.

You can check version of your store in the footer of Magento administration panel.

Need any help with Magento upgrade?

Turnkeye.com offers professional Magento support services (including Magento development and Magento upgrade service), feel free to contact our team.

Troubleshooting

1 – Magento upgrade script error:

upgrade-all: Please check for sufficient write file permissions.
Error: upgrade-all: Your Magento folder does not have sufficient write permissions, which downloader requires.

Execute this command to correct the error:

chmod -R 777 Upgrade

2 – Magento upgrade script error:

upgrade-all: Invalid stability in compareStabilities argument.

Execute these commands, it will fix the issue:

./mage channel-add connect20.magentocommerce.com/community
./mage channel-add connect20.magentocommerce.com/core
./mage sync

3 – Server error:

“Internal Server Error” instead of Magento storefront page or administration zone pages.

Most likely issue is connected with wrong permissions.

Fix this issue using these recursive commands:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

4 – Magento error: Different errors in Magento database.

Re-index your database in Magento administration panel and clear Magento cache.

5 – Magento error:

“Invalid mode for clean() method”.

Clear Zend cache (all files, including “Backend” folder) in [magento_folder]/app/code/core/Zend/Cache/

rm -rf app/code/core/Zend/Cache var/cache/* var/session/* (nice little command for you!!!)

6 – Magento error:

“Call to a member function toHtml() on a non-object in …/Layout.php”.

Open [magento_folder]/app/design/frontend/default/[your_theme]/layout/page.xml and replace this line of the code:

<block type=”core/profiler” output=”toHtml”/>

With:

<block type=”core/profiler” output=”toHtml” name=”core_profiler”/>

7 – Magento error:

“Maximum key size must be smaller 32″.

Clear Magento cache.

I have noticed that sometimes with magento the the featured products on the home page
disappear for not reason, After checking the cms page and the block code all looked fine.

The simple solution to this problem is to reindex the complete site.

system –> indexes and select all and re-index

Like magic the featured products re-appear

Well after lots of testing i see magento takes the tax on the configurable product and ignores the associated products
which seems a bit odd but there  you go. I came across a entry in a blog that pointed me to the right file and a swap of code
can result moving the tax down to the child products.

file is located in app/code/core/Mage/Tax/Model/Sales/Total/Quote/tax.php

code change

$taxRateRequest->setProductClassId($item->getProduct()->getTaxClassId());
for
if ($item->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
$child = current($item->getChildren());
$taxRateRequest->setProductClassId($child->getProduct()->getTaxClassId());
}
else {
$taxRateRequest->setProductClassId($item->getProduct()->getTaxClassId());
}

found this great bit for information , solved a problem I was having hope it helps you

URL paths in code file:

Magento had some very handy functions that easily allow you to find some fundamental urls of your site from your phtml files so you can avoid hardcoding them. These are:

$this->getBaseUrl() – returns the base url of your store (funnily enough)

$this->getSkinUrl() – returns the url of the folder containing your css, images and local js files (eg skin/frontend/default/your_theme, will vary depending on what package and theme the page is using).

So to find the image logo.gif in the images folder you would call

$this->getSkinUrl(’images/logo.gif’);

It should be noted that if getSkinUrl does not find the file that you have specified (like images/logo.gif) then it will default to looking in the default theme folders rather than your custom theme folders.

$this->getJsUrl() – returns the url of the main js folder. So if you want to include a new js library from a template you can use this

adding links to a static block

{{media url=”}}

Inserts the URL of the media directory, e.g., http://www.example.com/media/. Changing the value of the url attribute to a non-empty string will cause the string to be appended to this URL.

Example:

  1. {{media url=’catalog/product/l/a/large_phone.jpg’}}

This will produce the output http://www.example.com/media/catalog/product/l/a/large_phone.jpg.

{{skin url=”}}

Inserts the URL of the current theme’s skin directory, e.g., http://www.example.com/skin/frontend/default/default/. Changing the value of the url attribute to a non-empty string will cause the string to be appended to this URL.

Example:

Assuming you’re using the default theme and the default interface, then

  1. {{skin url=’images/media/about_us_img.jpg’}}

will be converted to http://www.example.com/skin/frontend/default/default/images/media/about_us_img.jpg.

{{store url=”}}

Inserts the store’s base URL, i.e., the URL of the store’s home page. (Sample output: http://www.example.com/.) Changing the value of the url attribute to a non-empty string will cause the string to be appended to the store’s base URL and a slash (/) to be tacked on to the end of the resulting URL. This trailing slash makes the url attribute suitable for referencing directory-like paths, e.g. customer/account.

Example:

  1. {{store url=’about-magento-demo-store’}}

This will be converted to http://www.example.com/index.php/about-magento-demo-store/. Note the terminating slash in this URL; this is what distinguishes the url attribute from the direct_url attribute.

{{store direct_url=”}}

Does the same as {{store url=''}} but without appending a slash to the resulting URL. This is suitable for referencing file-like paths, e.g. coffee/kona-fancy-whole-bean.html.

This is roughly what happens when Magento encounters a template tag it understands:

  1. Magento uses the tag to populate an array with three elements. The first element is the whole tag (e.g., {{store url='coffee/test.html'}}). The second element is the keyword which follows immediately after the opening curly braces (e.g., store). The third element is the tag’s keyword=value pair (e.g., url='coffee/test.html').
  2. Magento passes the array to a method of the Mage_Core_Model_Email_Template_Filter class. The name of the method depends on the keyword within the tag: if the keyword is store, for instance, the storeDirective method will be called.
  3. The method returns a value. This value is used instead of the template tag on the front end.

Hi all,

Asked this question more times than I care to remember, So login to your control panel , click on system –> configuration

select wishlist from the customer tabs and diable it !!

Easy when you know how :)

Most magento default websites do not have the text “Enter email address” in the input box, I keep forgetting the code

so here you go value=”Email address” onfocus=”if(this.value==’Email address’)this.value=”;” onblur=”if(this.value==”)this.value=’Email address’;”

This should do the job,

problem when you browse file and select an product image to upload to the sever nothing happens after you select

the image from your drive.

This problem is caused when your base and secure url are incorrect.

login to the magento admin panel and under configuration select the web tab option and update your urls

Once you have update the urls the upload should work !!!!

I need to add a quantity field in the product list page with in magento.

This form works well and all you have to do is replate the buttom add to cart line with the following to achieve it

File is list.phtml with the catalog directory

paste this code in removing the button line and all will function correctly

<form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" id="product_addtocart_form_<?php echo $_product->getId()?>"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
<?php if(!$_product->isGrouped()): ?>
<label for="qty"><?php echo $this->__('Qty') ?>:</label>
<
input type="text" class="input-text qty" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" />
<?php endif; ?>
<button type="button" class="button" onclick="this.form.submit()"><span><span><span><?php echo $this->__('Add to Cart') ?></span></span></span></button>
</
form>

I keep forgetting how to add images and links to magento’s columns so decided to type it up this time:)

  1. in the admin go to CMS->Manage Pages
  2. select the home page to edit it
  3. on the left select the second tab(own layout)
  4. as the layout choose either 3 colum or 2 column with left bar
  5. in the xml changes field add this:
<reference name="left">
    <block type="core/template" name="unique.id" template="callouts/left_col.phtml">
        <action method="setImgSrc"><src>imageUrl</src></action>
        <action method="setImgAlt" translate="alt" module="catalog"><alt>alternative text</alt></action>
    </block>
</reference>