Hi,

I am a newbie working on my first custom theme...

I am trying to override a template generated by ubercart. I used the devel module to determine that using node-product.tpl.php should override the current output... So, I created that file and put in the code that I wanted, cleared the cache and nothing happened...

What am I missing??

Comments

vm’s picture

devel allows you to clear the theme registry? I'm not sure if that is attached to cache or not. There is a way to turn this off and always clear the registry during development of the theme but I'll be darned if I can find that documentation at moment.

aprice42’s picture

thanks for the quick response...

I think I have read the documentation that you are referring to..

http://drupal.org/node/173880#theme-registry

it states that clearing the cache will clear the theme registry too... I have cleared the cache a number of times now, and still I am seeing the default output...

any other thoughts?

kovalev’s picture

Just to be confident, that you are talking about the right cache:
Clearing theme cache is done by pressing: "Clear cached data" in the bottom of the page at "/admin/settings/performance"
------------------------------------------------------------------------------------------------------------------------------------
Sergata - פיתוח תוכנה

aprice42’s picture

yes. that is the cache I am clearing...

so just to be clear, I have a theme called "latrunk" it lives here sites/all/themes/latrunk

I created the file node-product.tpl.php in that directory. the only other .tpl.php file that I have in there is page.tpl.php

is there some specific code that needs to be in the file node-product.tpl.php
Here is what I have in it...

<div class="product-teaser">
				<div class="teaser-photo">
				<div class="teaser-photo-photo">
						<img src="<?php echo $field_image_cache[0]["filepath"]; ?>" />
					</div>
					<!-- /teaser-photo-photo -->
					<div class="view-details">
						<a href=""><img src="magnify.png" /></a>
					</div>
					<!-- /view-details -->
				</div>
				<!-- /teaser-photo -->			
			</div>
			<!-- /product-teaser -->

Any more ideas?

kovalev’s picture

yes, you have to have a node.tpl.php file, even if it is empty, if Drupal doesn't find node.tpl.php, it does not go on looking for the more specific node-product.tpl.php or , say, node-12.tpl.php. It's the same thing with page, user, block and all of tamplate files
------------------------------------------------------------------------------------------------------------------------------------
Sergata - פיתוח תוכנה