mutiple virtual products share the same group of variants

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

mutiple virtual products share the same group of variants

Fred Forester-2

Hi All,

Im trying to setup mutiple virtual products and associate them to a
group of the same variants. when I try this scenario and add product1 to
the cart then click the item in the cart it displays product2. I assume
it has to do with the order of the Product associations.

is it currently possible to share variants in ofbiz? and if so how would
I set it up correctly.

Thanx.
Fred


Reply | Threaded
Open this post in threaded view
|

Re: mutiple virtual products share the same group of variants

Si Chen-2
It seems from your description that it was able to add the right  
product when you selected the features?  In that case, then you've  
set it correctly.  It's probably something about the showcart.ftl  
that's going back to the first virtual product found.  I think in the  
default ecommerce store usually only the virtual product is shown,  
and then with select boxes you get to a variant, so that's why.

How to fix it?  Not sure...  Once you're at the variant, it's like  
you're already at the bottom of a search tree.  You might need to set  
up some other thing for the ShoppingCartItem to remember where it  
came from unless somebody else has a better idea.

On Dec 1, 2006, at 9:29 AM, Fred Forester wrote:

>
> Hi All,
>
> Im trying to setup mutiple virtual products and associate them to a  
> group of the same variants. when I try this scenario and add  
> product1 to the cart then click the item in the cart it displays  
> product2. I assume it has to do with the order of the Product  
> associations.
>
> is it currently possible to share variants in ofbiz? and if so how  
> would I set it up correctly.
>
> Thanx.
> Fred
>

Best Regards,

Si
[hidden email]



Reply | Threaded
Open this post in threaded view
|

Re: mutiple virtual products share the same group of variants

Fred Forester-2

Si,

yes the correct variant is being added to the cart. Im also having the
same problem with getting surveys but I think I have that fixed.
I was thinking the same thing about setting something up in
ShoppingCartItem.

is it worth opening a jira for this?

Thanx
Fred



Si Chen wrote:

> It seems from your description that it was able to add the right  
> product when you selected the features?  In that case, then you've  set
> it correctly.  It's probably something about the showcart.ftl  that's
> going back to the first virtual product found.  I think in the  default
> ecommerce store usually only the virtual product is shown,  and then
> with select boxes you get to a variant, so that's why.
>
> How to fix it?  Not sure...  Once you're at the variant, it's like  
> you're already at the bottom of a search tree.  You might need to set  
> up some other thing for the ShoppingCartItem to remember where it  came
> from unless somebody else has a better idea.
>
> On Dec 1, 2006, at 9:29 AM, Fred Forester wrote:
>
>>
>> Hi All,
>>
>> Im trying to setup mutiple virtual products and associate them to a  
>> group of the same variants. when I try this scenario and add  product1
>> to the cart then click the item in the cart it displays  product2. I
>> assume it has to do with the order of the Product  associations.
>>
>> is it currently possible to share variants in ofbiz? and if so how  
>> would I set it up correctly.
>>
>> Thanx.
>> Fred
>>
>
> Best Regards,
>
> Si
> [hidden email]
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Add Parameter to request from Screen actions

Amit Shinde
Hello Everyone,
          Heres what I am trying to do. I pass a parameter from a URL which
calls a Screen. Now I want to add one more parameter with a different name
to the request in the actions section of the screen.

        Heres the address -

        http://localhost/xyz/control/additem/~category_id=0200/~add_product_id=DEMO
_PRODUCT_04/~quantity=1/

        I want to add product_id in the request but I cant add it in the above URL
else it would have looked like
http://localhost/xyz/control/additem/~category_id=0200/~add_product_id=DEMO_
PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04

        I tried this but it didnt work -
        <section>
            <actions>
                <set field="parameters.product_id"
from-field="parameters.add_product_id"/>
                ....
        </actions>
         <section>

        Is it possible to add product_id programmatically in the parameters map?

        Any inputs would be appreciated.

Thanks in advance,

Amit Shinde


Reply | Threaded
Open this post in threaded view
|

Re: mutiple virtual products share the same group of variants

Si Chen-2
In reply to this post by Fred Forester-2
Sure, open a JIRA issue.

On Dec 1, 2006, at 12:22 PM, Fred Forester wrote:

