Solved

Display additional product attributes on Product information page

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
jquery, html5 UI 1 49
Open an ul or div with hover on a li,how? 9 23
CSS Divs in Safari 3 20
Wordpress CSS Link Issue 2 17
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

743 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

14 Experts available now in Live!

Get 1:1 Help Now