adding URL parameters

Posted by ray | Posted in cheat codes | Posted on August 4th 2009

0

product id example:

  • $this->getUrl(’[any valid url]‘, array(’id’=>$_product->getId()));

then retrieve it:

  • $productId = $this->getRequest()->getParam(’id’);
Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

use secure URLs in Magento

Posted by ray | Posted in cheat codes | Posted on August 4th 2009

0

  • $this->getUrl(’checkout/onepage’, array(’_secure’=>true));

‘checkout/onepage’ can be any valid URL on your site…

Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

get the name of a products attribute set

Posted by ray | Posted in cheat codes | Posted on August 4th 2009

0

$_product = $this->getProduct();

$setId = $_product->getAttributeSetId();
$set = Mage::getModel(’eav/entity_attribute_set’)->load($setId);
$setName = $set->getAttributeSetName();

Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

get URLs

Posted by ray | Posted in cheat codes | Posted on August 3rd 2009

0

Mage::app()->getStore()->getBaseUrl();

$this->getUrl(’customer/account/login’);

Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

Get current user and attributes

Posted by ray | Posted in cheat codes | Posted on August 3rd 2009

0

  • $customer = Mage::getModel(’customer/customer’);
  • $customer->load(Mage::getSingleton(’customer/session’)->getCustomerId());
  • $arr = $customer->getAttributes();
Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

Upgrading Magento Via SSH

Posted by ray | Posted in Magento | Posted on July 25th 2009

0

The following commands work for any hosting environment, but it’s primarily for users that are in an environment with no suEXEC, like one where PHP is running as an Apache module.

In this kind of environment, all web-based processes are owned by user nobody, unlike an environment with suEXEC, where these are owned by the user.

Once you’ve accessed your site via SSH, change in to the directory where Magento is installed. Run the following commands to upgrade Magento:

  1. ./pear upgrade-all
  2. rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

If you receive an error, that means the PEAR registry has not been initialized. You need to run the following commands:

  1. ./pear mage-setup .
  2. ./pear install magento-core/Mage_All_Latest
  3. rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

This is only required once, after it’s initialized you don’t need to do this again and can use the first command listed in this article.

You also might need to clear your cache directory out after an upgrade:

  1. rm -rf var/cache/*

To install an extension via SSH, run the following command from the directory where Magento is installed:

  1. ./pear install EXTENSION_KEY

Replace EXTENSION_KEY with the appropriate value.

For example, to install the Blue Skin, you would do this:

  1. ./pear install magento-core/Interface_Frontend_Default_Default_Blue

Be sure to clear the cache out after you’re done:

  1. rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

Boost the speed of your Magento | Inchoo

Posted by ray | Posted in Magento | Posted on July 14th 2009

0

enable resulting html compression

via Boost the speed of your Magento | Inchoo.

Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

The Beatles Live On The Ed Sullivan Show

Posted by ray | Posted in Magento, Uncategorized | Posted on June 13th 2009

0

Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

Magento – Wiki – Add fields to contact form

Posted by ray | Posted in Magento | Posted on May 10th 2009

0

Magento – Wiki – Add fields to contact form.

Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati

Magento – Wiki – Create a Downloadable Product

Posted by ray | Posted in Magento | Posted on May 10th 2009

0

Magento – Wiki – Create a Downloadable Product.

Share and Enjoy:
  • Print this article!
  • E-mail this story to a friend!
  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati