Magento 1.9 Pull in Attribute Labels of Configurable products
Got a table which currently pulls the data of the Attributes of the config products. Im trying to add a the Attribute titles. Currently got this but can not seem to spit the Label out. Any ideas?
<div class="col-sm-8" style="padding:0px;">
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<div class="confpros">
<table class="<?php echo $packclass; ?> moreproducts">
<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>
<?php
$simpleids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($_product->getId());
$subproducts = Mage::getModel('catalog/product')->getCollection()
->addAttributeToFilter('entity_id', $simpleids)
->addAttributeToFilter('status', array('eq' => 1))
/*->setOrder('sku', 'ASC');*/
->setOrder('pir_model', 'ASC');
$count = 1;
?>
<thead>
<?php
$count = 1;
foreach($subproducts as $simple) {
while ($count <= 1) {
$simpleids = Mage::getModel('catalog/product')->load($simple->getId());
$attributes = $simpleids->getAttributes();
$aTmp = array();
$i = 0;
foreach( $attributes as $row ) {
if( $row->getIsVisibleOnFront() && $row->getFrontendLabel() == 'pir_model' ) {
$data = $row->getData();
if( $i++ == 0 ) {
$aTmp[-1] = $row;
break;
}
}
}
foreach( $_attributes as $row ) {
$tmp = new Mage_Catalog_Model_Resource_Eav_Attribute();
$row = $tmp->load($row->getAttributeId());
if( $row->getIsVisibleOnFront() ) {
$aTmp = $row;
}
}
ksort($aTmp);
$attributes = array_values($aTmp);
$aAtributeHolder = $attributes;
?>
<tr>
<!-- <th>Item</th> -->
<?php $y = 0; ?>
<?php foreach ($attributes as $attribute) {
if ($attribute->getIsVisibleOnFront()) { ?>
<?php if ($y < 1) { ?>
<?php
$value = $attribute->getFrontend()->getValue($simpleids);
$label = $attribute->getFrontendLabel();
?>
<?php //echo $value; ?>
<th>
<?php if ($value != "No") { ?>
<?php echo $label; ?>
<?php } ?>
</th>
<?php } ?>
<?php $y++; ?>
<?php } ?>
<?php } ?>
<?php /*echo "1"; die();*/ ?>
<!-- Ecommerce -->
<th class="ecom">Test</th>
<!-- End Ecommerce -->
</tr>
<?php $count++; ?>
<?php } ?>
<?php } ?>
</thead>
<tbody>
<?php
foreach($subproducts as $simple) {
//for( $i = 65; $i <= 90; $i++ ) {
$simplePro = Mage::getModel('catalog/product')->load($simple->getId());
// Pack name
$packname = $simplePro->getAttributeText('pir_model');
$packclass = preg_replace('/s*/', '', $packname);
$packclass = strtolower($packclass);
$packname = explode("_", $simplePro->getAttributeText('pir_model'));
// Width
$pwidth = $simplePro->getAttributeText('pir_width');
$pwidth = preg_replace('/s*/', '', $pwidth);
$pwidth = strtolower($pwidth);
$pwidth = explode("_", $simplePro->getAttributeText('pir_width'));
// Length
$plength = $simplePro->getAttributeText('pir_lenght');
$plength = preg_replace('/s*/', '', $plength);
$plength = strtolower($plength);
$plength = explode("_", $simplePro->getAttributeText('pir_lenght'));
// Arch
$parcheight = $simplePro->getAttributeText('pir_arch_height');
$parcheight = preg_replace('/s*/', '', $parcheight);
$parcheight = strtolower($parcheight);
$parcheight = explode("_", $simplePro->getAttributeText('pir_arch_height'));
//dims
$pdims = $simplePro->getAttributeText('pir_dims');
$pdims = preg_replace('/s*/', '', $pdims);
$pdims = strtolower($pdims);
$pdims = explode("_", $simplePro->getAttributeText('pir_dims'));
//Oil Holding Capacity
$poilholding = $simplePro->getAttributeText('pir_oil_holding_capacity');
$poilholding = preg_replace('/s*/', '', $poilholding);
$poilholding = strtolower($poilholding);
$poilholding = explode("_", $simplePro->getAttributeText('pir_oil_holding_capacity'));
//Max Even Load Capacity
$pmaxload = $simplePro->getAttributeText('pir_max_even_load_capacity');
$pmaxload = preg_replace('/s*/', '', $pmaxload);
$pmaxload = strtolower($pmaxload);
$pmaxload = explode("_", $simplePro->getAttributeText('pir_max_even_load_capacity'));
//Bays
$pbays = $simplePro->getAttributeText('pir_bays');
$pbays = preg_replace('/s*/', '', $pbays);
$pbays = strtolower($pbays);
$pbays = explode("_", $simplePro->getAttributeText('pir_bays'));
//Tray Depth
$ptdepth = $simplePro->getAttributeText('pir_tray_depth');
$ptdepth = preg_replace('/s*/', '', $ptdepth);
$ptdepth = strtolower($ptdepth);
$ptdepth = explode("_", $simplePro->getAttributeText('pir_tray_depth'));
//kVA
$pkva = $simplePro->getAttributeText('pir_kva');
$pkva = preg_replace('/s*/', '', $pkva);
$pkva = strtolower($pkva);
$pkva = explode("_", $simplePro->getAttributeText('pir_kva'));
//Tank Capacity
$ptcapacity = $simplePro->getAttributeText('pir_tank_capacity');
$ptcapacity = preg_replace('/s*/', '', $ptcapacity);
$ptcapacity = strtolower($ptcapacity);
$ptcapacity = explode("_", $simplePro->getAttributeText('pir_tank_capacity'));
//Size
$psize = $simplePro->getAttributeText('pir_size');
$psize = preg_replace('/s*/', '', $psize);
$psize = strtolower($psize);
$psize = explode("_", $simplePro->getAttributeText('pir_size'));
?>
<?php // Get Simple Products ?>
<?php $count++; ?>
<tr>
<td>
<?php echo $simplePro->getName(); ?>
</td>
<?php echo '<td>' .$pwidth[0]. '</td>'; ?>
<?php echo '<td>' .$plength[0]. '</td>'; ?>
<?php echo '<td>' .$pwidth[0]. '</td>'; ?>
<?php echo '<td>' .$parcheight[0]. '</td>'; ?>
<?php echo '<td>' .$pdims[0]. '</td>'; ?>
<?php echo '<td>' .$poilholding[0]. '</td>'; ?>
<?php echo '<td>' .$psize[0]. '</td>'; ?>
<?php echo '<td>' .$pmaxload[0]. '</td>'; ?>
<?php echo '<td>' .$pbays[0]. '</td>'; ?>
<?php echo '<td>' .$pkva[0]. '</td>'; ?>
<?php echo '<td>' .$ptcapacity[0]. '</td>'; ?>
</tr>
<?php } ?>
<?php endif; ?>
</tbody>
</table>
</div>
magento-1.9 configurable-product products table
add a comment |
Got a table which currently pulls the data of the Attributes of the config products. Im trying to add a the Attribute titles. Currently got this but can not seem to spit the Label out. Any ideas?
<div class="col-sm-8" style="padding:0px;">
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<div class="confpros">
<table class="<?php echo $packclass; ?> moreproducts">
<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>
<?php
$simpleids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($_product->getId());
$subproducts = Mage::getModel('catalog/product')->getCollection()
->addAttributeToFilter('entity_id', $simpleids)
->addAttributeToFilter('status', array('eq' => 1))
/*->setOrder('sku', 'ASC');*/
->setOrder('pir_model', 'ASC');
$count = 1;
?>
<thead>
<?php
$count = 1;
foreach($subproducts as $simple) {
while ($count <= 1) {
$simpleids = Mage::getModel('catalog/product')->load($simple->getId());
$attributes = $simpleids->getAttributes();
$aTmp = array();
$i = 0;
foreach( $attributes as $row ) {
if( $row->getIsVisibleOnFront() && $row->getFrontendLabel() == 'pir_model' ) {
$data = $row->getData();
if( $i++ == 0 ) {
$aTmp[-1] = $row;
break;
}
}
}
foreach( $_attributes as $row ) {
$tmp = new Mage_Catalog_Model_Resource_Eav_Attribute();
$row = $tmp->load($row->getAttributeId());
if( $row->getIsVisibleOnFront() ) {
$aTmp = $row;
}
}
ksort($aTmp);
$attributes = array_values($aTmp);
$aAtributeHolder = $attributes;
?>
<tr>
<!-- <th>Item</th> -->
<?php $y = 0; ?>
<?php foreach ($attributes as $attribute) {
if ($attribute->getIsVisibleOnFront()) { ?>
<?php if ($y < 1) { ?>
<?php
$value = $attribute->getFrontend()->getValue($simpleids);
$label = $attribute->getFrontendLabel();
?>
<?php //echo $value; ?>
<th>
<?php if ($value != "No") { ?>
<?php echo $label; ?>
<?php } ?>
</th>
<?php } ?>
<?php $y++; ?>
<?php } ?>
<?php } ?>
<?php /*echo "1"; die();*/ ?>
<!-- Ecommerce -->
<th class="ecom">Test</th>
<!-- End Ecommerce -->
</tr>
<?php $count++; ?>
<?php } ?>
<?php } ?>
</thead>
<tbody>
<?php
foreach($subproducts as $simple) {
//for( $i = 65; $i <= 90; $i++ ) {
$simplePro = Mage::getModel('catalog/product')->load($simple->getId());
// Pack name
$packname = $simplePro->getAttributeText('pir_model');
$packclass = preg_replace('/s*/', '', $packname);
$packclass = strtolower($packclass);
$packname = explode("_", $simplePro->getAttributeText('pir_model'));
// Width
$pwidth = $simplePro->getAttributeText('pir_width');
$pwidth = preg_replace('/s*/', '', $pwidth);
$pwidth = strtolower($pwidth);
$pwidth = explode("_", $simplePro->getAttributeText('pir_width'));
// Length
$plength = $simplePro->getAttributeText('pir_lenght');
$plength = preg_replace('/s*/', '', $plength);
$plength = strtolower($plength);
$plength = explode("_", $simplePro->getAttributeText('pir_lenght'));
// Arch
$parcheight = $simplePro->getAttributeText('pir_arch_height');
$parcheight = preg_replace('/s*/', '', $parcheight);
$parcheight = strtolower($parcheight);
$parcheight = explode("_", $simplePro->getAttributeText('pir_arch_height'));
//dims
$pdims = $simplePro->getAttributeText('pir_dims');
$pdims = preg_replace('/s*/', '', $pdims);
$pdims = strtolower($pdims);
$pdims = explode("_", $simplePro->getAttributeText('pir_dims'));
//Oil Holding Capacity
$poilholding = $simplePro->getAttributeText('pir_oil_holding_capacity');
$poilholding = preg_replace('/s*/', '', $poilholding);
$poilholding = strtolower($poilholding);
$poilholding = explode("_", $simplePro->getAttributeText('pir_oil_holding_capacity'));
//Max Even Load Capacity
$pmaxload = $simplePro->getAttributeText('pir_max_even_load_capacity');
$pmaxload = preg_replace('/s*/', '', $pmaxload);
$pmaxload = strtolower($pmaxload);
$pmaxload = explode("_", $simplePro->getAttributeText('pir_max_even_load_capacity'));
//Bays
$pbays = $simplePro->getAttributeText('pir_bays');
$pbays = preg_replace('/s*/', '', $pbays);
$pbays = strtolower($pbays);
$pbays = explode("_", $simplePro->getAttributeText('pir_bays'));
//Tray Depth
$ptdepth = $simplePro->getAttributeText('pir_tray_depth');
$ptdepth = preg_replace('/s*/', '', $ptdepth);
$ptdepth = strtolower($ptdepth);
$ptdepth = explode("_", $simplePro->getAttributeText('pir_tray_depth'));
//kVA
$pkva = $simplePro->getAttributeText('pir_kva');
$pkva = preg_replace('/s*/', '', $pkva);
$pkva = strtolower($pkva);
$pkva = explode("_", $simplePro->getAttributeText('pir_kva'));
//Tank Capacity
$ptcapacity = $simplePro->getAttributeText('pir_tank_capacity');
$ptcapacity = preg_replace('/s*/', '', $ptcapacity);
$ptcapacity = strtolower($ptcapacity);
$ptcapacity = explode("_", $simplePro->getAttributeText('pir_tank_capacity'));
//Size
$psize = $simplePro->getAttributeText('pir_size');
$psize = preg_replace('/s*/', '', $psize);
$psize = strtolower($psize);
$psize = explode("_", $simplePro->getAttributeText('pir_size'));
?>
<?php // Get Simple Products ?>
<?php $count++; ?>
<tr>
<td>
<?php echo $simplePro->getName(); ?>
</td>
<?php echo '<td>' .$pwidth[0]. '</td>'; ?>
<?php echo '<td>' .$plength[0]. '</td>'; ?>
<?php echo '<td>' .$pwidth[0]. '</td>'; ?>
<?php echo '<td>' .$parcheight[0]. '</td>'; ?>
<?php echo '<td>' .$pdims[0]. '</td>'; ?>
<?php echo '<td>' .$poilholding[0]. '</td>'; ?>
<?php echo '<td>' .$psize[0]. '</td>'; ?>
<?php echo '<td>' .$pmaxload[0]. '</td>'; ?>
<?php echo '<td>' .$pbays[0]. '</td>'; ?>
<?php echo '<td>' .$pkva[0]. '</td>'; ?>
<?php echo '<td>' .$ptcapacity[0]. '</td>'; ?>
</tr>
<?php } ?>
<?php endif; ?>
</tbody>
</table>
</div>
magento-1.9 configurable-product products table
add a comment |
Got a table which currently pulls the data of the Attributes of the config products. Im trying to add a the Attribute titles. Currently got this but can not seem to spit the Label out. Any ideas?
<div class="col-sm-8" style="padding:0px;">
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<div class="confpros">
<table class="<?php echo $packclass; ?> moreproducts">
<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>
<?php
$simpleids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($_product->getId());
$subproducts = Mage::getModel('catalog/product')->getCollection()
->addAttributeToFilter('entity_id', $simpleids)
->addAttributeToFilter('status', array('eq' => 1))
/*->setOrder('sku', 'ASC');*/
->setOrder('pir_model', 'ASC');
$count = 1;
?>
<thead>
<?php
$count = 1;
foreach($subproducts as $simple) {
while ($count <= 1) {
$simpleids = Mage::getModel('catalog/product')->load($simple->getId());
$attributes = $simpleids->getAttributes();
$aTmp = array();
$i = 0;
foreach( $attributes as $row ) {
if( $row->getIsVisibleOnFront() && $row->getFrontendLabel() == 'pir_model' ) {
$data = $row->getData();
if( $i++ == 0 ) {
$aTmp[-1] = $row;
break;
}
}
}
foreach( $_attributes as $row ) {
$tmp = new Mage_Catalog_Model_Resource_Eav_Attribute();
$row = $tmp->load($row->getAttributeId());
if( $row->getIsVisibleOnFront() ) {
$aTmp = $row;
}
}
ksort($aTmp);
$attributes = array_values($aTmp);
$aAtributeHolder = $attributes;
?>
<tr>
<!-- <th>Item</th> -->
<?php $y = 0; ?>
<?php foreach ($attributes as $attribute) {
if ($attribute->getIsVisibleOnFront()) { ?>
<?php if ($y < 1) { ?>
<?php
$value = $attribute->getFrontend()->getValue($simpleids);
$label = $attribute->getFrontendLabel();
?>
<?php //echo $value; ?>
<th>
<?php if ($value != "No") { ?>
<?php echo $label; ?>
<?php } ?>
</th>
<?php } ?>
<?php $y++; ?>
<?php } ?>
<?php } ?>
<?php /*echo "1"; die();*/ ?>
<!-- Ecommerce -->
<th class="ecom">Test</th>
<!-- End Ecommerce -->
</tr>
<?php $count++; ?>
<?php } ?>
<?php } ?>
</thead>
<tbody>
<?php
foreach($subproducts as $simple) {
//for( $i = 65; $i <= 90; $i++ ) {
$simplePro = Mage::getModel('catalog/product')->load($simple->getId());
// Pack name
$packname = $simplePro->getAttributeText('pir_model');
$packclass = preg_replace('/s*/', '', $packname);
$packclass = strtolower($packclass);
$packname = explode("_", $simplePro->getAttributeText('pir_model'));
// Width
$pwidth = $simplePro->getAttributeText('pir_width');
$pwidth = preg_replace('/s*/', '', $pwidth);
$pwidth = strtolower($pwidth);
$pwidth = explode("_", $simplePro->getAttributeText('pir_width'));
// Length
$plength = $simplePro->getAttributeText('pir_lenght');
$plength = preg_replace('/s*/', '', $plength);
$plength = strtolower($plength);
$plength = explode("_", $simplePro->getAttributeText('pir_lenght'));
// Arch
$parcheight = $simplePro->getAttributeText('pir_arch_height');
$parcheight = preg_replace('/s*/', '', $parcheight);
$parcheight = strtolower($parcheight);
$parcheight = explode("_", $simplePro->getAttributeText('pir_arch_height'));
//dims
$pdims = $simplePro->getAttributeText('pir_dims');
$pdims = preg_replace('/s*/', '', $pdims);
$pdims = strtolower($pdims);
$pdims = explode("_", $simplePro->getAttributeText('pir_dims'));
//Oil Holding Capacity
$poilholding = $simplePro->getAttributeText('pir_oil_holding_capacity');
$poilholding = preg_replace('/s*/', '', $poilholding);
$poilholding = strtolower($poilholding);
$poilholding = explode("_", $simplePro->getAttributeText('pir_oil_holding_capacity'));
//Max Even Load Capacity
$pmaxload = $simplePro->getAttributeText('pir_max_even_load_capacity');
$pmaxload = preg_replace('/s*/', '', $pmaxload);
$pmaxload = strtolower($pmaxload);
$pmaxload = explode("_", $simplePro->getAttributeText('pir_max_even_load_capacity'));
//Bays
$pbays = $simplePro->getAttributeText('pir_bays');
$pbays = preg_replace('/s*/', '', $pbays);
$pbays = strtolower($pbays);
$pbays = explode("_", $simplePro->getAttributeText('pir_bays'));
//Tray Depth
$ptdepth = $simplePro->getAttributeText('pir_tray_depth');
$ptdepth = preg_replace('/s*/', '', $ptdepth);
$ptdepth = strtolower($ptdepth);
$ptdepth = explode("_", $simplePro->getAttributeText('pir_tray_depth'));
//kVA
$pkva = $simplePro->getAttributeText('pir_kva');
$pkva = preg_replace('/s*/', '', $pkva);
$pkva = strtolower($pkva);
$pkva = explode("_", $simplePro->getAttributeText('pir_kva'));
//Tank Capacity
$ptcapacity = $simplePro->getAttributeText('pir_tank_capacity');
$ptcapacity = preg_replace('/s*/', '', $ptcapacity);
$ptcapacity = strtolower($ptcapacity);
$ptcapacity = explode("_", $simplePro->getAttributeText('pir_tank_capacity'));
//Size
$psize = $simplePro->getAttributeText('pir_size');
$psize = preg_replace('/s*/', '', $psize);
$psize = strtolower($psize);
$psize = explode("_", $simplePro->getAttributeText('pir_size'));
?>
<?php // Get Simple Products ?>
<?php $count++; ?>
<tr>
<td>
<?php echo $simplePro->getName(); ?>
</td>
<?php echo '<td>' .$pwidth[0]. '</td>'; ?>
<?php echo '<td>' .$plength[0]. '</td>'; ?>
<?php echo '<td>' .$pwidth[0]. '</td>'; ?>
<?php echo '<td>' .$parcheight[0]. '</td>'; ?>
<?php echo '<td>' .$pdims[0]. '</td>'; ?>
<?php echo '<td>' .$poilholding[0]. '</td>'; ?>
<?php echo '<td>' .$psize[0]. '</td>'; ?>
<?php echo '<td>' .$pmaxload[0]. '</td>'; ?>
<?php echo '<td>' .$pbays[0]. '</td>'; ?>
<?php echo '<td>' .$pkva[0]. '</td>'; ?>
<?php echo '<td>' .$ptcapacity[0]. '</td>'; ?>
</tr>
<?php } ?>
<?php endif; ?>
</tbody>
</table>
</div>
magento-1.9 configurable-product products table
Got a table which currently pulls the data of the Attributes of the config products. Im trying to add a the Attribute titles. Currently got this but can not seem to spit the Label out. Any ideas?
<div class="col-sm-8" style="padding:0px;">
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<div class="confpros">
<table class="<?php echo $packclass; ?> moreproducts">
<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>
<?php
$simpleids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($_product->getId());
$subproducts = Mage::getModel('catalog/product')->getCollection()
->addAttributeToFilter('entity_id', $simpleids)
->addAttributeToFilter('status', array('eq' => 1))
/*->setOrder('sku', 'ASC');*/
->setOrder('pir_model', 'ASC');
$count = 1;
?>
<thead>
<?php
$count = 1;
foreach($subproducts as $simple) {
while ($count <= 1) {
$simpleids = Mage::getModel('catalog/product')->load($simple->getId());
$attributes = $simpleids->getAttributes();
$aTmp = array();
$i = 0;
foreach( $attributes as $row ) {
if( $row->getIsVisibleOnFront() && $row->getFrontendLabel() == 'pir_model' ) {
$data = $row->getData();
if( $i++ == 0 ) {
$aTmp[-1] = $row;
break;
}
}
}
foreach( $_attributes as $row ) {
$tmp = new Mage_Catalog_Model_Resource_Eav_Attribute();
$row = $tmp->load($row->getAttributeId());
if( $row->getIsVisibleOnFront() ) {
$aTmp = $row;
}
}
ksort($aTmp);
$attributes = array_values($aTmp);
$aAtributeHolder = $attributes;
?>
<tr>
<!-- <th>Item</th> -->
<?php $y = 0; ?>
<?php foreach ($attributes as $attribute) {
if ($attribute->getIsVisibleOnFront()) { ?>
<?php if ($y < 1) { ?>
<?php
$value = $attribute->getFrontend()->getValue($simpleids);
$label = $attribute->getFrontendLabel();
?>
<?php //echo $value; ?>
<th>
<?php if ($value != "No") { ?>
<?php echo $label; ?>
<?php } ?>
</th>
<?php } ?>
<?php $y++; ?>
<?php } ?>
<?php } ?>
<?php /*echo "1"; die();*/ ?>
<!-- Ecommerce -->
<th class="ecom">Test</th>
<!-- End Ecommerce -->
</tr>
<?php $count++; ?>
<?php } ?>
<?php } ?>
</thead>
<tbody>
<?php
foreach($subproducts as $simple) {
//for( $i = 65; $i <= 90; $i++ ) {
$simplePro = Mage::getModel('catalog/product')->load($simple->getId());
// Pack name
$packname = $simplePro->getAttributeText('pir_model');
$packclass = preg_replace('/s*/', '', $packname);
$packclass = strtolower($packclass);
$packname = explode("_", $simplePro->getAttributeText('pir_model'));
// Width
$pwidth = $simplePro->getAttributeText('pir_width');
$pwidth = preg_replace('/s*/', '', $pwidth);
$pwidth = strtolower($pwidth);
$pwidth = explode("_", $simplePro->getAttributeText('pir_width'));
// Length
$plength = $simplePro->getAttributeText('pir_lenght');
$plength = preg_replace('/s*/', '', $plength);
$plength = strtolower($plength);
$plength = explode("_", $simplePro->getAttributeText('pir_lenght'));
// Arch
$parcheight = $simplePro->getAttributeText('pir_arch_height');
$parcheight = preg_replace('/s*/', '', $parcheight);
$parcheight = strtolower($parcheight);
$parcheight = explode("_", $simplePro->getAttributeText('pir_arch_height'));
//dims
$pdims = $simplePro->getAttributeText('pir_dims');
$pdims = preg_replace('/s*/', '', $pdims);
$pdims = strtolower($pdims);
$pdims = explode("_", $simplePro->getAttributeText('pir_dims'));
//Oil Holding Capacity
$poilholding = $simplePro->getAttributeText('pir_oil_holding_capacity');
$poilholding = preg_replace('/s*/', '', $poilholding);
$poilholding = strtolower($poilholding);
$poilholding = explode("_", $simplePro->getAttributeText('pir_oil_holding_capacity'));
//Max Even Load Capacity
$pmaxload = $simplePro->getAttributeText('pir_max_even_load_capacity');
$pmaxload = preg_replace('/s*/', '', $pmaxload);
$pmaxload = strtolower($pmaxload);
$pmaxload = explode("_", $simplePro->getAttributeText('pir_max_even_load_capacity'));
//Bays
$pbays = $simplePro->getAttributeText('pir_bays');
$pbays = preg_replace('/s*/', '', $pbays);
$pbays = strtolower($pbays);
$pbays = explode("_", $simplePro->getAttributeText('pir_bays'));
//Tray Depth
$ptdepth = $simplePro->getAttributeText('pir_tray_depth');
$ptdepth = preg_replace('/s*/', '', $ptdepth);
$ptdepth = strtolower($ptdepth);
$ptdepth = explode("_", $simplePro->getAttributeText('pir_tray_depth'));
//kVA
$pkva = $simplePro->getAttributeText('pir_kva');
$pkva = preg_replace('/s*/', '', $pkva);
$pkva = strtolower($pkva);
$pkva = explode("_", $simplePro->getAttributeText('pir_kva'));
//Tank Capacity
$ptcapacity = $simplePro->getAttributeText('pir_tank_capacity');
$ptcapacity = preg_replace('/s*/', '', $ptcapacity);
$ptcapacity = strtolower($ptcapacity);
$ptcapacity = explode("_", $simplePro->getAttributeText('pir_tank_capacity'));
//Size
$psize = $simplePro->getAttributeText('pir_size');
$psize = preg_replace('/s*/', '', $psize);
$psize = strtolower($psize);
$psize = explode("_", $simplePro->getAttributeText('pir_size'));
?>
<?php // Get Simple Products ?>
<?php $count++; ?>
<tr>
<td>
<?php echo $simplePro->getName(); ?>
</td>
<?php echo '<td>' .$pwidth[0]. '</td>'; ?>
<?php echo '<td>' .$plength[0]. '</td>'; ?>
<?php echo '<td>' .$pwidth[0]. '</td>'; ?>
<?php echo '<td>' .$parcheight[0]. '</td>'; ?>
<?php echo '<td>' .$pdims[0]. '</td>'; ?>
<?php echo '<td>' .$poilholding[0]. '</td>'; ?>
<?php echo '<td>' .$psize[0]. '</td>'; ?>
<?php echo '<td>' .$pmaxload[0]. '</td>'; ?>
<?php echo '<td>' .$pbays[0]. '</td>'; ?>
<?php echo '<td>' .$pkva[0]. '</td>'; ?>
<?php echo '<td>' .$ptcapacity[0]. '</td>'; ?>
</tr>
<?php } ?>
<?php endif; ?>
</tbody>
</table>
</div>
magento-1.9 configurable-product products table
magento-1.9 configurable-product products table
edited 2 days ago
James
asked 2 days ago
JamesJames
12
12
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f257376%2fmagento-1-9-pull-in-attribute-labels-of-configurable-products%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f257376%2fmagento-1-9-pull-in-attribute-labels-of-configurable-products%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown