Developer forum

Forum » Development » Group and product on same page?

Group and product on same page?


Reply
I am trying to build a shop (without payment), and I need  to show both the chosen group of products (eg. køkkenarmaturer) AND when you click one of them, the product must show in the right side of the same page.
See this:

http://cassoe.net.dynamicweb.dk/da-DK/Produkter/Armatur/Køkken.aspx

I can't find any useful examples in your references - but I know from earlier that nearly everything is possible, so I'll ask anyway, and before I start a lot of experiments :-)

Is it at all possible to show both group and product in same page?

/Lise


Replies

 
Nicolai Høeg Pedersen
Reply
Yes - that should be possible.

On the page, add another paragraph for showing a product and set it up like you would want the product displayed.

In the existing paragraph where you have the list of products, alter the list template to include a parameter called PID and set it to the ID of the secon paragraph - know it is a little tricky.

Your link to the product looks like this now
http://cassoe.net.dynamicweb.dk/da-DK/Produkter/Armatur/Køkken.aspx?ProductID=PROD4

Add a PID=123 to it and that will cause the product detailed to be rendered on the paragraph with the id 123 instead of the paragraph where the list is...

http://cassoe.net.dynamicweb.dk/da-DK/Produkter/Armatur/Køkken.aspx?ProductID=PROD4&PID=12

Hope this makes sense...
 
Reply

Hi, Nikolaj

It makes a lot of sense, and it works!

But now I get a little lazy...

With this method, as I see it, I need to make a copy of the productlist-template for each productgroup, because they have to be shown on a page each. - and because the PID's are coded directly in the template.

Is there a "shortcut" for this problem, if I would like to have only one productlist-template?


I have tried to make a group field called "afsnit", and then in the Ecom I have written the known paragraph id in this field for each group, and hoped that I was able to include the output as something like this ...&PID=!--@Ecom:Group:Field.afsnit.Value.Clean-->
 

But it does'nt work, and it was maybe a little bit to creative?

In the bottom of my ProductListCassoe.html template, I have hidden the full code string, which I have tried to use.

Is it in any way possible to get the PID number from at group field - or is there any other suggestions?

/Lise


 

 


 

 
Reply
Hi,

If the module has a "Display as" field like the News module, this would be easilly resolved.

I had a similar problem, and I solved it using xslt and in another ocasion using javascript.

I also resolved a similar case in the past, where we used only one paragraph and opened the product with ajax. This however may not be the best approach, since you won't get the SEO features.

Best Regards,
Nuno

 

You must be logged in to post in the forum