Display Products of Specific Category

Hi guys

Very frustrated, please help! I’ve been trying to find posts / resources on this problem for a couple of days now…
I’m trying to modify the code on start.tpl (bargain, top-shop etc) – not sure what / where to modify exactly.

What I’m trying to do:

  1. Create a code snippet that displays all products from a custom category
    i.e. ‘Myproducts’ – I can then take this and display it on the home page or wherever I want.

  2. Create a code snippet that displays details of a specific product (by name or id)

I appreciate any help that you guys can give me!!

Thanks!

Hi kermit,

I would miss-use a function of Admin -> Customer Info -> Promotions for this. Just adopt a Promotion that you do not use and it will be shown on start page.
Same for the specific product. Just assign only one product to the appropriate promotion.

Cheers

Thanks!

Do I need to add additional code on the Start page for this? I mean can I just ‘copy’ any promotion and then make a reference to that ‘promotion’ on the Start page somehow? or does it happen automatically?

Ideally, I would like to have a piece of code that references a category and displays all products belonging to that cat. This way I can move it around and modify it as I please (e.g. size=thin or whatever)

Is there a way to do this?

Thanks in advance!!

Hi,

you probably did not install the demodata so you still have got a blank start page, right?
Just try to alter a promotion - it will apprear on the start page or on the right frame “automatically”. Additionally, you might want to have a look at the templates /out/basic/tpl/start.tpl and _right.tpl. Probably there is obvious how promotions are handeled.

For the code snippet, I could imagine you had to write a module.

Regards

Hi Marco,

Yeah I got the demo data installed. Will try tonight to alter a promotion. I was just wondering if there was maybe a smarty command that would enable you to draw all products from a cat. Tried to modify bestsellers, top of the shop - to select a different category - but didn’t work.

Any other ideas would be helpful. Thanks!

Sigh

All the promotions in Admin are in German - how do I determine which is which?

Is there absolutely no way that I can modify the Besteller or Top of the Shop code in start.tpl to display products from a category that I specify??

Can someone please tell me how to do this?

Even as a nativ german speaking person it is not always clear which promotions has the effect you like to have.
There is only one way to find out: trying and testing which promotion has the effect you like.

When you know the effect, you can rename the promotion easily, why dont you use this feature to clarify the promotions?

CYA Firefax

Hi,

check this one out:
“Frisch eingetroffen” == “Just arrived”.

Of course, still manual work to assign every single product but assigning a category would need to programm a module. Have you had a chance to have a look at the tutorials how to code an extension?

Do you feel familiar enough with PHP to do so?

Cheers

Hi,

There is no possibility to assign a category to promotion. I would better suggesto one of the following:
A. You could make a link from fresh product to its default category (similar to what you have in details.tpl - a link to default product category)

OR

B. Create some special hidden category “Front page” and assign products you want to display in start page. Then load all products for this category in start view (over module), then display all its products in start.tpl template.

Thanks for the replies guys…

re tomas’ point B: That is exactly what I want to do! … except that… this is the noobie forum, right?

I do have php coding experience and while I’m sure that I might write modules or smarty snippets one day - I just don’t have the time to seriously figure out how to write a [B]module[/B] for Oxid right now!
Damn. Guess I’ll just have to wait and try to make do with what I have at the mo. Sigh!

Thanks for the help guys - appreciate it!

I’d also like to display a promotion on an external site. I have zero PHP skills.

Is there a module or an easy-ish solution to this surely universally helpful issue?