4 replies [Last post]
faceorganics's picture
Offline
Joined: 04/10/2009
Juice: 19
Was this information Helpful?

I have created "views" to display my products in a grid. However, they look horrible and unformatted. I know I need to use the .tpl.php files to theme the row and the nodes and fields.

Is there someone out there that has .tpl.php files that mirror the same CSS as the ubercart catalog?? This is what I am trying to get my views to look like but it is not happenening. utlimately the view should match the defualt ubercart catalog view. ..

where can I find those ubercart .tpl theming files? Can anyone share that code/s with me please?

stephthegeek's picture
Offline
Theminator
Joined: 10/20/2007
Juice: 575
Re: Theme a VIEW to match the default ubercart catalog...need th

You should be able to do everything in just CSS. Install Firebug in Firefox to inspect the underlying markup and classes so you know what you're working with, then start making some changes in your theme's CSS.

It depends on the style you want to end up with. I don't know which theme you're using, and each one will display Ubercart's standard product catalog a little differently.

Some suggestions would be:
- background shading or borders around each item in the view
- add padding and/or margins to increase space between rows and columns
- centering text/images within each item
- adding emphasis to product titles (if you're using them on the grid) by doing a bolder/larger font
- add a border to images
- do some styling to add pizazz to Add to Cart buttons
- add margins to each field

Do you have a live link to this?

Gorgeous original Drupal themes (and Ubercart themes!) ~ Psst: more Ubercart themes on our new site

faceorganics's picture
Offline
Joined: 04/10/2009
Juice: 19
Re: Re: Theme a VIEW to match the default ubercart catalog...nee

I dont have a link to it cause im working on it on my local host...

Thanks for the suggestions - but where do I add that CSS? Im use the Acquia Marina theme...do I add it to the style.css theme? or the View sub themes?

I definitely want to add all that, but im not e3xactly sure how to do it...

Here is an example: I use views to make a product Grid. Now, its not centered. So where do I add the CSS to center everything? in the views templates? and then link to the style.css?

im so confused!

stephthegeek's picture
Offline
Theminator
Joined: 10/20/2007
Juice: 575
Re: Re: Re: Theme a VIEW to match the default ubercart catalog..

Usually you'd use your theme's style.css file, but Acquia Marina comes with a local.css file (actually open up local_sample.css and read the instructions) where you can make your changes as overrides so you can still easily upgrade the theme.

Gorgeous original Drupal themes (and Ubercart themes!) ~ Psst: more Ubercart themes on our new site

faceorganics's picture
Offline
Joined: 04/10/2009
Juice: 19
thanks! instead of making

thanks!

instead of making them in the local.css file...im making them in the themeing templates, like "views-fields.tpl.php" and view-rowstyle.tpl.php" and putting the CSS code above...

I guess next time I upgrade the theme, i will have to start using the local css file to avoid issues. . but i havnt been using it thus far...