Hi,
Is it posible to show all products from a specific manufacture?
I can see on the products that they got a manufacture.ID e.g. MANU1
How do i put this in the url in order for DW to only show these products?
Developer forum
E-mail notifications
Show all products with same manufacture
Thomas Kjærgaard
Posted on 31/10/2011 13:02:24
Replies
Merethe Nielsen
Posted on 01/11/2011 07:59:39
How about using If statements like this:
<!--@If(Ecom:Manufacturor.ID=MANU2)--><!--@Ecom:Product.Name-->- <!--@Ecom:Manufacturor.ID--> <!--@EndIf-->
Select all your groups in the product catalog and the If statements filters the products.
Read more about If statements in the Template manual.
Thomas Kjærgaard
Posted on 01/11/2011 08:20:17
Well i don't think this is quite suiteble for me..
The function i seek may also be know as a "Brands" category. You know, it should dynamicly get all products by a manufacture based on the "ManufactureID" e.g. MANU1.
Ain't it possible to achive this by adding the "ManufactureID" to the url query?
The function i seek may also be know as a "Brands" category. You know, it should dynamicly get all products by a manufacture based on the "ManufactureID" e.g. MANU1.
Ain't it possible to achive this by adding the "ManufactureID" to the url query?
Søren Kottal-Nielsen
Posted on 01/11/2011 08:48:24
You can compare variables through if statements, so it should be possible by having a products.aspx?ManufactureID=22 solution. I.e.:
<!--@If(Ecom:Manufacturor.ID=Server:Request.manufactureid)-->
Thomas Kjærgaard
Posted on 01/11/2011 08:50:07
I'm gonna try that out my friend :) Thanks!
Søren Kottal-Nielsen
Posted on 01/11/2011 08:54:46
I would suggest adding another parameter where you can add the name of the manufacturor, for SEO reasons. Like products.aspx?manu=thomiweb&manuid=22
Juriaan Pinkse
Posted on 01/11/2011 20:25:56
Maybe the best solution is to just use Dynamicweb Filtering for this. Create a filter on Manufacturer and when selecting this you get the desired selection, based on a querystring variable.
Thomas Kjærgaard
Posted on 02/11/2011 09:38:09
I can't get it working Søren.
If i "print" out both the Server:Request and the product Manufacurer.ID, and i get both values correctly. But when i try to match them it simply returns nothing?
Here is the code:
It seems a bit strange to me?
If i "print" out both the Server:Request and the product Manufacurer.ID, and i get both values correctly. But when i try to match them it simply returns nothing?
Here is the code:
<h1><!--@Ecom:Group.Name--></h1> <div class="prod-list"> <!--@LoopStart(Products)--> <!--@If Defined(Server:Request.manuid)--> <!--@If(Server:Request.manuid=Ecom:Manufacturor.ID)--> <div class="prod"> <a href="<!--@Ecom:Product.LinkGroup.Clean.PID-->"> <div class="img-holdr"> <div class="inside"> <img align="middle" src="/admin/public/getimage.aspx?Image=<!--@Ecom:Product.ImageLarge.Clean-->&Format=jpg&Width=130&Height=130&Crop=5" /> </div> </div> <div class="info"> <div class="name"><!--@Ecom:Product.Name--></div> <!--@If Not(Ecom:Product.Price==Ecom:Product.Discount.Price.PriceFormatted)--> <div class="price"><span class="discount"><!--@Ecom:Product.Discount.Price.PriceFormatted--></span> <strike><!--@Ecom:Product.Price--></strike></div> <!--@EndIf--> <!--@If(Ecom:Product.Price==Ecom:Product.Discount.Price.PriceFormatted)--> <div class="price"><!--@Ecom:Product.Price--></div> <!--@EndIf--> </div> </a> </div> <!--@EndIf--> <!--@EndIf(Server:Request.manuid)--> <!--@LoopEnd(Products)--> </div> <span id="pagenavigation"> <a id="prevpage" href="<!--@Ecom:ProductList.PrevPage.Clean-->" <!--@Ecom:ProductList.PrevPage-->>Forrige</a> <a id="nextpage" href="<!--@Ecom:ProductList.NextPage.Clean-->" <!--@Ecom:ProductList.NextPage-->>Næste</a><br /> </span>
It seems a bit strange to me?
You must be logged in to post in the forum