Skip to content

Instantly share code, notes, and snippets.

@corpsefilth
corpsefilth / simpleinfo.php
Created April 16, 2015 02:17
display simple product information from configurable product.
<?php
if($_product->getTypeId() == "configurable"):
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
foreach($simple_collection as $simple_product){
echo $simple_product->getSku() . " - " . $simple_product->getName() . " - " . Mage::helper('core')->currency($simple_product->getPrice()) . "<br>";
}
endif;
?>
@corpsefilth
corpsefilth / wpattachedsamples.php
Created September 18, 2015 21:52
display list of attached images of a page or post excluding featured image
<?php
//get featured image ID
$thumb_ID = get_post_thumbnail_id( $post->ID );
//attachement loop - with exclude argument for featured image
$args = array(
'orderby' => 'menu_order',
'post_type' => 'attachment',
'post_parent' => get_the_ID(),
'post_mime_type' => 'image',
@corpsefilth
corpsefilth / mediaqueriesextended.css
Created September 18, 2015 21:55
Extended CSS Media Queries Reference
/* --------------------------------------------------------- */
/* BASIC CSS ----------------------------------------------- */
/* --------------------------------------------------------- */
/* YOUR STYLES */
@corpsefilth
corpsefilth / mediaqueries.css
Created September 18, 2015 22:03
Simple CSS media queries for mobile devices
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@corpsefilth
corpsefilth / press-items.html
Created November 9, 2016 01:20
Press Item Code Snippets
working code sample
<div class="col col-md-3 col-sm-6 col-xs-12 press-item editorial digital wrapper featured">
<div class="pressitemholder press-padder">
<a href="{{media url='wysiwyg/press/Online_WhoWhatWear-2.9.16.jpg'}}" title="WHO WHAT WEAR February 2016" class="lightbox pressanchor"></a>
<img src="{{media url="wysiwyg/press/Online_WhoWhatWear-2.9.16.jpg"}}" alt="" />
<div class="press-item-title">
<div class="press-title-wrap">
<span class="maintitle">WHO WHAT WEAR</span>
<span class="subtitle">February 2016</span>
</div>