Check if there are any shipping methods available
public function haveShippingMethods() { if (count(Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingRatesCollection())) { return true; } return false; }
I'd rather be in outer space 🛸
Jules of Nature
Three Goblin Art

⁂

Kiana Khansmith


Product Placement

izzy's playlists!


Discoholic 🪩
cherry valley forever
Lint Roller? I Barely Know Her

Janaina Medeiros
noise dept.

★

Andulka
Peter Solarz

pixel skylines
Aqua Utopia|海の底で記憶を紡ぐ
Xuebing Du
seen from Taiwan
seen from United States
seen from United Kingdom
seen from France
seen from United Kingdom

seen from United States

seen from Canada
seen from United States

seen from Türkiye

seen from France
seen from Indonesia

seen from Türkiye

seen from Malaysia
seen from Lithuania

seen from Malaysia

seen from United States

seen from United Kingdom
seen from India

seen from Germany
seen from Kenya
@magento-code-snippets-blog
Check if there are any shipping methods available
public function haveShippingMethods() { if (count(Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingRatesCollection())) { return true; } return false; }

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Get attribute set collection
$attributeSetCollection = Mage::getResourceModel('eav/entity_attribute_set_collection') ->load();
Get a categories products ordered by number of sales
$categoryId = 1; //Change this to whatever the category id is - duh :) //Lets load up that category $category = Mage::getModel('catalog/category')->load($categoryId); $products = Mage::getResourceModel('reports/product_collection') ->addOrderedQty() ->addAttributeToSelect('*') ->setOrder('ordered_qty', 'desc') ->addCategoryFilter($category);
Get all of the top level categories
//Usually, the first base category added will have the id of 2 $defaultCategoryId = 2; $topLevelCats = Mage::getModel('catalog/category') ->getCollection() ->addAttributeToSelect('path','name','id') ->addAttributeToFilter('parent_id', $defaultCategoryId) ->setOrder('position', 'ASC');
Set current store (pass the integer id)
$storeId = 1; Mage::app()->setCurrentStore($storeId);

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Print the SQL queries performed when calling a product collection
$_productCollection->printLogQuery(true);
Get store contact number
Mage::getStoreConfig('general/store_information/phone');
Unsubscribe customer using email address
Mage::getModel('newsletter/subscriber') ->loadByEmail($emailAddress) ->unsubscribe();
Get Base Secure URL
Mage::getBaseUrl('web', true);
Check if Google Analytics is available
Mage::helper('googleanalytics')->isGoogleAnalyticsAvailable()

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Get product collection
$collection = Mage::getModel('catalog/product')->getCollection();
Check if RSS is enabled
Mage::getStoreConfig('rss/catalog/category');
Get the current category name
Mage::registry('current_category')->getName();
How many items are there in the basket?
Mage::getSingleton('checkout/cart')->getSummaryQty();
Get a configurable product child products
$childProducts = Mage::getModel('catalog/product_type_configurable') ->getUsedProducts(null, $product);

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Get the number of products shown in the sidebar
Mage::getStoreConfig('checkout/sidebar/count');
Check if a product is configurable
$product->isConfigurable();