?
Solved

Display additional product attributes on Product information page

Posted on 2014-10-29
5
Medium Priority
?
232 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
[X]
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
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

801 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