You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by rohit2006 <ro...@yahoo.com> on 2006/07/22 16:32:33 UTC
Re: Users - How to Create Product Properties or Details
Jacopo,
can you please give an example of how to include product attribute in the
product details page.
rohit
--
View this message in context: http://www.nabble.com/How-to-Create-Product-Properties-or-Details-tf1634919.html#a5446574
Sent from the OFBiz - User forum at Nabble.com.
Re: Users - How to Create Product Properties or Details
Posted by Chris Howe <cj...@yahoo.com>.
That's not a typo so much as it is a missing entry in
ProductUiLables.properties.
If you'll notice the field "labelTitleProperty" only
gets used in the decorator screen
CommonProductDecorator located in
CatalogCommonScreens.xml where it is called in the
context of: ${uiLabelMap.${labelTitleProperty}}
--- rohit2006 <ro...@yahoo.com> wrote:
>
> There is also a typo error in the ProductScreen.xml,
> which reads
> ProductProductAttributes, instead of Product
> Attributes.
>
> Hope somebody corrects it.
>
> rohit
> --
> View this message in context:
>
http://www.nabble.com/How-to-Create-Product-Properties-or-Details-tf1634919.html#a5447533
> Sent from the OFBiz - User forum at Nabble.com.
>
>
Re: Users - How to Create Product Properties or Details
Posted by rohit2006 <ro...@yahoo.com>.
There is also a typo error in the ProductScreen.xml, which reads
ProductProductAttributes, instead of Product Attributes.
Hope somebody corrects it.
rohit
--
View this message in context: http://www.nabble.com/How-to-Create-Product-Properties-or-Details-tf1634919.html#a5447533
Sent from the OFBiz - User forum at Nabble.com.
Re: Users - How to Create Product Properties or Details
Posted by rohit2006 <ro...@yahoo.com>.
Thanks Jacopo for the prompt reply,
I am still new to the workings of ofbiz, can you please be little more
descriptive. Like how to 'Retrieve the attribute (from the ProductAttribute
entity) in the bsh script'.
i thought i could use the scripts, that are used in the catalog section to
insert and update attributes for the product. I was unable to properly
locate where the scipts lied and how exactly they were invoked.
rohit
--
View this message in context: http://www.nabble.com/How-to-Create-Product-Properties-or-Details-tf1634919.html#a5446695
Sent from the OFBiz - User forum at Nabble.com.
Re: Users - How to Create Product Properties or Details
Posted by Jacques Le Roux <ja...@les7arts.com>.
OK, I understand what you were meaning now.
I was thinking that you were asking about the rightness of your own code. Now I understand that you propose to commit this snippet.
I have no right to commit in this component (order) so I will wait for an official commiter to do it.
Furthermore this is not a right way to contribute to the project, please read here :
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
Thanks for your work
Jacques
> i guess the features in ofbiz are quite interlinked and code is reused in multiple applications. So just wanted to be sure, if
thers are another file where such code was supposed to be or it was fine to put it in these fines.
>
> If the code is fine, can you commit it, such that one does not wonder why attributes dont show up in product pages.
>
> Rohit
>
>
>
> ----- Original Message ----
> From: Jacques Le Roux <ja...@les7arts.com>
> To: ofbiz-user@incubator.apache.org
> Sent: Tuesday, July 25, 2006 8:46:37 AM
> Subject: Re: Users - How to Create Product Properties or Details
>
>
> Hi Rohit,
>
> It seems rather good but what do you exactly mean (want t to know ?) when you say "the right method to edit files in future" ?
>
> Jacques
>
>
> >
> > hi jacopo,
> >
> > i was able to get this done. i feel pretty proud of this, this is my first
> > step towards learning ofbiz.
> >
> > i made the following additions:
> >
> >
> > 1) In order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productdetail.bsh
> >
> > // get the product attribute(s)
> > attribute = product.getRelated("ProductAttribute");
> > context.put("ProductAttribute", attribute);
> >
> > 2) In
> > component://order/webapp/ordermgr/entry/catalog/marketplace_productdetail.ftl
> >
> > <#-- attributes of product -->
> >
> > <#if ProductAttribute?has_content>
> >
> > <#list ProductAttribute as ProductAttributes>
> > <div class="tabletext">
> > ${ProductAttributes.attrName}: ${ProductAttributes.attrValue}</div>
> > </#list>
> > </#if>
> > <#-- attributes of product END -->
> >
> > I will appreciate if you just let me know if this is the right method to
> > edit files in future, or there is another better way.
> >
> > Thanks
> >
> > rohti
> > --
> > View this message in context: http://www.nabble.com/How-to-Create-Product-Properties-or-Details-tf1634919.html#a5484153
> > Sent from the OFBiz - User forum at Nabble.com.
Re: Users - How to Create Product Properties or Details
Posted by Rohit Sureka <ro...@yahoo.com>.
i guess the features in ofbiz are quite interlinked and code is reused in multiple applications. So just wanted to be sure, if thers are another file where such code was supposed to be or it was fine to put it in these fines.
If the code is fine, can you commit it, such that one does not wonder why attributes dont show up in product pages.
Rohit
----- Original Message ----
From: Jacques Le Roux <ja...@les7arts.com>
To: ofbiz-user@incubator.apache.org
Sent: Tuesday, July 25, 2006 8:46:37 AM
Subject: Re: Users - How to Create Product Properties or Details
Hi Rohit,
It seems rather good but what do you exactly mean (want t to know ?) when you say "the right method to edit files in future" ?
Jacques
>
> hi jacopo,
>
> i was able to get this done. i feel pretty proud of this, this is my first
> step towards learning ofbiz.
>
> i made the following additions:
>
>
> 1) In order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productdetail.bsh
>
> // get the product attribute(s)
> attribute = product.getRelated("ProductAttribute");
> context.put("ProductAttribute", attribute);
>
> 2) In
> component://order/webapp/ordermgr/entry/catalog/marketplace_productdetail.ftl
>
> <#-- attributes of product -->
>
> <#if ProductAttribute?has_content>
>
> <#list ProductAttribute as ProductAttributes>
> <div class="tabletext">
> ${ProductAttributes.attrName}: ${ProductAttributes.attrValue}</div>
> </#list>
> </#if>
> <#-- attributes of product END -->
>
> I will appreciate if you just let me know if this is the right method to
> edit files in future, or there is another better way.
>
> Thanks
>
> rohti
> --
> View this message in context: http://www.nabble.com/How-to-Create-Product-Properties-or-Details-tf1634919.html#a5484153
> Sent from the OFBiz - User forum at Nabble.com.
Re: Users - How to Create Product Properties or Details
Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Rohit,
It seems rather good but what do you exactly mean (want t to know ?) when you say "the right method to edit files in future" ?
Jacques
>
> hi jacopo,
>
> i was able to get this done. i feel pretty proud of this, this is my first
> step towards learning ofbiz.
>
> i made the following additions:
>
>
> 1) In order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productdetail.bsh
>
> // get the product attribute(s)
> attribute = product.getRelated("ProductAttribute");
> context.put("ProductAttribute", attribute);
>
> 2) In
> component://order/webapp/ordermgr/entry/catalog/marketplace_productdetail.ftl
>
> <#-- attributes of product -->
>
> <#if ProductAttribute?has_content>
>
> <#list ProductAttribute as ProductAttributes>
> <div class="tabletext">
> ${ProductAttributes.attrName}: ${ProductAttributes.attrValue}</div>
> </#list>
> </#if>
> <#-- attributes of product END -->
>
> I will appreciate if you just let me know if this is the right method to
> edit files in future, or there is another better way.
>
> Thanks
>
> rohti
> --
> View this message in context: http://www.nabble.com/How-to-Create-Product-Properties-or-Details-tf1634919.html#a5484153
> Sent from the OFBiz - User forum at Nabble.com.
Re: Users - How to Create Product Properties or Details
Posted by rohit2006 <ro...@yahoo.com>.
hi jacopo,
i was able to get this done. i feel pretty proud of this, this is my first
step towards learning ofbiz.
i made the following additions:
1) In order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productdetail.bsh
// get the product attribute(s)
attribute = product.getRelated("ProductAttribute");
context.put("ProductAttribute", attribute);
2) In
component://order/webapp/ordermgr/entry/catalog/marketplace_productdetail.ftl
<#-- attributes of product -->
<#if ProductAttribute?has_content>
<#list ProductAttribute as ProductAttributes>
<div class="tabletext">
${ProductAttributes.attrName}: ${ProductAttributes.attrValue}</div>
</#list>
</#if>
<#-- attributes of product END -->
I will appreciate if you just let me know if this is the right method to
edit files in future, or there is another better way.
Thanks
rohti
--
View this message in context: http://www.nabble.com/How-to-Create-Product-Properties-or-Details-tf1634919.html#a5484153
Sent from the OFBiz - User forum at Nabble.com.
Re: Users - How to Create Product Properties or Details
Posted by Jacopo Cappellato <ti...@sastau.it>.
Retrieve the attribute (from the ProductAttribute entity) in the bsh
script and put it into the context; then you can use it in the ftl
template using the ${} syntax.
Jacopo
rohit2006 wrote:
> Jacopo,
>
> can you please give an example of how to include product attribute in the
> product details page.
>
> rohit