Solved

Display additional product attributes on Product information page

Posted on 2014-10-29
5
215 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

813 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now