>
> Si,
>
> yes the correct variant is being added to the cart. Im also having  
> the same problem with getting surveys but I think I have that fixed.
> I was thinking the same thing about setting something up in  
> ShoppingCartItem.
>
> is it worth opening a jira for this?
>
> Thanx
> Fred
>
>
>
> Si Chen wrote:
>> It seems from your description that it was able to add the right  
>> product when you selected the features?  In that case, then  
>> you've  set it correctly.  It's probably something about the  
>> showcart.ftl  that's going back to the first virtual product  
>> found.  I think in the  default ecommerce store usually only the  
>> virtual product is shown,  and then with select boxes you get to a  
>> variant, so that's why.
>> How to fix it?  Not sure...  Once you're at the variant, it's  
>> like  you're already at the bottom of a search tree.  You might  
>> need to set  up some other thing for the ShoppingCartItem to  
>> remember where it  came from unless somebody else has a better idea.
>> On Dec 1, 2006, at 9:29 AM, Fred Forester wrote:
>>>
>>> Hi All,
>>>
>>> Im trying to setup mutiple virtual products and associate them to  
>>> a  group of the same variants. when I try this scenario and add  
>>> product1 to the cart then click the item in the cart it displays  
>>> product2. I assume it has to do with the order of the Product  
>>> associations.
>>>
>>> is it currently possible to share variants in ofbiz? and if so  
>>> how  would I set it up correctly.
>>>
>>> Thanx.
>>> Fred
>>>
>> Best Regards,
>> Si
>> [hidden email]

Best Regards,

Si
[hidden email]



Reply | Threaded
Open this post in threaded view
|

Re: Add Parameter to request from Screen actions

David E Jones-2
In reply to this post by Amit Shinde

I'm not sure what you're getting at here, but my guess is you are  
trying to output parameters into the input parameters Map. To get a  
parameter onto a link or other URL, it needs to be added wherever  
that URL is defined, like in the form def or ftl file, or whatever.

-David


On Dec 1, 2006, at 5:04 PM, Amit Shinde wrote:

> Hello Everyone,
>           Heres what I am trying to do. I pass a parameter from a  
> URL which
> calls a Screen. Now I want to add one more parameter with a  
> different name
> to the request in the actions section of the screen.
>
> Heres the address -
>
> http://localhost/xyz/control/additem/~category_id=0200/ 
> ~add_product_id=DEMO
> _PRODUCT_04/~quantity=1/
>
> I want to add product_id in the request but I cant add it in the  
> above URL
> else it would have looked like
> http://localhost/xyz/control/additem/~category_id=0200/ 
> ~add_product_id=DEMO_
> PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
>
> I tried this but it didnt work -
>         <section>
>             <actions>
> <set field="parameters.product_id"
> from-field="parameters.add_product_id"/>
> ....
> </actions>
>          <section>
>
> Is it possible to add product_id programmatically in the  
> parameters map?
>
> Any inputs would be appreciated.
>
> Thanks in advance,
>
> Amit Shinde
>
>

Reply | Threaded
Open this post in threaded view
|

RE: Add Parameter to request from Screen actions

Amit Shinde
David,
           Adding the parameter onto the link is definitely the best
solution. But I was wondering for my knowledge, if we could add that
parameter from the screen actions. That way I wouldnt have to go search
every ftl where this link is called.

        So is it possible to add more parameters to the requestparameters Map.

        Imagine that this is the link that is present in a ton of ftl pages -

        http://localhost/xyz/control/additem/~category_id=0200/~add_product_id=DEMO
_PRODUCT_04/~quantity=1/

        I could definitely go in every ftl file and add a parameter and link would
be -

        http://localhost/xyz/control/additem/~category_id=0200/~add_product_id=DEMO
_PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04

        You will notice that the new parameter 'product_id' has the same value as
'add_product_id'. The question is, is this the best way or can I do
something from Screen actions to add the parameter which would save me tons
of time. All I want to do is add 'product_id' to the input parameters Map
from the actions part.


Thanks a lot for your response,

Amit Shinde




-----Original Message-----
From: David E Jones [mailto:[hidden email]]
Sent: Saturday, December 02, 2006 7:32 AM
To: [hidden email]
Subject: Re: Add Parameter to request from Screen actions



I'm not sure what you're getting at here, but my guess is you are
trying to output parameters into the input parameters Map. To get a
parameter onto a link or other URL, it needs to be added wherever
that URL is defined, like in the form def or ftl file, or whatever.

-David


On Dec 1, 2006, at 5:04 PM, Amit Shinde wrote:

