3 replies [Last post]
druru's picture
Offline
Brain Stormer
Joined: 08/08/2007
Juice: 228
Was this information Helpful?

I'm in the throws of setting up a *very* simple shop that has only 1 product for sale. I'd like that product to be on the home page of the store *section* of my site.

I'm trying to figure out the best way to do this.

1) Ideally i'd like to be able to simply insert the themed single product node view into the front page node of the section using an uc theme function. Does anybody know if that function exists.. i can't find any theme_product or similar function that takes a node object or node id and normally themes an entire product node?

The closest i find uc_product_view but that's probably not going to do it. I also find uc_product_default (but this themes all the product nodes and would be much more useful if you could pass it a category or an array of nodes so that you can show only a subset of product nodes - fyi, this function might exist under a different name and i just haven't found it).

I imagine i could use drupal php code to do this as well. just looking for the simplest method

2) Alternatively i could set the store home section page to point to uc path 'catalog'. however, it looks silly with one category and nothing else on the page. So the question is:

a) how do i insert html in front/on top of the catalog themed output? I imagine there's a catalog theme function which i can override and insert html before the catalog. what/where is it? theme_uc_catalog_block, tapir_get_table?

b)OR we can do as in step 1. If i know the catalog them function, i can use it to insert the themed catalog into my store home section page node.

fyi, i'm sure i could just create a store home section node and then create a link to product node and feature it in a div box or something. But because i have only one product, it's kind of silly to make someone drill down another link to get to the single product. I'd prefer to just have the themed product with add to cart button on that front store page.

thanks

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Theming Store Section Front Page with One Product

1) Try theme_node(). Well, really theme('node', $node) just in case.

2) For both cases, the function is theme_uc_catalog_browse().

I think that you're right that you'd be better off having just the product rather than a full-blown catalog page containing only one item in it.

druru's picture
Offline
Brain Stormer
Joined: 08/08/2007
Juice: 228
cool. it looks like an uc

cool.

it looks like an uc product is themed at the drupal core node level which eventually calls all the uc product theming hooks via module_invoke.

thanks

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
Re: cool. it looks like an uc

How can i theme product list on catalog and manufacturer pages?