Developer forum

Forum » Ecommerce - Standard features » Show all products with same manufacture

Show all products with same manufacture

Thomas Kjærgaard
Reply
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?




Replies

 
Merethe Nielsen
Reply

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
Reply
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?

 
Søren Kottal-Nielsen
Reply
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
Reply
I'm gonna try that out my friend :) Thanks!
 
Søren Kottal-Nielsen
Reply
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
Reply

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
Reply
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:

<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>&nbsp;&nbsp;<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&aelig;ste</a><br />
    </span>  


It seems a bit strange to me?

 

You must be logged in to post in the forum