how to view product assoc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to view product assoc

puranisank
Hi,
The following lines are taken from "applications\product\webapp\catalog\WEB-INF\actions\product\EditProductAssoc.bsh".


if (product != null) {
    assocFromProducts = product.getRelated("MainProductAssoc", null, UtilMisc.toList("sequenceNum"));
    context.put("assocFromProducts", assocFromProducts);
   
    assocToProducts = product.getRelated("AssocProductAssoc");
    context.put("assocToProducts", assocToProducts);
}


I don't understand where from the variables "MainProductAssoc" and "AssocProductAssoc". I searched for the entities in this name. But I could not find out.

Could I please get some help regarding this.

Thanks
Purani
Reply | Threaded
Open this post in threaded view
|

Re: how to view product assoc

David E Jones-2

Those are relationship names. For more information I highly recommend  
looking at the documentation on the ofbiz.org site, including the  
Entity Engine Guide and the Framework Introduction videos. Even  
better, achieve an extensive knowledge of the with the Advanced  
Framework package from Undersun.

http://www.undersunconsulting.com/ecommerce/control/product/ 
~product_id=OFBADVFWKPKG

-David


On Sep 14, 2006, at 5:06 AM, Purani S wrote:

> Hi,
> The following lines are taken from "applications\product\webapp
> \catalog\WEB-INF\actions\product\EditProductAssoc.bsh".
>
>
> if (product != null) {
>     assocFromProducts = product.getRelated("MainProductAssoc",  
> null, UtilMisc.toList("sequenceNum"));
>     context.put("assocFromProducts", assocFromProducts);
>
>     assocToProducts = product.getRelated("AssocProductAssoc");
>     context.put("assocToProducts", assocToProducts);
> }
>
>
> I don't understand where from the variables "MainProductAssoc" and  
> "AssocProductAssoc". I searched for the entities in this name. But  
> I could not find out.
>
> Could I please get some help regarding this.
>
> Thanks
> Purani

Reply | Threaded
Open this post in threaded view
|

Re: Re: how to view product assoc

puranisank
In reply to this post by puranisank
Thanks David. Anyhow the relationship names should be given in the entityModel.xml files.
But I could not find those names in the xml file.
Thanking in advance.

Purani


On Thu, 14 Sep 2006 David E Jones wrote :

>
>Those are relationship names. For more information I highly recommend  looking at the documentation on the ofbiz.org site, including the  Entity Engine Guide and the Framework Introduction videos. Even  better, achieve an extensive knowledge of the with the Advanced  Framework package from Undersun.
>
>http://www.undersunconsulting.com/ecommerce/control/product/ ~product_id=OFBADVFWKPKG
>
>-David
>
>
>On Sep 14, 2006, at 5:06 AM, Purani S wrote:
>
>>Hi,
>>The following lines are taken from "applications\product\webapp \catalog\WEB-INF\actions\product\EditProductAssoc.bsh".
>>
>>
>>if (product != null) {
>>     assocFromProducts = product.getRelated("MainProductAssoc",  null, UtilMisc.toList("sequenceNum"));
>>     context.put("assocFromProducts", assocFromProducts);
>>
>>     assocToProducts = product.getRelated("AssocProductAssoc");
>>     context.put("assocToProducts", assocToProducts);
>>}
>>
>>
>>I don't understand where from the variables "MainProductAssoc" and  "AssocProductAssoc". I searched for the entities in this name. But  I could not find out.
>>
>>Could I please get some help regarding this.
>>
>>Thanks
>>Purani
>
Reply | Threaded
Open this post in threaded view
|

Re: how to view product assoc

David E Jones-2

Please don't take this personally, but this is the very reason you  
need to check out the docs!

A relationship name is the combination of the relationship title  
(optional) and the related entity name (required). So no, searching  
for the relationship name in the entity defs won't get you very far.

-David


On Sep 15, 2006, at 1:53 AM, Purani S wrote:

