Developer forum

Forum » Development » Product variable in BOM-loop

Product variable in BOM-loop


Reply
Hi folks,

Is it possible to gain access to a product-variable in a BOMloop ?

Because, this wont work:


   
       
            NO WAY!
           
   
       
   


Regards,
Martin


Replies

 
Nicolai Høeg Pedersen
Reply
This is how you should do it:

http://templates.dynamicweb-cms.com/eCommerce/Dynamicweb-eCommerce-template-tags/Product-Catalog/Product-detail/Loops/BOMConfigurators.aspx
 
Reply
I can't see what i'm doing different from the way it's described..

http://pastebin.com/E4JLr0a7
Thats my code.

I want to check a Mainproduct's customfield inside of the BOM-loop..
 
Nicolai Høeg Pedersen
Reply
Ecom:Product:Field should be Ecom:Product.Field
 
Reply
That returns the variable on the product IN THE LOOP.

I want the product before loop.

MAIN PRODUCT
- Info, picture and stuff goes here

%loop%
%Get variable from MAIN PRODUCT%
%loopend%

Have a nice weekend :)
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Hi Martin

The template system does not support nested scopes, therefore I suggest using either JS or XSLT.
Currently I don't see any other way of doing what you're trying to achieve.

- Jeppe

 

You must be logged in to post in the forum