> Hello Everyone,
>           Heres what I am trying to do. I pass a parameter from a
> URL which
> calls a Screen. Now I want to add one more parameter with a
> different name
> to the request in the actions section of the screen.
>
> Heres the address -
>
> http://localhost/xyz/control/additem/~category_id=0200/
> ~add_product_id=DEMO
> _PRODUCT_04/~quantity=1/
>
> I want to add product_id in the request but I cant add it in the
> above URL
> else it would have looked like
> http://localhost/xyz/control/additem/~category_id=0200/
> ~add_product_id=DEMO_
> PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
>
> I tried this but it didnt work -
>         <section>
>             <actions>
> <set field="parameters.product_id"
> from-field="parameters.add_product_id"/>
> ....
> </actions>
>          <section>
>
> Is it possible to add product_id programmatically in the
> parameters map?
>
> Any inputs would be appreciated.
>
> Thanks in advance,
>
> Amit Shinde
>
>


Reply | Threaded
Open this post in threaded view
|

RE: Add Parameter to request from Screen actions

Amit Shinde
In reply to this post by David E Jones-2
David,
           Adding the parameter onto the link is definitely the best
solution. But I was wondering for my knowledge, if we could add that
parameter from the screen actions. That way I wouldnt have to go search
every ftl where this link is called.

        So is it possible to add more parameters to the requestparameters Map.

        Imagine that this is the link that is present in a ton of ftl pages -

        http://localhost/xyz/control/additem/~category_id=0200/~add_product_id=DEMO
_PRODUCT_04/~quantity=1/

        I could definitely go in every ftl file and add a parameter and link would
be -

        http://localhost/xyz/control/additem/~category_id=0200/~add_product_id=DEMO
_PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04

        You will notice that the new parameter 'product_id' has the same value as
'add_product_id'. The question is, is this the best way or can I do
something from Screen actions to add the parameter which would save me tons
of time. All I want to do is add 'product_id' to the input parameters Map
from the actions part.


Thanks a lot for your response,

Amit Shinde




-----Original Message-----
From: David E Jones [mailto:[hidden email]]
Sent: Saturday, December 02, 2006 7:32 AM
To: [hidden email]
Subject: Re: Add Parameter to request from Screen actions



I'm not sure what you're getting at here, but my guess is you are
trying to output parameters into the input parameters Map. To get a
parameter onto a link or other URL, it needs to be added wherever
that URL is defined, like in the form def or ftl file, or whatever.

-David


On Dec 1, 2006, at 5:04 PM, Amit Shinde wrote:

> Hello Everyone,
>           Heres what I am trying to do. I pass a parameter from a
> URL which
> calls a Screen. Now I want to add one more parameter with a
> different name
> to the request in the actions section of the screen.
>
> Heres the address -
>
> http://localhost/xyz/control/additem/~category_id=0200/
> ~add_product_id=DEMO
> _PRODUCT_04/~quantity=1/
>
> I want to add product_id in the request but I cant add it in the
> above URL
> else it would have looked like
> http://localhost/xyz/control/additem/~category_id=0200/
> ~add_product_id=DEMO_
> PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
>
> I tried this but it didnt work -
>         <section>
>             <actions>
> <set field="parameters.product_id"
> from-field="parameters.add_product_id"/>
> ....
> </actions>
>          <section>
>
> Is it possible to add product_id programmatically in the
> parameters map?
>
> Any inputs would be appreciated.
>
> Thanks in advance,
>
> Amit Shinde
>
>


Reply | Threaded
Open this post in threaded view
|

RE: Add Parameter to request from Screen actions

cjhowe
I believe your issue is with the lack of a
setParameter(String name, String value) method in
Java's ServletRequest Class (and by extension
HttpServletRequest sub interface).  
If you wish to change a user's request by appending,
deleting or changing information, you must read the
the parameter map into an attribute map (or additional
map of your choosing) and then only use the
information from the attribute map for any "work" that
needs to be done.  Otherwise, you must setup the
request paramter map by changing the request in each
ftl (or screen definition, etc).

Ref:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4255707


--- Amit Shinde <[hidden email]> wrote:

> David,
>            Adding the parameter onto the link is
> definitely the best
> solution. But I was wondering for my knowledge, if
> we could add that
> parameter from the screen actions. That way I
> wouldnt have to go search
> every ftl where this link is called.
>
> So is it possible to add more parameters to the
> requestparameters Map.
>
> Imagine that this is the link that is present in a
> ton of ftl pages -
>
>
>
http://localhost/xyz/control/additem/~category_id=0200/~add_product_id=DEMO
> _PRODUCT_04/~quantity=1/
>
> I could definitely go in every ftl file and add a
> parameter and link would
> be -
>
>
>
http://localhost/xyz/control/additem/~category_id=0200/~add_product_id=DEMO