> Thanks David. Anyhow the relationship names should be given in the  
> entityModel.xml files.
> But I could not find those names in the xml file.
> Thanking in advance.
>
> Purani
>
>
> On Thu, 14 Sep 2006 David E Jones wrote :
>>
>> Those are relationship names. For more information I highly  
>> recommend  looking at the documentation on the ofbiz.org site,  
>> including the  Entity Engine Guide and the Framework Introduction  
>> videos. Even  better, achieve an extensive knowledge of the with  
>> the Advanced  Framework package from Undersun.
>>
>> http://www.undersunconsulting.com/ecommerce/control/product/ 
>> ~product_id=OFBADVFWKPKG
>>
>> -David
>>
>>
>> On Sep 14, 2006, at 5:06 AM, Purani S wrote:
>>
>>> Hi,
>>> The following lines are taken from "applications\product\webapp  
>>> \catalog\WEB-INF\actions\product\EditProductAssoc.bsh".
>>>
>>>
>>> if (product != null) {
>>>     assocFromProducts = product.getRelated("MainProductAssoc",  
>>> null, UtilMisc.toList("sequenceNum"));
>>>     context.put("assocFromProducts", assocFromProducts);
>>>
>>>     assocToProducts = product.getRelated("AssocProductAssoc");
>>>     context.put("assocToProducts", assocToProducts);
>>> }
>>>
>>>
>>> I don't understand where from the variables "MainProductAssoc"  
>>> and  "AssocProductAssoc". I searched for the entities in this  
>>> name. But  I could not find out.
>>>
>>> Could I please get some help regarding this.
>>>
>>> Thanks
>>> Purani
>>

Reply | Threaded
Open this post in threaded view
|

Re: Re: how to view product assoc

puranisank
In reply to this post by puranisank
  Thanks David. I understand it now.


Purani


On Fri, 15 Sep 2006 David E Jones wrote :

>
>Please don't take this personally, but this is the very reason you  need to check out the docs!
>
>A relationship name is the combination of the relationship title  (optional) and the related entity name (required). So no, searching  for the relationship name in the entity defs won't get you very far.
>
>-David
>
>
>On Sep 15, 2006, at 1:53 AM, Purani S wrote:
>
>>Thanks David. Anyhow the relationship names should be given in the  entityModel.xml files.
>>But I could not find those names in the xml file.
>>Thanking in advance.
>>
>>Purani
>>
>>
>>On Thu, 14 Sep 2006 David E Jones wrote :
>>>
>>>Those are relationship names. For more information I highly  recommend  looking at the documentation on the ofbiz.org site,  including the  Entity Engine Guide and the Framework Introduction  videos. Even  better, achieve an extensive knowledge of the with  the Advanced  Framework package from Undersun.
>>>
>>>http://www.undersunconsulting.com/ecommerce/control/product/  ~product_id=OFBADVFWKPKG
>>>
>>>-David
>>>
>>>
>>>On Sep 14, 2006, at 5:06 AM, Purani S wrote:
>>>
>>>>Hi,
>>>>The following lines are taken from "applications\product\webapp  \catalog\WEB-INF\actions\product\EditProductAssoc.bsh".
>>>>
>>>>
>>>>if (product != null) {
>>>>     assocFromProducts = product.getRelated("MainProductAssoc",   null, UtilMisc.toList("sequenceNum"));
>>>>     context.put("assocFromProducts", assocFromProducts);
>>>>
>>>>     assocToProducts = product.getRelated("AssocProductAssoc");
>>>>     context.put("assocToProducts", assocToProducts);
>>>>}
>>>>
>>>>
>>>>I don't understand where from the variables "MainProductAssoc"  and  "AssocProductAssoc". I searched for the entities in this  name. But  I could not find out.
>>>>
>>>>Could I please get some help regarding this.
>>>>
>>>>Thanks
>>>>Purani
>>>
>