eCommerce addon, adding product attributes to order page
Permalink
Hi can anyone help me.
I'm trying to add the product attributes to the print order page of the ecommerce package
I copied the code for the customer choices (see below) and it's bringing in the attribute names but not the values. What am I doing wrong?
I'm trying to add the product attributes to the print order page of the ecommerce package
/packages/core_commerce/elements/orders/detail.php
I copied the code for the customer choices (see below) and it's bringing in the attribute names but not the values. What am I doing wrong?
<?php if (is_object($op->product)) { ?> <?php Loader::model('attribute/categories/core_commerce_product', 'core_commerce'); $attribs = CoreCommerceProductAttributeKey::getList(); ?> <?php $text = ''; foreach($attribs as $ak) { ?> <?php $text .= $ak->render('label','',true) . ": " . $op->getAttribute($ak, 'display')."," ?> <?php } ?> <?php echo rtrim($text, ",") ?> <?php } else { ?> <?php echo t('Unknown. This product has been removed.')?> <?php } ?>
In version 2.8.10 for someting very similar.
That not being the question, I believe you need
Rather than
Because the product will have the attributes, not the order itself which I assume is what $op is.