Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6991097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:26:55+00:00 2026-05-27T19:26:55+00:00

I have two custom attributes, one called ‘amz_prod_description’ and one called ‘upc’. According to

  • 0

I have two custom attributes, one called ‘amz_prod_description’ and one called ‘upc’.

According to this >
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/0_-_theming_in_magento/data_accessing_methods_from_within_various_scopes#accessing_the_value_of_a_product_s_custom_attribute

I should be able to access them both $product->getUpc() and $product->getAmzProdDescription() where $product. In the same switch, I am using both of these. The ‘upc’ attribute var works fine, the other doesn’t work at all which is really bugging the you-know-what out of me as they’re both using the methodology that Magento calls for and in the same PHP function. So they’re both in the same context, etc.

Help me!? :\

Here’s my actual code for what it’s worth >

case "{amazon_description}":
            $description = $product->getAmzProdDescription();
            // I have tested, $description is not being set.  I have changed the bottom return to just $description and it returns nothing.
            if(strlen($description) > 1499) {
                $amz_description = substr($description,0,1500) . "...";
            } else {
                $amz_description = $description;
            }

            return $amz_description;
        break;

case "{upc}":
            $upc = $product->getUpc();
            return $upc;
        break;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:26:56+00:00Added an answer on May 27, 2026 at 7:26 pm

    There’s a flag in the attribute management in the Magento admin called “Visible on Product View Page on Front-end”. Make sure that’s set to “Yes” for both attributes, otherwise the attribute won’t be built into the getData array. This assumes that your code is running in the frontend, although you haven’t specified that.

    Also make sure you rebuild indexes and flush the cache & cache storage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two ItemsControls, one a ListView, and one a custom control I am
I have two custom attributes defined like so: internal class SchemaAttribute : Attribute {
I have two custom attributes in my asp.net mvc(C#) application. [CustAttribute1()] [CustAttribute2()] When I
I have two custom methods for a model manager in Django. One of them
I have custom control with two textboxes and one drop down list. I want
I have this HTML code: <span id=one>one</span> <div> <span>two</span> </div> <span id=click>click</span> $(#click).click(function(){ $(this).css('color',
I have two custom controls that are analogous to a node and the control
I have two custom ActionFilters on an action. In first of the actionfilters, I
I have two lists of custom objects and want to update a field for
I have a UITableView with two custom cells and each of them has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.