Mage::getSingleton('customer/session')->isLoggedIn()
Mage::getSingleton('customer/session')->getCustomer()
$customerAddressId = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling();
if ($customerAddressId){
$address = Mage::getModel('customer/address')->load($customerAddressId);
$htmlAddress = $address->format('html')
}
$customerAddressId = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling();
if ($customerAddressId){
$address = Mage::getModel('customer/address')->load($customerAddressId);
echo "<pre>"; print_r($address->getData());echo "</pre>";
}
$street = $address->getData('street'); Linking to other cms pages from Magento's wysiwyg editor is simple, but if you don't know how to do it, you will get a few suprises.
The correct way to create a link is to wrap the url into a magento handler like this:
To link directly to the front page, simply leave the url empty.
This is a very simple task.
Once you created the Static Block, simply go to CMS -> Manage Pages. Select your Page or create a new one.
Click on the Design tab on the left and paste the following code to the "Layout Update XML" textarea.
(Also, don't forget to select the Layout, eg.: 2 columns with left (or right) bar)
<reference name="left"> <block before="-" name="block-name" type="cms/block"> <action method="setBlockId"><block_id>block-id</block_id></action> </block> </reference>
The reference name can be left or right depending on which column you would like the block to appear.
The block name can be the same as the id. The block id is of course the Identifier of the block.
You can also set the position of the block by changing the before (or after) options in the block tag.
Once you saved the page, the block should show up in the sidebar.
This has been tested in Magento 1.6, but it should work in almost all the other versions.
Good luck.
Dr. Susan Weinschenk shares seven principles beyond usability to make your website more engaging - principles of persuasion, emotion, and trust...
$("#id-select :selected").removeAttr("selected");
$('#id-select').val('[value you need to select]');
This is a maintenance release.
You can find the latest VBoxGuestAdditions ISO (4.0.4) here:
http://download.virtualbox.org/virtualbox/4.0.4/VBoxGuestAdditions_4.0.4...
Don't forget, you can install Virtualbox using the Update Manager in Ubuntu:
Add the following line to the /etc/apt/sources.list: (for latest 10.10 Ubuntu - older versions, change distro name in url)
deb http://download.virtualbox.org/virtualbox/debian maverick contrib
The Oracle public key for apt-secure can be added using these commands:
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
Finally, simple run the update command and install Virtualbox
sudo apt-get update sudo apt-get install virtualbox-4.0
From now on, the Update Manager should pick up all the updates for Virtualbox.
If you would like to change the "Post new comment" text on just a single content type copy paste this code into your template.php, change the function name to your theme name and set the content type. The str_replace function second parameter will be your new text.
Tested in Drupal 6.
Drupal 7 Marketing Video from Jeff Robbins on Vimeo.