Solved

Display additional product attributes on Product information page

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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…

914 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