> _PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
>
> You will notice that the new parameter 'product_id'
> has the same value as
> 'add_product_id'. The question is, is this the best
> way or can I do
> something from Screen actions to add the parameter
> which would save me tons
> of time. All I want to do is add 'product_id' to the
> input parameters Map
> from the actions part.
>
>
> Thanks a lot for your response,
>
> Amit Shinde
>
>
>
>
> -----Original Message-----
> From: David E Jones
> [mailto:[hidden email]]
> Sent: Saturday, December 02, 2006 7:32 AM
> To: [hidden email]
> Subject: Re: Add Parameter to request from Screen
> actions
>
>
>
> I'm not sure what you're getting at here, but my
> guess is you are
> trying to output parameters into the input
> parameters Map. To get a
> parameter onto a link or other URL, it needs to be
> added wherever
> that URL is defined, like in the form def or ftl
> file, or whatever.
>
> -David
>
>
> On Dec 1, 2006, at 5:04 PM, Amit Shinde wrote:
>
> > Hello Everyone,
> >           Heres what I am trying to do. I pass a
> parameter from a
> > URL which
> > calls a Screen. Now I want to add one more
> parameter with a
> > different name
> > to the request in the actions section of the
> screen.
> >
> > Heres the address -
> >
> >
>
http://localhost/xyz/control/additem/~category_id=0200/
> > ~add_product_id=DEMO
> > _PRODUCT_04/~quantity=1/
> >
> > I want to add product_id in the request but I
> cant add it in the
> > above URL
> > else it would have looked like
> >
>
http://localhost/xyz/control/additem/~category_id=0200/

> > ~add_product_id=DEMO_
> > PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
> >
> > I tried this but it didnt work -
> >         <section>
> >             <actions>
> > <set field="parameters.product_id"
> > from-field="parameters.add_product_id"/>
> > ....
> > </actions>
> >          <section>
> >
> > Is it possible to add product_id programmatically
> in the
> > parameters map?
> >
> > Any inputs would be appreciated.
> >
> > Thanks in advance,
> >
> > Amit Shinde
> >
> >
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Add Parameter to request from Screen actions

David E Jones-2
In reply to this post by Amit Shinde

If I understand right you are trying to add a parameter to an  
outgoing link, or the HTML in the file being sent to the client. This  
has absolutely nothing to do with incoming parameters or attributes,  
which is what the parameters Map represents.

It would certainly be possible to implement something like this, but  
would you really want to add a parameter to ALL links on a page?

-David


On Dec 3, 2006, at 9:46 PM, Amit Shinde wrote:

> David,
>            Adding the parameter onto the link is definitely the best
> solution. But I was wondering for my knowledge, if we could add that
> parameter from the screen actions. That way I wouldnt have to go  
> search
> every ftl where this link is called.
>
> So is it possible to add more parameters to the requestparameters  
> Map.
>
> Imagine that this is the link that is present in a ton of ftl pages -
>
> http://localhost/xyz/control/additem/~category_id=0200/ 
> ~add_product_id=DEMO
> _PRODUCT_04/~quantity=1/
>
> I could definitely go in every ftl file and add a parameter and  
> link would
> be -
>
> http://localhost/xyz/control/additem/~category_id=0200/ 
> ~add_product_id=DEMO
> _PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
>
> You will notice that the new parameter 'product_id' has the same  
> value as
> 'add_product_id'. The question is, is this the best way or can I do
> something from Screen actions to add the parameter which would save  
> me tons
> of time. All I want to do is add 'product_id' to the input  
> parameters Map
> from the actions part.
>
>
> Thanks a lot for your response,
>
> Amit Shinde
>
>
>
>
> -----Original Message-----
> From: David E Jones [mailto:[hidden email]]
> Sent: Saturday, December 02, 2006 7:32 AM
> To: [hidden email]
> Subject: Re: Add Parameter to request from Screen actions
>
>
>
> I'm not sure what you're getting at here, but my guess is you are
> trying to output parameters into the input parameters Map. To get a
> parameter onto a link or other URL, it needs to be added wherever
> that URL is defined, like in the form def or ftl file, or whatever.
>
> -David
>
>
> On Dec 1, 2006, at 5:04 PM, Amit Shinde wrote:
>
>> Hello Everyone,
>>           Heres what I am trying to do. I pass a parameter from a
>> URL which
>> calls a Screen. Now I want to add one more parameter with a
>> different name
>> to the request in the actions section of the screen.
>>
>> Heres the address -
>>
>> http://localhost/xyz/control/additem/~category_id=0200/
>> ~add_product_id=DEMO
>> _PRODUCT_04/~quantity=1/
>>
>> I want to add product_id in the request but I cant add it in the
>> above URL
>> else it would have looked like
>> http://localhost/xyz/control/additem/~category_id=0200/
>> ~add_product_id=DEMO_
>> PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
>>
>> I tried this but it didnt work -
>>         <section>
>>             <actions>
>> <set field="parameters.product_id"
>> from-field="parameters.add_product_id"/>
>> ....
>> </actions>
>>          <section>
>>
>> Is it possible to add product_id programmatically in the
>> parameters map?
>>
>> Any inputs would be appreciated.
>>
>> Thanks in advance,
>>
>> Amit Shinde
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Add Parameter to request from Screen actions

