You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Jonathon -- Improov <jo...@improov.com> on 2007/01/12 16:34:10 UTC

Suggested change to ProductFeatureServices.getVariantCombinations()

Currently, that function appends the ProductFeature idCode(s) immediately to the end of the 
Product ID. So, WG-9943 will have WG-9943B3 rather than WG-9943-B3.

Can I just add a '-' before the entire string of ProductFeature idCode(s)? Or should I do more 
work to store this prefix '-' in some entity linked to a Product?

I'd like to have this feature rolled into OFBiz. Thanks!

Jonathon

Re: Suggested change to ProductFeatureServices.getVariantCombinations()

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
On Jan 12, 2007, at 9:43 PM, Jonathon -- Improov wrote:

> David,
>
> True, no problem hardcoding it because it's just a suggested  
> default that can be manually overridden by the user. But it's not  
> trivial for those who need to automatically create HUNDREDS of  
> variants at once!
>
> And for other users who also need to create huge numbers of  
> variants at once, it'll be a pain to manually replace my separator  
> '-' with say '--'.

The "huge numbers" is what catches my attention here. Usually when  
huge numbers are involved custom requirements and patterns come along  
for the ride. In other words, we could guess all we want about the  
variations that people might want in the future for something like  
this, but unless we have a number of examples or existing  
requirements to design to we're not going to get a very good hit rate.

Which is why for something like this, hard coding is even more  
thrilling and sexy than a custom XML config file... ;)

-David


> David E. Jones wrote:
>> This isn't a universal policy or anything, but I'd say for  
>> something minor like this there isn't a problem with hard-coding it.
>> The whole point of the ID generation is to make the IDs unique. In  
>> the UI you can specify an ID instead of using the default, so it  
>> only matters so much.
>> -David


Re: Suggested change to ProductFeatureServices.getVariantCombinations()

Posted by Jonathon -- Improov <jo...@improov.com>.
David,

True, no problem hardcoding it because it's just a suggested default that can be manually 
overridden by the user. But it's not trivial for those who need to automatically create HUNDREDS 
of variants at once!

And for other users who also need to create huge numbers of variants at once, it'll be a pain to 
manually replace my separator '-' with say '--'.

Jonathon

David E. Jones wrote:
> 
> This isn't a universal policy or anything, but I'd say for something 
> minor like this there isn't a problem with hard-coding it.
> 
> The whole point of the ID generation is to make the IDs unique. In the 
> UI you can specify an ID instead of using the default, so it only 
> matters so much.
> 
> -David

Re: Suggested change to ProductFeatureServices.getVariantCombinations()

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
This isn't a universal policy or anything, but I'd say for something  
minor like this there isn't a problem with hard-coding it.

The whole point of the ID generation is to make the IDs unique. In  
the UI you can specify an ID instead of using the default, so it only  
matters so much.

-David


On Jan 12, 2007, at 7:17 PM, Jonathon -- Improov wrote:

> Jacques,
>
> Which is a good idea? Hardcoding separator '-', or putting it in  
> config folder like Scott said? And will OFBiz receive this  
> suggested change?
>
> Please let me know, because I'm implementing it now. If my boss  
> says he only ever needs '-', then changing  
> ProductFeatureServices.getVariantCombinations() is enough, I'm  
> done. But I'd like to do something that can be rolled into OFBiz.
>
> For now, I'm maintaining the '-' separator change in my private  
> branch of development, until OFBiz accepts the change. That's that,  
> I'm done. It's just a 1-second change, so if someone in charge of  
> commits can let me know "the right thing to do", I'll do it right  
> away just so OFBiz can take in my changes.
>
> At risk of "asking for it (more work) for myself", would anyone  
> want this separator to be specify-able on the QuickAddVariants page/ 
> form itself?
>
> Thanks!
>
> Jonathon
>
> Jacques Le Roux wrote:
>> Yes, sounds lilke a good idea indeed
>> Jacques
>> ----- Original Message ----- From: "Scott Gray" <le...@gmail.com>
>> To: <us...@ofbiz.apache.org>
>> Sent: Friday, January 12, 2007 8:22 PM
>> Subject: Re: Suggested change to  
>> ProductFeatureServices.getVariantCombinations()
>>> Hi Jonathan
>>>
>>> I have done the same thing, I would say if any objected it could  
>>> always be added to one of the property files.  Something like  
>>> product.variant.id.feature.separator=-
>>>
>>> Jonathon -- Improov wrote:
>>>> Currently, that function appends the ProductFeature idCode(s)  
>>>> immediately to the end of the Product ID. So, WG-9943 will have  
>>>> WG-9943B3 rather than WG-9943-B3.
>>>>
>>>> Can I just add a '-' before the entire string of ProductFeature  
>>>> idCode(s)? Or should I do more work to store this prefix '-' in  
>>>> some entity linked to a Product?
>>>>
>>>> I'd like to have this feature rolled into OFBiz. Thanks!
>>>>
>>>> Jonathon
>>>>
>


