Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

I want to edit the product template. how do i? 
 
Brad Morse
Jr. Member
 
Total Posts:  7
Joined:  2009-09-15
 

I installed the SEO blank theme http://www.magentocommerce.com/extension/974/yoast-blank-seo-theme

and now I want to apply that theme to the product page, but in the manage pages section, it does not have the product page, here is the URL to one of the products http://shop.gaif.us/index.php/catalog/product/view/id/16/s/nokia-2610-phone/category/8/

Screenshot of the manage pages admin, it does not show the product page template. I am very new to magento and I have a feeling you have to create your own product page and apply it to the appropriate pages: http://grab.by/1f2V

I only need pages for the following:

- product listing page (has a list of all the products for that specific category)
- product detail page (only shows the details of that specific product)

and obviously the other pages, checkout, cart, etc…

Any help to how to create such pages will be very helpful and any links to tutorials would be nice too!

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

Hey, CMS is used only for a few pages. The rest is template/PHP only. (Actually, there are also a few other files in the locale folders)

So, you need to know some basic PHP to edit product/category pages. The files you’ll need to edit are
“app/design/(yourtheme)/default/template/catalog/product/view.phtml”
and a few others in the catalog/product folder.

You can find out which templates are used where by enabling template path hints.
http://sree.cc/2008/12/01/magento-how-to-enable-template-path-hints-and-block-names/

You should read the “Designers Guide to Magento” also. It’s a heavy read but a must have (be sure to search the forums and the web for clarifications on the many questions that will arise while making even basic modifications).
http://www.magentocommerce.com/design_guide

Good luck & have fun!  wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brad Morse
Jr. Member
 
Total Posts:  7
Joined:  2009-09-15
 

I read the Magento Design guide and now I am taking baby steps w/ editing just the logo.gif within the blank seo theme

The code from logo-home.phtml

<h1 id="logo" class="logo" title="<?php echo $this->getLogoAlt() ?>" style="background-image:url(<?php echo $this->getLogoSrc() ?>);"><a href="<?php echo $this->getUrl('') ?>"><?php echo $this->getLogoAlt() ?></a></h1>

The html renders like this:

<h1 id="logo" class="logo" title="Magento Commerce" style="background-image:url(http://shop.domain.us/skin/frontend/default/blank_seo/images/logo.gif);"><a href="http://shop.domain.us/index.php/">Magento Commerce</a></h1>

Do I make the change in logo-home.phtml or another file? Because I see that logo-home.phtml is calling the function getLogoSrc, so that makes me think I need to edit the source of the new logo I created in another file.

What file do you think I need to edit?

Any help is appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
demonkoryu
Guru
 
Avatar
Total Posts:  328
Joined:  2008-11-26
Dortmund, Germany
 

Hi, the $this->getLogoSrc() gets the logo URL from the Admin. Specifically, it refers to the image you specified at “System/Configuration/(General Tab)/Design/Logo Image Src”, normally “images/logo.gif”. This image is to be placed in the “skin/(yourtheme)/(yourskin)/image folder”.

If you want to use another image, just place it in that image folder and refer to it in the admin: image/mylogo.png or what you want.

So in this case, you just need to choose another image and not change any template (you could however do this by using the following code).

Generally, though, you refer to skin images in the templates simply via the following code:

<img src="<?php echo $this->getSkinUrl('images/myimage.jpg') ?>" />

Edit: getSkinUrl, not getUrl. It was late. rasberry

 
Magento Community Magento Community
Magento Community
Magento Community
 
nirmallama
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2009-12-05
 

thanx alot for your posting

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top