oceatoon
Hi Amit

you can retreive your request parameters in the action section of your
SCreen Widget like this : parameters.add_product_id. you can set it on
another variable to reuse in your ftl if you like

Tibor


On 12/4/06, David E Jones <[hidden email]> wrote:

>
>
> If I understand right you are trying to add a parameter to an
> outgoing link, or the HTML in the file being sent to the client. This
> has absolutely nothing to do with incoming parameters or attributes,
> which is what the parameters Map represents.
>
> It would certainly be possible to implement something like this, but
> would you really want to add a parameter to ALL links on a page?
>
> -David
>
>
> On Dec 3, 2006, at 9:46 PM, Amit Shinde wrote:
>
> > David,
> >            Adding the parameter onto the link is definitely the best
> > solution. But I was wondering for my knowledge, if we could add that
> > parameter from the screen actions. That way I wouldnt have to go
> > search
> > every ftl where this link is called.
> >
> >       So is it possible to add more parameters to the requestparameters
> > Map.
> >
> >       Imagine that this is the link that is present in a ton of ftl
> pages -
> >
> >       http://localhost/xyz/control/additem/~category_id=0200/
> > ~add_product_id=DEMO
> > _PRODUCT_04/~quantity=1/
> >
> >       I could definitely go in every ftl file and add a parameter and
> > link would
> > be -
> >
> >       http://localhost/xyz/control/additem/~category_id=0200/
> > ~add_product_id=DEMO
> > _PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
> >
> >       You will notice that the new parameter 'product_id' has the same
> > value as
> > 'add_product_id'. The question is, is this the best way or can I do
> > something from Screen actions to add the parameter which would save
> > me tons
> > of time. All I want to do is add 'product_id' to the input
> > parameters Map
> > from the actions part.
> >
> >
> > Thanks a lot for your response,
> >
> > Amit Shinde
> >
> >
> >
> >
> > -----Original Message-----
> > From: David E Jones [mailto:[hidden email]]
> > Sent: Saturday, December 02, 2006 7:32 AM
> > To: [hidden email]
> > Subject: Re: Add Parameter to request from Screen actions
> >
> >
> >
> > I'm not sure what you're getting at here, but my guess is you are
> > trying to output parameters into the input parameters Map. To get a
> > parameter onto a link or other URL, it needs to be added wherever
> > that URL is defined, like in the form def or ftl file, or whatever.
> >
> > -David
> >
> >
> > On Dec 1, 2006, at 5:04 PM, Amit Shinde wrote:
> >
> >> Hello Everyone,
> >>           Heres what I am trying to do. I pass a parameter from a
> >> URL which
> >> calls a Screen. Now I want to add one more parameter with a
> >> different name
> >> to the request in the actions section of the screen.
> >>
> >>      Heres the address -
> >>
> >>      http://localhost/xyz/control/additem/~category_id=0200/
> >> ~add_product_id=DEMO
> >> _PRODUCT_04/~quantity=1/
> >>
> >>      I want to add product_id in the request but I cant add it in the
> >> above URL
> >> else it would have looked like
> >> http://localhost/xyz/control/additem/~category_id=0200/
> >> ~add_product_id=DEMO_
> >> PRODUCT_04/~quantity=1/~product_id=DEMO_PRODUCT_04
> >>
> >>      I tried this but it didnt work -
> >>         <section>
> >>             <actions>
> >>              <set field="parameters.product_id"
> >> from-field="parameters.add_product_id"/>
> >>              ....
> >>      </actions>
> >>          <section>
> >>
> >>      Is it possible to add product_id programmatically in the
> >> parameters map?
> >>
> >>      Any inputs would be appreciated.
> >>
> >> Thanks in advance,
> >>
> >> Amit Shinde
> >>
> >>
> >
> >
>
>