1

I seem to be having a bit of strange problem when trying to pull Attribute data to my product listing page. If I add this line of PHP:

<?php echo $this->escapeHtml($_product->getAttributeText('manufacturer')); ?>

I can successfully add the Manufacturer Attribute to my listings page however if I try the same code for example:

<?php echo $this->escapeHtml($_product->getAttributeText('model')); ?>

If I change the Attribute to model the code does not pull through the data for that attribute.

I find it strange how Manufacturers pulls through to the front end but Model does not.

It made me wonder if I setup the attribute wrongly so I copied all of the settings the Manufacturer attribute has and I still can't pull the data through.

Any ideas why this might be happening guys?

Here is my block of PHP:

<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $this->escapeHtml($_product->getAttributeText('manufacturer')); ?>&nbsp;<?php echo $this->escapeHtml($_product->getAttributeText('model')); ?><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
0

Nick,

This code is work if model attribute is enable in Use In product list.

So,go to admin>Catalog>Mange Attribute> Select your attribute Check the Used in Product list and make it yes.

Then goto admin>System> do indexing from Index Management indexing

  • Thanks for this! What I didn't realise is that I needed to Index it afterwards :) – Uncle Kracker Feb 15 '15 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.