Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Display additional product attributes on Product information page

Posted on 2014-10-29
5
218 Views
Last Modified: 2016-03-02
I have a Magento website, fully functional. I just need to add additional information of the product on the Product information page. As shown on the attached files. I need to know where and which file to be edited and what commands need to be inserted.
additionalInfo.png
0
Comment
Question by:Shaun-1
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Jernej Navotnik
ID: 40410167
Dear Shaun-1!

*Edit: Hope I did correctly understand from the jpg - you do want to display the Manufacturer info? :)

There are a few steps, let me gude you throug. Here we go... :) :
1. Go to Attribute Sets (in Magento admin) and make sure "manufacturer" is assigned to the attribute set you are using (for the specific product - usually this is the case).
2. Make sure you have some Manufacturer information entered (at the attribute level) and selected at the product level
3. File to edit: app/design/frontend/yourpackage/yourtheme/template/catalog/product/view.phtml
(default path: app/design/frontend/default/modern/template/catalog/product/view.phtml)
4. The "magic" line:  
<?php echo 'Additinoal info - say ' . $_product->getAttributeText('manufacturer'); ?> 

Open in new window

Be sure you are putting this code after this line:
<?php $_product = $this->getProduct(); ?>

Open in new window


That's about all there is to it.

Best regards!
0
 

Author Comment

by:Shaun-1
ID: 40410383
I think I am almost there, but it is a bit daunting to make a change. I am fine tuning a bit to be more prcise. Please find attachments. I have attached view.phtml file.
What I would like to achieve is as below,
1.      After SKU display give 4 spaces, then the manufacturer and give 2 spaces, then
2.      First two characters of the Brand
The file looks complicated to me, could you verify if this is the correct file? if so where would I insert and what will be the magic commands.
ManfDisp-1.png
manfDisp-2.png
viewphtml.txt
0
 
LVL 4

Accepted Solution

by:
Jernej Navotnik earned 500 total points
ID: 40410457
The file  is correct.
Find this line:
<h1><?php echo nl2br($_product->getSku()); ?></h1>

Open in new window


Replace (around line 53) (but ! replace "NAMEOFBRANDATT" with the name of the "brand" attribute you would like to display [I don't know how it is called]):
<h1><?php echo nl2br($_product->getSku()); ?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $_product->getAttributeText('manufacturer'); ?>&nbsp;&nbsp;<?php echo substr($_product->getAttributeText('NAMEOFBRANDATT'), 0, 2); ?></h1>

Open in new window


Best regards, Jernej

*Edit - Note: the position of manufacturer name and brand is not fixed - it depends on the width of SKU. The best would be to display each in a separate line, or all three in some sort of containers (div,table). My vote is for each to be in the separate line.
0
 

Author Comment

by:Shaun-1
ID: 40410640
Dear Jerneg,
Thank you for making my life easier. I would not have been able to find the file which needs to be edited. I also need to know the file location of shopping cart where I need to fix the radio button selection alignment. Please see the attached file. I need to BOLD Australia Post, reduce gap between Australia Post and Estimated ..Std and Exp, also the radio buttons need to be aligned to the prices.

The samething I need to repeat for Road transport and In Store pick up

Your input is highly appreciated.
ShoppingCart1.png
ShoppingCart2.png
0
 
LVL 4

Expert Comment

by:Jernej Navotnik
ID: 40410703
Dear Shaun-1, you're most welcome.

The template file your are looking for:  /yourpackage/yourtheme/template/checkout/cart/shippnig.phtml
If the file does not exist, create the necessary folders and copy it from the base package/theme instead of editing it there.

But I suppose all this stilling you wish to accomplish, can be done in your theme's css files (and it is probably the only way to do it). The list has a class name of "sp-methods", if yours is still named by the default theme. CSS files can be found in /magRoot/skin/frontend/yourpackage/yourtheme/css .

You can test the css rules before editing the CSS files by using let's say firebug for Mozzilla (but this I presume you already know).

Best regards, Jernej
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question