Re: Suggested change to ProductFeatureServices.getVariantCombinations()

Posted by Jonathon -- Improov <jo...@improov.com>.
Jacques,

Which is a good idea? Hardcoding separator '-', or putting it in config folder like Scott said? 
And will OFBiz receive this suggested change?

Please let me know, because I'm implementing it now. If my boss says he only ever needs '-', then 
changing ProductFeatureServices.getVariantCombinations() is enough, I'm done. But I'd like to do 
something that can be rolled into OFBiz.

For now, I'm maintaining the '-' separator change in my private branch of development, until OFBiz 
accepts the change. That's that, I'm done. It's just a 1-second change, so if someone in charge of 
commits can let me know "the right thing to do", I'll do it right away just so OFBiz can take in 
my changes.

At risk of "asking for it (more work) for myself", would anyone want this separator to be 
specify-able on the QuickAddVariants page/form itself?

Thanks!

Jonathon

Jacques Le Roux wrote:
> Yes, sounds lilke a good idea indeed
> 
> Jacques
> 
> ----- Original Message ----- 
> From: "Scott Gray" <le...@gmail.com>
> To: <us...@ofbiz.apache.org>
> Sent: Friday, January 12, 2007 8:22 PM
> Subject: Re: Suggested change to ProductFeatureServices.getVariantCombinations()
> 
> 
>> Hi Jonathan
>>
>> I have done the same thing, I would say if any objected it could always 
>> be added to one of the property files.  Something like 
>> product.variant.id.feature.separator=-
>>
>> Jonathon -- Improov wrote:
>>> Currently, that function appends the ProductFeature idCode(s) 
>>> immediately to the end of the Product ID. So, WG-9943 will have 
>>> WG-9943B3 rather than WG-9943-B3.
>>>
>>> Can I just add a '-' before the entire string of ProductFeature 
>>> idCode(s)? Or should I do more work to store this prefix '-' in some 
>>> entity linked to a Product?
>>>
>>> I'd like to have this feature rolled into OFBiz. Thanks!
>>>
>>> Jonathon
>>>
> 
> 


Re: Suggested change to ProductFeatureServices.getVariantCombinations()

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes, sounds lilke a good idea indeed

Jacques

----- Original Message ----- 
From: "Scott Gray" <le...@gmail.com>
To: <us...@ofbiz.apache.org>
Sent: Friday, January 12, 2007 8:22 PM
Subject: Re: Suggested change to ProductFeatureServices.getVariantCombinations()


> Hi Jonathan
> 
> I have done the same thing, I would say if any objected it could always 
> be added to one of the property files.  Something like 
> product.variant.id.feature.separator=-
> 
> Jonathon -- Improov wrote:
> > Currently, that function appends the ProductFeature idCode(s) 
> > immediately to the end of the Product ID. So, WG-9943 will have 
> > WG-9943B3 rather than WG-9943-B3.
> >
> > Can I just add a '-' before the entire string of ProductFeature 
> > idCode(s)? Or should I do more work to store this prefix '-' in some 
> > entity linked to a Product?
> >
> > I'd like to have this feature rolled into OFBiz. Thanks!
> >
> > Jonathon
> >

Re: Suggested change to ProductFeatureServices.getVariantCombinations()

Posted by Scott Gray <le...@gmail.com>.
Hi Jonathan

I have done the same thing, I would say if any objected it could always 
be added to one of the property files.  Something like 
product.variant.id.feature.separator=-

Jonathon -- Improov wrote:
> Currently, that function appends the ProductFeature idCode(s) 
> immediately to the end of the Product ID. So, WG-9943 will have 
> WG-9943B3 rather than WG-9943-B3.
>
> Can I just add a '-' before the entire string of ProductFeature 
> idCode(s)? Or should I do more work to store this prefix '-' in some 
> entity linked to a Product?
>
> I'd like to have this feature rolled into OFBiz. Thanks!
>
> Jonathon
>